Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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|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.