From a3f7ecd97af8de4920ec8bdbedb064cb4a685270 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 28 Oct 2019 14:19:34 -0500 Subject: [PATCH] Illusion Colors project --- visuals/IllusionColors/IllusionColors.pyde | 38 ++++++++++++++++++++++ visuals/IllusionColors/sketch.properties | 2 ++ visuals/README.md | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 visuals/IllusionColors/IllusionColors.pyde create mode 100644 visuals/IllusionColors/sketch.properties diff --git a/visuals/IllusionColors/IllusionColors.pyde b/visuals/IllusionColors/IllusionColors.pyde new file mode 100644 index 0000000..e29369b --- /dev/null +++ b/visuals/IllusionColors/IllusionColors.pyde @@ -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(); diff --git a/visuals/IllusionColors/sketch.properties b/visuals/IllusionColors/sketch.properties new file mode 100644 index 0000000..2456b0a --- /dev/null +++ b/visuals/IllusionColors/sketch.properties @@ -0,0 +1,2 @@ +mode=Python +mode.id=jycessing.mode.PythonMode diff --git a/visuals/README.md b/visuals/README.md index 2fb60c9..4af8bc4 100644 --- a/visuals/README.md +++ b/visuals/README.md @@ -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. +- **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. - **Rotating_HSB_Squares** - Slowly builds a mandela-like structure out of squares that slowly change color through the HSB color spectrum.