2
$\begingroup$

It is known that circle M: (x+1) ^ 2+y ^ 2=1, circle N: (x-1) ^ 2+y ^ 2=25, dynamic circle P is circumscribed by circle M and inscribed by circle N, and the locus of circle center P is curve C. It is required to draw two fixed circles M and N, and show the track of the center P in the form of a dynamic graph, that is, show the track of P as an ellipse in the form of a moving point P.

enter image description here

enter image description here

$\endgroup$
3
  • $\begingroup$ it is not clear to me what you are asking. How will the P circle move? You gave no constraints, Will it move such that it remains touching the smaller circle M or will it move such that it remains touching the inner of the large circle N? Can you show a diagram of some position of the inner circle P at some later time? Clearly once it moves from the instance you shown, it can't remain touching both circles all the time? The length $r$ is fixed length, right? $\endgroup$
    – Nasser
    Commented Jan 25, 2023 at 4:22
  • $\begingroup$ M circle and N circle are fixed circle, that is, the center and radius of the circle are known. So M circle and N circle are fixed. The center of the circle P is point P, (the picture I sent has been noted above).dynamic circle P is circumscribed by circle M and inscribed by circle N, and the locus of circle center P is curve C.The motion path of the center P of circle P is an ellipse C. I want to express the elliptical trajectory in the form of dynamic graph. $\endgroup$
    – csn899
    Commented Jan 25, 2023 at 4:50
  • $\begingroup$ Just as the moon revolves around the earth, the trajectory of the moon is drawn with an ellipse, and the moon is represented by a point, which moves around and around on its trajectory. Want to achieve the same effect $\endgroup$
    – csn899
    Commented Jan 25, 2023 at 4:50

1 Answer 1

6
$\begingroup$
Clear["Global`*"];
n = {1, 0};
m = {-1, 0};
rN = 5;
rM = 1;
circleM = Circle[m, rM];
circleN = Circle[n, rN];
reg = ImplicitRegion[
   EuclideanDistance[{x, y}, m] - rM == 
    rN - EuclideanDistance[{x, y}, n], {x, y}];
p0 = {x, y} /. FindInstance[{x, y} ∈ reg, {x, y}][[1]];
Manipulate[
 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 -> {{-4.5, 6}, Automatic}, PlotRangePadding -> 1.2, 
   AxesLabel -> {x, y}, 
   LabelStyle -> Directive[FontFamily -> "Times", 10]]], {{p, p0}, 
  Locator, 
  TrackingFunction -> Function[pos, p = RegionNearest[reg]@pos], 
  Appearance -> None}]

enter image description here

$\endgroup$
7
  • $\begingroup$ Thank you very much for your help. The effect of your code is almost what I want. What is the reason why I didn't move after running? The static effect of this figure has completely met the requirements, but the moving point has not moved, and the corresponding circle will also move after moving. Can you help me modify it? thank you! $\endgroup$
    – csn899
    Commented Jan 25, 2023 at 4:54
  • $\begingroup$ Can I add the rectangular coordinate system and the center letter of the corresponding circle to the picture? $\endgroup$
    – csn899
    Commented Jan 25, 2023 at 4:56
  • $\begingroup$ Thank you very much! Both the coordinate axis and the center letter are available. One of the most important questions is why the moving point P and the corresponding moving circle do not move after clicking the autorun button? $\endgroup$
    – csn899
    Commented Jan 25, 2023 at 6:08
  • 1
    $\begingroup$ @csn899 double click the red point and move the mouse. $\endgroup$
    – cvgmt
    Commented Jan 25, 2023 at 6:18
  • $\begingroup$ Thank you very much for giving me the code! Can I get the form that pressing the autorun button can make it move by itself? thank you! $\endgroup$
    – csn899
    Commented Jan 25, 2023 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.