mw99aj

24 Reputation

2 Badges

14 years, 111 days

MaplePrimes Activity


These are replies submitted by mw99aj

turns out that the last example of plots[display] will suit this purpose. Please disregard this question

F := proc(t)
>      plots[display](
> plottools[line]([t,0], [t,vertice(t)], color=blue),
> plot(sin(x), x=0..t, view=[-3..7, -5..5])
>      );
> end proc:
> animate(F,[theta], theta=0..2*Pi,
>         background=plot([cos(t)-2, sin(t), t=0..2*Pi]),
>         scaling=constrained, axes=none);

Here is a better example to see what is wrong.  Thanks,

>  with(plots):with(plottools):vertice:=proc(t)
>   if t < -1 then return 1;
>   elif t > 1 then return 1;
>   else return 2;
>   end if;
> end proc:
> animate(plot,arrow([t,0],[t,vertice(t)],0.5,0.3,0.1),t=-5..5,frames=10);
Error, (in vertice) cannot determine if this expression is true or false: t < -1
 

Page 1 of 1