system tree {
use turtle3d // shorthand for defining all turtle commands
mod A(l,w)
mod ~D(i) // ~<name> is special and needs to be defined by the user if used, <name> must be the name of a surface or obj
// if <name> names an obj, no param is allowed -> if surface only one iterations param is allowed!
// params must have a default value
param r1 = 0.0
prod {
1.0; _ < F(w,l) > _: _ -> ~D(w)
}
axiom A(100, w0)
}
// an instance must be a system
instance x: tree {
// an iteration must define the number of iterations
iterations 15
r1 = 2.0
}
scene {
material 0 {
diffuse 1.0, 0.0, 0.0
}
ambientlight {
color 1.0, 1.0, 1.0
}
pointlight {
position 1.0, 0.0, 0.0
color 1.0, 1.0, 1.0
}
// only instances can be drawn
draw x
draw x with transform { ... }
}
// surface & obj commands are something for the future
// surfaces may only be used in a system
surface D {
use surface3d // shorthand for defining all surface commands
mod X()
param = ..
prod {
}
axiom
} with transform {
1., 0., 0., 0.,
0., 1., 0., 0.,
0., 0., 1., 0.,
0., 0., 0., 1.,
}
// objs may only be used in a system
obj X {
https....
} // omitted with transform block defaults to identity