Ejemplo n.º 1
0
 def addCoolOrbits(self, remainingOrbitTime):
     "Add the minimum radius cool orbits."
     if len(self.boundaryLayer.loops) < 1:
         return
     insetBoundaryLoops = intercircle.getInsetLoopsFromLoops(self.perimeterWidth, self.boundaryLayer.loops)
     if len(insetBoundaryLoops) < 1:
         insetBoundaryLoops = self.boundaryLayer.loops
     largestLoop = euclidean.getLargestLoop(insetBoundaryLoops)
     loopArea = abs(euclidean.getPolygonArea(largestLoop))
     if loopArea < self.minimumArea:
         center = 0.5 * (euclidean.getMaximumFromPoints(largestLoop) + euclidean.getMinimumFromPoints(largestLoop))
         centerXBounded = max(center.real, self.cornerMinimum.real)
         centerXBounded = min(centerXBounded, self.cornerMaximum.real)
         centerYBounded = max(center.imag, self.cornerMinimum.imag)
         centerYBounded = min(centerYBounded, self.cornerMaximum.imag)
         center = complex(centerXBounded, centerYBounded)
         maximumCorner = center + self.halfCorner
         minimumCorner = center - self.halfCorner
         largestLoop = euclidean.getSquareLoop(minimumCorner, maximumCorner)
     pointComplex = euclidean.getXYComplexFromVector3(self.oldLocation)
     if pointComplex != None:
         largestLoop = euclidean.getLoopStartingNearest(self.perimeterWidth, pointComplex, largestLoop)
     intercircle.addOrbitsIfLarge(
         self.distanceFeedRate, largestLoop, self.orbitalFeedRatePerSecond, remainingOrbitTime, self.highestZ
     )
Ejemplo n.º 2
0
	def addCoolOrbits( self, remainingOrbitTime ):
		"Add the minimum radius cool orbits."
		if len( self.boundaryLayer.loops ) < 1:
			return
		insetBoundaryLoops = intercircle.getInsetLoopsFromLoops( self.perimeterWidth, self.boundaryLayer.loops )
		if len( insetBoundaryLoops ) < 1:
			insetBoundaryLoops = self.boundaryLayer.loops
		largestLoop = euclidean.getLargestLoop( insetBoundaryLoops )
		loopArea = abs( euclidean.getPolygonArea( largestLoop ) )
		if loopArea < self.minimumArea:
			center = 0.5 * ( euclidean.getMaximumFromPoints( largestLoop ) + euclidean.getMinimumFromPoints( largestLoop ) )
			centerXBounded = max( center.real, self.boundingRectangle.cornerMinimum.real )
			centerXBounded = min( centerXBounded, self.boundingRectangle.cornerMaximum.real )
			centerYBounded = max( center.imag, self.boundingRectangle.cornerMinimum.imag )
			centerYBounded = min( centerYBounded, self.boundingRectangle.cornerMaximum.imag )
			center = complex( centerXBounded, centerYBounded )
			maximumCorner = center + self.halfCorner
			minimumCorner = center - self.halfCorner
			largestLoop = euclidean.getSquareLoop( minimumCorner, maximumCorner )
		pointComplex = euclidean.getXYComplexFromVector3( self.oldLocation )
		if pointComplex != None:
			largestLoop = euclidean.getLoopStartingNearest( self.perimeterWidth, pointComplex, largestLoop )
		intercircle.addOrbitsIfLarge( self.distanceFeedRate, largestLoop, self.orbitalFeedRatePerSecond, remainingOrbitTime, self.highestZ )
Ejemplo n.º 3
0
	def __init__( self, loop ):
		self.area = abs( euclidean.getPolygonArea( loop ) )
		self.loop = loop