homework_04/15_martin_dinev/point.py
def find_relative_position(self, circle):
        """
        Function that finds where is one circle to another
        according to their radius and center.
        """
        assert isinstance(circle, Circle)
        if circle.center.x_coordinate == self.center.x_coordinate and \
            circle.center.y_coordinate == self.center.y_coordinate:
            return RelativePosition.SAME

        distance = sqrt(power(circle.center.x_coordinate - self.center.x_coordinate, 2) + \
            power(circle.center.y_coordinate - self.center.y_coordinate, 2))
        if distance > self.radius + circle.radius:
            return RelativePosition.NO_COMMON_POINTS

        if abs(distance - (self.radius + circle.radius)) < 0.0001:
            return RelativePosition.TOUCHING

        #distance < self.radius + circle.radius:
        if distance + circle.radius < self.radius or \
            (distance + circle.radius) - self.radius < 0.0001:
            return RelativePosition.SAME

        return RelativePosition.INTERSECTING

        Function that finds where is one circle to another
        according to their radius and center.
        
Function that finds where is one circle to another
according to their radius and center.
Function that finds where is one circle to another according to their radius and center .
def find_relative_position(self, circle):
        assert isinstance(circle, Circle)
        if circle.center.x_coordinate == self.center.x_coordinate and \
            circle.center.y_coordinate == self.center.y_coordinate:
            return RelativePosition.SAME
        distance = sqrt(power(circle.center.x_coordinate - self.center.x_coordinate, 2) + \
            power(circle.center.y_coordinate - self.center.y_coordinate, 2))
        if distance > self.radius + circle.radius:
            return RelativePosition.NO_COMMON_POINTS
        if abs(distance - (self.radius + circle.radius)) < 0.0001:
            return RelativePosition.TOUCHING
        if distance + circle.radius < self.radius or \
            (distance + circle.radius) - self.radius < 0.0001:
            return RelativePosition.SAME
        return RelativePosition.INTERSECTING
def find_relative_position ( self , circle ) : assert isinstance ( circle , Circle ) if circle . center . x_coordinate == self . center . x_coordinate and circle . center . y_coordinate == self . center . y_coordinate : return RelativePosition . SAME distance = sqrt ( power ( circle . center . x_coordinate - self . center . x_coordinate , 2 ) + power ( circle . center . y_coordinate - self . center . y_coordinate , 2 ) ) if distance > self . radius + circle . radius : return RelativePosition . NO_COMMON_POINTS if abs ( distance - ( self . radius + circle . radius ) ) < 0.0001 : return RelativePosition . TOUCHING if distance + circle . radius < self . radius or ( distance + circle . radius ) - self . radius < 0.0001 : return RelativePosition . SAME return RelativePosition . INTERSECTING
Function that finds where is one circle to another
according to their radius and center.
Function that finds where is one circle to another according to their radius and center .
"""
        Function that finds where is one circle to another
        according to their radius and center.
        """ #distance < self.radius + circle.radius:
self
circle