

line_from_points($x1, $y1, $x2, $y2) 
Returns the coefficients of a line in the Ax + By + C = 0 form.
Returns the list (A, B, C), or an empty list if they are the same point. 
intersect_lines(@abc1, @abc2)  Returns the point of intersection of the 2 lines, each given in Ax+By+C=0 form. Returns either the point (x, y) or an empty list. 
intersect_line_and_circle(@abc, $cx, $cy, $radius)  Returns the points or point of intersection of the given line and circle. 
intersect_line_and_circle() The implementation is a little heavy on math. Perhaps there was a better way to implement it. Starting with the equations of a line and that of a circle:
(1) Ax + By + C = 0 (2) (x  x1)**2 + (y  y1)**2 = R ** 2 (3) Ax = By  C # rearrange (1) (4) A**2 (x  x1)**2 + A**2 (y  y1)**2 = R**2 A**2 # (2) * A**2 (5) (Ax  Ax1)**2 + (Ay  Ay1)**2 = R**2 A**2 # move it inside (6) (By  C  Ax1)**2 + (Ay  Ay1)**2 = R**2 A**2 # sub (3) into (5)Expand and convert to standard quadratic form, and similary for x.
Be careful :)
Tony Cook <tony@develophelp.com>
Imager::Graph(3), http://www.develophelp.com/imager/
perl v5.20.3  IMAGER::GRAPH::UTIL (3)  20120504 
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.