5.mws

5-1 Construct the envelope of the light rays emitted from a radiant point source

at infinity after reflection by the semi-circle.

> restart;

> m:=[[-3,sin(t)],[cos(t),sin(t)],[cos(t)-cos(2*t),sin(t)-sin(2*t)]];

m := [[-3, sin(t)], [cos(t), sin(t)], [cos(t)-cos(2...

> t:=k*2*Pi/100-Pi/2;

t := 1/50*k*Pi-1/2*Pi

> plot([m$k=0..50],scaling=constrained,color=green,axes=none);

[Maple Plot]

5-2 Construct the envelope of the light rays emitter from a radient point source

at the circumference after reflection by the same circle

> restart;

> m:=[[-1,0],[cos(t),sin(t)],[cos(t)-cos(3*t/2),sin(t)-sin(3*t/2)]];

m := [[-1, 0], [cos(t), sin(t)], [cos(t)-cos(3/2*t)...

> t:=k*2*Pi/100-Pi;

t := 1/50*k*Pi-Pi

> plot([m$k=0..100],scaling=constrained,color=blue,axes=none);

[Maple Plot]

5-3 Construct the envelope formed by a fix diameter of a circle

rolling along a straight line

> restart;

> m:=[[t-cos(t),sin(t)],[t+cos(t),-sin(t)]];

m := [[1/50*n*Pi-cos(1/50*n*Pi), sin(1/50*n*Pi)], [...

> t:=n*2*Pi/100;

t := 1/50*n*Pi

> plot([m$n=-100..100],scaling=constrained,color=gold,axes=none);

[Maple Plot]

5-4 Construct the envelope formed by a fix diameter of a circle

rolling along a fixed circle of the same size

> restart;

> m:=[[2*cos(t)-cos(2*t),2*sin(t)-sin(2*t)],[2*cos(t)+cos(2*t),2*sin(t)+sin(2*t)]];

m := [[2*cos(t)-cos(2*t), 2*sin(t)-sin(2*t)], [2*co...

> t:=k*2*Pi/100;

t := 1/50*k*Pi

> plot([m$k=0..100],scaling=constrained,color=pink,axes=none);

[Maple Plot]

5-5 Construct the envelope formed by a fix diameter of a circle

rolling along a fixed circle twice the diameter

> restart;

> m:=[[3*cos(t)-cos(3*t),3*sin(t)-sin(3*t)],[3*cos(t)+cos(3*t),3*sin(t)+sin(3*t)]];

m := [[3*cos(t)-cos(3*t), 3*sin(t)-sin(3*t)], [3*co...

> t:=k*2*Pi/100;

t := 1/50*k*Pi

> plot([m$k=0..100],scaling=constrained,color=brown,axes=none);

[Maple Plot]

5-6 Construct the figure

> restart;

> m:=[[-3*cos(t)-cos(-3*t),-3*sin(t)-sin(-3*t)],[-3*cos(t)+cos(-3*t),-3*sin(t)+sin(-3*t)]];

m := [[-3*cos(t)-cos(3*t), -3*sin(t)+sin(3*t)], [-3...

> t:=k*2*Pi/100;

t := 1/50*k*Pi

> plot([m$k=0..100],scaling=constrained,color=orange,axes=none);

[Maple Plot]

5-7 Construct this figure

> restart;

> m:=[[-4*cos(t)-cos(-4*t),-4*sin(t)-sin(-4*t)],[-4*cos(t)+cos(-4*t),-4*sin(t)+sin(-4*t)]];

m := [[-4*cos(t)-cos(4*t), -4*sin(t)+sin(4*t)], [-4...

> t:=2*k*Pi/100;

t := 1/50*k*Pi

> plot([m$k=0..100],scaling=constrained,color=green,axes=none,title="pictrue 5-7");

[Maple Plot]

5-8 Construct this design

> restart;

> t:=Pi*n/100;

t := 1/100*Pi*n

> x:=cos(t)-1;

>

x := cos(1/100*Pi*n)-1

> y:=sin(t);

y := sin(1/100*Pi*n)

> x1:=sqrt(1-(y-1)^2);

x1 := sqrt(1-(sin(1/100*Pi*n)-1)^2)

> m:=[[x,y],[x,-y],[x1,-y],[x1,y],[x,y]]:

> plot([m$n=1..50],scaling=constrained,axes=none,color=violet);

[Maple Plot]

5-9 Construct the nested squares as thus

> restart;

> m:=[[1,1],[1,-1],[-1,-1],[-1,1],[1,1]];

m := [[1, 1], [1, -1], [-1, -1], [-1, 1], [1, 1]]

> w:=[]:

> t:=0.1:

> w:=[op(w),m];

w := [[[1, 1], [1, -1], [-1, -1], [-1, 1], [1, 1]]]...

> plot(w,scaling=constrained);

[Maple Plot]

> sm:=[m[2],m[3],m[4],m[1],m[2]];

sm := [[1, -1], [-1, -1], [-1, 1], [1, 1], [1, -1]]...

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[4],m[1],m[2]]:m:=(1-t)*m+t*sm: od:

> plot(w,scaling =constrained,title="nested square",color=blue,axes=none);

[Maple Plot]

5-10 Constructed nested triangles as thus:

> restart;

> q:=evalf(Pi/3);

q := 1.047197551

> m:=[[0,0],[1,0],[cos(q),sin(q)],[0,0]];

m := [[0, 0], [1, 0], [.5000000002, .8660254037], [...

> w:=[]:

> t:=0.1:

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[1],m[2]]:m:=(1-t)*m+t*sm: od:

> plot(w,scaling=constrained,color=gold,title="5-10 nestes triangle",axes=none);

[Maple Plot]

5-11 Construct this pattern

> restart;

> with(plots):

Warning, the name changecoords has been redefined

> q:=evalf(Pi/3);

q := 1.047197551

> m:=[[0,0],[1,0],[cos(q),sin(q)],[0,0]];

>

m := [[0, 0], [1, 0], [.5000000002, .8660254037], [...

> w:=[]:

> t:=0.1:

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[1],m[2]]:m:=(1-t)*m+t*sm:od:

> a1:=plot(w,axes=none,scaling=constrained,color=red):

> m:=[[0,0],[cos(2*q),sin(2*q)],[cos(q),sin(q)],[0,0]]:

> w:=[]:

> t:=0.1:

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[1],m[2]]:m:=(1-t)*m+t*sm:od:

> a2:=plot(w,axes=none,scaling=constrained,color=blue):

> m:=[[0,0],[cos(2*q),sin(2*q)],[cos(3*q),sin(3*q)],[0,0]]:

> w:=[]:

> t:=0.1:

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[1],m[2]]:m:=(1-t)*m+t*sm:od:

> a3:=plot(w,axes=none,scaling=constrained,color=blue):

> m:=[[0,0],[cos(4*q),sin(4*q)],[cos(3*q),sin(3*q)],[0,0]]:

> w:=[]:

> t:=0.1:

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[1],m[2]]:m:=(1-t)*m+t*sm:od:

> a4:=plot(w,axes=none,scaling=constrained,color=blue):

> m:=[[0,0],[cos(4*q),sin(4*q)],[cos(5*q),sin(5*q)],[0,0]]:

> w:=[]:

> t:=0.1:

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[1],m[2]]:m:=(1-t)*m+t*sm:od:

> a5:=plot(w,axes=none,scaling=constrained,color=blue):

> m:=[[0,0],[cos(6*q),sin(6*q)],[cos(5*q),sin(5*q)],[0,0]]:

> w:=[]:

> t:=0.1:

> for k to 20 do w:=[op(w),m]:sm:=[m[2],m[3],m[1],m[2]]:m:=(1-t)*m+t*sm:od:

> a6:=plot(w,axes=none,scaling=constrained,color=blue):

> display(a1,a2,a3,a4,a5,a6);

[Maple Plot]

5-12 Construct the family of ellipses

[Maple Bitmap]

as t ranges in [0,1]

> restart;

> x:=(1-a)*cos(t);

x := (1-a)*cos(t)

> y:=a*sin(t);

y := a*sin(t)

> a:=k/20:

> m:=[x,y,t=0..2*Pi];

m := [(1-1/20*k)*cos(t), 1/20*k*sin(t), t = 0 .. 2*...

> plot([m$k=0..20],scaling=constrained,color=black,axes=none);

[Maple Plot]

°Ê ±Þ

> restart;

> with(plots);

Warning, the name changecoords has been redefined

[animate, animate3d, animatecurve, changecoords, co...
[animate, animate3d, animatecurve, changecoords, co...
[animate, animate3d, animatecurve, changecoords, co...
[animate, animate3d, animatecurve, changecoords, co...
[animate, animate3d, animatecurve, changecoords, co...
[animate, animate3d, animatecurve, changecoords, co...

> ?animate:

> x:=(1-a)*cos(t):

> y:=a*sin(t):

> a:=k/20

> m:=[x,y,t=0..2*Pi];

m := [(1-a)*cos(t), a*sin(t), t = 0 .. 2*Pi]

> animate(m,k=0..20);

[Maple Plot]

5-13 Construct the concentric and coaxial ellipses of constant area

[Maple Bitmap]

5-14 Construct this pattern

> restart;

> plot([[x,cos(x)+0.03*n*x*(x-1)*(x-2)*(x-3)*(x-4),x=0..4]$n=0..10],scaling=constrained,axes=none,color=violet);

[Maple Plot]

5-15 Construct this pattern

> restart;

> plot([[x,10*sin(x)/x+n,x=-20..20]$n=0..30],scaling=constrained,axes=none,color=orange);

[Maple Plot]

5-16 Construct the reflections of a light ray trapped inside a reflective ellipse. There are two cases

case1:

> restart;

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

> a:=5:b:=3:r:=2.34:s:=3.5;

s := 3.5

> ll:=[a*cos(r),b*sin(r)]:l:=[a*cos(s),b*sin(s)];

l := [-4.682283436, -1.052349683]

> m:=[l,ll];

m := [[-4.682283436, -1.052349683], [-3.477816632, ...

> for k to 200 do u:=ll-l: n:=[-b*ll[1]/a,-a*ll[2]/b]:v:=u-2*dotprod(u , n)*n/dotprod(n,n):t:=-2*(b^2*v[1]*ll[1]+a^2*ll[2]*v[2])/(b^2*v[1]^2+a^2*v[2]^2):lll:=ll+t*v:m:=[op(m),lll]:l:=ll:ll:=lll:od:

> plot(m,scaling=constrained,axes=none,color=green);

[Maple Plot]

caes2:

> restart;

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

> a:=3:b:=5:r:=2.22:s:=5.1;

s := 5.1

> ll:=[a*cos(r),b*sin(r)]:l:=[a*cos(s),b*sin(s)];

l := [1.133933228, -4.629073412]

> m:=[l,ll];

m := [[1.133933228, -4.629073412], [-1.813656813, 3...

> for k to 200 do u:=ll-l: n:=[-b*ll[1]/a,-a*ll[2]/b]:v:=u-2*dotprod(u , n)*n/dotprod(n,n):t:=-2*(b^2*v[1]*ll[1]+a^2*ll[2]*v[2])/(b^2*v[1]^2+a^2*v[2]^2):lll:=ll+t*v:m:=[op(m),lll]:l:=ll:ll:=lll:od:

> plot(m,scaling=constrained,axes=none,color=gold);

[Maple Plot]