top of page
Search

p5.js Sketch

oliviacollett846

On Tuesday we began learning the basics of the p5.js program. From what we learned, we were able to experiment with different functions. In this sketch, I experimented with the layering of objects, stroke weight, custom colors, and transparency. The goal I had in mind was to create a rainbow color gradient.


Code:

function setup() {

createCanvas(500, 270);

}


function draw() {

background(0);

strokeWeight(0)

fill(247, 147, 145, 90)

ellipse(160, 130, 50, 50)

fill(255, 200, 115, 90)

ellipse(180, 110, 50, 50)

fill(240, 237, 148, 90)

ellipse(200, 90, 50, 50)

fill(198, 240, 192, 90)

ellipse(220, 70, 50, 50)

fill(227, 255, 248, 90)

ellipse(250, 50, 50, 50)

fill(148, 225, 227, 90)

ellipse(280, 70, 50, 50)

fill(196, 184, 227, 90)

ellipse(300, 90, 50, 50)

fill(247, 147, 145, 90)

ellipse(320, 110, 50, 50)

fill(255, 200, 115, 90)

ellipse(340, 130, 50, 50)

fill(240, 237, 148, 90)

ellipse(320, 150, 50, 50)

fill(198, 240, 192, 90)

ellipse(300, 170, 50, 50)

fill(227, 255, 248, 90)

ellipse(280, 190, 50, 50)

fill(148, 225, 227, 90)

ellipse(250, 210, 50, 50)

fill(247, 147, 145, 90)

ellipse(220, 190, 50, 50)

fill(255, 200, 115, 90)

ellipse(200, 170, 50, 50)

fill(240, 237, 148, 90)

ellipse(180, 150, 50, 50)

fill(198, 240, 192, 90)

}

6 views0 comments

Recent Posts

See All

Typographic Hierarchy

The article about structuring typographic hierarchy was both interesting and helpful. When thinking of typographic hierarchy in general,...

Comments


bottom of page