def getJumpPoint(begin, end, loop, runningJumpSpace):
 segment = (begin - end)
 segmentLength = abs(segment)
 if (segmentLength == 0.0):
  return begin
 segment /= segmentLength
 distancePoint = DistancePoint(begin, loop, runningJumpSpace, segment)
 if (distancePoint.distance == runningJumpSpace):
  return distancePoint.point
 effectiveDistance = distancePoint.distance
 jumpPoint = distancePoint.point
 segmentLeft = complex(0.7071067811865476, (-0.7071067811865476))
 distancePoint = DistancePoint(begin, loop, runningJumpSpace, segmentLeft)
 distancePoint.distance *= 0.5
 if (distancePoint.distance > effectiveDistance):
  effectiveDistance = distancePoint.distance
  jumpPoint = distancePoint.point
 segmentRight = complex(0.7071067811865476, 0.7071067811865476)
 distancePoint = DistancePoint(begin, loop, runningJumpSpace, segmentRight)
 distancePoint.distance *= 0.5
 if (distancePoint.distance > effectiveDistance):
  effectiveDistance = distancePoint.distance
  jumpPoint = distancePoint.point
 return jumpPoint

def getJumpPoint ( begin , end , loop , runningJumpSpace ) : segment = ( begin - end ) segmentLength = abs ( segment ) if ( segmentLength == 0.0 ) : return begin segment /= segmentLength distancePoint = DistancePoint ( begin , loop , runningJumpSpace , segment ) if ( distancePoint . distance == runningJumpSpace ) : return distancePoint . point effectiveDistance = distancePoint . distance jumpPoint = distancePoint . point segmentLeft = complex ( 0.7071067811865476 , ( - 0.7071067811865476 ) ) distancePoint = DistancePoint ( begin , loop , runningJumpSpace , segmentLeft ) distancePoint . distance *= 0.5 if ( distancePoint . distance > effectiveDistance ) : effectiveDistance = distancePoint . distance jumpPoint = distancePoint . point segmentRight = complex ( 0.7071067811865476 , 0.7071067811865476 ) distancePoint = DistancePoint ( begin , loop , runningJumpSpace , segmentRight ) distancePoint . distance *= 0.5 if ( distancePoint . distance > effectiveDistance ) : effectiveDistance = distancePoint . distance jumpPoint = distancePoint . point return jumpPoint
get running jump point inside loop .