       Re: Mathematica Animation Problem

• To: mathgroup at smc.vnet.net
• Subject: [mg35449] Re: [mg35432] Mathematica Animation Problem
• From: BobHanlon at aol.com
• Date: Sat, 13 Jul 2002 03:48:20 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```In a message dated 7/12/02 6:55:08 AM, tofesi at web.de writes:

>I hope someone can give me advice concerning the following Mathematica
>(Version 4.1) problem:
>
>I am trying to produce an animation of a circular "walk" around a 3D
>plot. I get the animation, but it looks like sometimes I get nearer to
>the plot and sometimes the plot looks more distant, so that I don't
>get the impression of walking on a circle.
>
>My guess is that I have not yet understood how the options
>"ViewCenter" and "ViewPoint" work.
>
>So here is what I wrote to produce the image sequence:
>
>For [alpha = 0.0, alpha < 2 Pi, alpha = alpha + 0.1,
>  Plot3D[ Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2},
>          {ViewCenter -> {0, 0, 0},
>           ViewPoint -> {5 Cos[alpha], 5 Sin[alpha], 0.5}}]]
>
>So all viewpoints should lie on a circle of radius 5 around the origin
>and with a constant height of 0.5. But the visual impression is
>different, as decribed above. Anyone knows what's wrong?
>

For[alpha=0, alpha<2 Pi, alpha=alpha+0.1,
Plot3D[Exp[-(x^2+y^2)],
{x,-2,2},{y,-2,2},
ViewPoint->
{5 Cos[alpha], 5 Sin[alpha], 0.5},

SphericalRegion->True,
Ticks->None]];

However, you are calculating the plot for each view.  Alternatively,

plt=Plot3D[Exp[-(x^2+y^2)],
{x, -2, 2}, {y, -2, 2},

DisplayFunction->Identity];

For[alpha=0, alpha<2 Pi, alpha=alpha+0.1,
Show[plt,
ViewPoint->
{5 Cos[alpha], 5 Sin[alpha], 0.5},

SphericalRegion->True,
Ticks->None,
DisplayFunction->\$DisplayFunction]];

Bob Hanlon
Chantilly, VA  USA

```

• Prev by Date: Re: Mathematica Animation Problem
• Next by Date: RE: Re: symbolic and indefinite differentiation
• Previous by thread: Re: Mathematica Animation Problem
• Next by thread: Re: Mathematica Animation Problem