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, 06 Apr 2012 17:44:26 +0200How to orthogonaly project a 3d plot to coordinate planes?https://ask.sagemath.org/question/8863/how-to-orthogonaly-project-a-3d-plot-to-coordinate-planes/Hi, I created a 3d plot with
parametric_plot3d( (cos(t)^3, sin(t)^3, cos(2*t)), (t, 0, 2*pi))
I looked over at google for some projection() functions but I didn't find much.
Basically what I need to do is orthogonally project that plot onto coordinate planes (x, y, z).
If anyone has any idea or an approximate algorithm, that would be nice.
Edit: is it possible that this is an orthogonal projection to coordinate planes? I'm showing 3 plots, first has z = 0, second has x = 0 and third has y = 0.
show( parametric_plot3d((cos(t)^3, sin(t)^3, 0), (t, 0, 2*pi)) + parametric_plot3d( (0, sin(t)^3, cos(2*t)), (t, 0, 2*pi)) + parametric_plot3d( (cos(t)^3, 0, cos(2*t)), (t, 0, 2*pi)));
Fri, 06 Apr 2012 12:54:47 +0200https://ask.sagemath.org/question/8863/how-to-orthogonaly-project-a-3d-plot-to-coordinate-planes/Comment by niles for <p>Hi, I created a 3d plot with</p>
<pre><code>parametric_plot3d( (cos(t)^3, sin(t)^3, cos(2*t)), (t, 0, 2*pi))
</code></pre>
<p>I looked over at google for some projection() functions but I didn't find much.</p>
<p>Basically what I need to do is orthogonally project that plot onto coordinate planes (x, y, z).</p>
<p>If anyone has any idea or an approximate algorithm, that would be nice.</p>
<p>Edit: is it possible that this is an orthogonal projection to coordinate planes? I'm showing 3 plots, first has z = 0, second has x = 0 and third has y = 0.</p>
<pre><code>show( parametric_plot3d((cos(t)^3, sin(t)^3, 0), (t, 0, 2*pi)) + parametric_plot3d( (0, sin(t)^3, cos(2*t)), (t, 0, 2*pi)) + parametric_plot3d( (cos(t)^3, 0, cos(2*t)), (t, 0, 2*pi)));
</code></pre>
https://ask.sagemath.org/question/8863/how-to-orthogonaly-project-a-3d-plot-to-coordinate-planes/?comment=19969#post-id-19969yep, looks like you got it :)Fri, 06 Apr 2012 17:44:26 +0200https://ask.sagemath.org/question/8863/how-to-orthogonaly-project-a-3d-plot-to-coordinate-planes/?comment=19969#post-id-19969Answer by kcrisman for <p>Hi, I created a 3d plot with</p>
<pre><code>parametric_plot3d( (cos(t)^3, sin(t)^3, cos(2*t)), (t, 0, 2*pi))
</code></pre>
<p>I looked over at google for some projection() functions but I didn't find much.</p>
<p>Basically what I need to do is orthogonally project that plot onto coordinate planes (x, y, z).</p>
<p>If anyone has any idea or an approximate algorithm, that would be nice.</p>
<p>Edit: is it possible that this is an orthogonal projection to coordinate planes? I'm showing 3 plots, first has z = 0, second has x = 0 and third has y = 0.</p>
<pre><code>show( parametric_plot3d((cos(t)^3, sin(t)^3, 0), (t, 0, 2*pi)) + parametric_plot3d( (0, sin(t)^3, cos(2*t)), (t, 0, 2*pi)) + parametric_plot3d( (cos(t)^3, 0, cos(2*t)), (t, 0, 2*pi)));
</code></pre>
https://ask.sagemath.org/question/8863/how-to-orthogonaly-project-a-3d-plot-to-coordinate-planes/?answer=13431#post-id-13431Is this what you mean? We can just "slice" the vector here to get the coordinate pieces.
sage: var('t')
t
sage: V = vector((cos(t)^3, sin(t)^3, cos(2*t)))
sage: parametric_plot3d(V,(t,0,2*pi))
sage: parametric_plot(V[:2],(t,0,2*pi))
sage: parametric_plot(V[1:],(t,0,2*pi))
sage: parametric_plot(vector((V[0],V[2])),(t,0,2*pi))
Naturally, orthogonal projection to some *random* plane would be more involved (though basically you could use the [vector projection](http://en.wikipedia.org/wiki/Vector_projection), I guess), but maybe you don't need that much firepower.
Fri, 06 Apr 2012 13:23:29 +0200https://ask.sagemath.org/question/8863/how-to-orthogonaly-project-a-3d-plot-to-coordinate-planes/?answer=13431#post-id-13431