1 | initial version |
The theta (angle of line) is atan2(X1-X2,Y1-Y2).
The distance from origin rho is a point-line distance, the formula is here (#14): http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html
The X1,X2,Y1,Y2 are the members of the lines vector.