VertexShape - Recursion
//Draws one PShape each time it is called
//PShape size is determined by input parameter: len
PShape vertexShape( float len, color c){
PShape s = createShape();
s.beginShape();
s.fill( c ); //set fill
s.vertex(0,0);//list points in clockwise order
s.vertex( len, 0);
s.vertex( len, len);
s.vertex( len * .5, len * .5);
s.vertex( 0, len);
s.endShape(CLOSE);
return s; //return the shape
}recursivePattern( float length, float level ) function
Program using recursivePattern function
HSB Colormode - Set Fill at the Vertex Level - Shader Option

Vertex Shading Example

Framecount as a timer - Option
Last updated