KOS 1110 Computers in Science
Assignment 5 - Maple Art and Maplets
Due date Monday, 20-9-2004, 5pm
1. During your laboratory class, you have created multiplots (one figure containing several plots) and animations using these
multiplots. Using your own function, create at least one set of multiplot (static) and animation. Use as many options as
possible to make your plot look like textbook quality plots.
> | restart; |
> | with(plots): |
Warning, the name changecoords has been redefined
> | y:=N*B*A*sin(theta)+2*sin(2*theta); |
> | p1:=plot(subs(N=1,B=0.4,A=1,y),theta=0..2*Pi,colour=blue,legend="N=1"): p2:=plot(subs(N=2,B=0.4,A=1,y),theta=0..2*Pi,colour=green,legend="N=2"): p3:=plot(subs(N=3,B=0.4,A=1,y),theta=0..2*Pi,colour=brown,legend="N=3"): p4:=plot(subs(N=4,B=0.4,A=1,y),theta=0..2*Pi,colour=red,legend="N=4"): display({p1,p2,p3,p4}); |
> | animate(subs(B=0.4,A=1,y),theta=0..2*Pi,N=1..4); |
2. Your artistic skills: Draw a unique picture using Maple.
> | restart; |
> | with(plots): |
Warning, the name changecoords has been redefined
> | x:=3*cos(2*t)+sin(5*t); y:=3*sin(2*t)+cos(5*t); |
> | plot([y,x,t=-200..200],title="ku petik bintang-bintang",axes=none,colour=red); |
3. Make two unique animations in 2D and 3D.
Give names to these pictures. Publish these pictures and the animations in your home page along with the details , such as
the equations that are used to create the animations.
Animation in 2D
> | restart; |
> | with(plots): |
Warning, the name changecoords has been redefined
Bull's Eye
-The equations that are used to create this picture are:
y := sin(2ts) + 2sec(80s) and z := 90cos(20ts) + tanh(t)
> | animate({sin(2*t*s)+2*sec(80*s),90*cos(20*t*s)+tanh(t)},s=-20..20,t=0..2*Pi,coords=polar,frames=30,numpoints=100,colour=blue,axes=none,title="bull's eye"); |
Animation in 3D
> | restart; |
> | with(plots): |
Warning, the name changecoords has been redefined
f
- The equations that are used to create this picture are:
p1 = 3sin(2x) p2 = y p3 = k
> | animate3d({3*sin(2*x),y,k},x=-1..1,y=-1..1,k=-1..1,orientation=[-79,97],grid=[60,20],title="f",style=patchnogrid); |