We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
LSystem examples (Read 1110 times)
LSystem examples
May 4th, 2010, 12:53pm
 
The PenroseTile example could be improved. There several are bits of code that are not used (which could be very misleading to novice programmers). Also multiple if else statements could be replaced by switch/case block. Here are some of the offending lines. There are also some hacks viz unloading matrix stack, and use of ascii char as int, that are not explained.
Code:

//  float somestep = 0.1;

//  void useRule(String r_) {
//    rule = r_;
//  }
//
//  void useAxiom(String a_) {
//    axiom = a_;
//  }
//
//  void useLength(float l_) {
//    startLength = l_;
//  }
//
//  void useTheta(float t_) {
//    theta = radians(t_);
//  }

I would suggest substituting a simpler example, otherwise quite a revision of the original example along the lines of my translation to ruby-processing http://learning-ruby-processing.blogspot.com/2010/05/penrose-tiling-ruby-process....
Page Index Toggle Pages: 1