Skip to content

Commit b0ff31f

Browse files
committed
- reduce processing overhead
1 parent 3b6cd58 commit b0ff31f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

chapter-09-functions_and_periodic_motion/lissajous_curves/lissajous_curves.pyde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ def lissajousPoint(t, A, B, a, b):
66

77
def setup():
88
size(800, 600)
9+
frameRate(30)
910
background('#004477')
1011
fill('#FFFFFF')
1112
noStroke()
@@ -29,13 +30,13 @@ def draw():
2930

3031
# screensaver
3132

32-
for i in range(15):
33+
for i in range(10):
3334
# curves
3435
t = theta + i / 15.0
3536
x1, y1 = lissajousPoint(t, 300, 150, 3, 1)
3637
x2, y2 = lissajousPoint(t, 250, 220, 1, 3)
3738
# background color
38-
fill(0x44000000)
39+
fill(0x55000000)
3940
noStroke()
4041
rect(-width/2, -height/2, width, height)
4142
# line

img/ch09-lissajous_curves.png

-6.04 KB
Loading

0 commit comments

Comments
 (0)