title: Canvas Triangle, Pentagon, Rectangle collision detection with eachother?
body: <p>I have some code in which draws a triangle and returns an object with <code>x1, y1, x2, y2, x3, y3</code> in it. I also have a rectangle drawing function which returns <code>x, y, w, h</code>, and a pentagon drawing function which returns <code>x1, y1, x2, y2, x3, y3, x4, y4, x5, y5</code>. How can I make a collision detection function that can detect if rectangles and pentagons or triangles and pentagons have collided?</p>