All Questions
Tagged with collision mathematics
3
questions
2
votes
1
answer
93
views
Efficiently generate a random position inside an outer rectangle but outside an inner rectangle
It should be a uniform distribution (ie: every point is equally as likely). I also don't want to use the simple solution of: "in a loop check to see if the current generated point is within the ...
4
votes
1
answer
215
views
A library of 2D Shapes with functions for their intersections
The goal was as much code reuse as I could get. Shooting for a pure-function-y style.
Would love any feedback on general architecture, adherence to standard practice and usability - as well as ideas ...
4
votes
1
answer
3k
views
Circle - Line segment collision
I wrote an implementation of circle - line segment collision detection algorithm. Here is quick demonstration how it works:
And here is my implementation in Javascript using HTML canvas:
index.html
...