Created
September 27, 2014 21:09
-
-
Save kuzemkon/ced5321225e34ca82565 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float a; | |
void setup() | |
{ | |
size(600,600); | |
} | |
void petal() { | |
beginShape(); | |
curveVertex(0, 0); | |
curveVertex(0, 0); | |
curveVertex(100, 32); | |
curveVertex(150, 0); | |
curveVertex(100, -32); | |
curveVertex(0, 0); | |
curveVertex(0, 0); | |
endShape(); | |
} | |
void draw() | |
{ | |
a++; | |
background(255); | |
pushMatrix(); | |
translate(a+150,230); | |
stroke(0,100,0); | |
noFill(); | |
gip(); | |
popMatrix(); | |
pushMatrix(); | |
translate(420, 205-a); | |
for(int i=0; i<8; i++) { | |
rotate(PI/4); | |
fill(200, 0, 0); | |
stroke(200, 0, 0); | |
petal(); | |
} | |
fill(217, 245, 129); | |
stroke(217, 245, 129); | |
ellipse(0, 0, 50, 50); | |
popMatrix(); | |
pushMatrix(); | |
translate(100,a+200); | |
rotate(-PI/9); | |
stroke(0,100,0); | |
fill(0,150,0); | |
lystok(); | |
popMatrix(); | |
pushMatrix(); | |
translate(100-a,200); | |
stroke(0,100,0); | |
noFill(); | |
steblo(); | |
popMatrix(); | |
pushMatrix(); | |
translate(150-a,350); | |
rotate(-PI/7); | |
stroke(0,100,0); | |
noFill(); | |
zalupky(); | |
popMatrix(); | |
pushMatrix(); | |
translate(160-a,390); | |
rotate(-PI/8); | |
stroke(0,100,0); | |
noFill(); | |
zalupky(); | |
popMatrix(); | |
pushMatrix(); | |
translate(135-a,300); | |
rotate(-PI/6); | |
stroke(0,100,0); | |
noFill(); | |
kentavr(); | |
popMatrix(); | |
} | |
void steblo() | |
{ | |
beginShape(); | |
curveVertex(0,0); | |
curveVertex(0,0); | |
curveVertex(50,100); | |
curveVertex(100,300); | |
curveVertex(120,350); | |
curveVertex(140,400); | |
endShape(); | |
} | |
void lystok() { | |
beginShape(); | |
curveVertex(0,0); | |
curveVertex(0,0); | |
curveVertex(50,175); | |
curveVertex(0,250); | |
curveVertex(-50,175); | |
curveVertex(0,0); | |
curveVertex(0,0); | |
endShape(); | |
} | |
void zalupky() { | |
beginShape(); | |
curveVertex(50,0); | |
curveVertex(50,0); | |
curveVertex(25,25); | |
curveVertex(0,20); | |
curveVertex(-25,-25); | |
curveVertex(-50,0); | |
endShape(); | |
} | |
void kentavr() { | |
beginShape(); | |
curveVertex(35,0); | |
curveVertex(35,0); | |
curveVertex(25,25); | |
curveVertex(0,20); | |
curveVertex(-25,-25); | |
curveVertex(-35,0); | |
endShape(); | |
} | |
void gip() { | |
beginShape(); | |
curveVertex(0,200); | |
curveVertex(25,150); | |
curveVertex(75,75); | |
curveVertex(150,25); | |
curveVertex(200,5); | |
curveVertex(300,-20); | |
endShape(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment