monicah1-project-10-SectionA

sketch

// noise() function. 

var angleSpeed = 0.0005;
var angle = 0.005;

function setup() {
    createCanvas(480, 150);
    frameRate(20);
    background(0);
}
 
function draw() {
    
    // light sources shining on the living things
    beginShape(); 
    for (var x = 0; x < width; x++) {
        var t = (x * angle) + (millis() * angleSpeed);
        var y = map(noise(t), 0,1, 0, height);
        vertex(x, y); 
    }
    for (var x = 0; x < width; x++) {
    	fill(255,240,0);
        var t = (x * angle) + (millis() * angleSpeed);
        var y = map(noise(t), 1,4, 1, height);
        vertex(x, y); 
    }
    for (var x = 0; x < width; x++) {
        var t = (x * angle) + (millis() * angleSpeed);
        var y = map(noise(t), -3,10, -3, height);
        vertex(x, y); 
    }
    endShape();

    //living things
    for (var i = 0; i < 100; i++) {
        ellipse(random(width), random(height), 0.5);
    }
    
    
}

Here, the scenario is to have light sources projected on flock of living creature in a dark night. The light source moves randomly spotting the flock. I was interested in playing with the combination of movements and randomness of small scale objects and pieces of geometric shapes. The final sketch seems fairly success from what I imagined it to be.

Leave a Reply