Question 1:
Explain in detail an algorithm which returns the minimum distance from a point to a line segment in two dimensions. Make sure that you comprise all of your suppositions and all essential mathematical computations.
Question 2:
Consider the control of detail in a curve which is represented by a series of many straight line segments. Explain how Douglas and Pucker's algorithm can be used to eliminate superfluous points. You might use the algorithm from part first.
Question 3:
The quadratic Bezier curve is defined by three points, P1, P2, P3 and a parameter, t:
P(t) = (1-t)2 P1 + 2t (1-t) P2 + t2P3, 0 ≤ t ≤ 1
Explain an algorithm which draws the quadratic Bezier curve, by using straight lines only, to within a tolerance. You might use the algorithm from part (a) and you might assume that you already have an algorithm for drawing the straight line.