Hai teman mahasiswa apa kabar semua ? semoga sehat selalu yaa dan selalu dilindungi oleh Allah SWT, amiinn :)
Kali ini kita akan membuat gambar Lebah dan Bunga menggunakan Processing.
Baca juga :
1. ( Membuat Animasi Bergerak Perkotaan serta Lalu Lintas Menggunakan Processing )
2. ( Membuat Gambar Papan Catur Menggunakan Processing )
1. ( Membuat Animasi Bergerak Perkotaan serta Lalu Lintas Menggunakan Processing )
2. ( Membuat Gambar Papan Catur Menggunakan Processing )
Tanpa berlama-lama, berikut koding nya :)
//Membuat Lebah dan Bunga Menggunakan Processing
//Catatans Mahasiswa :)
void setup()
{
size(500,500);
background(#FFF7FF);
smooth();
fill(#EAD802);
rect(250,280,10,90);
fill(#009B8C);
pushMatrix();
translate(250,250);
rotate(radians(9));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(60));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(111));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(162));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(253));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(303));
fill(#FF0AC6);
ellipse(20,0,90,40);
line(20,0,55,0);
popMatrix();
//kelopak dalam
pushMatrix();
translate(250,250);
rotate(radians(30));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(90));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(130));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(220));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(275));
fill(#FF0AC6);
ellipse(20,0,60,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(#EAD802);
ellipse(0,80,80,30);
popMatrix();
//lingkaran
fill(#EAD802);
ellipse(250,250,50,50);
//lebah
//sayap
pushMatrix();
translate(250,250);
rotate(radians(70));
fill(#FFFCFE);
ellipse(-70,40,70,30);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(20));
fill(#FFFCFE);
ellipse(-70,-10,70,20);
popMatrix();
//antena
pushMatrix();
translate(200,200);
rotate(radians(-3));
strokeWeight(2);
line(55,0,0,0);
popMatrix();
pushMatrix();
translate(220,200);
rotate(radians(290));
strokeWeight(2);
line(30,0,0,0);
popMatrix();
//badan
pushMatrix();
translate(250,250);
rotate(radians(60));
fill(#FFFCFE);
ellipse(-30,30,60,30);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(255));
fill(#FFFCFE);
ellipse(20,-60,40,20);
popMatrix();
//badan
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(#EAD802);
ellipse(-40,-55,60,45);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(360));
fill(#EAD802);
ellipse(-40,-40,50,50);
popMatrix();
//mata
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(0);
ellipse(-15,-40,10,5);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(0);
ellipse(-15,-67,10,5);
popMatrix();
//antena
pushMatrix();
translate(250,250);
rotate(radians(320));
fill(#EAD802);
ellipse(40,-70,10,10);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(320));
fill(#EAD802);
ellipse(40,-35,10,10);
popMatrix();
pushMatrix();
translate(200,230);
rotate(radians(330));
fill(0);
ellipse(5,-10,3,10);
popMatrix();
}
//Catatans Mahasiswa :)
void setup()
{
size(500,500);
background(#FFF7FF);
smooth();
fill(#EAD802);
rect(250,280,10,90);
fill(#009B8C);
pushMatrix();
translate(250,250);
rotate(radians(9));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(60));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(111));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(162));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(253));
fill(#FF0AC6);
ellipse(20,0,90,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(303));
fill(#FF0AC6);
ellipse(20,0,90,40);
line(20,0,55,0);
popMatrix();
//kelopak dalam
pushMatrix();
translate(250,250);
rotate(radians(30));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(90));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(130));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(220));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(275));
fill(#FF0AC6);
ellipse(20,0,60,40);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(#FF0AC6);
ellipse(20,0,60,40);
line(20,0,40,0);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(#EAD802);
ellipse(0,80,80,30);
popMatrix();
//lingkaran
fill(#EAD802);
ellipse(250,250,50,50);
//lebah
//sayap
pushMatrix();
translate(250,250);
rotate(radians(70));
fill(#FFFCFE);
ellipse(-70,40,70,30);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(20));
fill(#FFFCFE);
ellipse(-70,-10,70,20);
popMatrix();
//antena
pushMatrix();
translate(200,200);
rotate(radians(-3));
strokeWeight(2);
line(55,0,0,0);
popMatrix();
pushMatrix();
translate(220,200);
rotate(radians(290));
strokeWeight(2);
line(30,0,0,0);
popMatrix();
//badan
pushMatrix();
translate(250,250);
rotate(radians(60));
fill(#FFFCFE);
ellipse(-30,30,60,30);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(255));
fill(#FFFCFE);
ellipse(20,-60,40,20);
popMatrix();
//badan
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(#EAD802);
ellipse(-40,-55,60,45);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(360));
fill(#EAD802);
ellipse(-40,-40,50,50);
popMatrix();
//mata
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(0);
ellipse(-15,-40,10,5);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(330));
fill(0);
ellipse(-15,-67,10,5);
popMatrix();
//antena
pushMatrix();
translate(250,250);
rotate(radians(320));
fill(#EAD802);
ellipse(40,-70,10,10);
popMatrix();
pushMatrix();
translate(250,250);
rotate(radians(320));
fill(#EAD802);
ellipse(40,-35,10,10);
popMatrix();
pushMatrix();
translate(200,230);
rotate(radians(330));
fill(0);
ellipse(5,-10,3,10);
popMatrix();
}
Jangan lupa semua koding nya di copy-paste dan silahkan "Run" . :)
Jika ada kesalahan atau kekurangan dalam penyampaian tutorial maupun perkataan yang kurang jelas, kami mohon maaf sebesar-besarnya.
Jika ada kesalahan atau kekurangan dalam penyampaian tutorial maupun perkataan yang kurang jelas, kami mohon maaf sebesar-besarnya.
Jika ada kekurangan, jangan sungkan untuk berkomentar yaa.
Komentar kalian sangat berarti bagi perkembangan Blog ini , Terima kasih .. :)
Jangan lupa di share yaa :D wkwk
#Salam Teman Mahasiswa
Selamat mencoba dan semoga berhasil ;)
Disini saya menggunakan Processing 2.2.1 .
Untuk Aplikasi Processing nya bisa di ( Download Disini :) )
Untuk Aplikasi Processing nya bisa di ( Download Disini :) )
Wassalamu'alaikum wr.wb
ConversionConversion EmoticonEmoticon