Equirectangular projection (source wikipedia) |
area = 2*Pi*integral sin(theta) d_theta = 2*Pi*(cos(theta_1) - cos(theta_2))
In Cartesian coordinates this is just:
area = 2*Pi*(z_1 - z_2)
So we can just project the sphere points in the xy plane onto the unit radius cylinder and unwrap it! If we have such an image with texture coordinates (u,v) in [0,1]^2, then
phi = 2*Pi*u
cos(theta) = 2*v -1
and the inverse:
u = phi / (2*Pi)
v = (1 + cos(theta)) / 2
So yes this projection has singularities at the poles, but it's pretty nice algebraically!
This is what we use for panos at Google. Seems wasteful vs an equal area projection like Lambert, which is over 50 percent shorter, so more distortion vertically... Would be interesting to store this as interrupted sinusoidal equal-area projection but be able to do the indexing this easily.
ReplyDelete