def getVoronoiLoopByPoint(inside, loop, outside):
 insideMinusOutside = (inside - outside)
 insideMinusOutside /= abs(insideMinusOutside)
 rotation = complex(insideMinusOutside.real, (- insideMinusOutside.imag))
 rotatedInside = (inside * rotation)
 rotatedLoop = euclidean.getRotatedComplexes(rotation, loop)
 rotatedOutside = (outside * rotation)
 midX = (0.5 * (rotatedInside.real + rotatedOutside.real))
 voronoiLoop = []
 for (pointIndex, point) in enumerate(loop):
  nextIndex = ((pointIndex + 1) % len(loop))
  addVoronoiPoint(point, loop[nextIndex], midX, voronoiLoop, rotatedLoop[pointIndex], rotatedLoop[nextIndex])
 return voronoiLoop

def getVoronoiLoopByPoint ( inside , loop , outside ) : insideMinusOutside = ( inside - outside ) insideMinusOutside /= abs ( insideMinusOutside ) rotation = complex ( insideMinusOutside . real , ( - insideMinusOutside . imag ) ) rotatedInside = ( inside * rotation ) rotatedLoop = euclidean . getRotatedComplexes ( rotation , loop ) rotatedOutside = ( outside * rotation ) midX = ( 0.5 * ( rotatedInside . real + rotatedOutside . real ) ) voronoiLoop = [ ] for ( pointIndex , point ) in enumerate ( loop ) : nextIndex = ( ( pointIndex + 1 ) % len ( loop ) ) addVoronoiPoint ( point , loop [ nextIndex ] , midX , voronoiLoop , rotatedLoop [ pointIndex ] , rotatedLoop [ nextIndex ] ) return voronoiLoop
get voronoi loop enclosing the inside .