phetsims / wave-interference

"Wave Interference" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
19 stars 5 forks source link

Consider asymmetric HISTORY_LENGTH #411

Open arouinfar opened 5 years ago

arouinfar commented 5 years ago

The screen has a temporal averaging called HISTORY_LENGTH specified in IntensitySample.js.

  // Number of samples to use for a temporal average.  Higher number means more latency and smoother. Lower number means
  // lower latency, but more bouncy.
  const HISTORY_LENGTH = 90 * WaveInterferenceConstants.CALIBRATION_SCALE;

Originally the the scaling factor was 180, but was tuned in #208 before we settled on 90. The lower the value, the less latency, but it also means that there is a lot more noise in the screen and Intensity graphs as mentioned in https://github.com/phetsims/wave-interference/issues/208#issuecomment-445411219

I think an averaging time of 40 is simply too low. There is a LOT of variation in intensity on the screen/graph, and I find it pretty distracting. The addition of the amplitude slider in #210, takes care of of the over-saturation issue in the screen (which was a motivator for this issue).

In today's design meeting, @kathy-phet remarked on the latency in the screen. The initial build up in intensity seemed okay to her, but the decay of intensity seemed a little long, so perhaps we could consider an asymmetric time averaging in the future.

Since this is not something that we are considering for the 2.0 release, I'll mark as deferred.