1
$\begingroup$

I have defined three functions: $x[t], x_1[t],x_2[t]$. $x[t]$ describes the motion of a circle of some radius $r$ that, at some moment $t_0$ decays into two circles of radii $r_1$ and $r_2$. The equations of motion of these two cirles are $x_1[t]$ and $x_2[t]$, respectively.

How can I, using command Manipulate, make an animation of the circle decay? I can make the animation for one circle:

Manipulate[Graphics[{Circle[{t, x[t]}, 0.5]}, 
  PlotRange -> {{-5, 10}, {-5, 10}}], {t, -5, 1}]

Some arbitrary conditions are given here, since that is not part of my problem.

How can I animate two additional circles on the same graph, while showing the original circle disappear?

$\endgroup$

closed as unclear what you're asking by Jens, MarcoB, Mr.Wizard Aug 12 '15 at 23:12

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Graphics[{If[t < t0, Circle[x[t], r], {Circle[x1[t], r1], Circle[x2[t], r2]}]}, ...] $\endgroup$ – Rahul Jul 13 '15 at 17:05
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Jul 13 '15 at 17:24
  • $\begingroup$ @Rahul How do I set plot range, if I use your line? $\endgroup$ – Nemanja Bojovic Jul 13 '15 at 17:58
  • $\begingroup$ Ok, I figured this out. I just need to know how to define the coordinates of the centre of the circle parametrically. $\endgroup$ – Nemanja Bojovic Jul 13 '15 at 18:21
1
$\begingroup$
myx1[t_] := Sin[t];
myx2[t_] := Sin[3 t];
myx3[t_] := Sin[4 t];
Manipulate[
 Graphics[
  {
   Circle[{myx1[t], 0}],
   If[t > 2, 
    {
     {Red, Circle[{myx2[t], 0}, .5]},
     {Green, Circle[{myx3[t], 0}, .5]}
     }
    ]},
  PlotRange -> {{-2, 2}, {-2, 2}}],
 {t, 0, 10}]
$\endgroup$
  • 1
    $\begingroup$ I have a problem with making an animation of multiple circles. It is not very important for first circle to disappear. My main goal is to make an animation of the first circle that will be based on the equation $x[t]$ to some moment $t_0$ and, after that moment, on equations $x_1[t]$ and $x_2[t]$ simultaneously. All on the same graph. Radius is not changing. Radius of the first circle is $r$ and, after moment $t_0$, the radii of two circles are $r_1$ and $r_2$. They should not change continously. $\endgroup$ – Nemanja Bojovic Jul 13 '15 at 17:31
  • $\begingroup$ I now understand how to do this. I just don't know how to define coordinates of the centre of each circle parametricaly, i.e. I should have $x[t]$ and $y[t]$ for each circle. $\endgroup$ – Nemanja Bojovic Jul 13 '15 at 18:57

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