Formula to determine if an infinite line and a line segment intersect?
问题 Given a point on a line and that line's slope how would one determine if the line, extending in each direction infinitely, intersects with a line segment (x1,y1) , (x2,y2) and, if so, the point at which the intersection occurs? I found this, but I'm unsure if it's helpful here. If someone wants to help me understand "rays", that's alright with me. http://www.realtimerendering.com/intersections.html I'm sorry that I'm an idiot. 回答1: Arbitrary point on the first line has parametric equation dx