//only works with GroIMP version >=1.5 module A(float len) extends Sphere(0.1).(setShader(GREEN)); int stepCounter = 0; protected void init () [ Axiom ==> A(1); { stepCounter = 0; println("\nStep NoObjTotal NoObjSceneGraph TimeForRepaint [ms] TimeForTraversing [ms] RuleApplication [ms]"); } ] public void run () [ A(x) ==> F(x) [RU(30) RH(90) A(x*0.8)] [RU(-30) RH(90) A(x*0.8)]; { long startTime = System.nanoTime(); derive(); //apply rules long endTime = System.nanoTime(); stepCounter++; print(" "+stepCounter+"\t"); //print(getGraphSize()+" "+count((* Node*))+"\t",0xff0000); //print(getSceneGraphSize()+" "+count((* ShadedNull *))+"\t ",0x00ff00); print(getGraphSize()+"\t ",0xff0000); print(getSceneGraphSize()+"\t ",0x00ff00); print(getTimeForRepaint()+"\t ",0x0000ff); print(getTimeForTraversingGraph()+"\t ",0xff00ff); print(((endTime-startTime)* 1e-6)+"\n",0x00ffff); } ]