I’m trying to do some really slick collision detection with pictures. Please try to follow my logic, it’s not that clear, sorry. I want an image to bounce off the edge of the window, perfectly. Also, I want to understand how it does it, so I can later make 2 images interact.
basically, i realized all pictures are rectangles, and all a rectangle is is 4 points(or 4 lines).
If a rectangle is spinning, the corners move in a circle.
If a spinning rectangle is also moving it forms a trochoid(http://en.wikipedia.org/wiki/Trochoid)
I still need to figure out the equation for a trochoid moving in 2D, but once I do, collisions will be easy. just solve the equation for x or y, and set the other to a known value
(example: if the x of a point is greater than the boundary, y = f(x) and x = the boundary)
If anyone can point me in the right direction I would greatly appreciate it.