m5.mws

Construct the envelope of the light rays emitted from a radiant point source at infinity after reflection by the semi-circle.

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

> t:=n*Pi/50-Pi/2:

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

[Maple Plot]

Construct the envelope of the light rays emitted from a radiant 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)]]:

> t:=n*Pi/50-Pi:

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

[Maple Plot]

Construct the envelope formed by a fix diameter of a circle rolling along a straight line.

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

> t:=n*Pi/50:

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

[Maple Plot]


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)]]:

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

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

[Maple Plot]

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)]]:

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

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

[Maple Plot]

Construct this 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)]]:

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

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

[Maple Plot]

> 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)]]:

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

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

[Maple Plot]

Construct this design:

> restart;

> t:=Pi*n/100:

> x:=cos(t)-1:y:=sin(t):

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

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

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

[Maple Plot]

Construct the nested squares as thus:

> restart;

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

> w:=[]:

> t:=0.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,axes=none,scaling=constrained,color=green);

[Maple Plot]

Constructed nested triangles as thus:

> restart;

> m:=[[1, 0],[-1, 1],[-1, -1],[1, 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:

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

[Maple Plot]

Construct this pattern:

> restart;

> with(plots):

Warning, the name changecoords has been redefined

> q:=evalf(Pi/3):

> m:=[[0,0],[1,0],[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:

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

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

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

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

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

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

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

[Maple Plot]

Construct the family of ellipses
x=(1-t)cos s, y=t sin s, 0<= s <=
2*Pi
as t ranges in [0,1].

> restart;

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

> y:=a*sin(t):

> a:=k/20:

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

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

[Maple Plot]

Construct the concentric and coaxial ellipses of constant area:

> restart:

> x:=tan(k*Pi/240)*cos(t):

> y:=cot(k*Pi/240)*sin(t):

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

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

[Maple Plot]

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

[Maple Plot]

Construct this pattern.

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

[Maple Plot]

Construct the reflections of a light ray trapped inside a reflective ellipse. There are two case

> 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:

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

> m:=[l,ll]:

> 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]

> a:=5:b:=3:r:=2.34:s:=5.9:

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

> m:=[l,ll]:

> 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]

>