p5.collide2D icon indicating copy to clipboard operation
p5.collide2D copied to clipboard

Option to calculate intersection points for circles

Open dhowe opened this issue 3 years ago • 5 comments

may have missed this, but would be nice to be able to get circle/circle and circle/line intersection points as well (either 1 or 2)

dhowe avatar Sep 12 '21 18:09 dhowe

agreed.

This will take some amount of non-related sub-collision to achieve. eg. collision detection that is not inherent to the calculation of the collision being calculated. Circle collisions are not based on where the intersection happened, instead based on distance from the center point.

But I agree it would be nice to have, but was never implemented because it is an additional step.

bmoren avatar Sep 12 '21 19:09 bmoren

@bmoren I would be willing to take this up.

brownsloth avatar Oct 04 '21 11:10 brownsloth

Hi @brownsloth sounds good, make a PR when it's ready and I'll review.

THANK YOU!

bmoren avatar Oct 04 '21 14:10 bmoren

@bmoren I am done with the changes. This might sound trivial but I need to test them, what's the procedure for that?

brownsloth avatar Oct 04 '21 16:10 brownsloth

There is no formal procedure, but if you can provide some context / sketches for your testing procedure that should be good enough for me.

I'd just try and make a variety of sketches that think about the normal and edge cases

bmoren avatar Oct 04 '21 16:10 bmoren