How to make moving point and moving circle play automatically?
The last question is that the trajectory of the moving point is ellipse. The trajectory of this moving point is hyperbolic.
It is known that moving circle M is circumscribed with circle C1: (x+4) ^ 2+y ^ 2=2, and inscribed with circle C2: (x-4) ^ 2+y ^ 2=2. According to this relationship, the trajectory of the center of the moving circle M is the right branch of the hyperbola.
It is known that moving circle N is inscribed with circle C1: (x+4) ^ 2+y ^ 2=2, and is circumscribed with circle C2: (x-4) ^ 2+y ^ 2=2. According to this relationship, the locus of the center of the moving circle N is the left branch of the hyperbola.
How to draw a moving circle and its motion path hyperbola, which can be played automatically
Update 1:
Hyperbolic trajectories obtained by circumscribing two circles of different sizes ,code by cvgmt.thank you!
Please do not delete this code when you modify it. I want to keep learning
Clear["Global`*"];
n = {4, 0};
m = {-4, 0};
rN = 4;
rM = 2;
circleM = Circle[m, rM];
circleN = Circle[n, rN];
reg = DiscretizeRegion[
ImplicitRegion[
EuclideanDistance[{x, y}, m] - rM ==
EuclideanDistance[{x, y}, n] - rN, {x, y}], {{-20, 20}, {-20,
20}}];
pts = MeshPrimitives[reg, 1][[;; , 1]][[;; , 2]];
ani = ListAnimate[
Table[Module[{circleP},
circleP = Circle[p, EuclideanDistance[p, m] - rM];
Show[Region[reg],
Graphics[{circleM, circleN, circleP,
Line[{n,
n + (EuclideanDistance[p, n] + EuclideanDistance[p, m] -
rM) Normalize[p - n]}], {AbsoluteThickness[2], Cyan,
Line[{m, p}], Line[{n, p}]},
AbsolutePointSize[5], {Blue, Point[m],
Point[n]}, {AbsolutePointSize[10], Red, Point[p]},
Text[Style["P", Bold, Italic, 12, FontFamily -> "Times"],
p, {-2, -2}],
Text[Style["M", Bold, Italic, 12, FontFamily -> "Times"],
m, {0, 1.5}],
Text[Style["N", Bold, Italic, 12, FontFamily -> "Times"],
n, {0, 1.5}]}], Axes -> True,
AxesStyle -> Arrowheads[{{.035, 1.0}}], PlotRange -> 20,
PlotRangePadding -> 1.2, AxesLabel -> {x, y},
LabelStyle -> Directive[FontFamily -> "Times", 10]]], {p, pts}]]
Update 2:
The left branch of the hyperbola obtained by circumscribing two circles with unequal radii. Could you please perfect it and draw both branches of the hyperbola? thank you!
Clear["Global`*"];
n = {4, 0};
m = {-4, 0};
rN = Sqrt[2];
rM = Sqrt[2];
circleM = Circle[m, rM];
circleN = Circle[n, rN];
reg = DiscretizeRegion[
ImplicitRegion[
EuclideanDistance[{x, y}, m] - rM ==
EuclideanDistance[{x, y}, n] + rN, {x, y}], {{-20, 20}, {-20,
20}}];
pts = MeshPrimitives[reg, 1][[;; , 1]][[;; , 2]];
ani = ListAnimate[
Table[Module[{circleP},
circleP = Circle[p, EuclideanDistance[p, m] - rM];
Show[Region[reg],
Graphics[{circleM, circleN, circleP,
Line[{n,
n + (EuclideanDistance[p, n] + EuclideanDistance[p, m] -
rM) Normalize[p - n]}], {AbsoluteThickness[2], Cyan,
Line[{m, p}], Line[{n, p}]},
AbsolutePointSize[5], {Blue, Point[m],
Point[n]}, {AbsolutePointSize[10], Red, Point[p]},
Text[Style["P", Bold, Italic, 12, FontFamily -> "Times"],
p, {-2, -2}],
Text[Style["M", Bold, Italic, 12, FontFamily -> "Times"],
m, {0, 1.5}],
Text[Style["N", Bold, Italic, 12, FontFamily -> "Times"],
n, {0, 1.5}]}], Axes -> True,
AxesStyle -> Arrowheads[{{.035, 1.0}}], PlotRange -> 20,
PlotRangePadding -> 1.2, AxesLabel -> {x, y},
LabelStyle -> Directive[FontFamily -> "Times", 10]]], {p, pts}]]