xxxxxxxxxx
104
function setup() {
createCanvas(400, 400);
background(230);
}
function draw() {
//shape(posx,posy,length,height);
//triangle(x1,y1,x2,y2,x3,y3,);
//fill(r,b,g);
//Functions for a phone.
noStroke();
fill(80); {
rect(30, 25, 120, 242, 15);
// quad(100,50,150,100,250,50,200,20);
// ellipse(30,29,8,8);
// ellipse(150,29,8,8);
// ellipse(30,263,8,8);
// ellipse(150,263,8,8);
}
fill(183); {
ellipse(90, 245, 25, 25);
}
fill(20); {
rect(38, 42, 105, 180);
rect(65, 35, 50, 3);
}
//Functions for a MetroCard.
fill(255, 204, 0);
//{rect(200,50,175,110);} referenced
{
rect(200, 50, 155, 110);
rect(200, 70, 175, 90);
triangle(355, 50, 375, 70, 355, 70);
}
fill(255, 155, 0); {
ellipse(230, 75, 30, 30);
}
fill(0, 115, 255); {
triangle(200, 90, 200, 130, 360, 60);
}
fill(25); {
rect(200, 120, 175, 30);
}
//Functions for a pencil.
fill(240, 200, 130)
{
triangle(30, 320, 80, 310, 80, 330);
}
fill(25)
{
triangle(30, 320, 55, 315, 55, 325);
}
fill(255, 204, 0); {
rect(80, 310, 240, 10);
}
fill(255, 180, 0)
{
rect(80, 315, 240, 10);
}
fill(255, 160, 0)
{
rect(80, 323, 240, 7);
}
fill(183)
{
rect(320, 310, 25, 20);
}
fill(255, 0, 0)
{
rect(345, 310, 20, 20);
}
// textSize(14);
// text("CEN I HABE DE HAMBUGER", 200, 200);
//Pencil New
fill(240, 200, 130)
quad(200,200,300,250,300,300,250,300);
fill(25);
triangle(200,200,225,212.5,212.5,225);
fill(255, 204, 0);
quad(300,250,370,350,370,360,290,270);
fill(255, 160, 0);
quad(250,300,350,370,360,370,270,290);
fill(255, 180, 0);
quad(290,270,270,290,360,370,370,360);
// fill();
// quad(370,350,
}