Skip to content

Instantly share code, notes, and snippets.

@kuzemkon
Last active August 29, 2015 14:06
Show Gist options
  • Save kuzemkon/8d9c52a3052717faf860 to your computer and use it in GitHub Desktop.
Save kuzemkon/8d9c52a3052717faf860 to your computer and use it in GitHub Desktop.
void setup()
{
size(600,600);
background(255);
}
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()
{
pushMatrix();
translate(150,230);
stroke(0,100,0);
noFill();
gip();
popMatrix();
pushMatrix();
translate(420, 205);
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,200);
rotate(-PI/9);
stroke(0,100,0);
fill(0,150,0);
lystok();
popMatrix();
pushMatrix();
translate(100,200);
stroke(0,100,0);
noFill();
steblo();
popMatrix();
pushMatrix();
translate(150,350);
rotate(-PI/7);
stroke(0,100,0);
noFill();
zalupky();
popMatrix();
pushMatrix();
translate(160,390);
rotate(-PI/8);
stroke(0,100,0);
noFill();
zalupky();
popMatrix();
pushMatrix();
translate(135,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