Steven Dollins on Nostr: Particle tunneling My cheap collision detection finds the nearest point on the ...
Particle tunneling
My cheap collision detection finds the nearest point on the ellipse to the ball center and if that point is inside the ball, it bounces. Fast balls can go from one side on one frame to the other on the next without touching the edge, tunneling through.
The hacky fix adds more physics updates. The "right" fix intersects their motion line with the edge, but that requires messier, slower math.
#generative #GenerativeArt #CreativeCoding #Processing #physics #simulation
My cheap collision detection finds the nearest point on the ellipse to the ball center and if that point is inside the ball, it bounces. Fast balls can go from one side on one frame to the other on the next without touching the edge, tunneling through.
The hacky fix adds more physics updates. The "right" fix intersects their motion line with the edge, but that requires messier, slower math.
#generative #GenerativeArt #CreativeCoding #Processing #physics #simulation