5

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.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
kneu93
  • 53
  • 1
  • 3

1 Answers1

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