Results 1 to 6 of 6
Like Tree4Likes
  • 1 Post By tolcreator
  • 1 Post By tolcreator
  • 2 Post By tolcreator

Thread: Equirectangular Projection

  1. #1
      tolcreator is offline
    Guild Novice
    Join Date
    Jun 2009
    Posts
    11

    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...

    Equirectangular Projection-colours.png

  2. #2
      waldronate is offline
    Software Dev/Rep Gracious Donor waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    1,614

    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
      tolcreator is offline
    Guild Novice
    Join Date
    Jun 2009
    Posts
    11

    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...
    vorropohaiah likes this.

  4. #4
      tolcreator is offline
    Guild Novice
    Join Date
    Jun 2009
    Posts
    11

    Default

    And it looks like it worked! Here's the (very raw) output from the program:
    Equirectangular Projection-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:
    Name:  sphere.png
Views: 140
Size:  15.6 KB

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

    And from another angle:
    Name:  sphere2.png
Views: 136
Size:  13.6 KB
    Last edited by tolcreator; 05-22-2014 at 09:29 PM.
    vorropohaiah likes this.

  5. #5
      tolcreator is offline
    Guild Novice
    Join Date
    Jun 2009
    Posts
    11

    Default

    Some much cleaner images...

    Flat grid:
    Equirectangular Projection-supergrid_flat.png

    On a sphere:
    Equirectangular Projection-supergrid_sphere.png

    With colours!
    Equirectangular Projection-colour_sphere.png

    Next step is to start drawing an actual map...
    vorropohaiah and jbgibson like this.

  6. #6
    Guild Artisan Gracious Donor
    Facebook Connected
    vorropohaiah's Avatar
    Join Date
    Feb 2010
    Location
    35.921568 N,14.480068 E
    Posts
    922

    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 03: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
  •