Map a cube to a sphere
I have a regular cube of edge length = 2, and a sphere of radius = 1. Each face of the cube has been divided into N*N equal-area squares. How can I compute the projected area of every square on the sphere, so that the area of all the projections sum up to 4*pi.
I came to the following solution but the result does not sum to 4*pi:
- Denote the area of each square on the cube as: A
- Denote the length of the line segment connecting the center of the cube with the center of a square on the cube face as: R
- Then I compute the cosine of the angle between the above line segment with a face normal (ex. if the square lies in +X face, then the angle is between the line segment and the normal of face +X).
so that the projection of the area from the square to the sphere can be computed as:
A * cosine(angle) / R^2
However, the above solution does not sum to 4*pi
For some reason, I can only divide each cube face into a limited number of squares, say 15*15.
Last edited by shapeare; 06-24-2013 at 08:46 AM.