r/howdidtheycodeit • • Jan 30 '24

Question How are the web collisions coded?

Enable HLS to view with audio, or disable this notification

684 Upvotes

45 comments sorted by

View all comments

Show parent comment

12

u/SlothWithHumanHands Jan 31 '24

no need to do more of a less accurate thing — you can sweep a line into a quadrilateral and calculate a parameter t that finds the exact intersection with a polygon. for thread unwinding, a negative dot product of current thread and most recent incident thread perpendicular would indicate when to collapse into a free thread.

9

u/HypnoToad0 Feb 02 '24

I like your words, magic man.