phetsims / kite

A library for creating, manipulating and displaying 2D shapes in JavaScript.
MIT License
12 stars 6 forks source link

Intersection query failure with quadratics #78

Closed jonathanolson closed 1 year ago

jonathanolson commented 5 years ago

The following snippet:

const a = new kite.Quadratic(
  dot.v2( 16.704545454545453, -21 ),
  dot.v2( 17.644176136363637, -21 ),
  dot.v2( 18.449573863636363, -20.627130681818183 )
);
const b = new kite.Quadratic(
  dot.v2( 16.704545454545453, -21 ),
  dot.v2( 18.47940340909091, -21 ),
  dot.v2( 19.739701704545453, -19.739701704545453 )
);
kite.BoundsIntersection.getIntersectionRanges( a, b );

will spawn too many intersection ranges, and will fail out due to memory limits.

jonathanolson commented 1 year ago

Fixed in https://github.com/phetsims/kite/commit/b5304ed1ba62068eb169f3833436421bfbdd283f.