phetsims / masses-and-springs-basics

"Masses and Springs: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 3 forks source link

Add Center of Oscillation Line #29

Closed arouinfar closed 5 years ago

arouinfar commented 5 years ago

In design meeting, @kathy-phet brought up the point that it's handy to have a reference point for the COM when the vectors are turned on.

In MAS, the Natural Length and Equilibrium Position are replaced by the Displacement vector and Mass Equilibrium, in screens with vector representations. The Displacement is a bit too advanced for MASB, so we would instead like to add a "Center of Oscillation" line whenever the Period Trace, Velocity, or Acceleration is turned on.

The Center of Oscillation would have the same design as the Mass Equilibrium in MAS, but would have the string "Center of Oscillation" to its right. This feature will not have its own independent UI control, but would be visible so long as either the Period Trace, Velocity, or Acceleration is on.

screen shot 2018-10-18 at 5 12 10 pm
Denz1994 commented 5 years ago

An additional label option has been added to ReferenceLineNode.js. We can add custom labels to any of our reference lines. This has also been used for the Height = 0 line node in the non-basics version.

Both MAS and MASB should be reviewed @arouinfar, specifically the Center of Oscillation line in MASB and Height = 0 line in MAS.

arouinfar commented 5 years ago

Thanks @Denz1994. I noticed that the label is a bit far from the line itself. image image

Can you shift the strings to the left a bit so that the spacing is closer to that in the published version of MAS? image

Denz1994 commented 5 years ago

The strings have been brought in to match the original state of the label as seen in the original state of MAS. What do you think @arouinfar?

arouinfar commented 5 years ago

Looks good!