Aku Punya Blog | Animasi Processing | Pemandangan Laut
|
Assalamualaikum wr.wb..Ketemu lagi ... Kali ini saya akan share sebuah animasi java processing dengan tema pemandangan laut. bagi yang minat silahkan download atau copas. Bagi yang copas Harap download Link terlebih dahulu.. jangan lupa sertakan link sumbernya.. Terimakasih...
Via Dropbox Download Disini
float uIk,vIk;
float B,ugg,vgg;
float Pl;
float Aw;
float Aw2;
float M,K;
// pengatur Awan kanan
float xW=300;
int red=70;
int green=35;
int blue=35;
PImage img,imgg,imggg,imgg2,imggg2,imr;
float y,lm;
float yIk,xIkk;
float yBr;
float yBz;
float yBz2;
float size = 75;
int x=0; // a counter
int up=1; // arm up or down
float yB=10;
int currentFrame = 0;
//jumlah frame / gambar
int numFrames = 7;
int numFrame = 9;
int numFrame2 = 5;
PImage[] gambar = new PImage[numFrames];
PImage[] bur = new PImage[numFrame];
PImage[] lum = new PImage[numFrame2];
void setup() {
size(1000, 600);
img = loadImage("kapal.png");
imgg = loadImage("ikk0.png");
imgg2 = loadImage("ikk3.png");
imggg = loadImage("ikM1.png");
imggg2 = loadImage("ikM2.png");
imr = loadImage("rm.png");
gambar[0] = loadImage("he0.png");
gambar[1] = loadImage("he1.png");
gambar[2] = loadImage("he2.png");
gambar[3] = loadImage("he3.png");
gambar[4] = loadImage("he4.png");
gambar[5] = loadImage("he5.png");
gambar[6] = loadImage("he6.png");
bur[0] = loadImage("bu0.png");
bur[1] = loadImage("bu1.png");
bur[2] = loadImage("bu2.png");
bur[3] = loadImage("bu3.png");
bur[4] = loadImage("bu4.png");
bur[5] = loadImage("bu5.png");
bur[6] = loadImage("bu6.png");
bur[7] = loadImage("bu7.png");
bur[8] = loadImage("bu8.png");
lum[0] = loadImage("ww0.png");
lum[1] = loadImage("ww1.png");
lum[2] = loadImage("ww2.png");
lum[3] = loadImage("ww3.png");
lum[4] = loadImage("ww4.png");
}
void draw() {
frameRate(10);
int d;
d=second();
float b=600;
// langit
pushMatrix();
fill(red,green,blue);
if(blue<180)blue+=2;
if(green<120)green+=6;
if(red<105)red+=2;
rect(0,0,1000,600);
beginShape();
//laut
noStroke();
fill(61,150,182);
vertex(0, 315);
vertex(1000, 315);
vertex(1000, 600);
vertex(0, 600);
endShape(CLOSE);
//Matahari
if (M > 460)
{
//jarak start awal mengulang
M = 460;
}
fill(241,240,0);
noStroke();
ellipse(140,500-1*M,50,50);
float xM = 50;
while (xM < 10)
{
xM = xM - 10;
}
M = M + 1.6;
if(M<0)
{M=height;}
if(M>461.5) {
textSize(15);
text ("Mari Kita Jaga Kelestarian", 469, 422);
textSize(22);
text ("Laut Kita", 512, 465);
}
popMatrix();
// Tampil hasil
//Kepiting
pushMatrix();
K = K - 0.1;
translate(K+600,490);
//kepiting
strokeWeight(1);
stroke(0);
fill(255,0,0);
ellipse(300,100,21,12);
line(294,96,294,91);
fill(255);
ellipse(294,89,4,4);
point(294,89);
line(305,96,305,91);
ellipse(305,89,4,4);
point(305,89);
//capit
line(291,96,287,90);
line(308,96,312,90);
beginShape();
vertex(287, 90);
vertex(281, 87);
vertex(286, 87);
vertex(289, 84);
endShape(CLOSE);
beginShape();
vertex(312, 90);
vertex(310, 84);
vertex(313, 87);
vertex(317, 87);
endShape(CLOSE);
//kaki,kiri,kanan
line(310,98,314,96);
line(314,96,318,96);
line(318,96,321,98);
line(310,98+3,314,96+3);
line(314,96+3,318,96+3);
line(318,96+3,321,98+3);
line(309,98+6,314,96+6);
line(314,96+6,318,96+6);
line(318,96+6,321,98+6);
line(310-30,98,314-30,96);
line(314-30,96,318-30,96);
line(318-30,96,321-30,98);
line(310-30,98+3,314-30,96+3);
line(314-30,96+3,318-30,96+3);
line(318-30,96+3,321-30,98+3);
line(309-30,98+6,314-30,96+6);
line(314-30,96+6,318-30,96+6);
line(318-30,96+6,321-30,98+6);
popMatrix();
image(imr, 0, 450);
//Lumba
pushMatrix();
lm=lm-1.4;
translate(lm+405,105);
currentFrame = (currentFrame+0) % numFrame2; // Use % to cycle through frames
int offset = -9;
// 10 kanan, -10 bawah
image(lum[(currentFrame) % numFrame2], 530, 190);
popMatrix();
//Burung
x=x+1;
if (x==20) {
// reset counter
x=0;
// change direction of arm
up=up*-1;
}
if (up==1) {
// arm up
stroke(0);
//yBr = yBr + 0.8;
translate(yBr-200, 0+yB);
noFill();
// 1
bezier(479, 130, 493, 126, 506, 132, 515, 136);
bezier(551, 130, 537, 126, 524, 132, 515, 136);
bezier(979, 30, 993, 26, 1006, 32, 1015, 36);
bezier(1051, 30, 1037, 26, 1024, 32, 1015, 36);
//2
pushMatrix();
translate(yBr+30, 50+yB);
bezier(206, 8, 215, 5, 224, 5, 232, 9);
bezier(258, 8, 249, 5, 240, 5, 232, 9);
bezier(606, 148, 615, 145, 624, 145, 632, 149);
bezier(658, 148, 649, 145, 640, 145, 632, 149);
bezier(606+300, 148-50, 615+300, 145-50, 624+300, 145-50, 632+300, 149-50);
bezier(658+300, 148-50, 649+300, 145-50, 640+300, 145-50, 632+300, 149-50);
//kaki 2
line(226,13,239,13);
line(626,153,639,153);
line(626+300,153-50,639+300,153-50);
popMatrix();
//kaki 1
line(508,138,522,138);
line(1008,38,1022,38);
} else {
// arm down
//yBr = yBr + 0.8;
stroke(0);
translate(yBr-200, 0+yB);
noFill();
bezier(481, 134, 493, 129, 506, 131, 515, 136);
bezier(549, 134, 537, 129, 524, 131, 515, 136);
bezier(981, 34, 993, 29, 1006, 31, 1015, 36);
bezier(1049, 34, 1037, 29, 1024, 31, 1015, 36);
//kaki 1
line(508,138,522,138);
line(1008,38,1022,38);
//2
pushMatrix();
//yB=10;
translate(yBr+30, 50+yB);
bezier(206, 11, 215, 8, 224, 5, 232, 10);
bezier(258, 11, 249, 8, 240, 5, 232, 10);
bezier(606, 151, 615, 148, 624, 145, 632, 150);
bezier(658, 151, 649, 148, 640, 145, 632, 150);
bezier(606+300, 151-50, 615+300, 148-50, 624+300, 145-50, 632+300, 150-50);
bezier(658+300, 151-50, 649+300, 148-50, 640+300, 145-50, 632+300, 150-50);
//kaki 2
line(226,13,239,13);
line(626,153,639,153);
line(626+300,153-50,639+300,153-50);
popMatrix();
}
if(M<600) {
// Awan Kiri
fill(255,255,255);
pushMatrix();
Aw = Aw + 0.7;
translate(Aw+0,200);
fill(95,158,160);
noStroke();
//kiri 0
ellipse(-140,-170,50,30);
ellipse(-100,-170,80,50);
ellipse(-60,-170,110,70);
ellipse(-20,-170,80,55);
ellipse(0,-170,75,40);
// kiri 1
ellipse(-80,-100,60,30);
ellipse(-50,-100,80,47);
ellipse(-20,-100,70,50);
ellipse(0,-100,80,33);
// kiri 1
ellipse(120,-100,60,30);
ellipse(150,-100,80,47);
ellipse(180,-100,70,50);
ellipse(200,-100,80,33);
//kiri 2
ellipse(330,-50,40,20);
ellipse(360,-50,60,40);
ellipse(400,-50,89,60);
ellipse(430,-50,70,37);
popMatrix();
// AWan Kanan
pushMatrix();
Aw2 = Aw2 - .5;
translate(Aw2+0, 220);
fill(95,158,160);
//kiri 3
ellipse(570+xW,-190,50,30);
ellipse(600+xW,-190,80,50);
ellipse(640+xW,-190,110,75);
ellipse(680+xW,-190,80,55);
ellipse(700+xW,-190,75,40);
//kiri 4
ellipse(820+xW,-180,50,30);
ellipse(850+xW,-180,80,40);
ellipse(890+xW,-180,110,55);
ellipse(930+xW,-180,80,45);
ellipse(950+xW,-180,75,30);
//kiri 4
ellipse(820+xW,-50,50,30);
ellipse(850+xW,-50,80,40);
ellipse(890+xW,-50,110,55);
ellipse(930+xW,-50,80,45);
ellipse(950+xW,-50,75,30);
fill(255);
//Hujan
noStroke();
fill(255);
translate(630+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
pushMatrix();
Aw2 = Aw2 - 0.5;
translate(Aw2+0, 220);
translate(670+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
pushMatrix();
Aw2 = Aw2 - 0.5;
translate(Aw2+0, 220);
translate(710+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
pushMatrix();
Aw2 = Aw2 - 0.5;
translate(Aw2+0, 220);
translate(750+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
pushMatrix();
Aw2 = Aw2 - 0.5;
translate(Aw2+0, 220);
translate(500+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
pushMatrix();
Aw2 = Aw2 - 0.5;
translate(Aw2+0, 220);
translate(460+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
pushMatrix();
Aw2 = Aw2 - 0.5;
translate(Aw2+0, 220);
translate(420+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
pushMatrix();
Aw2 = Aw2 - 0.5;
translate(Aw2+0, 220);
translate(390+xW,-375+4*d);
triangle(196.5,220-40,200,210.5-40,203.5,220-40);
ellipse(200,220-40,6,7);
triangle(196.5,220-102,200,210.5-102,203.5,220-102);
ellipse(200,220-102,6,7);
triangle(196.5,200-122,200,189-122,203.5,200-122);
ellipse(200,200-122,6,7);
triangle(196.5,220-171,200,210.5-171,203.5,220-171);
ellipse(200,220-171,6,7);
popMatrix();
}
if(M<460) {
textSize(15);
text ("Tunggu sampai Pelanginya muncul....", 900, 5);
}
if(M>460) {
textSize(15);
text ("TERIMAKASIH", 700, 15);
}
if(M>460) {
//Pelangi
//jarak maksimal
if (Pl > 260)
{
//jarak start awal mengulang
Pl = 260;
}
noFill();
strokeWeight(14.5);
strokeCap(SQUARE);
stroke(255,0,0);
// fill(255);
//atas
arc(700,300,1100,500,(-180*PI)/180,(-175*PI+2*Pl)/180);
stroke(0,255,0);
arc(700,300,1070,470,(-180*PI)/180,(-175*PI+2*Pl)/180);
stroke(0,0,255);
arc(700,300,1040,440,(-180*PI)/180,(-175*PI+2*Pl)/180);
float xP = 500;
while (xP < 100)
{
xP = xP - 10;
}
Pl = Pl + 1.9;
// Orang Terjun
pushMatrix();
translate(750,-250+5*d);
strokeWeight(1);
fill(255,0,0);
arc(409,233,20,23,(-180*PI)/180,(0*PI)/180);
stroke(0);
line(401,233,409,246);
line(416,233,409,246);
line(409,233,409,246);
//orang
line(404,253,409,246);
line(414,253,409,246);
fill(0);
ellipse(410,255,5,5);
line(404,253,406,265);
line(414,253,413,265);
line(406,265,413,265);
line(410,255,410,270);
line(404,280,410,270);
line(415,280,410,270);
popMatrix();
//Helikopter
translate(265,-15);
currentFrame = (currentFrame+1) % numFrames; // Use % to cycle through frames
// 10 kanan, -10 bawah
image(gambar[(currentFrame) % numFrames], 800, -10);
}
if(M<600) {
//kapal kiri
//jarak maksimal
if (yBz > 900)
{
//jarak start awal mengulang
yBz = -250;
}
pushMatrix();
yBz = yBz + 0.8;
translate(yBz+10, height/2-2*size/2);
image(img, 110, 23);
popMatrix();
float x1 = 150;
while (x1 < 299)
{
x1 = x1 + 10;
}
yBz = yBz + 1;
if(M<601) {
//jarak maksimal
if (yBz2 < -1100)
{
//jarak start awal mengulang
yBz2 = 50;
}
//Kapal kanan
pushMatrix();
yBz2 = yBz2 - 1;
translate(yBz2+1000, height/2-2*size/2);
image(img, 10, 40);
popMatrix();
float x2 = 150;
while (x2 > 299)
{
x2 = x2 + 10;
}
yBz2 = yBz2 - 1.6;
}
if(M>460) {
//Ikan
//jarak maksimal
if (xIkk > 290)
{
//jarak start awal mengulang
xIkk = 290;
}
pushMatrix();
xIkk = xIkk + 7;
translate(510-xIkk,yIk+290);
fill(0,0,255);
triangle(300,100,310,85,310,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(321, 100);
vertex(327, 94);
vertex(324, 100);
vertex(327, 106);
endShape(CLOSE);
fill(255);
ellipse(298,98,3,3);
popMatrix();
//pushMatrix();
pushMatrix();
xIkk = xIkk - 0.5;
translate(560-xIkk,yIk+280);
fill(0,0,255);
triangle(300,100,310,85,310,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(321, 100);
vertex(327, 94);
vertex(324, 100);
vertex(327, 106);
endShape(CLOSE);
fill(255);
ellipse(298,98,3,3);
popMatrix();
pushMatrix();
xIkk = xIkk - 0.5;
translate(590-xIkk,yIk+310);
fill(0,0,255);
triangle(300,100,310,85,310,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(321, 100);
vertex(327, 94);
vertex(324, 100);
vertex(327, 106);
endShape(CLOSE);
fill(255);
ellipse(298,98,3,3);
popMatrix();
pushMatrix();
xIkk = xIkk - 0.5;
translate(570-xIkk,yIk+345);
fill(0,0,255);
triangle(300,100,310,85,310,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(321, 100);
vertex(327, 94);
vertex(324, 100);
vertex(327, 106);
endShape(CLOSE);
fill(255);
ellipse(298,98,3,3);
popMatrix();
pushMatrix();
xIkk = xIkk - 0.5;
translate(500-xIkk,yIk+410);
fill(0,0,255);
triangle(300,100,310,85,310,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(321, 100);
vertex(327, 94);
vertex(324, 100);
vertex(327, 106);
endShape(CLOSE);
fill(255);
ellipse(298,98,3,3);
popMatrix();
pushMatrix();
xIkk = xIkk - 0.5;
translate(550-xIkk,yIk+380);
fill(0,0,255);
triangle(300,100,310,85,310,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(321, 100);
vertex(327, 94);
vertex(324, 100);
vertex(327, 106);
endShape(CLOSE);
fill(255);
ellipse(298,98,3,3);
popMatrix();
float xIKx = 50;
while (xIKx < 10)
{
xIKx = xIKx + 10;
}
xIkk = xIkk + 1.6;
}
if(M>460) {
//Ikan Kiri
//jarak maksimal
if (uIk > 270)
{
//jarak start awal mengulang
uIk = 270;
}
pushMatrix();
uIk = uIk + 5;
translate(-125+uIk,vIk+290);
fill(0,0,255);
triangle(312,100,302,85,302,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(330-44, 100);
vertex(327-44, 94);
vertex(334-44, 100);
vertex(327-44, 106);
endShape(CLOSE);
fill(255);
ellipse(315,98,3,3);
popMatrix();
pushMatrix();
uIk = uIk + 0.5;
translate(-165+uIk,vIk+280);
fill(0,0,255);
triangle(312,100,302,85,302,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(330-44, 100);
vertex(327-44, 94);
vertex(334-44, 100);
vertex(327-44, 106);
endShape(CLOSE);
fill(255);
ellipse(315,98,3,3);
popMatrix();
pushMatrix();
uIk = uIk + 0.5;
translate(uIk-195,vIk+310);
fill(0,0,255);
triangle(312,100,302,85,302,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(330-44, 100);
vertex(327-44, 94);
vertex(334-44, 100);
vertex(327-44, 106);
endShape(CLOSE);
fill(255);
ellipse(315,98,3,3);
popMatrix();
pushMatrix();
uIk = uIk + 0.5;
translate(uIk-175,vIk+345);
fill(0,0,255);
triangle(312,100,302,85,302,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(330-44, 100);
vertex(327-44, 94);
vertex(334-44, 100);
vertex(327-44, 106);
endShape(CLOSE);
fill(255);
ellipse(315,98,3,3);
popMatrix();
pushMatrix();
uIk = uIk + 0.5;
translate(uIk-155,vIk+380);
fill(0,0,255);
triangle(312,100,302,85,302,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(330-44, 100);
vertex(327-44, 94);
vertex(334-44, 100);
vertex(327-44, 106);
endShape(CLOSE);
fill(255);
ellipse(315,98,3,3);
popMatrix();
pushMatrix();
uIk = uIk + 0.5;
translate(uIk-105,vIk+410);
fill(0,0,255);
triangle(312,100,302,85,302,115);
fill(255,0,0);
ellipse(306,100,30,12);
beginShape();
vertex(330-44, 100);
vertex(327-44, 94);
vertex(334-44, 100);
vertex(327-44, 106);
endShape(CLOSE);
fill(255);
ellipse(315,98,3,3);
popMatrix();
float uIKx = 50;
while (uIKx < 10)
{
uIKx = uIKx + 10;
}
uIk = uIk - 1.5;
}
if(M<460) {
//Burung 2
pushMatrix();
B=B+1.7;
translate(B-600,yIk-60);
currentFrame = (currentFrame+1) % numFrames; // Use % to cycle through frames
// 10 kanan, -10 bawah
image(bur[(currentFrame) % numFrame], 800, -10);
popMatrix();
pushMatrix();
ugg=ugg-1.7;
translate(ugg+805,410);
image(imgg, 260, 23);
image(imggg, 260, -20);
image(imggg, 310, -20);
image(imggg, 260, 120);
image(imggg, 310, 120);
image(imggg, 260+20, 80);
image(imggg, 310+20, 80);
image(imgg, 420, 80);
image(imggg, 420, -30);
image(imggg, 420, 20);
popMatrix();
pushMatrix();
vgg=vgg+1.7;
translate(vgg+105,410);
image(imgg2, 260, 23);
image(imgg2, 420, 80);
image(imgg2, 260, 240);
image(imgg2, 420, 240);
image(imggg2, 380, 50);
image(imggg2, 380, 10);
image(imggg2, 460, 50);
image(imggg2, 420, -30);
image(imggg2, 300, -30);
image(imgg2, 260-100, 0);
image(imgg2, 420-100, 80);
image(imggg2, 380-140, 50);
image(imggg2, 380-30, 10);
image(imggg2, 380-260, 50);
image(imggg2, 380-260, 10);
image(imggg2, 460-140, 50);
image(imggg2, 420-240, -30);
image(imggg2, 300-240, -30);
popMatrix();
}
}
}
kok ada yang error gan
BalasHapusNumpang ya bossku ^^
BalasHapusHANYA DI KENARI POKER BANYAK BONUSNYA BOSSKU
Bonus Welcome Untuk New Member:
- Bagi deposit Rp.10,000 - Rp.14,999 Bonus Rp.5.000
- Bagi deposit Rp.15,000 - Rp.24,999 Bonus Rp.10.000
- Bagi deposit Rp.25,000 - Rp.49,999 Bonus Rp.15.000
- Bagi deposit Rp.50,000 - Rp.99,999 Bonus Rp.20.000
- Bagi deposit Rp.100,000 ke atas Bonus Rp.25.000
- Bonus next deposit 5% untuk deposit Rp.50.000
REAL PLAYER VS PLAYER !!!
Syarat Klaim bonus yaitu menghubungi CS kami di
WHATSAPP : +855966139323
BBM : KENARI00
LIVE CHAT : KENARIPOKER . COM
ALTERNATIVE LINK : KENARIPOKER . COM