Closed brandonLi8 closed 1 year ago
@amanda-phet is this spec currently in Natural Selection? If so, can you point me to where I can find it in the sim and I'll take a look at how it's rendered.
No, we decided on a different approach because of the difficulty involved. But for Calculus Grapher I think it's a critical piece of the model!
9/22/2022 design meeting:
This feature is needed. @veillette will investigate how to address.
This feature may also have informed the shape of the "pedestal" operator, may need to revisit.
I think we can close this issue as rendering discontinuities has not been a problem. The view side of the "equation" is relatively straightforward. The most difficult part lies in the model, where one would like to detect discontinuities, without false positives. (see #110 ).
I think it would be worth opening a new issue regarding the work that needs to be done with respect of detecting discontinuities.
This issue is superseded by #132 . Closing.
From the design doc, the HTML5 version of calculus grapher will need to render discontinuities for non-differentiable points with open circles and a thicker connecting dashed line.
@amanda-phet said in the design doc:
This could potentially be a problem. I'll keep this in mind for when I'm implementing the model. It also came up in collision lab (with the ball paths) and gravity and orbits. The solution for both sims was to use Canvas instead, which supports different strokes between segments (see https://github.com/phetsims/collision-lab/issues/61). It's hard for me to gauge if this approach is appropriate for calculus grapher at the moment (since nothing has been implemented).
Another solution specific to calculus grapher would be to render the curve normally with a single Path and ignoring the discontinuity, then going over it and using separate dashed lines on top of the curve with a different line-dash and line-width. Unsure at this point how this would impact memory/performance.
@amanda-phet is this spec currently in Natural Selection? If so, can you point me to where I can find it in the sim and I'll take a look at how it's rendered.