xxxxxxxxxx
/*
Lin Relucio
April 4th, 2023
A2.2 Clipart
Recreate a specific image as accurately as possible
*/
size(500,500); // makes 500x500 canvas
/* CAKE */
fill(255,140,0); // changes shapes colour to orange
rect(100,200,300,200); // makes rectangle part of cylinder
ellipse(250,205,300,100); // makes top part of cylinder
ellipse(250,395,300,100); // makes bottom part of cylinder
stroke(255,140,0); // changes stroke/outline colour to orange
rect(102,260,296,150,15); // hides the bottom ellipses stroke
/* CANDLESTICKS */
fill(0,128,0); // changes shapes colour to green
stroke(0); // changes stroke/outline colour to black
rect(240,120,15,55,10); // makes candlestick
fill(255,20,147); // changes shapes colour to pink
rect(150,130,15,55,10); // makes far left candlestick
rect(335,130,15,55,10); // makes far right candlestick
fill(139,0,0); // changes shapes colour to dark red
rect(195,145,15,55,10); // makes middle left candlestick
fill(0,0,255); // changes shapes colour to blue
rect(290,145,15,55,10); // makes middle right candlestick
line(247,110,247,120); // makes middle candlestick wick
line(202,135,202,145); // makes middle left candlestick wick
line(298,135,298,145); // makes middle right candlestick wick
line(157,120,157,130); // makes far left candlestick wick
line(343,120,343,130); // makes far right candlestick wick
/* CANDLE FLAME */
fill(255,255,0); // changes shapes colour to yellow
ellipse(248,100,10,25); // makes middle flame
ellipse(202,125,10,25); // makes middle left flame
ellipse(298,125,10,25); // makes middle right flame
ellipse(157,110,10,25); // makes far left flame
ellipse(343,110,10,25); // makes far right flame