11.07.2015 Views

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

Maple 9 Learning Guide - Maplesoft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

150 • Chapter 5: PlottingNote: On some computers, the numpoints options value may need tobe decreased to generate the plot.1. Dirichlet Problem for a Circle> with(plots):> setoptions3d(scaling=constrained, projection=0.5,> style=patchnogrid):> f1 := (x, y) -> 0.5*sin(10*x*y):> f2 := t -> f1(cos(t), sin(t)):> a0 := evalf(Int(f2(t), t=-Pi..Pi)/Pi):> a := seq(evalf(Int(f2(t)*cos(n*t), t=-Pi..Pi)/Pi), n=1..50):> b := seq(evalf(Int(f2(t)*sin(n*t), t=-Pi..Pi)/Pi), n=1..50):> L := (r, s) -> a0/2+sum(’r^n*(a[n]*cos(n*s)+b[n]*sin(n*s))’,> ’n’=1..50):> q := plot3d([r*cos(s), r*sin(s), L(r, s)], r=0..1, s=0..2*Pi,> color=[L(r, s), -L(r, s), 0.2], grid=[29, 100],> numpoints=10000):> p := tubeplot([cos(t), sin(t), f2(t), t=-Pi..Pi,> radius=0.015], tubepoints=70, numpoints=1500):> display3d({q, p}, orientation=[3, 89], lightmodel=light3);2. Mandelbrot SetThe Mandelbrot Set is one of the most complex objects in mathematicsgiven the chaotic nature that surrounds the image. Code for thisgraphic is available at the <strong>Maple</strong> Application Center.3. Origami BirdThe Origami Bird can be displayed as a simple graphic as well as a<strong>Maple</strong> animation. Code for the graphic and the animation are availableat the <strong>Maple</strong> Application Center.4. ConchoidCode for this and other seashells is available at the <strong>Maple</strong> ApplicationCenter.5. Gauss Map Graphed on a Torus> with(plots):> sp := [rho*cos(2*Pi*t), rho*sin(2*Pi*t), 0, radius=b]:> pc := n -> [ (rho-r*cos(2*Pi*t))*cos(2*Pi/(n+t)),> (rho-r*cos(2*Pi*t))*sin(2*Pi/(n+t)),> -r*sin(2*Pi*t)]:> rho, r, b := 3, 1.1, 1:> s := spacecurve( {seq(pc(k), k=1..50)}, t=0..1, thickness=2,> color=blue, view=[-4.4..4.4, -4.4..4.4, -2.2..2.2]):> s2 := tubeplot( sp, t=0..1, tubepoints=150,> view=[-4.4..4.4, -4.4..4.4, -2.2..2.2], style=PATCHNOGRID,> color=cyan):

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!