## 400 Reputation

6 years, 346 days

## avoid the flickering points of an animat...

Maple 2021

restart;
Proc := proc(t) local t4, l3, R, r, eq, sol; _EnvHorizontalName := 'x'; _EnvVerticalName := 'y'; t4 := thickness = 4; l3 := linestyle = dot; R := 9; r := 1/2*R; geometry:-point(OO, 0, 0); geometry:-circle(Cir, [OO, R]); geometry:-point(K, R*cos(t), R*sin(t)); geometry:-point(Omega, r*cos(t), r*sin(t)); geometry:-circle(cir, [Omega, r]); eq := geometry:-Equation(cir); geometry:-line(XXp, y = 0); geometry:-line(YYp, x = 0); geometry:-line(L1, y = x); geometry:-line(L2, y = -x); geometry:-projection(M1, K, XXp); geometry:-coordinates(M1); geometry:-point(K2, geometry:-coordinates(M1)[1] - 2*R, 0); geometry:-coordinates(K2); geometry:-segment(sT, K2, M1); geometry:-point(N1, 0, R*sin(t)); subs(y = x, eq); sol := solve(%, x); geometry:-point(N2, sol[2], sol[2]); subs(y = -x, eq); sol := solve(%, x); geometry:-point(N3, sol[2], -sol[2]); plots:-display(geometry:-draw([Cir(color = blue, t4), cir(color = grey, t4), sT(color = black, t4), XXp(color = black, l3), YYp(color = black, l3), L1(color = black, l3), L2(color = black, l3), N1(color = blue, symbol = solidcircle, symbolsize = 15), N2(color = blue, symbol = solidcircle, symbolsize = 15), N3(color = blue, symbol = solidcircle, symbolsize = 15), M1(color = blue, symbol = solidcircle, symbolsize = 15)]), axes = none, view = [-30 .. 10, -10 .. 10], size = [800, 800]); end proc;
plots:-animate(Proc, [t], t = 0 .. 2*Pi, frames = 200);
NULL;
I am trying to program  this drawing, how to improve this code ? Thank you.

## How a figure evolves when a point moves...

Maple 2021

restart;
with(plots);
with(geometry);
_EnvHorizontalName := 'x';
_EnvVerticalName := 'y';
xA := 5;
yA := 0;
point(A, xA, yA);
xB := 5;
yB := -7;
point(B, xB, yB);
midpoint(C, A, B);
segment(sg1, A, B);
xP := -12;
yP := 0;
point(P, xP, yP);
PerpenBisector(L, C, P);
line(YYp, y = yB);
line(XXp, y = 0);
intersection(M, L, YYp);
line(PM, [P, M]);
projection(H, C, PM);
triangle(CMP, [C, M, P]);
triangle(ABH, [A, B, H]);
distance(B, H);
circle(cir, [B, 7]);
display(textplot([[coordinates(A)[], "A"], [coordinates(B)[], "B "], [coordinates(C)[], "C"], [coordinates(M)[], "M"], [coordinates(H)[], "H"], [coordinates(P)[], "P"]], align = {"above", 'right'}),
draw([YYp(color = red), XXp(color = black), PM(color = green), L(color = green), sg1(color = black), cir(color = magenta), P(color = black, symbol = solidcircle, symbolsize = 10), M(color = black, symbol = solidcircle, symbolsize = 10), H(color = black, symbol = solidcircle, symbolsize = 10), A(color = blue, symbol = solidcircle, symbolsize = 10), B(color = blue, symbol = solidcircle, symbolsize = 10), CMP(color = blue, filled = true, transparency = 0.8), ABH(color = red, filled = true, transparency = 0.8), C(color = blue, symbol = solidcircle, symbolsize = 10)]),
axes = none, view = [-15 .. 14, -15 .. 3]);
I want to change this figure when xP varies from -12 to 12; Is it possible to use Explore or animate ? Thank you.

## non-numeric coordinate encountered, can...

Maple 2021

