home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / graphtal / examples / honda.lsy < prev    next >
Text File  |  1992-10-30  |  759b  |  31 lines

  1. /*
  2.  * Example of the monopadial tree-like structure
  3.  * of Honda.
  4.  *
  5.  * The Algorithmic Beauty of Plants, p. 56
  6.  */
  7.  
  8. lsystem hondaTree;
  9.  
  10. const r1 = 0.9;   // contraction ratio fro the trunk
  11.       r2 = 0.6;   // contraction ratio for branches
  12.       a0 = 45;    // branching angle from the trunk
  13.       a2 = 45;    // branching angle for lateral axes
  14.       d  = 137.5; // divergence angle
  15.       wr = 0.707; // width decrase rate
  16.  
  17. table table1 {
  18.   A(l,w) -> wi(w) F(l) [ pt(-a0) B(l*r2, w*wr) ]
  19.             ro(-d) A(l*r1, w*wr);
  20.   B(l,w) -> wi(w) F(l) [ tu(-a2) rv C(l*r2, w*wr) ] 
  21.             C(l*r1, w*wr);
  22.   C(l,w) -> wi(w) F(l) [ tu(a2) rv B(l*r2, w*wr) ] 
  23.             B(l*r1, w*wr);
  24. };
  25.  
  26. attributes {
  27.   axiom A(1,0.1);
  28.   derivation table1(10);
  29.  
  30.   coneres 5;
  31. };