Basically, I want to move a graphic (such as a circle) along a given path (such as sin(x)). I was thinking that the trick might be making the x and y coordinates of the circle vary based on the equation, but I have not been able to make anything except a circle that just sits there.
Asked
Active
Viewed 3,280 times
5
1 Answers
4
You need to specify the PlotRange:
f[x_] := Sin[x];
Manipulate[Graphics[{Circle[{x, f[x]}, 0.5]}, PlotRange -> {{0, 5}, {-2, 2}}], {x, 0, 5}]
Yves Klett
- 15,383
- 5
- 57
- 124
nickjamesuk
- 883
- 6
- 13
-
Thank you, the missing PlotRange was exactly my issue. Thanks so much for the speedy response! – kneu93 Jan 03 '13 at 12:44
-
ManipulateandCircleandGraphics. Also, the demonstrations site is bound to yield some relevant code... – Yves Klett Jan 03 '13 at 12:31PlotRangecan help them in similar situations. – Yves Klett Jan 03 '13 at 13:39