What’s on our mind?

Collection of articles, design, site, and resources made by designers and publisher @Menu View


	var angle = 0.0; 
    var y = []; 
    var x;

    function setup() {
        createCanvas(windowWidth, windowHeight);
        stroke(255);
        strokeWeight(3);    
    }
    function draw() {
        background( '#1d0808' ); 
        angle += 0.02;  
        x = angle;  

        for ( var i = 0; i < width; i++ ) {
            y[i] = sin(x);
            y[i] = y[i] * 200;
            x += 1;
        }
        for ( var i = 0; i < width; i++ ) {
            stroke(abs(y[i] * 1.4), 0, 0);
            point(i * 5, height/2 + y[i] );
        }
    }