Closed kathy-phet closed 3 years ago
@jonathanolson - does the code naturally scale to more balls? @arouinfar - what do you think of the use case for 5?
The screens are created with a maximum "internal" number of balls, which can be different than the number that are active/visible. So we can change the internal maximum easily (to 5), and also set certain screens with that number by default. Having the maximum number of balls change dynamically once a screen is created would be a bit more work.
I am fine with 5, but doesn't seem like a huge need to me personally.
I think this is a reasonable suggestion for the Explore 1D screen and something that other teachers could find valuable. I would not include five balls on the Explore 2D screen, however.
To make room for the 5th ball, we'll need to adjust the default positions of the other balls a bit. @jonathanolson these values should work:
Ball 5 Data/Defaults
rgb( 247, 248, 16 )
Adding a 5th ball to the panel will bring it pretty close to the navbar, so we'll probably need to move the entire panel up a few px and bottom align it with the ResetAllButton. This change will affect all screens, but there should be enough room for it.
Done in the above commit. Should the spacing for the 1d momenta diagram be reduced?
@jonathanolson looks good in master. Let's try cutting the padding between vectors in half, and see what that looks like.
This is half the padding, I'm going to try a few options and commit the best one (and then let me know if another value is better).
FYI it's DEFAULT_1D_VERTICAL_SPACING
at the top of https://github.com/phetsims/collision-lab/blob/master/js/common/model/MomentaDiagram.js, was 0.4 before, 0.2 in the above screen-shot.
Went with 0.3, let me know if that looks ok!
JO, just a small suggestion, Can you move the word “total” up closer to the black arrow so that it won’t overlap / be obscured by the zoom buttons it it faces to the right?
Sent from my iPhone
On Dec 10, 2020, at 6:54 PM, Jonathan Olson notifications@github.com wrote:
Went with 0.3, let me know if that looks ok!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Moved the "total" so it fits better (in the 1d cases) with the above commit.
@jonathanolson the 5th ball and its associated changes all look good in master, including the Momenta Diagram.
A user has asked "Would you consider allowing five spheres on the Collisions Lab: explore 1D? I'd like five spheres because I'm interested in simulating Newton's cradle. " I know the original had 5 and we went to 4 since we didn't see a need for 5, but this is an interesting reason to have 5. I don't know if the sim is set up to be easily extensible to 5 for the 1D situation.