Pablo Robles: Árbol
De Casiopea
Título | Pablo Robles: Árbol |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Asignatura | Taller Inicial 1ª y 2ª Etapa, |
Del Curso | Imagen Escrita, |
Carreras | Arquitectura |
Alumno(s) | Pablo Robles |
Profesor | Herbert Spencer |
void setup() { size(400, 600); smooth(); background(color(#E5E527)); } void drawTree(float x, float y, float big, int levels) { pushMatrix(); { translate(x, y); line(0, 0, 0, -big); // base line(0, -big/3, -big/2, -big); // izquierda line(0,-big/2,0,-big); // centro line(0, -big/4, big/2, -big); // derecha // recursividad if (levels > 0) { stroke(0,random(15,000),0); drawTree(-big/4, -big, big*(random(.10,1)), levels - 2); // Y izquierda drawTree(big/2, -big, big*(random(.19,1)), levels - 1); // Y derecha drawTree(0, -big,big*(random(.14,1)), levels - 2 ); // rama central } } popMatrix(); } void draw() { } void mouseReleased() { drawTree(mouseX, mouseY, 100, round(9)); saveFrame("blacktree.jpg"); }