phetsims/vector-addition

angle checkbox bug

Closed this issue · 3 comments

@arouinfar thinks she observed a bug with the angle checkbox in interviews. She will look at her notes and try to reproduce.

@pixelzoom I've found two angle-related bugs in dev.41. Turning angles off and then back on will fix both bugs.

Zero-magnitude bug

If a vector's magnitude becomes zero and then later increases to something non-zero, it will lose its angle readout.

Method 1

  1. Equation screen.

  2. Turn on Angles
    image

  3. Use equation spinner to change coefficient of a from 1 to -1. Notice that a no longer has an angle readout.
    image

Method 2

  1. Explore 2D
  2. Drag out b and c.
  3. Turn on Sum and Angles
    image
  4. Rotate b to <0, 10> so it cancels out c.
    image
  5. Drop a into the play area. Notice that the sum no longer has an angle readout.
    image

Turning on Angles while play area is empty

Method 1

  1. Explore 2D
  2. Turn on Angles
  3. Drag out a vector
  4. Turn on the sum. Notice the sum doesn't have an angle readout.
    image

Method 2

  1. Explore 2D
  2. Turn on Angles & Sum
  3. Drag out a vector. The sum is missing the angle readout.
    image

VectorAngleNode needed some general cleanup, particularly wrt the handling of visibility. (I hadn't touched VectorAngleNode much prior to this.) I did that in the above commits, and the problems are resolved.

@arouinfar please verify in master.

Looks fixed in master @pixelzoom.