add more rectangles (similar to scanline wiki aritcle) + slowed point of interest animation
This commit is contained in:
parent
072a1501b3
commit
aed7c35624
|
@ -33,7 +33,7 @@ class Scanline(VGroup):
|
||||||
class Main(Scene):
|
class Main(Scene):
|
||||||
def construct(self):
|
def construct(self):
|
||||||
|
|
||||||
boards = [Billboard(x, y, w, h) for x, y, w, h in [(1, 0, 3, 3), (2, 2, 5, 2)]]
|
boards = [Billboard(x, y, w, h) for x, y, w, h in [(1, 1, 2.3, 3.5), (1.5, 2, 9, 2), (2, 1.5, 4, 3), (3.7, 2.1, 3, 1.4), (4.5, 0, 2.8, 4.2), (6.3, 1.1, 2.8, 3.6)]]
|
||||||
self.add(*boards)
|
self.add(*boards)
|
||||||
|
|
||||||
poi = sorted([(b.x, 1, i) for i, b in enumerate(boards)] + [(b.x + b.w, -1, i) for i, b in enumerate(boards)])
|
poi = sorted([(b.x, 1, i) for i, b in enumerate(boards)] + [(b.x + b.w, -1, i) for i, b in enumerate(boards)])
|
||||||
|
@ -47,5 +47,7 @@ class Main(Scene):
|
||||||
else:
|
else:
|
||||||
scan.delete(boards[i].y)
|
scan.delete(boards[i].y)
|
||||||
|
|
||||||
|
self.wait(0.5)
|
||||||
|
|
||||||
|
|
||||||
self.wait(2)
|
self.wait(2)
|
||||||
|
|
Loading…
Reference in New Issue