Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Map a cube to a sphere

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Intern Contributor
    Join Date
    Jun 2011

    Unhappy 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:

    1. Denote the area of each square on the cube as: A
    2. 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
    3. 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 07:46 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