[Date Index]
[Thread Index]
[Author Index]
Re: How to rotate a PolarPlot?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg58008] Re: [mg57982] How to rotate a PolarPlot?
*From*: Selwyn Hollis <sh2.7183 at earthlink.net>
*Date*: Thu, 16 Jun 2005 05:36:18 -0400 (EDT)
*References*: <200506150958.FAA29769@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
On Jun 15, 2005, at 5:58 AM, paul at selfreferral.com wrote:
> Hi All,
>
> Would appreciate some help with this. I would like to know how I can
> rotate the following plot to an arbitrary angle:
>
> PolarPlot[Exp[.2t], {t, 0, 8p}, PlotStyle -> Red,
> PlotRange -> All, AspectRatio -> Automatic, Ticks -> None]
>
> Thanks
> Paul
>
Paul,
First define the rotation matrix, corresponding to ccw rotations
through Euler angles psi, phi, theta around the z, x, and z axes,
respectively:
rot[psi_, phi_, theta_] =
{{Cos[theta], -Sin[theta], 0}, {Sin[theta], Cos[theta], 0}, {0,
0, 1}}.
{{1, 0, 0}, {0, Cos[phi], -Sin[phi]}, {0, Sin[phi], Cos[phi]}}.
{{Cos[psi], -Sin[psi], 0}, {Sin[psi], Cos[psi], 0}, {0, 0, 1}}
Now define
show3DRot[plot2D_, {psi_, phi_, theta_}, opts___] :=
Show[ Graphics3D[ First[ plot2D /.
{{x_Real, y_Real} -> rot[theta, phi, psi].{x, y,
0}} ] ], opts]
Then, for example,
grf = PolarPlot[Exp[.2t], {t, 0, 8Pi}, PlotStyle -> Red]
show3DRot[ grf, {Pi/2, Pi/3, Pi/4}, PlotRange -> All]
----------------
Selwyn Hollis
http://www.appliedsymbols.com
Prev by Date:
**Re: Text Manipulation**
Next by Date:
** Re: For Loop and Array related**
Previous by thread:
**Re: How to rotate a PolarPlot?**
Next by thread:
** Re: How to rotate a PolarPlot?**
| |