ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 24 Mar 2012 15:09:02 -0500Viewing Stereographic Projection of an Imagehttps://ask.sagemath.org/question/8824/viewing-stereographic-projection-of-an-image/I'm trying to write a program that takes an image and projects it onto a sphere that I can then view using 3dplot. I'm using pylab to read the image, numpy to put it into an array and then a stereographic projection to actually project it onto a sphere. I'm fairly certain the program is working correctly.
The problem I have is that 3dplot is not letting me view an image. The plot doesn't load. I tried the tachyon viewer, and I could get an image of my picture on a sphere, but I would prefer if I had the ability to rotate the sphere that 3dplot provides. Is there a better way to accomplish what I'm trying other than using pylab? I don't know much about other python imaging systems.
Sat, 24 Mar 2012 12:15:43 -0500https://ask.sagemath.org/question/8824/viewing-stereographic-projection-of-an-image/Answer by Jason Grout for <p>I'm trying to write a program that takes an image and projects it onto a sphere that I can then view using 3dplot. I'm using pylab to read the image, numpy to put it into an array and then a stereographic projection to actually project it onto a sphere. I'm fairly certain the program is working correctly. </p>
<p>The problem I have is that 3dplot is not letting me view an image. The plot doesn't load. I tried the tachyon viewer, and I could get an image of my picture on a sphere, but I would prefer if I had the ability to rotate the sphere that 3dplot provides. Is there a better way to accomplish what I'm trying other than using pylab? I don't know much about other python imaging systems.</p>
https://ask.sagemath.org/question/8824/viewing-stereographic-projection-of-an-image/?answer=13390#post-id-13390I don't think there is an easy way to get the current plot3d/jmol wrapper to display an image texture. I'm curious how you got it on the tachyon image. Did you use the plot3d command, or did you write your own tachyon file?
You might be interested in writing a bit of code to do a javascript webgl sphere. See http://stackoverflow.com/questions/6911815/how-do-i-use-texture-on-a-sphere-in-three-js and http://sagenb.org/home/pub/4176/ (for a demo of how to use it in Sage).Sat, 24 Mar 2012 15:09:02 -0500https://ask.sagemath.org/question/8824/viewing-stereographic-projection-of-an-image/?answer=13390#post-id-13390