home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / gprogs / rstarlab.icn < prev    next >
Text File  |  2001-05-02  |  2KB  |  65 lines

  1. ############################################################################
  2. #
  3. #    File:     rstarlab.icn
  4. #
  5. #    Subject:  Program to draw regular stars
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     May 2, 2001
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  This program draws regular stars.  See
  18. #
  19. #    Geometric and Artistic Graphics; Design Generation with
  20. #    Microcomputers, Jean-Paul Delahaye, Macmillan, 1987, pp. 5-7.
  21. #    
  22. #  The window is square.  The window size can be given on the command line,
  23. #  default 600.
  24. #
  25. #  The present user interface is crude.  To see all the regular stars
  26. #  that are provided by default, type
  27. #
  28. #    all
  29. #
  30. #  from standard input.  After each star is drawn, the program waits
  31. #  for an event before going on to the next star.
  32. #
  33. #  Alternatively, a single star can be drawn by typing its name preceded
  34. #  by an equals sign.  The names are rstar01 through rstar06.  For example,
  35. #
  36. #    =rstar02
  37. #
  38. #  draws the second star.
  39. #
  40. #  In future extensions, provision will be made for user-defined stars.
  41. #
  42. ############################################################################
  43. #
  44. #  Requires:  Version 9 graphics
  45. #
  46. ############################################################################
  47. #
  48. #  Links:  drawlab, rstars, rstartbl
  49. #
  50. ############################################################################
  51.  
  52. link drawlab
  53. link rstars
  54. link rstartbl
  55.  
  56. global size
  57.  
  58. procedure main(argl)
  59.  
  60.    size := integer(argl[1]) | 600
  61.  
  62.    drawlab(rstar, rstartbl, "regular stars")
  63.  
  64. end
  65.