import static de.grogra.qsm.utils.Library.*; import static de.grogra.qsm.utils.Descriptors.*; module MyShoot(super.length, super.diameter) extends F{{setShader(EGA_6);}} module MyBud(int order, float length) extends Sphere(0.002){{setShader(EGA_3);}} public void update()[ { jumpAllAxis(); } f:F,(f[RTREND]==0) ==> MyShoot(f.length,f.diameter).($[transform]=f[transform]) [ M(-0.3*f.length) [ RL(65)MyBud(f[BO]+1,f.length*0.5) ] [ RL(-65)MyBud(f[BO]+1,f.length*0.5) ] ] MyBud(f[BO],f.length*0.7); f:F ==> MyShoot(f.length,f.diameter).($[transform]=f[transform]); ] public void grow()[ MyBud(o,l),(o<3) ==> MyShoot(l,l/20) [ M(-0.3*l) [ RL(65)MyBud(o+1,l*0.5) ] [ RL(-65)MyBud(o+1,l*0.5) ] ] MyBud(o,l*0.7); ]