5-16.mws

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

>