# Question:Animation of an ellipse

## Question:Animation of an ellipse

Maple 2021

Problema with textplot

restart:with(plots):
with(geometry):
_EnvHorizontalName := 'x':
_EnvVerticalName := 'y':
a := 7:
b := 3:
ellipse(p, x^2/a^2 + y^2/b^2 - 1, [x, y]):
Fig := proc(t)
local M, l1,L1,L2,  q, m, c , tex;
global a, b, p;
point(M, a*cos(t), b*sin(t));
if   VerticalCoord(M)=0
then line(l1, x=HorizontalCoord(M));
else m:=eval[recurse]( rhs
( isolate
( diff
( eval
( Equation(p),
y=y(x)
),
x
),
diff(y(x),x)
)
),
[ y(x)=y,
x=HorizontalCoord(M),
y=VerticalCoord(M)
]
);
c:=VerticalCoord(M)-m*HorizontalCoord(M);
line(l1, y=m*x+c);
fi;
reflection(q, p, l1);
line(L1, [point(P1, evalf~(coordinates(foci(q)[1]))),
point(P2, evalf~(coordinates(foci(q)[2])))]):
line(L2, [point(P3, evalf~(coordinates(foci(p)[1]))),
point(P4, evalf~(coordinates(foci(p)[2])))]):
segment(P1P3,[P1,P3]): circle(cir1,[P3,2*a]):
segment(P2P4,[P2,P4]):
circle(cir1,[P3,2*a]): circle(cir2,[P4,2*a]):
textplot([[P2[], "F1"], [P4[], "F2"]], font = [times, 10], align = {below, left}):
draw( [ p(color = blue),P1P3(color=magenta,linestyle=3),
q(color = blue),P2P4(color=magenta,linestyle=3),
l1(color = black),L1(color = black),cir1(color=magenta,linestyle=3),
cir2(color=magenta,linestyle=3),
M(color = blue, symbol = solidcircle, symbolsize = 16),
P1(color = red, symbol = solidcircle, symbolsize = 16),
P2(color = red, symbol = solidcircle, symbolsize = 16),
P3(color = red, symbol = solidcircle, symbolsize = 16),
P4(color = red, symbol = solidcircle, symbolsize = 16)
],
axes = none,
scaling = constrained);
end proc:
#
# Change nFig to type float
#
nFig := 180.0:
#
# Make sure loop index is a float, and change end point
# on loop to nFig-1.0
#
Figs := seq(Fig(2*Pi*i/nFig), i = 0.0 .. nFig-1.0):
plots:-display(Figs, insequence = true);
Error, (in plots:-textplot) improper op or subscript selector
Error, (in plots:-display) expecting plot structure but received: Figs

﻿