@@ -106,5 +106,44 @@ def construct(self):
106106 self .play (Animation (a ))
107107
108108
109+ class ArcPolygonTest (Scene ):
110+ def construct (self ):
111+ r3 = np .sqrt (3 )
112+ arc_config = {"stroke_width" :3 ,"stroke_color" :RED ,
113+ "fill_opacity" :0.5 ,"color" : GREEN }
114+ pol_config = {"stroke_width" :10 ,"stroke_color" :BLUE ,
115+ "fill_opacity" :1 ,"color" : PURPLE }
116+ arc0 = ArcBetweenPoints (np .array ([- 1 ,0 ,0 ]),
117+ np .array ([1 ,0 ,0 ]),radius = 2 ,** arc_config )
118+ arc1 = ArcBetweenPoints (np .array ([1 ,0 ,0 ]),
119+ np .array ([0 ,r3 ,0 ]),radius = 2 ,** arc_config )
120+ arc2 = ArcBetweenPoints (np .array ([0 ,r3 ,0 ]),
121+ np .array ([- 1 ,0 ,0 ]),radius = 2 ,** arc_config )
122+ a = ArcPolygon (arc0 ,arc1 ,arc2 ,** pol_config )
123+ self .play (Animation (a ))
124+
125+
126+ class TilingTest (Scene ):
127+ def construct (self ):
128+ a = Tiling (Square (),
129+ [[Mobject .shift ,[2.1 ,0 ,0 ]]],
130+ [[Mobject .shift ,[0 ,2.1 ,0 ]]],
131+ range (- 1 ,1 ),
132+ range (- 1 ,1 ))
133+ self .play (Animation (a ))
134+
135+
136+ class GraphTest (Scene ):
137+ def construct (self ):
138+ g = {0 : [[0 ,0 ,0 ], [[1 ,{"angle" : 2 }], [2 ,{"color" : WHITE }]], {"color" : BLUE }],
139+ 1 : [[1 ,0 ,0 ], [0 , 2 ], {"color" : GRAY }],
140+ 2 : [[0 ,1 ,0 ], [0 , 1 ], {"color" : PINK }]}
141+ K3 = Graph (g ,vertex_config = {"radius" : 0.2 ,"fill_opacity" : 1 },
142+ edge_config = {"stroke_width" : 5 ,"color" : RED })
143+ K3v = K3 .vertices
144+ K3e = K3 .edges
145+ self .play (Animation (K3e ),Animation (K3v ))
146+
147+
109148def test_scenes ():
110149 utils_test_scenes (get_scenes_to_test (__name__ ), "geometry" )
0 commit comments