add more rectangles (similar to scanline wiki aritcle) + slowed point of interest animation

This commit is contained in:
Bibin Muttappillil 2022-10-30 00:34:54 +02:00
parent 072a1501b3
commit aed7c35624
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class Scanline(VGroup):
class Main(Scene):
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)
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:
scan.delete(boards[i].y)
self.wait(0.5)
self.wait(2)