I have two line segments which are currently intersecting, how do I rotate either intersecting line about the intersection point?
How do I calculate rotation of these lines?
Rotation about a point formula:
x' = x * cos(theta) - y * sin(theta) y' = x * sin(theta) + y * cos(theta)
But I believe this is rotation about the origin. So I need to first calculate the point of intersection. I know how to calculate the point of intersection, so let's assume I have my point of intersection.
How do I use my pointOfIntersection variable to rotate a line about this? I can plug in values for x and y, but what is theta? Is theta the angle of intersection?