def getWithinNodes(self, pixelTable): 'Get the nodes this circle node is within.' withinNodes = [] squareValues = euclidean.getSquareValuesFromPoint(pixelTable, 0.5 * self.dividedPoint) for squareValue in squareValues: if abs(self.dividedPoint - squareValue.dividedPoint) < 2.0: withinNodes.append(squareValue) return withinNodes
def isWithinCircles(self, pixelTable): 'Determine if this circle intersection is within the circle node circles.' absolutePosition = self.getAbsolutePosition() squareValues = euclidean.getSquareValuesFromPoint(pixelTable, absolutePosition) for squareValue in squareValues: if abs(squareValue.dividedPoint - absolutePosition) < 1.0: if squareValue != self.circleNodeAhead and squareValue != self.circleNodeBehind: return True return False
def getIsPointInsideZoneAwayOthers(diameterReciprocal, loopsComplex, point, pixelDictionary): 'Determine if the point is inside the loops zone and and away from the other points.' if not euclidean.getIsInFilledRegion(loopsComplex, point): return False pointOverDiameter = complex(point.real * diameterReciprocal.real, point.imag * diameterReciprocal.imag) squareValues = euclidean.getSquareValuesFromPoint(pixelDictionary, pointOverDiameter) for squareValue in squareValues: if abs(squareValue - pointOverDiameter) < 1.0: return False euclidean.addElementToPixelListFromPoint(pointOverDiameter, pixelDictionary, pointOverDiameter) return True
def getIsPointInsideZoneAwayOthers(diameterReciprocal, loopsComplex, point, pixelDictionary): "Determine if the point is inside the loops zone and and away from the other points." if not euclidean.getIsInFilledRegion(loopsComplex, point): return False pointOverDiameter = complex(point.real * diameterReciprocal.real, point.imag * diameterReciprocal.imag) squareValues = euclidean.getSquareValuesFromPoint(pixelDictionary, pointOverDiameter) for squareValue in squareValues: if abs(squareValue - pointOverDiameter) < 1.0: return False euclidean.addElementToPixelListFromPoint(pointOverDiameter, pixelDictionary, pointOverDiameter) return True