homework_04/17_petar_damyanov/circles.py
def find_relative_position(self, circle):
        """
        Function that finds position of circle1 to circle2
        by given circle radius and center
        """
        assert isinstance(circle, Circle)
        if circle.center.coordinate_x == self.center.coordinate_x and \
            circle.center.coordinate_y == self.center.coordinate_y:
            return RelativePosition.SAME

        distance = find_distance(self.center, circle.center)
        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 position of circle1 to circle2
        by given circle radius and center
        
Function that finds position of circle1 to circle2
by given circle radius and center
Function that finds position of circle1 to circle2 by given circle radius and center
def find_relative_position(self, circle):
        assert isinstance(circle, Circle)
        if circle.center.coordinate_x == self.center.coordinate_x and \
            circle.center.coordinate_y == self.center.coordinate_y:
            return RelativePosition.SAME
        distance = find_distance(self.center, circle.center)
        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 . coordinate_x == self . center . coordinate_x and circle . center . coordinate_y == self . center . coordinate_y : return RelativePosition . SAME distance = find_distance ( self . center , circle . center ) 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 position of circle1 to circle2
by given circle radius and center
Function that finds position of circle1 to circle2 by given circle radius and center
"""
        Function that finds position of circle1 to circle2
        by given circle radius and center
        """
self
circle