phetsims / pendulum-lab

"Pendulum Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 10 forks source link

Possible to have infinite period trace #91

Closed bryo5363 closed 8 years ago

bryo5363 commented 9 years ago

This is a tricky issue but it shows incorrect behavior nonetheless.

Steps to reproduce: 1) open sim 2) open intro 3) turn on period trace 4) drag the length slider at the point of highest potential. if you can reduce the length long enough, you will be able to get the period trace to continue drawing as the mass rotates around origin

phet-steele commented 9 years ago

I maybe have seen this in other environments. Can you post a video or screenshot, or is this what you are talking about?

Happens around 16 seconds in: https://drive.google.com/file/d/0B3HJopSo_QqLRnQ2MGcwTTZIRm8/view?usp=sharing

phet-steele commented 9 years ago

Or this? https://drive.google.com/file/d/0B3HJopSo_QqLSk9Ydnl6anNHVFk/view?usp=sharing

elisemorgan commented 9 years ago

I'm seeing the same thing on safari. Both objects have an infinite period - object two is being traced while object one isn't. screen shot 2015-06-17 at 12 44 22 pm

ariel-phet commented 9 years ago

Hopefully will be addressed with new minimum length

jonathanolson commented 8 years ago

I'm curious what the desired behavior is for the period trace tool. It seems that by changing the length/gravity, one can switch between spinning around the axle or not.

Also unless the minimum length is equal to the maximum length (not happening), this will always be possible to cause.

Thoughts?

arouinfar commented 8 years ago

@jonathanolson I've been playing around with dev.6 and I think the period trace is looking good for a non-spinning pendulum. When the pendulum spins about its own axis, I think we have two options.

I have a preference for the first solution, but could live with either. Any thoughts about this @jonathanolson?

jonathanolson commented 8 years ago

I'm not sure that a spinning pendulum technically has a period anymore since it's not oscillating back and forth. (The period timer records an infinite period while spinning.) We could remove the period trace in this situation.

It's more complicated/computationally intensive to determine IF the pendulum is spinning or will reverse direction, particularly if friction is enabled. This sounds like we'd want to not start the period trace/timer IF we compute that it will spin?

Alternatively, we could leave the trace, but it would need some tweaks to match the desired behavior.

Like stopping the trace (and starting to fade) once the pendulum reaches the vertical/up position?

I'm not sure I have a particularly good solution. I can look more into the first solution, and getting a good/fast approximate check to see if the pendulum will pass the vertical as a function of (length, angular velocity at the bottom, friction, gravity).

Thoughts?

ariel-phet commented 8 years ago

I know this is funky...however, since spinning around is really not the point of the sim...the point is simple harmonic motion, I think this is a use case we do not have to address further. Basically the idea of a "period" gets wonky in this case, and I think that is a perfectly valuable message. Period is only meaningful for a pendulum when it is performing SHM, not when spinning around the axle.

I think fine to leave as is. Thanks for pointing out thought @bryo5363 @elisemorgan and @phet-steele!