dunbarx wrote:Sure.
But you see how a sinusoidal motion is critical to a good looking pendulum. So if you use "move" to change the position of the weight, is that so different than setting its loc? You will need the same information to do either.
Anyway, write back with what you make.
Craig Newman
Craig,
Unless I'm missing something, I can:
Code: Select all
move graphic "ball" to the points of graphic "line" in 2 seconds
but I can't:
Code: Select all
set the loc of graphic "ball" to the points of graphic "line"
...without using a repeat loop like this:
Code: Select all
on mouseUp
repeat with x = 1 to the number of lines in the points of graphic "line"
set the loc of graphic "ball" to item 1 of line x of the points of graphic "line",item 2 of line x of the points of graphic "line"
wait .5 second -- set this with a user entered number in a field or popup
end repeat
end mouseUp
...and I'd just have the ball "popping" into existence at the endpoints. If I want to have smooth motion, I guess I'd have to add many points between the two endpoints and then I'd have the major processing overhead of the loop (which is why I'm back at the "move" command for its simplicity). I agree the sinusoidal motion of the pendulum is critical if I
must have a pendulum. I'm abandoning that idea now as I can see trying to maintain code using mathematics I don't understand (although can experience with the pendulum stack) might be a headache I'm not willing to accept. What's the old saying?
I beat my head against the wall because it feels so good when I stop. Um...nah.
I'm even thinking about a pulsing light and sound (although I haven't looked into what a pulsing light might take in terms of code - I'm not looking to complicate this app -

)
Thanks,
Barry