home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / graphtal / examples / ballsanm.sys < prev    next >
Text File  |  1992-10-30  |  632b  |  36 lines

  1. /*
  2.  * L-system for bouncing ball animation. A sphere is
  3.  * bounced at the hull (the hull consists of 6 planes,
  4.  * forming a box).
  5.  *
  6.  * Start bouncingball script to get the animation.
  7.  *
  8.  * Copyright (C) 1992, Christoph Streit (strei@iam.unibe.ch)
  9.  * All rights reserved.
  10.  */
  11.  
  12. lsystem BouncingBall;
  13.  
  14. hull cube {
  15.  plane 0 0 0  0 0 1
  16.  plane 0 0 10 0 0 1
  17.  plane  5 0 0 1 0 0
  18.  plane -5 0 0 1 0 0
  19.  plane 0 5  0 0 1 0
  20.  plane 0 -5 0 0 1 0
  21. };
  22.  
  23. table bounce {
  24.   G(l) -> G(l+1);
  25. };
  26.  
  27. attributes {
  28.   axiom pt(20) ro(30) tu(30) 
  29.     ah("cube") 
  30.     co ("red") G(1) s(1);
  31.   derivation bounce(iter);
  32.  
  33.   sphereres  6;
  34.   eye 25, 0, 5;
  35.   lookat 0, 0, 5;
  36. };