#### 6.34 animatecurve problem (24.10.98)

##### 6.34.1 John Kurtzke

I was thrilled to see animatecurve in Release 5 of Maple V, but lately, I have had problems. I am using a Power Mac with System 7.5.3 Revision 2.

I have been trying to animate the path of a projectile (baseball) and what I thought was working before no longer works:

x := t -> t*v*cos(u);
y := t -> -16*t^2 + t*v*sin(u) + 3;
v := 105;
u := Pi/4;
plot([x(t), y(t), t=0..4.68]);



gives the correct plot.

(Why 4.68? That’s when the ball hits the ground).

animatecurve([x(t), y(t), t=0..4.68]); also used to give the right animation until this past week. Deﬁng x & y as expressions instead of functions also used to work. Now animatecurve gives a graph for x & y values far beyond the correct ones.

Moreover, animatecurve( [ cos(t), sin(t), t=0..2*Pi]); works once, at most. After that, it gives various erroneous plots (my favorite is one with a set of points on the unit circle and lines between point on the other side of the circle – it’s a really neast picture that I could never do myself).

Writing down the x & y expressions directly in animatecurve sometimes works (but only once) and sometimes not.

This is a problem with my own personal copy of Maple (whether I am connected to the University network or not), with the network versions – both Mac & PC, and with a UNIX version installed on a Sun Sparc Station.

Yesterday, I stumbled across something that has worked thus far: With above notation,

animatecurve( [x, y, 0..4.68]);       # or, for the circle,
animatecurve([cos, sin, 0..2*Pi]);



I am glad I found sometihng that did work, but what I was doing before should have continued to work – certainly that’s what the help page for animate curve suggests.

I have given Maple plenty of memory – 30 MB, so I do not think it is a memory issue.

##### 6.34.2 Robert Israel (2.11.98)

The bug in animatecurve seems to be that it uses the global variables u and v for its own purposes. These should have been declared as local variables. If they have been assigned values, animatecurve may not work properly. So the easy work-around is to use some other variable names instead of u and v.

##### 6.34.3 Preben Alsholm (2.11.98)

Here is another bug, or, if you will, inconsistency, in animatecurve. Compare the following:

with(plots):
animatecurve(cos(t),t=0..Pi,coords=polar);
animatecurve(arccos(r),r=-1..1,coords=polar);
animate(a*cos(t),t=0..Pi,a=0..1,coords=polar);
plot(cos(t),t=0..Pi,coords=polar);



Whereas plot and animate understand the expression (here cos(t)) as referring to r expressed in terms of theta, animatecurve takes the opposite view. The last three commands give circles, where the ﬁrst does not.

There is no diﬀerence in interpretation when the parametric form is used: [cos(t),t,t=0..Pi].