After the last post, I got to thinking about how to come up with a mapping from the cube
to the points in the unit sphere. In the last post I used the mapping
Taking the length of the new point gives
So you can see that if x or y are either -1 or +1, this yeilds a vector with unit length. So, beginning with this, I decided that I'd work backward from the guess that if I had a mapping from the cube to the unit sphere, the length of a generated point would need to be
Which leads to the mapping
Trying this out yields some pretty nice results. This is the cube and its mapping onto the unit sphere. The thick lines are lines where at least two of the components are -1 or +1.
And here's another view from inside the sphere
Sorry this post is a little light on justification. I might try to explain this by looking at the level curves defined by constant x, y and z, but I'll save that for another day (maybe).
Wednesday, July 06, 2005
Mapping a Cube to a Sphere
Posted by Phil at 3:05 AM
Subscribe to:
Post Comments (Atom)

4 Comments:
very interesting
... :)
wow, didn't sphere mapping could be done that way. Sw33t!!!!
Nice, but an inverse transform would be nice. How do you take coordinates on the sphere and transform them to coordinates on the cube?
I've been working on it for a few minutes, but the algebra gets a little messy ;)
That is very elegant - I like it!
Post a Comment