Mathematical Experiment 13

1            2

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

 做法

  > m:=[[-2,sin(t)],[cos(t),sin(t)],[cos(t)-cos(2*t),sin(t)-sin(2*t)]];
  > t:=n*2*Pi/100;
  > plot([m$n=-25..25],color=brown,scaling=constrained,axes=none);

 Construct the envelope of the light rays emitted from a radiant point source
 at the circumference after reflection by the same circle.

 做法

  > m:=[[1,0],[cos(t),sin(t)],[cos(2*t),sin(2*t)]];
  > t:=n*2*Pi/100;
  > plot([m$n=0..100],color=blue,scaling=constrained,axes=none);
 

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

 做法

  1.
  > with(linalg):
  > a:=5;
  > b:=3;
  > r:=1.34;
  > s:=2.95;
  > 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);

  2.
  > with(linalg):
  > a:=5;
  > b:=3;
  > r:=1.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);

Construct the ellipses

x = (1-u) cos t

y = u sin t

0 < t < 2p

as u ranges over 20 equally spaces nodes in [0,1].

 
 Construct an animation displaying various ellipses tangent to the astroid.  
 Construct the line segments joining points of the curve with the
 corresponding center of curvature for each of the following: the nephroid,
 the astroid, the deltoid and the cardioid.

 做法

 The main part is

  > k:=3;
  > x:=k*cos(t)-cos(k*t);
  > y:=k*sin(t)-sin(k*t);
  > x1:=diff(x,t);
  > y1:=diff(y,t);
  > x2:=diff(x1,t);
  > y2:=diff(y1,t);
  > f:=(x1^2+y1^2)/(x1*y2-y1*x2+0.000001);
  > xc:=x-f*y1;
  > yc:=y+f*x1;
  > m:=[[x,y],[xc,yc]];
  > t:=n*2*Pi/100;
  > plot([m$n=1..100],color=red,scaling=constrained,axes=none);

 

 When k:=-3 ------>

 

 

 

 

 

 

 

 When k:=-2 ------>

 

 

 

 

 

 

 

 When k:=2 ------>