Beispiel #1
0
 def GetRadiusPointFromExt(self,x,y):
     """
         get The intersecrion point from the line(x,y,cx,cy) and the circle
     """
     _cx, _cy = self.center.getCoords()
     _r = self.radius
     centerPoint=Point(_cx,_cy)
     outPoint=Point(x,y)
     vector=Vector(outPoint,centerPoint)
     vNorm=vector.norm()
     newNorm=abs(vNorm-_r)
     magVector=vector.mag()
     magVector.mult(newNorm)
     newPoint=magVector.point()
     intPoint=Point(outPoint+newPoint)
     return intPoint.getCoords()
Beispiel #2
0
 def GetRadiusPointFromExt(self, x, y):
     """
         get The intersecrion point from the line(x,y,cx,cy) and the circle
     """
     _cx, _cy = self.center.getCoords()
     _r = self.radius
     centerPoint = Point(_cx, _cy)
     outPoint = Point(x, y)
     vector = Vector(outPoint, centerPoint)
     vNorm = vector.norm()
     newNorm = abs(vNorm - _r)
     magVector = vector.mag()
     magVector.mult(newNorm)
     newPoint = magVector.point()
     intPoint = Point(outPoint + newPoint)
     return intPoint.getCoords()