def addHorizontallyBoundedPoint(begin, center, end, horizontalBegin, horizontalEnd, path):
 if ((center.real >= horizontalEnd) and (center.real <= horizontalBegin)):
  path.append(center)
  return
 if (end != None):
  if ((center.real > horizontalBegin) and (end.real <= horizontalBegin)):
   centerMinusEnd = (center - end)
   along = ((center.real - horizontalBegin) / centerMinusEnd.real)
   path.append((center - (along * centerMinusEnd)))
   return
 if (begin != None):
  if ((center.real < horizontalEnd) and (begin.real >= horizontalEnd)):
   centerMinusBegin = (center - begin)
   along = ((center.real - horizontalEnd) / centerMinusBegin.real)
   path.append((center - (along * centerMinusBegin)))

def addHorizontallyBoundedPoint ( begin , center , end , horizontalBegin , horizontalEnd , path ) : if ( ( center . real >= horizontalEnd ) and ( center . real <= horizontalBegin ) ) : path . append ( center ) return if ( end != None ) : if ( ( center . real > horizontalBegin ) and ( end . real <= horizontalBegin ) ) : centerMinusEnd = ( center - end ) along = ( ( center . real - horizontalBegin ) / centerMinusEnd . real ) path . append ( ( center - ( along * centerMinusEnd ) ) ) return if ( begin != None ) : if ( ( center . real < horizontalEnd ) and ( begin . real >= horizontalEnd ) ) : centerMinusBegin = ( center - begin ) along = ( ( center . real - horizontalEnd ) / centerMinusBegin . real ) path . append ( ( center - ( along * centerMinusBegin ) ) )
add point if it is within the horizontal bounds .