You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
In #218
@amanda-phet noted that a case where it was relatively to generate discontinuities in cases that were unwarranted.
The text was updated successfully, but these errors were encountered: