Application Center - Maplesoft

# Color Plate: Dirichlet Problem for a circle

You can switch back to the summary page by clicking here.

DirichletCircle.mw

Plate 1: Dirichlet Problem for a Circle

Maplesoft, a division of Waterloo Maple Inc., 2004

 > restart;

 > with(plots):

Warning, the name changecoords has been redefined

 > 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=5000):

 > p:=tubeplot([cos(t), sin(t), f2(t), t=-Pi..Pi, radius=0.015], tubepoints=70, numpoints=750):

 > display3d({q, p}, orientation=[3, 89], lightmodel=light3);

To create a smoother result, try the following commands.  This may take some time to produce a result

 > 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);

 >