From e4efc148ea8ffa30f13d1e453ca5d24fefe74e84 Mon Sep 17 00:00:00 2001 From: Jonathan Hogg Date: Sun, 22 Sep 2019 15:11:36 +0100 Subject: [PATCH] More development during the event --- constants.py | 3 +++ cues.py | 22 ++++++++++++++++++++++ setup.py | 7 +++++++ 3 files changed, 32 insertions(+) diff --git a/constants.py b/constants.py index 9a8a4a2..aaea5b7 100644 --- a/constants.py +++ b/constants.py @@ -32,6 +32,9 @@ TriangleWidth = 60 TriangleHeight = 40 TriangleRadius = 430 Spirals = 7 +TunnelLoops = 22 +FirstTunnelRadius = 10 +TunnelLoopMultiplier = 1.25 MaskColor = Color.hsv(0.09, 0.8, 0.25) DarkMaskColor = MaskColor * 0.25 diff --git a/cues.py b/cues.py index 5cb4f2a..b59282a 100644 --- a/cues.py +++ b/cues.py @@ -8,6 +8,9 @@ from constants import * #%% +BPM = 126 + + client.activate() with Cue('Q01', name='Mask', fadeIn=5, fadeOut=5): @@ -61,6 +64,12 @@ with Cue('Q08', name='Shrinking mask', fadeIn=1, fadeOut=1): count = t / period Match('#master_mask').scale = 0.01 + sine(count) +with Cue('Q09', name='Beating mask', fadeIn=1, fadeOut=1): + period = 60 / BPM + count = t / period + beat = sawtooth(count, duty=0.25) + Match('#master_mask').scale = 0.9 + 0.2 * impulse(beat) + with Cue('Q11', name='Rainbow triangles', fadeIn=1, fadeOut=1): period = 5 count = t / period @@ -135,6 +144,12 @@ with Cue('Q24', name='Rushing stars', fadeIn=1, fadeOut=1): m.color = white(sine(count)) m.scale = count % 1 +with Cue('Q25', name='Beating stars', fadeIn=1, fadeOut=1): + period = 60 / BPM + count = t / period + beat = sawtooth(count, duty=0.25) + Match('#stars').scale = 0.9 + 0.2 * impulse(beat) + with Cue('Q31', name='Spirals', fadeIn=1, fadeOut=1): period = 10 count = t / period @@ -143,3 +158,10 @@ with Cue('Q31', name='Spirals', fadeIn=1, fadeOut=1): Match('#spirals').rotate = -count Match('.spiral .segment').lineWidth = 1.5 ** meta.index Match('.spiral .segment').color = hsv(count + meta.count / Spirals, meta.index / 8, value) + +with Cue('Q41', name='Tunnel', fadeIn=1, fadeOut=1): + period = 2 + count = t / period + Match('#tunnel').fader = 1 + Match('#tunnel .loop').color = hsv(count - i/n, 1, 0.25 + 0.75 * i/n) + Match('#tunnel').scale = 1 + (TunnelLoopMultiplier - 1) * sawtooth(count) diff --git a/setup.py b/setup.py index 03af6c4..0564171 100644 --- a/setup.py +++ b/setup.py @@ -151,6 +151,13 @@ with Screen('main', width=1920, height=1080) as screen: with Group('spirals', x=screen.width/2, y=screen.height/2, color='white', lineWidth=2, fader=0, composite='lighter'): for j in range(Spirals): Spiral(rotate=j/Spirals, count=j, tags='spiral') + with Group('tunnel', x=screen.width/2, y=screen.height/2, fader=0, composite='lighter'): + radius = FirstTunnelRadius + for j in range(TunnelLoops): + with Path(tags='loop', lineWidth=radius / 10): + Ellipse(0, 0, radius, radius) + StrokePath() + radius *= TunnelLoopMultiplier with Path(id='mask', pattern='mask_pattern', fader=0): Rect(0, 0, container.width, container.height) FillPath()