Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive: Discontinuities are triggered in smooth sections of curves. #246

Closed
veillette opened this issue Mar 3, 2023 · 2 comments

Comments

@veillette
Copy link
Contributor

In #218
@amanda-phet noted that a case where it was relatively to generate discontinuities in cases that were unwarranted.

This situation is just drawing a random-ish curve, nothing too fancy or unusual.

@veillette veillette self-assigned this Mar 3, 2023
@veillette
Copy link
Contributor Author

@amanda-phet was able to generate (easily) discontinuities that did not go away even after using the smooth button.

In #208, we have come up with a new approach to assign cusps and discontinuities.
Instead of relying on a detection algorithm to notice discontinuities and cusps, we explicitly assign a point type to particular points after some curve manipulation. In the case of smooth, we explicitly tag all points to a smooth type. As a result, there are no longer any discontinuities and cusps after a smooth operation.

public smooth(): void {
    ...

    // Loops through each Point of the curve and set the new y-value.
    this.points.forEach( point => {

      ...

      // Set all points to smooth type;
      point.pointType = 'smooth';
    } );
}

Assigning to @amanda-phet to see if she can run a cursory test to check the presence/absence of discontinuities.

@veillette
Copy link
Contributor Author

I'm going to close this issue. Instead we will create an issue (#292) to let the QA team be on the lookout for this kind of problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants