Maple computations

> restart;

> eqns:=x = s*t+r*sqrt(1-t^2), y = (1-s)*sqrt(1-t^2)+r*t;

eqns := x = s*t+r*sqrt(1-t^2), y = (1-s)*sqrt(1-t^2...

> sol:=solve({eqns},{t, sqrt(1-t^2)});

sol := {t = (r*y-x+s*x)/(r^2-s+s^2), sqrt(1-t^2) = ...

A parameterization of the locus of C is obtained by joining together the parameterizaions of the two loci.

> c1 := (r,s,t)->s*[t,0]+(1-s)*[0,sqrt(1-t^2)]+r*[sqrt(1-t^2),t];

> c2 := (r,s,t)->s*[t,0]+(1-s)*[0,-sqrt(1-t^2)]+r*[-sqrt(1-t^2),t];

c1 := proc (r, s, t) options operator, arrow; s*[t,...

c2 := proc (r, s, t) options operator, arrow; s*[t,...

> p := proc(r,s,t)
if t >=0 and t<= 1/2 then c1(r,s,1-4*t) elif
t> 1/2 and t <= 1 then c2(r,s,4*t-3) fi end;

p := proc (r, s, t) if 0 <= t and t <= 1/2 then c1(...

>

> locus := proc(r,s)
plot([seq(p(r,s,i/100),i=0..100)],scaling=constrained) end;

locus := proc (r, s) plot([seq(p(r,s,1/100*i),i = 0...

> locus(1,1);

>

> rhs(sol[1])^2+rhs(sol[2])^2=1;

(r*y-x+s*x)^2/((r^2-s+s^2)^2)+(x*r-s*y)^2/((r^2-s+s...

>

> tri := proc(r,s,t)
if t >=0 and t<= 1/2 then plots[polygonplot]([c1(r,s,1-4*t),[1-4*t,0],
[0,sqrt(1-(1-4*t)^2)]],color=turquoise) elif
t> 1/2 and t <= 1 then plots[polygonplot]([c2(r,s,4*t-3),[4*t-3,0],
[0,-sqrt(1-(4*t-3)^2)]],color=turquoise) fi end:

seg := proc(r,s,t)
if t >=0 and t<= 1/2 then plot([[1-4*t,0],
[0,sqrt(1-(1-4*t)^2)]],color=red,thickness=3) elif
t> 1/2 and t <= 1 then plot([[4*t-3,0],
[0,-sqrt(1-(4*t-3)^2)]],color=red,thickness=3) fi
end:

> drawlocus := proc(r,s)
local frame,n,pts,i,movie,loc;
pts:=[seq(p(r,s,i/100),i=0..100)];
loc:= plot(pts,color=magenta,thickness=3):
frame := (r,s,t)->plots[display]([plottools[disk](p(r,s,t),.05,color=green),seg(r,s,t),loc,tri(r,s,t)]);
movie :=[seq(frame(r,s,i/100),i=0..100)];
plots[display](movie,insequence=true,scaling=constrained);
end:

> drawlocus(0,1/2);

> frame1 := proc(r,s)
local frame,n,pts,i,movie,loc;
pts:=[seq(p(r,s,i/100),i=0..100)];
loc:= plot(pts,color=magenta,thickness=3):
frame := (r,s,t)->plots[display]([seg(r,s,t),loc,plottools[disk](p(r,s,t),.05,color=green),tri(r,s,t)]);
plots[display](frame(r,s,0),scaling=constrained);
end:

>

> f := w->frame1(r(evalf(w)),s(evalf(w)));

f := proc (w) options operator, arrow; frame1(r(eva...

> drawlocus(1,2);

Calculations made in an attempt to loc ate the foci of this ellipse.

> eq:=(r*y-x+s*x)^2/((r^2-s+s^2)^2)+(x*r-s*y)^2/((r^2-s+s^2)^2) = 1;

eq := (r*y-x+s*x)^2/((r^2-s+s^2)^2)+(x*r-s*y)^2/((r...

> A := matrix(2,2,[s-1,r,r,-s]);

A := matrix([[-1+s, r], [r, -s]])

> eigs:=linalg[eigenvectors](A);

eigs := [-1/2+1/2*sqrt(1+4*r^2-4*s+4*s^2), 1, {vect...
eigs := [-1/2+1/2*sqrt(1+4*r^2-4*s+4*s^2), 1, {vect...

> u:= op(eigs[1][3]);v:=op(eigs[2][3]);

u := vector([(-1/2+1/2*sqrt(1+4*r^2-4*s+4*s^2)+s)/r...

v := vector([(-1/2-1/2*sqrt(1+4*r^2-4*s+4*s^2)+s)/r...

>

>

To compute the Foci of the ellipse, note that the ellipse (-x+x*s+r*y)^2/((-s+s^2+r^2)^2)+(-s*y+r*x)^2/((-s+s... is the image of the circle x^2+y^2 = -s+s^2+r^2 under the linear transformation defined by the matrix A := matrix([[-1+s, r], [r, -s]])

The eigenvectors and eigenvalues of A are u := vector([(-1/2+1/2*sqrt((2*s-1)^2+4*r^2)+s)/r, ... , ueig := -1/2+sqrt((2*s-1)^2+4*r^2)/2 , and

v := vector([(-1/2-1/2*sqrt((2*s-1)^2+4*r^2)+s)/r, ... , veig := -1/2-sqrt((2*s-1)^2+4*r^2)/2 . Since A is symmetric, we know the eigenvectors are perdicular and form the principal axes of the ellipse. The eigenvalues (in absolute value) are the major semi-axis M = 1/2+sqrt((2*s-1)^2+4*r^2)/2 in the director of v and minor semi-axis m = abs(-1/2+sqrt((2*s-1)^2+4*r^2)/2) in the direction of u. So the foci are F[1] = sqrt(M^2-m^2) u/abs(u) and F[2] = -sqrt(M^2-m^2) u/abs(u) . Note that the ellipse is a circle exactly when (2*s-1)^2+4*r^2 = 0 , that is when s = 1/2 and r = 0.

> M := (r,s)->1/2+sqrt((2*s-1)^2+4*r^2)/2;
m :=(r,s)-> abs(-1/2+sqrt((2*s-1)^2+4*r^2)/2);
uvec := (r,s)->[(-1/2+1/2*sqrt((2*s-1)^2+4*r^2)+s)/r, 1];
vvec:=(r,s)->[(-1/2-1/2*sqrt((2*s-1)^2+4*r^2)+s)/r, 1];
F1 := (r,s)->sqrt(M(r,s)^2-m(r,s)^2)/(uvec(r,s)[1]^2+uvec(r,s)[2]^2)*uvec(r,s);
F2 := (r,s)->-sqrt(M(r,s)^2-m(r,s)^2)/(uvec(r,s)[1]^2+uvec(r,s)[2]^2)*uvec(r,s);

M := proc (r, s) options operator, arrow; 1/2+1/2*s...

m := proc (r, s) options operator, arrow; abs(-1/2+...

uvec := proc (r, s) options operator, arrow; [(-1/2...

vvec := proc (r, s) options operator, arrow; [(-1/2...

F1 := proc (r, s) options operator, arrow; sqrt(M(r...

F2 := proc (r, s) options operator, arrow; -sqrt(M(...

sqrt((1/2+1/2*sqrt(1+4*r^2-4*s+4*s^2))^2-abs(-1/2+1...
sqrt((1/2+1/2*sqrt(1+4*r^2-4*s+4*s^2))^2-abs(-1/2+1...

> locuswithfoci := proc(r,s)
local pl1,pl2,pl3,f1,f2;
pl1:= plot([seq(p(r,s,i/100),i=0..100)],scaling=constrained);
pl2 := plottools[disk](convert(evalf(F1(r,s)),list),.1,color=yellow);
pl3 := plottools[disk](convert(evalf(F2(r,s)),list),.1,color=yellow);
plots[display]([pl2,pl3,pl1],scaling=constrained);
end;

locuswithfoci := proc (r, s) local pl1, pl2, pl3, f...
locuswithfoci := proc (r, s) local pl1, pl2, pl3, f...
locuswithfoci := proc (r, s) local pl1, pl2, pl3, f...
locuswithfoci := proc (r, s) local pl1, pl2, pl3, f...
locuswithfoci := proc (r, s) local pl1, pl2, pl3, f...
locuswithfoci := proc (r, s) local pl1, pl2, pl3, f...
locuswithfoci := proc (r, s) local pl1, pl2, pl3, f...

> plot([F1(1,1),F2(1,1)]);

Plotting error, empty plot

> locuswithfoci(3,1);

> drawlocus2 := proc(r,s)
local frame,n,pts,i,movie,loc;
pts:=[seq(p(r,s,i/100),i=0..100)];
loc:= plot(pts,color=magenta,thickness=3):
if s <> s^2+r^2 and (r <>0 or s<>1/2) then
loc := loc,
plottools[disk](convert(evalf(F1(r,s)),list),.05,color=yellow),
plottools[disk](convert(evalf(F2(r,s)),list),.05,color=yellow) fi;
frame := (r,s,t)->plots[display]([plottools[disk](p(r,s,t),.05,color=green),
plot([evalf(F1(r,s)),p(r,s,t),evalf(F2(r,s))],color=blue),seg(r,s,t),loc,tri(r,s,t)]);
movie :=[seq(frame(r,s,i/100),i=0..100)];
plots[display](movie,insequence=true,scaling=constrained);
end:

>

> drawlocus2(1,2);

>