Skip to content
Snippets Groups Projects
Commit 3307bd90 authored by Raphael Hunt's avatar Raphael Hunt
Browse files

Upload New File

parent fab6d95f
Branches
No related merge requests found
//this sketch provides two different variations on a strobe created by aligning two different spheres to rapidly change size at different rates. besides creating a unique strobe effect these two sketches also give off the sensation of being pulled into the screen.
var difference;
function setup() {
createCanvas(720, 720);
}
function draw() {
//creating blur
pixelDensity(0.1);
background(random(0,255),0,255);
difference = frameCount%20;
stroke(255,0,0);
fill(255);
//first strobe uses two spheres one red and one that changes color over time to create the strobe effect while utilizing randomness to give the movements more dynamism.
strokeWeight(10);
ellipse(360+random(-50,50), 360+random(-50,50), (frameCount % 21)*40, (frameCount % 21)*40);
fill(frameCount%255,0,255);
ellipse(360+random(-50,50), 360+random(-50,50), (frameCount % 20)*40, (frameCount % 20)*40);
////this second strobe also uses two spheres but they both shrink in size in sync, this creates an effect as if the viewer were moving away from what is happening on screen.
// strokeWeight(25);
// ellipse(360+random(-difference,difference),
// 360+random(-difference,difference),
// (frameCount % 11)*45, (frameCount % 11)*45);
// fill(0,0,255);
// ellipse(360+random(-difference,difference),
// 360+random(-difference,difference),
// (frameCount % 10)*40, (frameCount % 10)*40);
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment