def __init__(self, n=3, **kwargs): digest_config(self, kwargs, locals()) start_vect = rotate_vector(RIGHT, self.start_angle) vertices = compass_directions(n, start_vect) Polygon.__init__(self, *vertices, **kwargs)
def arrange_subparts(self, *subparts): # VGroup(*subparts).rotate(np.pi/4) for part, vect in zip(subparts, compass_directions(start_vect=UP + RIGHT)): part.next_to(ORIGIN, vect, buff=0) VGroup(*subparts).rotate(np.pi / 4, about_point=ORIGIN)
def arrange_subparts(self, *subparts): # VGroup(*subparts).rotate(np.pi/4) for part, vect in zip(subparts, compass_directions(start_vect=UP + RIGHT)): part.next_to(ORIGIN, vect, buff=0) VGroup(*subparts).rotate(np.pi / 4, about_point=ORIGIN)
def __init__(self, n=3, **kwargs): digest_config(self, kwargs, locals()) start_vect = rotate_vector(RIGHT, self.start_angle) vertices = compass_directions(n, start_vect) Polygon.__init__(self, *vertices, **kwargs)