Four-Leaved Rose.mws
>
A
Four- Leaved Rose
by Jules Guay Teacher ,
Cegep of Drummondville , Quebec , Canada
.
Email : jules.guay@dr.cgocable.ca
Applications in polar coordinates .
- The first application illustrates the dynamic process of drawing a 2D curve in polar coordinates .
( the command
animatecurve
is used to acheive that ) .
- The second application wants to teach students how to evaluate the length of the closed curve drawn in polar coordinates .
- The third application shows how the
area bounded by the curve
is built up . ( Animations are used to build the area , in polar coordinates and in rectangular coordinates ) . Both evaluations are done to illustrate that the result is the same but it is easier to use polar coordinates .
- The last application using the same curve is
the rotation of the 2D curve around the polar axis
to obtain a 3D solid of revolution . Animation will help students to visualize how the boundary of this solid is traced in 3D . Evaluation of the volume is also done .
Packages used : plots , plottools(rotate , arrow) , modified coorplot for polar sheet .
Advantages of Maple for such applications : Animations showing how a 2D area is filled up and how a 3D solid is obtained from the rotation of a 2D curve .Also the power of Maple in solving integrals.
The function which has been chosen for the applications is the symmetric function :
= 5
>
restart:with(plots):
r:=5:
Ray:=r*cos(2*theta):sequences:=32:ft:=unapply(Ray,theta):
color=color_list:labelling=label_type:view=view_range:
PP1:=coordplot(polar,[0..6,0..Pi],view=[-6..6,0..6],color=[navy,blue],labelling=front):
PP2:=coordplot(polar,[0..6,Pi..2*Pi],view=[-6..6,-6..0],color=[navy,blue],labelling=front):
CP:=animatecurve([Ray,theta,theta=0..2*Pi],coords=polar,color=magenta,thickness=3,frames=sequences):
display(PP1,PP2,CP,scaling=constrained,numpoints=1000,title="Animation : curve in polar coord.",titlefont=[COURIER,BOLD,14]);
Warning, the name changecoords has been redefined
The
length of the curve .
Now if we want to evaluate the total length
of the closed curve drawn , the symmetry of the curve shows that we only need
to sketch the curve from
= 0 to
=
/ 4 , find the length of this part of the curve and multiply
8 times this result to obtain the total length .
We can ask Maple to check if the curve goes through the pole at
=
/ 4 .
>
thrPol:=solve(Ray,theta);
The length of the curve will be obtained with an integral which adds the differentials of arc ds . The next graph shows a differential of arc .
The formula of the differential ds is also given .
>
with(plottools):
LonPar:=polarplot(Ray,theta=0..Pi/4,color=magenta,thickness=2):
AxeP:=plot([[-1,0,0],[6,0,0]],color=black):
rhoSup:=plot([[0,0],[ft(Pi/6)*cos(Pi/6),ft(Pi/6)*sin(Pi/6)]],color=black):
rhoInf:=plot([[0,0],[ft(Pi/8)*cos(Pi/8),ft(Pi/8)*sin(Pi/8)]],color=black):
cTriang:=plot([[ft(Pi/6)*cos(Pi/6),ft(Pi/6)*sin(Pi/6)],[2.4,1.0]],color=black):
Rho:=textplot([2.1,0.8,` r`],align=RIGHT,
font=[SYMBOL,12]):
dAng:=textplot([1.45,0.75,` dq`],font=[SYMBOL,12]):
Ar:=arrow([2.75,1.75],[2.75,1.45],.005,.07,.1):
elLarc:=textplot([2.75,2,` ds`]):
PolAX:=plot([[-1,0],[6,0]],color=black):
display(LonPar,AxeP,rhoSup,rhoInf,cTriang,Rho,dAng,Ar,elLarc,PolAX,scaling=constrained,axes=none,
title=`1/8 of the curve`,titlefont=[COURIER,BOLD,14],view=[-1..6,0..2]);
ds:=(sqrt(rho^2+(d(rho)/d(theta))^2))*d(theta);
dl:=sqrt(rho^2+(d(rho)/d(theta))^2):
der:=diff(Ray,theta):
ArcLen:=8*Int(dl,theta=0..Pi/4)=evalf(8*int(sqrt(Ray^2+der^2),theta=0..Pi/4),5)*` units`;
The area bounded by the curve .
By symmetry , the total area is 8 times the area swept out as
increases from 0 to
/ 4 .
In polar coordinates , a differential dA is given by the area of a triangle ; dA = (1/2)
d
. An integral will add these differentials to give te desired area .
In the animation below , Maple help us to visualize how the area is swept out .
The formula of a differential is also given .
>
Nimage:=1:
for k from 0 to 12
do
CCP:=polarplot(Ray,theta=0..2*Pi,color=blue,thickness=2):
Lpetal:=plot([[0,0],[ft(k*Pi/48)*cos(k*Pi/48),ft(k*Pi/48)*sin(k*Pi/48)],[r,0],[0,0]],filled=true,color=gray):
Fpetal:=polarplot(Ray,theta=0..k*Pi/48,filled=true,color=grey):
TrSup:=plot([[0,0],[ft(5*Pi/48)*cos(5*Pi/48),ft(5*Pi/48)*sin(5*Pi/48)]],color=black,thickness=2):
TrInf:=plot([[0,0],[ft(3*Pi/48)*cos(3*Pi/48),ft(3*Pi/48)*sin(3*Pi/48)]],color=black,thickness=2):
polAxe:=plot([[-6,0],[6,0]],color=black):
gr||Nimage:=display(CCP,Lpetal,Fpetal,TrSup,TrInf,polAxe):
Nimage:=Nimage+1:
od:
display(gr||(1..Nimage-1),insequence=true,scaling=constrained,axes=none,title=` Area swept out (Animation) `,titlefont=[COURIER,BOLD,14]);
dA:=(1/2)*Ray^2*d(theta);
AreaPol:=8*Int((1/2)*Ray^2,theta=0..Pi/4)=8*int((1/2)*Ray^2,theta=0..Pi/4)*` square units`;
We can also find the area bounded by the curve in rectangular coordinates . We must then use the substitution x =
and y =
.
A differential dA will be the area of a rectangle and the total area of the flower will be obtained by an integral which will add the differentials .
In the next animation Maple shows how the area of a half leaf is swept out in Cartesian coordinates.
The formula of a differential is also given and the total area of the flower is evaluated . The result is the same as before but the integral is more difficult to solve; with this function given in polar coordinates , it is easier to stay in polar coordinates for evaluation of area ...
>
restart: with(plots):
r:=5:Ray:=r*cos(2*theta):
Image:=1:#area in Cartesian coordinates.
param1:=filled=true,color=magenta:
param2:=filled=true,color=cyan:
lstRect:=NULL:
for m from 1 to 32
do
CcP:=polarplot(Ray,theta=0..2*Pi,color=blue,thickness=2):
if irem(m,2)=0
then
param:=param1
else
param:=param2
fi:
rectangle:=polarplot(Ray,theta=(m-1)*Pi/128..m*Pi/128,param):
lstRect:=lstRect,rectangle:
gr||Image:=display(CcP,lstRect,scaling=constrained):Image:=Image+1:
od:
display(gr||(1..Image-1),insequence=true,scaling=constrained,title=`Area filled up with rect.(Animation)`,titlefont=[COURIER,BOLD,10]);
cx:=Ray*cos(theta):
cy:=Ray*sin(theta):
dx:=diff(cx,theta):
dA:=cy*dx*d(theta);
AreaCart:=8*Int(cy*dx,theta=Pi/4..0)=8*int(cy*dx,theta=Pi/4..0);
Warning, the name changecoords has been redefined
Rotation of the closed curve around the polar axis .
With Maple , let us see how the boundary of the solid of revolution is drawn in 3D .
The next animation will help students to visualize the formation of this solid .
The last application will be the evaluation of the volume obtained by the rotation of the curve .
The students will have to remember that solid of revolution may be evaluated by adding disks obtained by revolving rectangles perpendicular to the axis of rotation or by adding cylindrical shells obtained by revolving rectangles parrallel to the axis of rotation ; both methods will be used on different parts of the plane surface in rotation .
#Animation : boundary of the solid of rvolution.
>
restart:with(plots):
Ray:=5*cos(2*theta):ft:=unapply(Ray,theta):
C3d:=seq(plot3d([Ray*cos(theta),Ray*sin(theta)*sin(phi),Ray*cos(phi)*sin(theta)],theta=0..Pi,phi=0..n*Pi/12,numpoints=2000,color=cyan),n=1..25):
display(C3d,scaling=constrained,view=[-5..5,-5..5,-5..5],orientation=[80,90],insequence=true,title=` rotation of the 2D curve (animation)`,titlefont=[COURIER,BOLD,10]);
Warning, the name changecoords has been redefined
#Evaluation of the volume by disks and by cylindrical shells.
>
RotC:=polarplot(Ray,theta=0..Pi,color=blue,thickness=2):
pordisq:=polarplot(Ray,theta=0..Pi/4,filled=true,color=gray):
portub:=polarplot(Ray,theta=Pi/4..Pi/2,filled=true,color=gray):
portube:=polarplot(Ray,theta=Pi/4..3*Pi/8,filled=true,color=white):
disq:=plot([[ft(Pi/6)*cos(Pi/6),ft(Pi/6)*sin(Pi/6)],[ft(Pi/6)*cos(Pi/6),0]],color=black,thickness=4):
tub:=plot([[ft(3*Pi/8)*cos(3*Pi/8),ft(3*Pi/8)*sin(3*Pi/8)],[0,ft(3*Pi/8)*sin(3*Pi/8)]],color=black,thickness=4):
Rtub:=plot([[-.75,0],[-.75,ft(3*Pi/8)*sin(3*Pi/8)]],color=black):
PolAx:=plot([[-7,0],[7,0]],color=black):
display(RotC,pordisq,portube,portub,disq,tub,Rtub,PolAx,scaling=constrained,view=[-7..7,-7..7],axes=none);
deriv1:=diff(Ray*cos(theta),theta):
dv1:=Pi*((Ray*sin(theta))^2)*deriv1:
v1:=evalf(int(dv1,theta=Pi/4..0),5):V1:=2*v1:
deriv2:=diff(Ray*sin(theta),theta):
dv2:=2*Pi*(Ray*cos(theta)*Ray*sin(theta)*deriv2):
v2:=evalf(int(dv2,theta=3*Pi/2..7*Pi/4),5):V2:=2*v2:
Volume:=(V1+V2)*` cubic units`;
The end .
>