phetsims / calculus-grapher

"Calculus Grapher" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 4 forks source link

Manipulating f(x) may result in discontinuities #241

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

In https://github.com/phetsims/qa/issues/898#issuecomment-1437631257, @liammulh reported the issue below. I'd be surprised if it's specific to iPad. I have not been able to reproduce on any platform, and don't have any hypothesis about the cause. This is more in @veillette wheelhouse, so assigning to him to investigate.


These notes apply to:

Tester = LM
Device =
    (Seemingly has no name. Also has no cart sticker. Black with black case. Lion logo on the case.)
    iPad Model MR7F2LL/A
    iPadOS 16.3
    Safari 16.3 Mobile
Time = 1.5 hour

...

Integral Screen

With the area under curve checkbox checked, I've seen some weirdness. If you click buttons A and B, make a tall "high frequency" curve, then press button C, make the curve as vertical as possible, then click button D to move the curve to the top of the screen (or the bottom), then press button C again to mess around with the curve, you start to see some interesting dots. These dots move around as you move the curve, and they're not completely solid; you can see the background color coming through with some of them.

weird
kathy-phet commented 1 year ago

These are probably just the dots that appear when the curve is discontinuous. I believe it is behaving as expected (with the current approach).

pixelzoom commented 1 year ago

f(x) is not supposed to be discontinuous.

veillette commented 1 year ago

Although @liammulh created a curve that has clearly no pedagogical purposes, I see that he is trying to create an odd curve to test the limits of this simulation.

For the first two screens, one should not be able to create a discontinuous plot. However, the algorithm to detect the discontinuities is heuristic and based on the jump between two adjacent points. So it is possible in principle to create a curve with discontinuities on the first two screens.

@liammulh : I'd be curious to know the process of creating a "tall high frequency curve" as I could not reproduce it.

liammulh commented 1 year ago

This bug is very hard to reproduce.

I am swamped with translation utility work, QA work, and miscellaneous sprint work, so I likely won't be able to comment further today.

veillette commented 1 year ago

In the end, I was able to reproduce discontinuities on demand following these steps.

image

veillette commented 1 year ago

One pleasant side effect of the fix proposed in #245, means that it is one cannot readily create a large tilt. The large tilt of the slope (seen near x=0 in the screenshot above) was an essential component to create high frequency. Repeating the steps in https://github.com/phetsims/calculus-grapher/issues/241#issuecomment-1452678153, yields a rather well behave function for f(x)

image

pixelzoom commented 1 year ago

@veillette and I discussed in 3/7/2023 pairing. @veillette has made this problem impossible to create, so we're going to close this issue.