PDA

View Full Version : Equirectangular Projection

tolcreator
05-22-2014, 11:06 AM
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...

64327

waldronate
05-22-2014, 03:47 PM
Lazier folks would probably just go with a cube ( Inner Planes - Greywiki (http://www.canonfire.com/wiki/index.php?title=Inner_Planes) or Quadrilateralized spherical cube - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Quadrilateralized_spherical_cube) ). I have to admire this kind of thinking.

tolcreator
05-22-2014, 08:45 PM
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

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

tolcreator
05-22-2014, 09:26 PM
And it looks like it worked! Here's the (very raw) output from the program:
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:
64349

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

And from another angle:
64351

tolcreator
05-23-2014, 10:51 PM
Some much cleaner images...

Flat grid:
64373

On a sphere:
64374

With colours!
64375

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

vorropohaiah
05-24-2014, 01:01 AM
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