Module util :: Class Line
[frames] | no frames]

Class Line

Line in 2D space

Instance Methods
 
__init__(self, p1, p2)
Initialize with two points that are on the line.
 
pointOnLine(self, p, eps)
Return true if p is within eps of the line
 
__repr__(self)
Instance Variables
  theta
normal angle
  nx
x component of normal vector
  ny
y component of normal vector
  off
offset along normal
Method Details

__init__(self, p1, p2)
(Constructor)

 

Initialize with two points that are on the line. Actually store a normal and an offset from the origin