# \[?\] Plot the circles within a Manipulate?

**URL:** <https://community.wolfram.com/t/plot-the-circles-within-a-manipulate/11097>\
**Category:** Questions\
**Tags:** graphics-and-visualization, interface-construction\
**Created:** [August 14, 2017, 11:04am UTC](https://community.wolfram.com/t/plot-the-circles-within-a-manipulate/11097 "2017-08-14T11:04:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lis1lis1](https://avatars.discourse-cdn.com/v4/letter/l/6de8d8/32.png) [@lis1lis1](https://community.wolfram.com/u/lis1lis1)\
**Post date:** [August 14, 2017, 11:04am UTC](https://community.wolfram.com/t/plot-the-circles-within-a-manipulate/11097/1 "2017-08-14T11:04:42Z")

</div>

Consider the following code:

```
hypocycloid[tend] := 
 Module[{a = 4, b = 1, x, y, p}, 
  x[t_, p_] := b (a/b - 1) Cos[t] + b p Cos[(a/b - 1) t];
  y[t_, p_] := b (a/b - 1) Sin[t] - b p Sin[(a/b - 1) t]; 
  ParametricPlot[{x[t, 1], y[t, 1]}, {t, 0, tend}, 
   PlotStyle -> {Red, Thick}, Ticks -> None, ImageSize -> 225, 
   Epilog -> {Thick, Blue, Circle[{0, 0}, a], Black, 
     Circle[{x[tend, 0], y[tend, 0]}, b], Red, PointSize[Large], 
     Point[{x[tend, 1], y[tend, 1]}], Black, 
     Line[{{x[tend, 0], y[tend, 0]}, {x[tend, 1], y[tend, 1]}}]}, 
   PlotRange -> (1 + 1/20) {-a, a}]];

Manipulate[Quiet@hypocycloid[tend], {tend, .0001, 2*Pi}]

```

---

<div class="post-metadata">

**Author:** ![mthiel](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mthiel/32/42877_2.png) [@mthiel](https://community.wolfram.com/u/mthiel)\
**Post date:** [August 14, 2017, 12:04pm UTC](https://community.wolfram.com/t/plot-the-circles-within-a-manipulate/11097/2 "2017-08-14T12:04:32Z")

</div>

It does work if you define your functions properly:

```
hypocycloid[tend_] := 
Module[{a = 4, b = 1, x, y, p}, 
x[t_, p_] := b (a/b - 1) Cos[t] + b p Cos[(a/b - 1) t]; 
y[t_, p_] := b (a/b - 1) Sin[t] - b p Sin[(a/b - 1) t]; 
ParametricPlot[{x[t, 1], y[t, 1]}, {t, 0, tend}, 
PlotStyle -> {Red, Thick}, Ticks -> None, ImageSize -> 225, 
Epilog -> {Thick, Blue, Circle[{0, 0}, a], Black, 
Circle[{x[tend, 0], y[tend, 0]}, b], Red, PointSize[Large], 
Point[{x[tend, 1], y[tend, 1]}], Black, 
Line[{{x[tend, 0], y[tend, 0]}, {x[tend, 1], y[tend, 1]}}]}, 
PlotRange -> (1 + 1/20) {-a, a}]];

```

Then

```
Manipulate[Quiet@hypocycloid[tend], {tend, .0001, 2*Pi}]

```

does work.

![Aug-14-201713-04-04.gif](https://global.discourse-cdn.com/wolfram/original/3X/1/e/1ee2eb69531c3634b6ce22692f258612c725f832.gif)

Cheers,

Marco

---

<div class="post-metadata">

**Author:** ![lis1lis1](https://avatars.discourse-cdn.com/v4/letter/l/6de8d8/32.png) [@lis1lis1](https://community.wolfram.com/u/lis1lis1)\
**Post date:** [August 14, 2017, 12:46pm UTC](https://community.wolfram.com/t/plot-the-circles-within-a-manipulate/11097/3 "2017-08-14T12:46:35Z")

</div>

Thank you, Marco. I did not understand how you make it to run continuously. Please explain. Thank you again.
