{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 0 12 0 0 0 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Fo nt 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 0 12 128 0 128 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 0 11 0 128 128 1 2 1 2 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "Fancy1.mws" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 15 "parametric plot" }} {PARA 0 "" 0 "" {TEXT -1 9 "animation" }}{PARA 0 "" 0 "" {TEXT -1 41 " plot multiple functions on the same graph" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 47 "plotting multiple parametric plots using a loop" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 25 "3-D plot (simple example)" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 3 "sum" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "restart; with(plots): " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 61 "basic par ametric plot: x=cos(t), y=sin(t), for t from 0..2 Pi" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "plot([cos(t),sin( t),t=0..2*Pi]); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "Exercise : make a plot of an ellip se with a 2:1 x:y ratio." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "Here is a template for animating a simple function of x and t :" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "animate(t*cos(x),x=-3..3,t=0..1,frames=20,num points=50,color=blue);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 92 "Note that you have to click on \+ the graph, then use the player controls to run the animation." }} {PARA 0 "" 0 "" {TEXT -1 81 "Turning on 'balloon help' under Help will make understanding the controls easier!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 73 "Exercise: Using this basic plan, c reate an animation of a wave traveling " }}{PARA 0 "" 0 "" {TEXT -1 34 "in the +x direction y=A cos(kx-wt)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Here is a way to make \+ multiple plots on the same graph. " }}{PARA 0 "" 0 "" {TEXT -1 45 "The first two lines 'save up' one plot each. " }}{PARA 0 "" 0 "" {TEXT -1 71 "Notice the colons at the end of the line to suppress output on \+ h and j." }}{PARA 0 "" 0 "" {TEXT -1 36 "Then the 'display' plots them both. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 " h:=plot(x^2,x=0..6,color=blue):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 " j:=plot(15-3*x,x=0..6,color=red):" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 " display(\{h,j\},title=`two fun ctions on the same graph`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "The same idea can be appli ed to animations." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "c:=animate(cos(5*x-3*t),x=-3..3,t=0 ..2,frames=20,color=blue):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "d:=an imate(cos(5*x+3*t),x=-3..3,t=0..2,frames=20,color=red):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "display(\{c,d\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 67 "The idea of 'sa ving up' and displaying can be automated in a loop. " }}{PARA 0 "" 0 " " {TEXT -1 74 "Here are several offset circles, each a parametric plot , all done at once." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 " N:=20;radius:=20;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 " for k from 1 to N do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 " circ.k:=[k/5+radius*cos(t),2*k+radiu s*sin(t),t=-Pi..Pi]:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 " od:" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 78 " plot(\{circ.(1..N)\},c olor=black,title=`wind speed increases with height`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 69 "Here is a n example of a plot3D command. It plots functions of x and y" }}{PARA 0 "" 0 "" {TEXT -1 69 "plot3d(100*sin(x*y)^2,x=-1..1,y=-Pi..Pi,view=-2 00..200,grid=[40,40]);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 83 "The sum command is a very convenient one in certain \+ situations. Here is an example." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 " k:='k'; # free up k" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 " \+ y:=sum(k^3,k=1..m);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " \+ simplify(y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "21 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }