Creating an Emoji on p5.js

This was my first time learning p5.js, here is the process of coming up with an emoji and making it through code.

Peeking into my right brain 🖍️

Coming up with initial shapes

Making decisions 📋

Trying different variations

Coding the diamond emoji 🧑‍💻

The structure, in form of layers
function setup() {
createCanvas(550, 550);
}
function draw() {
background('#F4EBFF');
noStroke()

fill('#D8D6D6')
rect(70,70,422,422,65);
//primary shape
fill (255)
rect(64,64,422,422,60);


//diamond
const w = width * 0.375;
const h = height * 0.1875;
noStroke();
fill(40);
translate((width/2) - (w/2), height/2);

//left part
beginShape();

fill('#4CB5F5')
vertex(0, 0);
vertex(h, h);
vertex(w, 0);
vertex(h, -h);
endShape();
//right part
beginShape();

fill('#23307A')
vertex(142, 0);
vertex(h, h);
vertex(w, 0);
vertex(h, -h);
endShape();

//Middle part
beginShape();

fill('#23307A5B')
vertex(62, 0);
vertex(h, h);
vertex(w, 0);
vertex(h, -h);

endShape();
}

The reveal 🎉

The Big blue diamond — made with p5.js
Quite nice to see this coming from the whole cohort

😆 Fun fact: This assignment took a total of 4 hours and 35 minutes to complete.

--

--

Crafting independent stories, research, and designing experiences. • Twitter @inSitesh

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sitesh Kumar Sahoo

Crafting independent stories, research, and designing experiences. • Twitter @inSitesh