Given a square (described by x, y, width, height) and an angle (in radians) I need to calculate a vector that originates at the squares centre and terminates at the point th
Given the square's width and height you can then determine the center of the square (x+.5w, y+.5h).
From there, you can use some trigonometry to determine the length of the vector line:
tan(angle) = 0.5x / a
where a = the distance between the center of the square and the edge of the square. Your points are then x = a, y = (height).
Please be gentle, as it has been some time since I've used a lot of this math! :-)