homework_04/04_Victor_Dimitrov/circles.py
def circle_position(self, other_circle):
        '''
        In this function we determine if 2 circles have one, many or zero common points
        based on their centers' euclidean distance and sum/difference of their respective radii
        '''

        assert isinstance(other_circle, Circle)

        added_radiuses = self.radius + other_circle.radius
        substracted_radiuses = abs(self.radius - other_circle.radius)

        centers_distance = self.center.euclidean_distance(other_circle.center)

        position = None

        if centers_distance > added_radiuses:
            position = RelativePosition.NO_COMMON_POINTS

        elif centers_distance == added_radiuses:
            position = RelativePosition.TOUCHING

        elif substracted_radiuses < centers_distance < added_radiuses:
            position = RelativePosition.INTERSECTING

        else:
            position = RelativePosition.SAME

        return position

        In this function we determine if 2 circles have one, many or zero common points
        based on their centers' euclidean distance and sum/difference of their respective radii
        
In this function we determine if 2 circles have one, many or zero common points
based on their centers' euclidean distance and sum/difference of their respective radii
In this function we determine if 2 circles have one many or zero common points based on their centers ' euclidean distance and sum / difference of their respective radii
def circle_position(self, other_circle):
        assert isinstance(other_circle, Circle)
        added_radiuses = self.radius + other_circle.radius
        substracted_radiuses = abs(self.radius - other_circle.radius)
        centers_distance = self.center.euclidean_distance(other_circle.center)
        position = None
        if centers_distance > added_radiuses:
            position = RelativePosition.NO_COMMON_POINTS
        elif centers_distance == added_radiuses:
            position = RelativePosition.TOUCHING
        elif substracted_radiuses < centers_distance < added_radiuses:
            position = RelativePosition.INTERSECTING
        else:
            position = RelativePosition.SAME
        return position
def circle_position ( self , other_circle ) : assert isinstance ( other_circle , Circle ) added_radiuses = self . radius + other_circle . radius substracted_radiuses = abs ( self . radius - other_circle . radius ) centers_distance = self . center . euclidean_distance ( other_circle . center ) position = None if centers_distance > added_radiuses : position = RelativePosition . NO_COMMON_POINTS elif centers_distance == added_radiuses : position = RelativePosition . TOUCHING elif substracted_radiuses < centers_distance < added_radiuses : position = RelativePosition . INTERSECTING else : position = RelativePosition . SAME return position
In this function we determine if 2 circles have one, many or zero common points
based on their centers' euclidean distance and sum/difference of their respective radii
In this function we determine if 2 circles have one many or zero common points based on their centers ' euclidean distance and sum / difference of their respective radii
'''
        In this function we determine if 2 circles have one, many or zero common points
        based on their centers' euclidean distance and sum/difference of their respective radii
        '''
self
other_circle