Java Processing Gambar Motor Keren
Aku Punya Blog | Java Processing | Motor Keren|
Assalamualaikum wr.wb..Selamat pagi ketemu lagi dihari yang cerah ini.. Kali ini akan saya share lagi sourcode java processing Motor ... bagi anda yang suka belajar processing mungkin ini dapat sedikit membantu.. Bagi yang copas harap sertakan link sumber. Terima kasih
Silahkan Download
size(640,390);
background(255);
//roda belakang
fill(0);
ellipse(130,265,178,178);
fill(250,174,8);
ellipse(130,265,160,160);
fill(255,255,255);
ellipse(130,265,145,145);
fill(255,255,0);
ellipse(130,265,60,60);
ellipse(130,265,47,47);
// ruji
// merah
pushMatrix();
translate(130, 265);
rotate(radians(50));
strokeWeight(1.5);
stroke(255,0,0);
line(22, 13, 40, 60);
popMatrix();
// hijau
pushMatrix();
translate(130, 265);
rotate(radians(0));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 26, 40, 60);
popMatrix();
// merah
pushMatrix();
translate(130, 265);
rotate(radians(110));
strokeWeight(1.5);
stroke(255,0,0);
line(22, 13, 40, 60);
popMatrix();
// hijau
pushMatrix();
translate(130, 265);
rotate(radians(60));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 26, 40, 60);
popMatrix();
// merah
pushMatrix();
translate(130, 265);
rotate(radians(170));
strokeWeight(1.5);
stroke(255,0,0);
line(22, 13, 40, 60);
popMatrix();
// hijau
pushMatrix();
translate(130, 265);
rotate(radians(120));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 26, 40, 60);
popMatrix();
// merah
pushMatrix();
translate(130, 265);
rotate(radians(230));
strokeWeight(1.5);
stroke(255,0,0);
line(22, 13, 40, 60);
popMatrix();
// hijau
pushMatrix();
translate(130, 265);
rotate(radians(180));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 26, 40, 60);
popMatrix();
// merah
pushMatrix();
translate(130, 265);
rotate(radians(290));
strokeWeight(1.5);
stroke(255,0,0);
line(22, 13, 40, 60);
popMatrix();
// hijau
pushMatrix();
translate(130, 265);
rotate(radians(240));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 26, 40, 60);
popMatrix();
// merah
pushMatrix();
translate(130, 265);
rotate(radians(350));
strokeWeight(1.5);
stroke(255,0,0);
line(22, 13, 40, 60);
popMatrix();
// hijau
pushMatrix();
translate(130, 265);
rotate(radians(300));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 26, 40, 60);
popMatrix();
// biru
pushMatrix();
translate(130, 265);
rotate(radians(20));
strokeWeight(1.5);
stroke(0,0,255);
line(26, 14, 40, 60);
popMatrix();
// hitam
pushMatrix();
translate(130, 265);
rotate(radians(30));
strokeWeight(1.5);
stroke(0);
line(0, 28, 40, 60);
popMatrix();
// biru
pushMatrix();
translate(130, 265);
rotate(radians(80));
strokeWeight(1.5);
stroke(0,0,255);
line(26, 14, 40, 60);
popMatrix();
// hitam
pushMatrix();
translate(130, 265);
rotate(radians(90));
strokeWeight(1.5);
stroke(0);
line(0, 28, 40, 60);
popMatrix();
// biru
pushMatrix();
translate(130, 265);
rotate(radians(140));
strokeWeight(1.5);
stroke(0,0,255);
line(26, 14, 40, 60);
popMatrix();
// hitam
pushMatrix();
translate(130, 265);
rotate(radians(150));
strokeWeight(1.5);
stroke(0);
line(0, 28, 40, 60);
popMatrix();
// biru
pushMatrix();
translate(130, 265);
rotate(radians(200));
strokeWeight(1.5);
stroke(0,0,255);
line(26, 14, 40, 60);
popMatrix();
// hitam
pushMatrix();
translate(130, 265);
rotate(radians(210));
strokeWeight(1.5);
stroke(0);
line(0, 28, 40, 60);
popMatrix();
// biru
pushMatrix();
translate(130, 265);
rotate(radians(260));
strokeWeight(1.5);
stroke(0,0,255);
line(26, 14, 40, 60);
popMatrix();
// hitam
pushMatrix();
translate(130, 265);
rotate(radians(270));
strokeWeight(1.5);
stroke(0);
line(0, 28, 40, 60);
popMatrix();
// biru
pushMatrix();
translate(130, 265);
rotate(radians(330));
strokeWeight(1.5);
stroke(0,0,255);
line(26, 14, 40, 60);
popMatrix();
// hitam
pushMatrix();
translate(130, 265);
rotate(radians(340));
strokeWeight(1.5);
stroke(0);
line(0, 28, 40, 60);
popMatrix();
//roda depan
fill(0);
ellipse(527,265,178,178);
fill(250,174,8);
ellipse(527,265,160,160);
fill(255,255,255);
ellipse(527,265,145,145);
ellipse(527,265,92,92);
// ruji
// merah +57
pushMatrix();
translate(527, 265);
rotate(radians(50));
strokeWeight(1.5);
stroke(255,0,0);
line(15, 10, 40, 60);
popMatrix();
// hijau +57
pushMatrix();
translate(527, 265);
rotate(radians(0));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 18, 40, 60);
popMatrix();
// merah +57
pushMatrix();
translate(527, 265);
rotate(radians(110));
strokeWeight(1.5);
stroke(255,0,0);
line(15, 10, 40, 60);
popMatrix();
// hijau +57
pushMatrix();
translate(527, 265);
rotate(radians(60));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 18, 40, 60);
popMatrix();
// merah +57
pushMatrix();
translate(527, 265);
rotate(radians(170));
strokeWeight(1.5);
stroke(255,0,0);
line(15, 10, 40, 60);
popMatrix();
// hijau +57
pushMatrix();
translate(527, 265);
rotate(radians(120));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 18, 40, 60);
popMatrix();
// merah +57
pushMatrix();
translate(527, 265);
rotate(radians(230));
strokeWeight(1.5);
stroke(255,0,0);
line(15, 10, 40, 60);
popMatrix();
// hijau +57
pushMatrix();
translate(527, 265);
rotate(radians(180));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 18, 40, 60);
popMatrix();
// merah +57
pushMatrix();
translate(527, 265);
rotate(radians(290));
strokeWeight(1.5);
stroke(255,0,0);
line(15, 10, 40, 60);
popMatrix();
// hijau +57
pushMatrix();
translate(527, 265);
rotate(radians(240));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 18, 40, 60);
popMatrix();
// merah +57
pushMatrix();
translate(527, 265);
rotate(radians(350));
strokeWeight(1.5);
stroke(255,0,0);
line(15, 10, 40, 60);
popMatrix();
// hijau +57
pushMatrix();
translate(527, 265);
rotate(radians(300));
strokeWeight(1.5);
stroke(0,255,0);
line(0, 18, 40, 60);
popMatrix();
// biru +60
pushMatrix();
translate(527, 265);
rotate(radians(20));
strokeWeight(1.5);
stroke(0,0,255);
line(20, 7, 40, 60);
popMatrix();
// hitam +60
pushMatrix();
translate(527, 265);
rotate(radians(30));
strokeWeight(1.5);
stroke(0);
line(0, 20, 40, 60);
popMatrix();
// biru +60
pushMatrix();
translate(527, 265);
rotate(radians(80));
strokeWeight(1.5);
stroke(0,0,255);
line(20, 7, 40, 60);
popMatrix();
// hitam +60
pushMatrix();
translate(527, 265);
rotate(radians(90));
strokeWeight(1.5);
stroke(0);
line(0, 20, 40, 60);
popMatrix();
// biru +60
pushMatrix();
translate(527, 265);
rotate(radians(140));
strokeWeight(1.5);
stroke(0,0,255);
line(20, 7, 40, 60);
popMatrix();
// hitam +60
pushMatrix();
translate(527, 265);
rotate(radians(150));
strokeWeight(1.5);
stroke(0);
line(0, 20, 40, 60);
popMatrix();
// biru +60
pushMatrix();
translate(527, 265);
rotate(radians(200));
strokeWeight(1.5);
stroke(0,0,255);
line(20, 7, 40, 60);
popMatrix();
// hitam +60
pushMatrix();
translate(527, 265);
rotate(radians(210));
strokeWeight(1.5);
stroke(0);
line(0, 20, 40, 60);
popMatrix();
// biru +60
pushMatrix();
translate(527, 265);
rotate(radians(260));
strokeWeight(1.5);
stroke(0,0,255);
line(20, 7, 40, 60);
popMatrix();
// hitam +60
pushMatrix();
translate(527, 265);
rotate(radians(270));
strokeWeight(1.5);
stroke(0);
line(0, 20, 40, 60);
popMatrix();
// biru +60
pushMatrix();
translate(527, 265);
rotate(radians(320));
strokeWeight(1.5);
stroke(0,0,255);
line(20, 7, 40, 60);
popMatrix();
// hitam +60
pushMatrix();
translate(527, 265);
rotate(radians(330));
strokeWeight(1.5);
stroke(0);
line(0, 20, 40, 60);
popMatrix();
//cakram
noFill();
ellipse(527,265,67,67);
fill(255,255,0);
ellipse(527,265,38,38);
beginShape();
vertex(467, 245);
vertex(474, 244);
vertex(479, 239);
vertex(470, 235);
vertex(469, 240);
vertex(477, 224);
vertex(485, 224);
vertex(503, 237);
vertex(499, 261);
vertex(477, 269);
vertex(473, 265);
vertex(467, 267);
endShape(CLOSE);
ellipse(494,231,18,18);
ellipse(489,251,22,22);
ellipse(477,231,12,12);
// body belakang
noStroke();
fill(96,3,192);
beginShape();
vertex(35, 65);
vertex(43, 57);
vertex(85, 70);
vertex(60, 80);
endShape(CLOSE);
beginShape();
vertex(83, 70);
vertex(210, 138);
vertex(170, 164);
vertex(54, 82);
endShape(CLOSE);
stroke(0);
bezier(35, 65, 70, 77, 80, 125, 170, 163);
//jog
fill(54,54,50);
beginShape();
vertex(86, 70);
vertex(92, 62);
vertex(180, 99);
vertex(263, 117);
vertex(281, 153);
vertex(277, 152);
vertex(210, 138);
endShape(CLOSE);
line(92,62,180,98);
fill(255);
bezier(85, 70, 80, 67, 84, 69, 92, 62);
//tanki
noStroke();
fill(96,3,192);
beginShape();
vertex(263, 117);
vertex(321, 70);
vertex(415, 90);
vertex(438, 114);
vertex(332, 172);
vertex(282, 154);
endShape(CLOSE);
stroke(0);
fill(255);
bezier(180, 98, 210, 120, 240, 130, 265, 115);
//tutup
beginShape();
vertex(344, 65);
vertex(366, 69);
vertex(365, 76);
vertex(342, 71);
endShape(CLOSE);
//ungu
fill(96,3,192);
bezier(263, 117, 280, 94, 300, 80, 321, 70);
bezier(321, 70, 350, 71, 380, 82, 415, 90);
bezier(415, 90, 425, 95, 434, 105, 438, 114);
fill(255);
bezier(210, 138, 170, 130, 160, 140, 170, 163);
//lampu belakang
noFill();
bezier(37, 67, 47, 89, 45, 90, 45, 97);
bezier(45, 98, 61, 106, 63, 100, 80, 104);
// penyangga ban belakang
//atss
fill(0,0,255);
beginShape();
vertex(115, 255);
vertex(224, 255);
vertex(234, 278);
vertex(115, 278);
endShape(CLOSE);
//baut tromol belakang
fill(222,221,223);
ellipse(130,265,9,9);
//tromol & kabel
beginShape();
vertex(115, 280);
vertex(124, 280);
vertex(128, 309);
vertex(122, 309);
endShape(CLOSE);
ellipse(120,285,6,6);
line(117,307,212,300);
ellipse(125,306,5,5);
//bawah
beginShape();
vertex(198, 140);
vertex(208, 142);
vertex(224, 190);
vertex(212, 180);
endShape(CLOSE);
beginShape();
vertex(168, 143);
vertex(270, 222);
vertex(263, 228);
vertex(169, 155);
endShape(CLOSE);
//knalpot
beginShape();
vertex(98, 204);
vertex(111, 210);
vertex(95, 233);
vertex(84, 226);
endShape(CLOSE);
fill(222,221,223);
beginShape();
vertex(114, 208);
vertex(194, 258);
vertex(171, 286);
vertex(92, 238);
endShape(CLOSE);
fill(64,70,70);
beginShape();
vertex(194, 258);
vertex(212, 282);
vertex(202, 296);
vertex(171, 286);
endShape();
beginShape();
vertex(212, 282);
vertex(255, 305);
vertex(370, 305);
vertex(405, 234);
vertex(391, 223);
vertex(397, 215);
vertex(419, 230);
vertex(380, 315);
vertex(251, 316);
vertex(202, 296);
endShape();
stroke(255);
strokeWeight(2);
noFill();
arc(409,233,23,16,(-50*PI)/180,(45*PI)/180);
stroke(0);
// rumahan garpu
fill(240,240,240);
beginShape();
vertex(448, 102);
vertex(461, 97);
vertex(482, 153);
vertex(470, 158);
endShape(CLOSE);
// garpu
fill(253,254,255);
beginShape();
vertex(461, 97);
vertex(472, 90);
vertex(498, 158);
vertex(486, 162);
endShape(CLOSE);
beginShape();
vertex(498, 158);
vertex(504, 162);
vertex(481, 170);
vertex(486, 162);
endShape(CLOSE);
//
fill(255,0,0);
beginShape();
vertex(504, 162);
vertex(508, 173);
vertex(507, 176);
vertex(539, 271);
vertex(521, 276);
vertex(488, 182);
vertex(485, 180);
vertex(481, 170);
endShape(CLOSE);
ellipse(528,265,9,9);
//lampu depan
//lampu
//ungu
noStroke();
fill(96,3,192);
beginShape();
vertex(491, 112);
vertex(529, 92);
vertex(522, 148);
vertex(494, 133);
endShape();
stroke(0);
bezier(491, 112, 500, 104, 514, 98, 529, 92);
bezier(494, 133, 500, 138, 502, 140, 522, 148);
noFill();
bezier(534, 93, 534, 106, 533, 130, 528, 148);
fill(222,221,223);
//penyangga
beginShape();
vertex(482, 114);
vertex(515, 112);
vertex(516, 115);
vertex(490, 137);
endShape(CLOSE);
//baut lampu
ellipse(509,116,6,6);
beginShape();
vertex(534, 93);
vertex(528, 92);
vertex(522, 148);
vertex(528, 148);
endShape();
//rangka mesin
line(280,208,250,251);
bezier(280, 208, 370, 145, 412, 123, 455, 109);
bezier(250, 251, 253, 268, 260, 287, 270, 304);
line(455,109,471,151);
line(471,151,320,211);
bezier(320, 211, 310, 218, 300, 222, 290, 235);
bezier(290, 235, 285, 245, 281, 259, 283, 262);
//pedal
line(330,220,308,222);
line(330,225,310,227);
fill(255);
beginShape();
vertex(308, 222);
vertex(330, 221);
vertex(330, 226);
vertex(310, 227);
endShape(CLOSE);
bezier(308, 222, 299, 231, 289, 245, 286, 262);
bezier(310, 227, 299, 237, 291, 256, 289, 270);
beginShape();
vertex(275, 267);
vertex(286, 263);
vertex(289, 272);
vertex(277, 273);
endShape(CLOSE);
//blok mesin
fill(238,147,25);
beginShape();
vertex(310, 234);
vertex(338, 242);
vertex(343, 240);
vertex(376, 252);
vertex(382, 257);
vertex(383, 272);
vertex(350, 292);
vertex(343, 304);
vertex(300, 304);
vertex(290, 295);
vertex(288, 297);
vertex(275, 293);
endShape(CLOSE);
ellipse(314,255,40,40);
ellipse(314,255,32,32);
ellipse(354,276,22,22);
beginShape();
vertex(276, 273);
vertex(289, 270);
vertex(292, 285);
vertex(278, 287);
endShape(CLOSE);
ellipse(284,279,8,8);
//garis dalam blok
line(330,244,338,246);
line(338,246,345,244);
line(345,244,377,257);
line(377,257,379,259);
line(379,259,379,269);
line(379,269,364,278);
line(304,270,290,295);
line(295,293,304,301);
line(304,301,337,301);
// skok
fill(222,221,223);
beginShape();
vertex(220, 245);
vertex(225, 245);
vertex(241, 262);
vertex(251, 257);
vertex(265, 295);
vertex(235, 290);
vertex(235, 280);
endShape(CLOSE);
//per
stroke(255,0,0);
strokeWeight(3);
line(256,227,263,231);
line(254,230,260,234);
line(252,233,257,236);
line(250,237,255,240);
line(247,240,253,244);
line(245,243,251,247);
line(243,247,249,250);
line(241,251,247,253);
line(239,254,245,256);
line(237,257,242,259);
//kopling
fill(222,221,223);
stroke(0);
strokeWeight(1);
ellipse(240,290,10,10);
beginShape();
vertex(238, 295);
vertex(246, 293);
vertex(251, 300);
vertex(256, 305);
vertex(288, 305);
vertex(291, 302);
vertex(300, 302);
vertex(294, 312);
vertex(253, 312);
vertex(247, 307);
//vertex(256, 305);
endShape(CLOSE);
beginShape();
vertex(289, 301);
vertex(289, 298);
vertex(302, 297);
vertex(302, 301);
endShape();
//karbu
beginShape();
vertex(343, 240);
vertex(375, 250);
vertex(398, 214);
vertex(405, 210);
vertex(368, 188);
vertex(356, 204);
vertex(359, 209);
endShape(CLOSE);
//kotak bwh
beginShape();
vertex(361, 222);
vertex(381, 232);
vertex(371, 248);
vertex(349, 240);
endShape(CLOSE);
//kotak bwh
beginShape();
vertex(349, 240);
vertex(360, 222);
vertex(381, 232);
vertex(371, 248);
endShape();
//kotak ats
beginShape();
vertex(376, 192);
vertex(394, 204);
vertex(387, 218);
vertex(366, 209);
endShape(CLOSE);
//dek pinggir
fill(96,3,192);
beginShape();
vertex(390, 138);
vertex(424, 121);
vertex(481, 159);
vertex(429, 198);
vertex(425, 221);
vertex(370, 185);
vertex(371, 180);
vertex(418, 152);
vertex(417, 148);
vertex(390, 140);
endShape(CLOSE);
// pegangan gas
fill(222,221,223);
beginShape();
vertex(446, 97);
vertex(476, 86);
vertex(479, 91);
vertex(448, 102);
endShape(CLOSE);
beginShape();
vertex(483, 72);
vertex(485, 80);
vertex(456, 86);
vertex(456, 77);
endShape(CLOSE);
arc(482,76,10,11,(-40*PI)/180,(90*PI)/180);
fill(0);
beginShape();
vertex(412, 85);
vertex(437, 80);
vertex(438, 74);
vertex(448, 70);
vertex(457, 73);
vertex(458, 90);
vertex(444, 98);
vertex(440, 92);
vertex(413, 97);
endShape(CLOSE);
//spedometer
beginShape();
vertex(453, 61);
vertex(474, 58);
vertex(476, 70);
vertex(467, 75);
vertex(456, 75);
vertex(454, 69);
endShape(CLOSE);
fill(222,221,223);
ellipse(415,91,9,14);
//rem
beginShape();
vertex(458, 86);
vertex(465, 85);
vertex(465, 91);
vertex(459, 95);
vertex(453, 96);
vertex(433, 111);
vertex(432, 110);
vertex(451, 92);
vertex(458, 92);
vertex(459, 89);
endShape(CLOSE);
ellipse(432,112,6,6);
//selebor depan
//warna kiri
fill(96,3,192);
noStroke();
beginShape();
vertex(437, 248);
vertex(488, 179);
vertex(495, 185);
vertex(500, 213);
vertex(476, 215);
vertex(453, 228);
endShape(CLOSE);
stroke(0);
bezier(437, 248, 443, 220, 474, 186, 488, 179);
noFill();
bezier(438, 249, 453, 224, 476, 209, 500, 214);
//kanan
fill(96,3,192);
noStroke();
beginShape();
vertex(495, 175);
vertex(588, 194);
vertex(585, 196);
vertex(552, 196);
vertex(517, 214);
vertex(508, 191);
endShape(CLOSE);
stroke(0);
bezier(495, 175, 531, 171, 557, 177, 588, 194);
noFill();
bezier(517, 214, 530, 201, 552, 193, 585, 196);
0 komentar:
Posting Komentar