From aed7c3562448e9c757d284f552f16d63f54b77a3 Mon Sep 17 00:00:00 2001 From: bibin Date: Sun, 30 Oct 2022 00:34:54 +0200 Subject: [PATCH] add more rectangles (similar to scanline wiki aritcle) + slowed point of interest animation --- scanline/billboards_of_ny.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scanline/billboards_of_ny.py b/scanline/billboards_of_ny.py index 6a49d58..fcddc16 100644 --- a/scanline/billboards_of_ny.py +++ b/scanline/billboards_of_ny.py @@ -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)