Created
August 9, 2018 07:35
-
-
Save gncgnc/72ec60c17842aef956904814f90dea03 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
var canvElt, | |
numFrames = 120, | |
duration = 3000, | |
recording = true, | |
time = 0 | |
function setup() { | |
canvElt = createCanvas(600, 600).elt; | |
noStroke(); | |
} | |
function draw() { | |
background(255); | |
time = ((frameCount+frameCount/2)%numFrames)/numFrames | |
blendMode(DIFFERENCE) | |
var numCircs = 10; | |
for(var j=0; j<4; j++) { | |
translate(width/2,height/2) | |
rotate(PI/2) | |
translate(-width/2,-height/2) | |
fill(rgb[k]) | |
for (var i = 0; i < numCircs+4; i++) { | |
var r = ((numCircs-i+time*4))/numCircs * width * 1.4142; | |
fill(i%2 * 255) | |
r > 0 ? ellipse(0,0,2*r,2*r) : null; | |
} | |
} | |
blendMode(BLEND) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment