phetsims / plinko-probability

"Plinko Probability" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
5 stars 7 forks source link

bug in computation of default ball radius #79

Closed pixelzoom closed 7 years ago

pixelzoom commented 7 years ago

In BallsNode:

// set the default ball radius using the largest possible radius, that is the minimum number of rows.
var defaultNumberOfRows = PlinkoProbabilityConstants.ROWS_RANGE.min;
var defaultBallRadius = modelViewTransform.modelToViewDeltaX( GaltonBoard.getPegSpacing( defaultNumberOfRows ) * PlinkoProbabilityConstants.BALL_SIZE_FRACTION );

This is in fact not using the default number of rows, it's using the min number of balls. The default is 12, the min is 5.

So which is wrong - the implementation or the documentation?

pixelzoom commented 7 years ago

Based on the comment... I'm guessing that (for image quality) the correct thing to do is to use the largest ball radius. Which would mean using the minimum number of rows.