Files @ 1f1d49c1dbea
Branch filter:

Location: OneEye/src/epoint.py

Laman
correct corner handling
order the corners in counter-clockwise order, with the upper left first
EPoint extracted from gui.py
import math


## Euclidean 2D plane point: (x,y).
class EPoint:
  def __init__(self,x,y):
    self.x=x
    self.y=y
  
  def dist(self,a):
    return math.sqrt((self.x-a.x)**2+(self.y-a.y)**2)
    
  def __add__(self,a):
    return EPoint(self.x+a.x,self.y+a.y)
    
  def __truediv__(self,k):
    return EPoint(self.x/k,self.y/k)
    
  def __str__(self): return "({0},{1})".format(self.x,self.y)
  def __repr__(self): return "EPoint({0},{1})".format(self.x,self.y)