mirror of
https://github.com/Xevion/processing-projects.git
synced 2025-12-06 15:16:04 -06:00
Illusion Colors project
This commit is contained in:
38
visuals/IllusionColors/IllusionColors.pyde
Normal file
38
visuals/IllusionColors/IllusionColors.pyde
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
|
def setup():
|
||||||
|
size(750, 750)
|
||||||
|
frameRate(60)
|
||||||
|
background(0)
|
||||||
|
s = 0
|
||||||
|
multi = 12.0
|
||||||
|
|
||||||
|
curColor = 0
|
||||||
|
def nextColor():
|
||||||
|
global curColor
|
||||||
|
colors = [(255,0,0), (255, 127,0), (255,255,0), (0,255,0), (0,0,255), (75,0,130), (148,0,211)]
|
||||||
|
curColor += 1
|
||||||
|
return colors[curColor % len(colors)]
|
||||||
|
|
||||||
|
def draw():
|
||||||
|
multi = 12.0
|
||||||
|
s = 0
|
||||||
|
for _ in range(int(12//0.3)):
|
||||||
|
if multi <= 0:
|
||||||
|
noLoop()
|
||||||
|
time.sleep(1)
|
||||||
|
s = 0
|
||||||
|
multi = 12.0
|
||||||
|
s += 1
|
||||||
|
multi -= 0.3
|
||||||
|
pushMatrix();
|
||||||
|
translate(width/2,height/2);
|
||||||
|
# rotate(s*radians(0.6));
|
||||||
|
stroke(255)
|
||||||
|
R, G, B = nextColor()
|
||||||
|
stroke(R, G, B)
|
||||||
|
fill(0, 0, 0)
|
||||||
|
x1, y1, x2, y2, x3, y3 = -30*multi, 30*multi, 0, -30*multi, 30*multi, 30*multi
|
||||||
|
# triangle(x1, y1, x2, y2, x3, y3);
|
||||||
|
ellipse(0, 0, 100*multi, 100*multi)
|
||||||
|
popMatrix();
|
||||||
2
visuals/IllusionColors/sketch.properties
Normal file
2
visuals/IllusionColors/sketch.properties
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mode=Python
|
||||||
|
mode.id=jycessing.mode.PythonMode
|
||||||
@@ -14,6 +14,8 @@ All my projects attempting to create vivid or interesting visuals using the Proc
|
|||||||
|
|
||||||
- **Illusion** - A improperly named triangular rotation (I like the way they look) sketch.
|
- **Illusion** - A improperly named triangular rotation (I like the way they look) sketch.
|
||||||
|
|
||||||
|
- **IllusionColors** - A more proper mimic of the common illusion mechanic, but it doesn't work so well.
|
||||||
|
|
||||||
- **Trippy_Boxes** - Transparent rotating boxes that move throught the HSB color spectrum.
|
- **Trippy_Boxes** - Transparent rotating boxes that move throught the HSB color spectrum.
|
||||||
|
|
||||||
- **Rotating_HSB_Squares** - Slowly builds a mandela-like structure out of squares that slowly change color through the HSB color spectrum.
|
- **Rotating_HSB_Squares** - Slowly builds a mandela-like structure out of squares that slowly change color through the HSB color spectrum.
|
||||||
|
|||||||
Reference in New Issue
Block a user