def addVoronoiPoint(begin, end, midX, loop, rotatedBegin, rotatedEnd):
 if (rotatedBegin.real >= midX):
  loop.append(begin)
  if (rotatedEnd.real < midX):
   beginMinusEnd = (begin - end)
   rotatedBeginMinusEnd = (rotatedBegin - rotatedEnd)
   loop.append((end + ((beginMinusEnd * (midX - rotatedEnd.real)) / rotatedBeginMinusEnd.real)))
  return
 if (rotatedEnd.real <= midX):
  return
 endMinusBegin = (end - begin)
 rotatedEndMinusBegin = (rotatedEnd - rotatedBegin)
 loop.append((begin + ((endMinusBegin * (midX - rotatedBegin.real)) / rotatedEndMinusBegin.real)))

def addVoronoiPoint ( begin , end , midX , loop , rotatedBegin , rotatedEnd ) : if ( rotatedBegin . real >= midX ) : loop . append ( begin ) if ( rotatedEnd . real < midX ) : beginMinusEnd = ( begin - end ) rotatedBeginMinusEnd = ( rotatedBegin - rotatedEnd ) loop . append ( ( end + ( ( beginMinusEnd * ( midX - rotatedEnd . real ) ) / rotatedBeginMinusEnd . real ) ) ) return if ( rotatedEnd . real <= midX ) : return endMinusBegin = ( end - begin ) rotatedEndMinusBegin = ( rotatedEnd - rotatedBegin ) loop . append ( ( begin + ( ( endMinusBegin * ( midX - rotatedBegin . real ) ) / rotatedEndMinusBegin . real ) ) )
add voronoi point to loop .