xxxxxxxxxx
255
/* Assignment number 1 - Lost and Found, Object - BICYCLE 🚵
1. Mint colour wheels
2. Black/Dark Handles & Pedals
3. No carrier
4. White rods*/
function setup() {
angleMode(DEGREES);
createCanvas(400, 400);
}
function draw() {
//sky 🌌
background(151,227,248);//background
//road ⛹
fill(146);
rect(-10,330,410,350);
push();
fill(255);
noStroke();
rect(220,366,40,10);
rect(15,366,40,10);
rect(120,366,40,10);
rect(320,366,40,10);
pop();
strokeWeight(1.8);
line(130,280,60,290);
fill(163,211,182);//wheel-right
circle(290,290,95);//outer-right-ring
fill(151,227,248);//background
circle(290,290,80);//inner-right-ring
fill(163,211,182);
circle(90,290,95);//outer-left-ring
fill(151,227,248);//background
circle(90,290,80);//inner-left-ring
fill(0);
//wheel-line
line(129,286,50,289);//hortizontal-clock9-3
//scale(9,20,2);
push();
rotate(4);
line(100,322,118,244);
pop();
push();
rotate(18);
line(144,273,203,218);
line(160,212,190,285);
pop();
push();
strokeWeight(1.5);
translate(-5.5,4);
line(68,312,120,255);
pop();
push();
translate(-55,9);
line(169,310,120,250);
pop();
push();
strokeWeight(1.5);
translate(8,16);
line(96,311,68,237);
pop();
push();
strokeWeight(1.5);
translate(-60,24);
line(183,285,116,243);
pop();
line(128,297,52,278);
push();
stroke(2,90,19);
//rotate(7)
//line(123,235,100,170);
pop();
fill(163,211,182);
circle(90,288,20);
//right-wheel-line
strokeWeight(1.5);
translate(width/2,height/620);
line(129,286,50,289);//hortizontal-clock9-3
//scale(9,20,2);
push();
strokeWeight(1.5);
rotate(4);
line(100,322,118,244);
pop();
push();
rotate(18);
line(144,273,203,218);
line(160,212,190,285);
pop();
push();
strokeWeight(1.5);
translate(-5.5,4);
line(68,312,120,255);
pop();
push();
translate(-55,9);
line(169,310,120,250);
pop();
push();
translate(8,16);
line(96,311,68,237);
pop();
push();
translate(-60,24);
line(183,285,116,243);
pop();
line(128,297,52,278);
push();
stroke(2,90,19);
//rotate(7)
//line(123,235,100,170);
pop();
circle(90,288,20);
push();
fill(128,129,128);
circle(10,310,45);
pop();
circle(10,310,35);
push();
fill(155,155,155);
circle(10,310,10);
pop();
//pedal-right
push();
rotate(16);
fill(128,129,128);
rect(96,230,19,9,4);
pop();
push();
translate(width/6,height/67);
rotate(17);
fill(163,211,182);
rect(40,251,6,35);
pop();
//seat-stand
rotate(23);
fill(255);
rect(127,160,5,120);
push();
fill(128,129,128);
rect(127,135,6,39);
pop();
//seat****
//point(230,100);
//point(120,234);
/*point(145,99);
point(149,109);
point(125,135);
point(86,140);
point(80,130);
point(112,106);*/
push();
beginShape();
fill(163,211,182);
translate(width/72,height/25);
rotate(-3.5);
curveVertex(145,99);
curveVertex(145,99);
curveVertex(149,110);
curveVertex(125,140);
curveVertex(112,144);//left-curve
curveVertex(86,143);//left-curve
curveVertex(80,139);//left-curve
curveVertex(86,128);//left-side
curveVertex(132,104);//right-side
endShape(CLOSE);//close-vertex-seat
pop();
fill(163,211,182);
rect(125,285,6,34);
fill(128,129,128);
rect(118,319,19,9,4);
push();
translate(width/4,height/9);
rotate(50);
fill(255);
rect(200,56,5,71);
push();
rotate(69)
translate(width/18,height/6);
rect(90,-230,5,62);
pop();
//Connecting-rods
push();
rotate(46);
rect(185,-47,5,120)
rotate(12);
translate(width/65,height/89);
rect(212,-105,5,126);
pop();
push();
rotate(-52);
rect(-101,125,5,125);
pop();
//Handle
fill(255);
rect(33,125,5,35,12);
rotate(24);
fill(122);
rect(82,74,5,35,9);
push();
strokeWeight(1);
fill(163,211,182);
circle(96,130,13);
fill(128);
circle(96,130,4);
pop();
//🌞 sun
push();
fill(235,190,70);
blendMode( HARD_LIGHT);
noStroke();
circle(2,200,60);
pop();
}