phetsims / projectile-data-lab

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

Projectile Sampling Distributions: Restrict min and max of speedMeanProperty #305

Closed matthew-blackman closed 2 months ago

matthew-blackman commented 2 months ago

In implementing https://github.com/phetsims/projectile-data-lab/issues/304, we want to ensure that the data cannot fall outside of the horizontal range of the histogram when launcher properties are customized via PhET-IO. To prevent this from happening, let's restrict the min and max values of quantities like projectileDataLab.global.model.launcherMechanisms.explosion.speedMeanProperty to ensure that the data falls within the visible range of the histogram (within a reasonable degree, given the inherent randomness of the data).

matthew-blackman commented 2 months ago

Please close after verifying.

KatieWoe commented 2 months ago

I haven't managed to get a mean outside the bounds yet. Still possible probably, but relatively unlikely. Do we know what would happen if it did occur?

matthew-blackman commented 2 months ago

I think this would be extremely rare, but the best chance is probably with launcher 6. In the rare chance that this were to happen, the projectiles would appear with the same 'force field' image under them to show that they landed on something, and the mean would appear as normal between the projectiles. Feel free to close if that sounds okay to you @KatieWoe.