Open Nancy-Salpepi opened 3 years ago
Reproduced in master.
Notes to self: Pressing the "Initial Positions" button calls setExactPositions
, which is implemented separately by OneDimensionModel and TwoDimensionsModel.
Here's another easier way to reproduce:
After poking around in OneDimensionModel, I now understand what's going on here.
When you pause the sim in step 2 above, you do so at some time t
. That t
is not zero, and is used in the computation of the "waveform" by setExactPositions
. Each time I paused the sim, I was doing so at a different t
. So that's why there are different results for step 3 above - the waveform depends on what value of t
is being used. If you want the waveform to be identical to "Initial Positions", then t
must be zero (or a positive integer multiple of the waveform's period).
Some options:
(1) Do nothing.
(2) If any Amplitude slider is changed while the sim is paused, reset t
to zero. This could be confusing because the waveform change will be based on all sliders, not just the one that the user is moving.
My recommendation is (1).
@arouinfar How would you like to proceed for the prototype, and for the final version?
@pixelzoom I think (1) is fine for the purposes of the prototype.
I would prefer (2) in the final version of the simulation. Generally, people are likely to pause the simulation to set up a new initial condition. That could involve adjusting mode sliders and/or displacing the masses. Once the sim is playing, I would expect "initial positions" to return the sim to the state it was in just before pressing play. That also means that if I pause the sim and then move some sliders or masses around, hitting "initial positions" wouldn't appear to do anything because the sim is overriding the latest state as the new "initial positions".
Unassigning and deferring, since this will not be addressed for the prototype.
Test device MacBook Air (m1 chip)
Operating System 12.0.1
Browser Safari 15
Problem description https://github.com/phetsims/qa/issues/733
Sometimes when the sim is paused and amplitude values are changed, the positions of the masses don't accurately reflect that change.
Steps to reproduce This behavior is very inconsistent, but here are some steps that have worked for me:
Visuals
I do not see this behavior in the flash version