# Question:How do I animate a plot-based procedure or function P(t) depending of variable t where I do not take care about the type of geometry?

## Question:How do I animate a plot-based procedure or function P(t) depending of variable t where I do not take care about the type of geometry?

Maple

Hi MaplePrimes team,

If I assume a plot-based function or procedure C(s,t) and P1(t) are hidden in a package somewhere I don’t care about the type of geometry (spacecurve or plot3d). Now, I just want to animate P1(t) following the variable t. How do I do?

Example 1: Curve Animation in variable t

1. Equation

C := (s,t)-> Vector([cos(s), sin(s), t*s/2]):     #Helix shape as example

2. Plot

P1 := t-> display(spacecurve(C(s,t), s = 0..3*2*Pi, linestyle = solid)):

Example 2: Surface Animation in variable t

1. Equation

S := (x,y,t)-> Vector([x, y, t/(1 + x^2 + y^2)]):

2. Plot

P2 := t-> display(plot3d(S(x,y,t), x = -2..2, y = -2..2)):

If I assume the function or procedure S(x,y,t) and P2(t) are hidden in a package somewhere I don’t care. Now, I just want to animate P2(t) following the variable t. How do I do?

Example 3: Mixing Curve and Surface Animation in variable t

The ideal/”dream” basic syntax would be:

animate(display, [P1(t), P2(t)], t = t1..t2)

But it does not work.

Best.

Guy.

﻿