Stuff
This commit is contained in:
33
setup.py
33
setup.py
@ -1,14 +1,8 @@
|
||||
#%%
|
||||
|
||||
import math
|
||||
import random
|
||||
|
||||
from flight.case import *
|
||||
from flight.color import Color
|
||||
from flight.client import *
|
||||
from flight.expressions import *
|
||||
from flight.expressions import Expression
|
||||
from flight.server import FlightServer
|
||||
|
||||
from constants import *
|
||||
|
||||
@ -42,6 +36,30 @@ def Star(radius):
|
||||
ClosePath()
|
||||
|
||||
|
||||
def Spiral(count, startRadius=10, loops=2, **kwargs):
|
||||
with Group(**kwargs):
|
||||
r = startRadius
|
||||
x = -r
|
||||
y = 0
|
||||
for j in range(loops * 4):
|
||||
d = j % 4
|
||||
start = d / 4
|
||||
end = (d + 1) / 4
|
||||
with Path(tags='segment', meta_index=j, meta_count=count):
|
||||
Ellipse(x, y, r, r, startAngle=start, endAngle=end)
|
||||
StrokePath()
|
||||
if d == 0:
|
||||
y -= r
|
||||
elif d == 1:
|
||||
x += r
|
||||
elif d == 2:
|
||||
y += r
|
||||
elif d == 3:
|
||||
x -= r
|
||||
r *= 2
|
||||
|
||||
|
||||
|
||||
with Screen('main', width=1920, height=1080) as screen:
|
||||
with Pattern('beads', width=BeadSeparation * 2, height=BeadSeparation * 2) as beads:
|
||||
for x in range(3):
|
||||
@ -130,6 +148,9 @@ with Screen('main', width=1920, height=1080) as screen:
|
||||
with Path(tags='outline'):
|
||||
Star(10)
|
||||
StrokePath()
|
||||
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 Path(id='mask', pattern='mask_pattern', fader=0):
|
||||
Rect(0, 0, container.width, container.height)
|
||||
FillPath()
|
||||
|
Reference in New Issue
Block a user