phetsims/vector-addition

limit number of vectors in Lab screen

Closed this issue · 8 comments

The number of vectors is currently unlimited in the Lab screen. Limit the number to 10 per VectorSet. Update implementation-notes.md accordingly.

Visibility of the icon in the vector toolbox is handled in VectorCreatorPanelSlot. It currently supports creating of only single or infinite numbers of vectors.

        // Change the visibility to allow or not allow infinite slots
        iconNode.visible = options.isInfinite;

This change has been made in master and in 1.0.0-dev.38. @arouinfar please verify, close if all looks well.

While working on #225, I started wondering if there's any pedagogical advantage to having 10 of each vector type. More than 5 of each type creates an unable mess -- especially with the "projection" representation for component vectors. Should we consider limiting to 5 instead of 10?

Here's a worst case for projected component vectors when there are 10 of each type:

screenshot_1586

Here's a worst case with 5 of each type:

screenshot_1588

Maybe we want to keep the vectors closer to the axes in either case. But the latter certainly is easier to parse.

I would be fine with limiting to 5 of each vector for the initial publication. I cannot think of an obvious pedagogically useful case where more than 5 vectors of each type would be especially useful.

@pixelzoom confirmed it would be a trivial change to adjust the limit in the future. For sims like CCK we initially published with certain limits on the number of wires/batteries (partially for similar messiness reasons, partially for performance implications), so we could publish and if we get push back, we could up the limit in a future release. I certainly think it would keep the sim in a state where it was more difficult to make messy.

@pixelzoom confirmed it would be a trivial change to adjust the limit in the future.

Specifically, a 1-line change in LabVectorCreatorPanel:

numberOfVectors: 10 // Each slot can create 10 vectors

@pixelzoom the behavior in master is looking good.

I cannot think of an obvious pedagogically useful case where more than 5 vectors of each type would be especially useful.

I generally agree, but I am very hesitant to remove any flexibility from the simulation. Yes, things can get messy with lots of lots of vectors (x2 flavors) and the various representations all on, but you don't need everything all out/on at the same time. There may be a teacher out there that has some great use case that requires >5 vectors.

so we could publish and if we get push back, we could up the limit in a future release.

While I appreciate that this is a trivial change in the code, the redeploy process is very rarely trivial (especially if some time has passed since 1.0).

I'd really like to hear @kathy-phet's opinion on this. If she is comfortable cutting the number of vectors down to 5, then I would also be okay with it.

Discussed with @kathy-phet and @ariel-phet this morning. We've decided to keep the limit at 10 vectors. This screen is very much a sandbox, and things can get messy if you let them. Keeping the max at 10 may also be more useful in a math context, and generally allows for greater flexibility.