mirror of
https://github.com/Xevion/processing-projects.git
synced 2025-12-08 16:08:07 -06:00
trippy boxes sketch
This commit is contained in:
31
visuals/Trippy_Boxes/Trippy_Boxes.pyde
Normal file
31
visuals/Trippy_Boxes/Trippy_Boxes.pyde
Normal file
@@ -0,0 +1,31 @@
|
||||
class RGB:
|
||||
def __init__(self, r, g, b):
|
||||
self.r, self.g, self.b = r, g, b
|
||||
self.rgb = (r,g,b)
|
||||
|
||||
def setup():
|
||||
size(1000, 1000, P3D)
|
||||
colorMode(HSB, 5, 5, 5)
|
||||
|
||||
def drawMatrix(i):
|
||||
multi = 200
|
||||
for x in range(5):
|
||||
for y in range(5):
|
||||
for z in range(5):
|
||||
pushMatrix()
|
||||
translate(200, 200)
|
||||
translate(x * multi, y * multi, z * multi)
|
||||
rotateX(i)
|
||||
rotateY(i)
|
||||
stroke(i % 5, 5, 5, 240)
|
||||
fill(i % 5, 5, 5, 255/8)
|
||||
strokeWeight(3)
|
||||
box(100)
|
||||
popMatrix()
|
||||
i = 0
|
||||
def draw():
|
||||
global i
|
||||
i += 0.02
|
||||
background(5)
|
||||
drawMatrix(i)
|
||||
|
||||
Reference in New Issue
Block a user