Sq := proc(n::integer)
local aS, oS, aC, oC, s, dr, pc, u;
aS := -i/n;
oS := sum(1/s, s = 1 .. n);
aC := 1/2*aS;
oC := oS - 1/2*1/((n + 1)*n);
point(S, aS, oS); point(C, aC, oC);
MakeSquare(K, [S, 'center' = C]);
u := (x, i) -> sum(exp(-x*k)/k, k = 1 .. i);
pc := plot(u(x, n), x = 0 .. 4, color = green);
dr := draw([K]);
display({dr, pc});
end ;Sq(1);
Error, (in geometry:-draw) non-numeric coordinate encountered, cannot determine plot view
How to correct this procedure ?

## search for recurrence to find Bernoulli ...

Maple 2021

eqn := B(n) = -sum(binomial(n + 1, k)*B(k), k = 0 .. n - 1)/(n + 1);
init := B(0) = 1, B(1) = -1/2;
sol := rsolve({eqn, init}, B(n));
Why doesn’t this give me any solution ? Thank you.

## Moving tangent portion between 2 fixed t...

Maple 2021

How to show that the angle QF2P remains constant when M moves on the ellipse ? Perhaps with Explore ?
restart;
with(plots);
with(geometry);
_EnvHorizontalName := 'x';
_EnvVerticalName := 'y';
x0 := 100;
y0 := 40;
a := 7;
b := 5;
c := sqrt(a^2 - b^2);
ellipse(el, x^2/a^2 + y^2/b^2 - 1);
point(F1, -c, 0);
point(F2, c, 0);
eq := simplify((a^2 - x0^2)*(y - y0)^2 + (b^2 - y0^2)*(x - x0)^2 + 2*x0*y0*(x - x0)*(y - y0)) = 0;
sol := solve({eq}, {y});
line(tang1, op(sol[1]));
line(tang2, op(sol[2]));
sol2 := op(solve({op(sol[1]), x^2/a^2 + y^2/b^2 - 1 = 0}, {x, y}));
xM2 := rhs(sol2[1]);
yM2 := rhs(sol2[2]);
point(A, xM2, yM2);
sol3 := op(solve({op(sol[2]), x^2/a^2 + y^2/b^2 - 1 = 0}, {x, y}));
xM3 := rhs(sol3[1]);
yM3 := rhs(sol3[2]);
point(B, xM3, yM3);
line(Pol, [A, B]);
simplify(Equation(Pol));
isolate(%, y);
xM := 4;
sol := solve({subs(x = xM, x^2/a^2 + y^2/b^2 - 1 = 0)}, {y});
yM := rhs(op(sol[1]));
point(M, xM, yM);
line(Tang, x*xM/a^2 + y*yM/b^2 - 1 = 0);
intersection(P, tang1, Tang);
intersection(Q, tang2, Tang);
line(PF2, [P, F2]);
line(QF2, [Q, F2]);
alpha := FindAngle(PF2, QF2);
arctan(alpha);
evalf(%);
display(textplot([[-c, 0, "F1"], [c, 0, "F2"], [coordinates(B)[], "B"], [coordinates(A)[], "A "], [coordinates(M)[], "M "], [coordinates(P)[], "P "], [coordinates(Q)[], "Q "]], align = {"above", 'right'}), draw([el(color = red), A(color = black, symbol = solidcircle, symbolsize = 16), PF2(color = brown), QF2(color = brown), B(color = black, symbol = solidcircle, symbolsize = 16), M(color = black, symbol = solidcircle, symbolsize = 16), P(color = black, symbol = solidcircle, symbolsize = 16), tang1(color = green), tang2(color = green), Tang(color = green), F1(color = blue, symbol = solidcircle, symbolsize = 16), Q(color = blue, symbol = solidcircle, symbolsize = 16), F2(color = red, symbol = solidcircle, symbolsize = 16)]), axes = none, view = [-7 .. 15, -7 .. 12]);

 1 2 3 4 5 6 7 Last Page 1 of 30
﻿