void setup()
{
size(500,500);
smooth();
noStroke();
}
int x;
int y=0;
int colorVar1=1,colorVar2=200,colorVar3=250;
float z=PI/500;
void leaf(int x, int y, int size, int dir)
{
pushMatrix();
translate(x, y);
scale(size);
beginShape();
vertex(1.0*dir, -0.7);
bezierVertex(1.0*dir, -0.7, 0.4*dir, -1.0, 0.0, 0.0);
bezierVertex(0.0, 0.0, 1.0*dir, 0.4, 1.0*dir, -0.7);
endShape();
popMatrix();
}
void draw(){
background(255);
int a = 100;
translate(50,50);
for (x=0;x<100;x=x+1)
if ( (z>0) || (z<PI/400) ){
rotate(z);
scale(1.05);
colorVar1 = int(random( 255));
colorVar2 = int(random(100, 250));
colorVar3 = int(random(100, 255));
fill(colorVar1, colorVar2, colorVar3, a);
leaf(40,10,35,1);
}
z=z+PI/1000;
}