Message Boards Message Boards

0
|
3022 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

[?] Plot the circles within a Manipulate?

Posted 7 years ago
POSTED BY: Lisan Lisov
2 Replies
Posted 7 years ago

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

POSTED BY: Lisan Lisov

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.

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract