Python and Turtle Algorithms,Difficulty Level 7,games,math Closest Point On a Line Segment to Another Point

Closest Point On a Line Segment to Another Point

Write a program that finds the closest point of a line segment to another point. Randomly pick a point and color it in blue. Also, randomly generate several lines. Find the closest points on these lines to the blue point and mark these closest points in red as show in the picture below:

Closest Point On a Line Segment to the Blue Point

What’s next?
Intersecting Lines with a Circle

Related Post