home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / graphtal / examples / skyscrpr.lsy < prev    next >
Text File  |  1992-10-29  |  824b  |  50 lines

  1. /*
  2.  * This L-system description file generates a simple skyscraper.
  3.  *
  4.  * Copyright (C) 1992, Andrey Collison (collison@iam.unibe.ch)
  5.  * All rights reserved.
  6.  */
  7.  
  8. lsystem  SkyScraper;
  9.  
  10. table Building {
  11.    A       -> Ground Body(1) Roof;
  12.    Body(n) -> Floor(n) Body(n+1);
  13. };
  14.  
  15. table Floors {
  16.    const lf = 8*2.0;
  17.          lw = 2.0;
  18.          hf = 2.5;
  19.  
  20.    Floor(n) -> [ 
  21.                  Front Front Front Front
  22.                ] G(hf);
  23.    Front    -> [
  24.              Window Window Window Window Window Window Window Window
  25.            ] tu(90) G(lf) tu(-90) ro(-90);
  26.    Window ->   [ 
  27.             { sv F(hf) sv tu(90) F(lw) sv tu(90) F(hf) sv co("gold") }
  28.                ] tu(90) G(lw) tu(-90);
  29. };
  30.  
  31. attributes {
  32.    axiom wi(0.2) co("black") A;
  33.    derivation Building(30), Floors(3);
  34.  
  35.    eye 90, 40, 36;
  36.    lookat 0, 8, 36;
  37. };
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.