MuPAD Pro Computing Essentials, 2nd Edition

Example 7.4 Using VCam to produce animation

Very basic animation.  Letter "a" represents the parameter of animation. Type or copy the code in MuPAD, execute the code and check how the animation works.  Below  is presented one of the stages of the animation.

//static object  
Circle := plot::Curve2d([-1+cos(t),sin(t)], t=0..2*PI):
//objects to animate
P := plot::Point2d([-1+cos(a),sin(a)], a=0..2*PI):
Q := plot::Point2d([a, sin(a)], a=0..2*PI):
L1 := plot::Line2d(
   [-1,0],[-1+cos(a),sin(a)],a=0..2*PI
):
L2 := plot::Line2d(
   [-1+cos(a),sin(a)], [a, sin(a)], a=0..2*PI
):
SineCurve := plot::Function2d(
   sin(x),x=0..a,a=0..2*PI
):
 
plot(Circle, L1, L2,SineCurve, P, Q,
   Scaling=Constrained
)

 

© Miroslaw Majewski, Abu Dhabi,  Update  26-10-2004