Created
December 11, 2016 21:29
-
-
Save edgalindo/a990494cabc9222d3f3dad9f0abeca23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setup() { | |
| createCanvas(500, 500); // windowWidth, windowHeight is another Canvas shape mesurement | |
| colorMode(RGB); | |
| background(255, 253, 13, 70); | |
| //saveFrames('tunnel_', 'jpg', 5, 25); | |
| frameRate(10); | |
| } | |
| function draw() { | |
| for (var i = 0; i < 500; i++) { | |
| var w = random(500 * 100); //random X | |
| var colors = [color(255, 159, 13), | |
| color(255, 253, 13), | |
| color(255, 83, 13), | |
| color(232, 44, 12), | |
| color(255, 0, 0), | |
| color(232, 12, 122), | |
| color(255, 13, 255)]; | |
| var c = round(random(6)); // select array colors | |
| smooth(); // smooth | |
| noFill(); | |
| stroke(colors[c]); //set stroke color | |
| strokeWeight(0.25 + random (0.5 + 14)); | |
| strokeCap(SQUARE); // Endpoint of the arcs are as a square drawn | |
| arc( width/2, height/2, w, w,random(50), random(50)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment