Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to map a sphere to a cube in order to create a panoramic tour like the one given here

But I don't know how can you obtain images like enter image description here

This image is one of the cube's faces.

What I tried was to take the view ray, and determine the intersection between the viewray that passes trough a point on the sphere and the face of the cube that in inscribed into the sphere. But the result I get looks like

enter image description here

Please do not take into account that the second image is in mirror.

share|cite|improve this question
The second picture features the bed's headrest; the first picture doesn't. You should know that mappings won't make features like that that weren't originally there show up. :) – J. M. Nov 30 '11 at 1:26
I edited the question alot, and uploaded other images so I hope I can get more answers. Please take a look again – Ryan Nov 30 '11 at 1:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.