@@ -376,13 +376,13 @@ and :meth:`~.Mobject.get_start`. Here is an example of some important coordinate
376
376
377
377
class MobjectExample(Scene):
378
378
def construct(self):
379
- p1= [-1,-1,0]
380
- p2= [1,-1,0]
381
- p3= [1,1, 0]
382
- p4= [-1,1, 0]
383
- a = Line(p1,p2).append_points(Line(p2,p3).points).append_points(Line(p3,p4).points)
384
- point_start= a.get_start()
385
- point_end = a.get_end()
379
+ p1 = [-1,-1, 0]
380
+ p2 = [ 1,-1, 0]
381
+ p3 = [ 1, 1, 0]
382
+ p4 = [-1, 1, 0]
383
+ a = Line(p1,p2).append_points(Line(p2,p3).points).append_points(Line(p3,p4).points)
384
+ point_start = a.get_start()
385
+ point_end = a.get_end()
386
386
point_center = a.get_center()
387
387
self.add(Text(f"a.get_start() = {np.round(point_start,2).tolist()}", font_size=24).to_edge(UR).set_color(YELLOW))
388
388
self.add(Text(f"a.get_end() = {np.round(point_end,2).tolist()}", font_size=24).next_to(self.mobjects[-1],DOWN).set_color(RED))
@@ -425,8 +425,8 @@ function of numpy:
425
425
self.camera.background_color = WHITE
426
426
m1a = Square().set_color(RED).shift(LEFT)
427
427
m1b = Circle().set_color(RED).shift(LEFT)
428
- m2a= Square().set_color(BLUE).shift(RIGHT)
429
- m2b= Circle().set_color(BLUE).shift(RIGHT)
428
+ m2a = Square().set_color(BLUE).shift(RIGHT)
429
+ m2b = Circle().set_color(BLUE).shift(RIGHT)
430
430
431
431
points = m2a.points
432
432
points = np.roll(points, int(len(points)/4), axis=0)
0 commit comments