Example #1
0
 def __init__(self, *mobjects, **kwargs):
     start = Group(*mobjects)
     target = Group(*[
         m1.copy().move_to(m2)
         for m1, m2 in adjacent_pairs(start)
     ])
     Transform.__init__(self, start, target, **kwargs)
Example #2
0
def get_winding_number(points):
    total_angle = 0
    for p1, p2 in adjacent_pairs(points):
        d_angle = angle_of_vector(p2) - angle_of_vector(p1)
        d_angle = ((d_angle + PI) % TAU) - PI
        total_angle += d_angle
    return total_angle / TAU
Example #3
0
def region_from_polygon_vertices(*vertices, **kwargs):
    return region_from_line_boundary(*adjacent_pairs(vertices), **kwargs)
Example #4
0
def region_from_polygon_vertices(*vertices, **kwargs):
    return region_from_line_boundary(*adjacent_pairs(vertices), **kwargs)