Results 1 to 6 of 6

Thread: Equirectangular Projection

  1. #1

    Default Equirectangular Projection

    Here's what I want to draw:

    Take a globe.
    Draw 3 circles on it:
    1) The equator
    2) The 0/180 lines of longitude (i.e. a circle from north pole, to a point on the equator, to the south pole, to the antipode of that point, back to north).
    3) The 90/270 lines of longitude

    This gives you 6 points where these lines intersect, call them points A, B, C, D, E, and F.
    A is the north pole.
    B is the intersection of 0 longitude and the equator
    C is the intersection of 90 longitude and the equator.
    D is the antipode of A (i.e. the south pole)
    E is the antipode of B (i.e. intersection of 180 and equator)
    F is the antipode of C (i.e. intersection of 270 and equator).

    Now: I want to draw concentric circles, centered on each of these 6 points. And I want to unfold that sphere into a nice equirectangular projection. This is to form a grid. Each of those points is the "pole" of an element on my world, and the concentric circles show the decreasing influence of that element as you get further from the pole.

    I've attached what I have at the moment (lets see if that works...), a region centered on the "earth" pole (which is on the equator. North is ice, south is fire, west is water, east is air). While the grid for ice and fire is correct here (they are straight lines of lattitude), the circles for earth, water, and air are just plain circles. It's ok (ish) near those poles, but as you get further from them they get increasingly incorrect... at the center, the limits of air and water, say, should be straight vertical lines, and not circles at a tangent.

    Does any one know of a tool that can do what I want? I guess at a pinch I could try working out the maths and write something in python to do it...

    colours.png

  2. #2
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,610

    Default

    Lazier folks would probably just go with a cube ( Inner Planes - Greywiki or Quadrilateralized spherical cube - Wikipedia, the free encyclopedia ). I have to admire this kind of thinking.

  3. #3

    Default

    I've got what I *think* is the formula for my circles:

    y = acos((cos(R) - (sin(P) * sin(x)) )/ (cos(P) * cos(x))) + T

    P = latitude of center
    T = longitude of center
    R = radius of circle

    This turned out to be *way* harder than I thought when I started out on this, and this is the result of googling rather than deriving it myself... I couldn't really follow the maths. But plugging that into a program and spitting out results, if I limit x from 0 to R, gives numbers that look sort of right (circle-like when R is small, square-like when R is large). I'll try plotting graphs at some point...

  4. #4

    Default

    And it looks like it worked! Here's the (very raw) output from the program:
    trial.png

    Actually that's cleaned up a fair bit, the program only gave 1/8th of a circle, but it's symmetrical. Using that as the skin of a sphere I get:
    sphere.png

    Which looks good enough... I need to refine that program to give much finer lines and a much bigger image.

    And from another angle:
    sphere2.png
    Last edited by tolcreator; 05-22-2014 at 10:29 PM.

  5. #5

    Default

    Some much cleaner images...

    Flat grid:
    supergrid_flat.png

    On a sphere:
    supergrid_sphere.png

    With colours!
    colour_sphere.png

    Next step is to start drawing an actual map...

  6. #6
    Guild Expert Facebook Connected vorropohaiah's Avatar
    Join Date
    Feb 2010
    Location
    Malta
    Posts
    1,425

    Default

    great stuff - youre a better man than i to figure this out and implement it. it should really aid the creation of the equirectangular map, having that grid to work with.

    PS: if it's ok with you i might steal that clear grid :p
    Last edited by vorropohaiah; 05-24-2014 at 04:17 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •