Re: Animation of a rotating object. (Mathematica 6)
- To: mathgroup at smc.vnet.net
- Subject: [mg80775] Re: Animation of a rotating object. (Mathematica 6)
- From: Roger Bagula <rlbagula at sbcglobal.net>
- Date: Sat, 1 Sep 2007 00:30:44 -0400 (EDT)
This transform works in version 5:
Clear[x1, y1, x, y]
x1[t_] = x Cos[t] - y Sin[t]
y1[t_] = y Cos[t] + x Sin[t]
Table[Plot3D[Sin[x1[t]* y1[t]], {x, -5, 5}, {y, -5, 5},
PlotPoints -> 50, Mesh -> False], {t, -Pi, Pi, Pi/10}]
-------- Original Message --------
Subject: [mg80775] Animation of a rotating object. (Mathematica 6)
Date: Fri, 31 Aug 2007 04:00:40 +0000 (UTC)
From: Nacho <ncc1701zzz at gmail.com>
Hello.
I'm trying to make an animation of a rotating 3D object and I'm having
some problems.
I want to make a list of images to export them to an AVI file.
For example, the following object:
a = Plot3D[Sin[x y], {x, -5, 5}, {y, -5, 5}, MaxRecursion -> 1,
PlotPoints -> 50, Mesh -> None];
I want to rotate it around the z axis slowly. I've tried Rotate and
changing ViewPoint, but neither work for me because Rotate distorted
the scale of every image and changing ViewPoint only works if I want
to rotate everything at the same time.
I think that I should use Rotate, so I can Rotate several objects in
different angles or speeds. But I would like to avoid the distortion
in the size of the image:
I've tried specifying PlotRange, and it looks promising, but I have
two problems: calculating the best PlotRange paramters so everything
is included, and maximizing the plotted area (so the white region
around the objects is minimized).
This is close, but a lot of white space is around the object, and I
have to set the limits of PlotRange by try-and-see.
b = Table[
Graphics3D[Rotate[a[[1]], phi, {0, 0, 1}], Boxed -> False,
PlotRange -> {{-7, 7}, {-7, 7}, {-1, 1}}], {phi, 0, 1/4 Pi,
1/4 Pi /5}]
Any hint to do this?
The object doesn't need to be this particular Plot3D. It could be a
ParametricPlot3D, several Graphics3D primitives, etc.
Thanks a lot.
Best regards.
I'm trying to make an animation of a rotating 3D object and I'm having
some problems.
I want to make a list of images to export them to an AVI file.
For example, the following object:
a = Plot3D[Sin[x y], {x, -5, 5}, {y, -5, 5}, MaxRecursion -> 1,
PlotPoints -> 50, Mesh -> None];
I want to rotate it around the z axis slowly. I've tried Rotate and
changing ViewPoint, but neither work for me because Rotate distorted
the scale of every image and changing ViewPoint only works if I want
to rotate everything at the same time.
I think that I should use Rotate, so I can Rotate several objects in
different angles or speeds. But I would like to avoid the distortion
in the size of the image:
I've tried specifying PlotRange, and it looks promising, but I have
two problems: calculating the best PlotRange paramters so everything
is included, and maximizing the plotted area (so the white region
around the objects is minimized).
This is close, but a lot of white space is around the object, and I
have to set the limits of PlotRange by try-and-see.
b = Table[
Graphics3D[Rotate[a[[1]], phi, {0, 0, 1}], Boxed -> False,
PlotRange -> {{-7, 7}, {-7, 7}, {-1, 1}}], {phi, 0, 1/4 Pi,
1/4 Pi /5}]
Any hint to do this?
The object doesn't need to be this particular Plot3D. It could be a
ParametricPlot3D, several Graphics3D primitives, etc.
Thanks a lot.
Best regards.
</pre>
</body>
</html>
--------------090205020104050601020100--