xxxxxxxxxx
84
function setup() {
createCanvas(400, 400);
background(random(255), random(255), random (255));
fill (2, 2, 2)
stroke(10)
ellipse(150, 160, 30,30)
ellipse(250, 160, 30 ,30)
}
function draw() {
}
function keyPressed() {
if(key == "j"){
strokeWeight(5)
line(200, 200, 170, 230) ;
line(170, 230, 200, 230);
}
if(key == "c"){
noFill();
strokeWeight ( 5) ;
arc(200, 280, 80, 80,0,PI, PI + QUARTER_PI);
}
if(key =="k"){
line(130,140, 170, 130)
line(230, 130, 270, 140)
}
if(key == "l"){
strokeWeight(10)
line(130,130, 170, 130)
line(230, 130, 270, 130)
}
if(key =="f"){
line(150,120,180,160)
line(250, 120, 220, 160)
}
if(key =="v"){
strokeWeight ( 5)
line(170,280, 230, 280)
}
if(key == "t"){
strokeWeight(1)
fill(255,0,0)
ellipse(130,210, 40, 40)
ellipse(270,210, 40, 40)
}
if(key == "h"){
background(random(255), random(255), random (255))
fill(random(255), random(255), random (255))
ellipse (200,200,250,300)
stroke(15)
fill (2, 2, 2)
ellipse(150, 160, 30,30)
ellipse(250, 160, 30 ,30)
}
if(key == "b"){
noFill();
strokeWeight(5)
arc(200, 300, 80, 60, PI + QUARTER_PI, TWO_PI)
}
if(key == "y"){
strokeWeight(5)
line(190, 220, 190, 180)
line(210, 220, 210, 180)
line(210, 220, 190, 220)
line(210,220, 220, 210)
line(190, 220, 180, 210)
}
}h