ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 22 Jul 2011 09:48:21 +0200transforming 2D plots to the surface of a spherehttps://ask.sagemath.org/question/8174/transforming-2d-plots-to-the-surface-of-a-sphere/Hi there Sagers:
I'm trying to use a cartographic projection $f:\mathbb{R}^2\to S^2\subset\mathbb{R}^3$ to map Sage 2D graphics objects onto the sphere $S^2$. Projecting points is easy, but how can i project polygons or function plots? Do i somehow grab the graphics object points and use point3d and $f$?
Thanks for your attention.
Alex Thu, 21 Jul 2011 00:48:57 +0200https://ask.sagemath.org/question/8174/transforming-2d-plots-to-the-surface-of-a-sphere/Answer by niles for <p>Hi there Sagers:</p>
<p>I'm trying to use a cartographic projection $f:\mathbb{R}^2\to S^2\subset\mathbb{R}^3$ to map Sage 2D graphics objects onto the sphere $S^2$. Projecting points is easy, but how can i project polygons or function plots? Do i somehow grab the graphics object points and use point3d and $f$?</p>
<p>Thanks for your attention.
Alex </p>
https://ask.sagemath.org/question/8174/transforming-2d-plots-to-the-surface-of-a-sphere/?answer=12532#post-id-12532I don't think there's a way to do this just from the 2D graphics objects. Probably the most straightforward resolution would be to modify the way you're producing the 2D objects, to have them output 3D coordinates directly.
There has been some related work implementing [Cylindrical][1] and [Spherical][2] coordinates for 3D function plots, which might give you some other ideas too (although they were a little counterintuitive to me at first).
[1]: http://www.sagemath.org/doc/reference/sage/plot/plot3d/plot3d.html#sage.plot.plot3d.plot3d.Cylindrical
[2]: http://www.sagemath.org/doc/reference/sage/plot/plot3d/plot3d.html#sage.plot.plot3d.plot3d.SphericalFri, 22 Jul 2011 09:48:21 +0200https://ask.sagemath.org/question/8174/transforming-2d-plots-to-the-surface-of-a-sphere/?answer=12532#post-id-12532