       Re: Q: ROTATING ANIMATIONS in MMA?

• To: mathgroup at smc.vnet.net
• Subject: [mg2194] Re: Q: ROTATING ANIMATIONS in MMA?
• From: ianc (Ian Collier)
• Date: Fri, 13 Oct 1995 02:25:13 -0400
• Organization: Wolfram Research, Inc.

```In article <45d0hg\$5tc at ralph.vnet.net>, Zorro <berriz at husc.harvard.edu> wrote:

> Hi.  I'm trying to produce an animation of a 3-D object to simulate
> the smooth rotation of the object about the vertical axis.  I came up
> with
>
>   Table[Show[3DObject, Boxed -> False,
>   ViewPoint->{ 2 Cos[n 2 Pi/60], 2 Sin[n 2 Pi/60],2 }],
>   {n, 0, 60}];
>
> This *almost* worked.  The only problem is that Mathematica doesn't
> keep the size of 3DObject constant (wrt to the rest of the window)
> from one frame to the next, so the image zooms in and out as it
> rotates (a semi-cool effect, in face, but not exactly what I had in
> mind).  How can I get Mathematica to keep the image size constant wrt
> the window from one frame to the next?
>
>
> Z.

You could try using SpinShow which is defined in Graphics`Animation`,
one of the Standard Mathematica Packages that came with your copy
of Mathematica.

SpinShow automatically computes the viewpoints for you.

In this example at least the size of the image appears stable.

In:=
Needs[ "Graphics`Animation`"]
In:=
Needs[ "Graphics`Shapes`"]
In:=
Needs[ "Graphics`Polyhedra`"]

In:=
?SpinShow

SpinShow[graphics, opts...] will animate a three-dimensional
graphics object by rotating it.

In:=
g = Show[ Stellate[ Polyhedron[Octahedron],4.0]]

Out=
-Graphics3D-

In:=
SpinShow[ g, Frames -> 10,
SpinRange -> { 0 Degree, 180 Degree}];

I hope this helps.

--Ian

-----------------------------------------------------------
Ian Collier
Technical Sales Support
Wolfram Research, Inc.
-----------------------------------------------------------
tel:(217)-398-0700     fax:(217)-398-0747      ianc at wri.com