home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / graphuti / lparser2.zip / AXIS.LS < prev    next >
Text File  |  1993-10-10  |  1KB  |  44 lines

  1. # --- L-System Parser/Mutator --- Lj Lapre --- 
  2. #
  3. #---------------------------------------------------------------------------
  4. #
  5. # This file is to show the starting orientation of the turtle
  6. # and the basic directions. The colors are as they will appear in
  7. # the lviewer. This file will generate three blocks. Red is the current 
  8. # forward direction, yellow is the current left direction and green
  9. # is the current up direction.
  10. #
  11. # By replacing rule 2 with the one of the following alternatives 
  12. # you can get a better grip on the turtle movement through space :
  13. #
  14. # T=^f            # pitch up and go forward
  15. # T=&f            # pitch down and go forward
  16. # T=+f            # turn left and go forward
  17. # T=-f            # turn right and go forward
  18. # T=>f            # roll right (= clockwise) and go forward
  19. # T=<f            # roll left (= counter clockwise) and go forward
  20. #
  21. # Run these alternatives at a recursion level of 50.
  22. #
  23. # T=^+>f        # cylindrical motion
  24. # T=+;'fff        # spiral motion
  25. # T=+:f            # 'inverse' spiral motion
  26. #
  27. #---------------------------------------------------------------------------
  28. #
  29. 5            # recursion level
  30. 20            # basic angle
  31. 5            # thickness          
  32. &(90)s            #0 axiom
  33. s=aTs            #1 do axis, change orientation and recurse
  34. T=f            #2 go forward (REPLACE THIS RULE)
  35. a=[ABC]            #3 draw an axis
  36. A=[c(2)Z]        #4 forward = red
  37. B=[c(3)+(90)Z]        #5 left    = yellow
  38. C=[c(4)^(90)Z]        #6 up      = green
  39. #
  40. #---------------------------------------------------------------------------
  41. #
  42. @            # end of ls
  43.  
  44.