MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / construct

Method construct

animations/measure_scene.py:51–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49
50class MeasureScene2(AlgoScene):
51 def construct(self):
52 shape = self.camera.frame.get_shape()
53 horizon = Line(start=LEFT*shape[0]/2, end=RIGHT*shape[0]/2, color=RED)
54 verticle = Line(start=UP*shape[1]/2, end=DOWN*shape[1]/2, color=BLUE)
55 self.play(ShowCreation(horizon), ShowCreation(verticle))
56
57 delta = 0.0
58
59 v = VGroup()
60 for i in range(12):
61 nt = Text("%d width %.2f height %.2f delta %.2f"%(i, shape[0], shape[1], delta),
62 color=GREEN).shift(LEFT*3)
63 v.add(nt)
64 v.arrange(direction=UP, aligned_edge=LEFT, buff=0.0)
65 self.add(v)
66
67 self.camera.frame.shift(OUT*10)
68
69 self.snapshot()
70 self.wait()

Callers

nothing calls this directly

Calls 2

snapshotMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected