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

    Click image for larger version. 

Name:	colours.png 
Views:	137 
Size:	1.61 MB 
ID:	64327

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

    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:
    Click image for larger version. 

Name:	trial.png 
Views:	83 
Size:	3.9 KB 
ID:	64348

    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: 772
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: 1008
Size:  13.6 KB
    Last edited by tolcreator; 05-22-2014 at 09:29 PM.

  5. #5

    Default

    Some much cleaner images...

    Flat grid:
    Click image for larger version. 

Name:	supergrid_flat.png 
Views:	216 
Size:	228.9 KB 
ID:	64373

    On a sphere:
    Click image for larger version. 

Name:	supergrid_sphere.png 
Views:	104 
Size:	223.8 KB 
ID:	64374

    With colours!
    Click image for larger version. 

Name:	colour_sphere.png 
Views:	102 
Size:	333.8 KB 
ID:	64375

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