home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / prolog / library / prolo_c / exampl36.pro < prev    next >
Text File  |  1986-10-06  |  702b  |  26 lines

  1. /* Program 36 */
  2. /*
  3.   NOTE:  all graphics programs are in white on a
  4.   black(blue) background. If you don't like this
  5.   combination it can easily be changed.  You can
  6.   change the parameters to the 'graphics'
  7.   predicate, or you can change the drawing
  8.   color. Read page 92 and try some combinations
  9.   of parameters.  For example: graphics(1,5,17)
  10.   on a CGA will give you pink letters and a
  11.   white line on a blue background. Other
  12.   systems give different colors. Just explore.
  13. */
  14.  
  15. predicates
  16.     polyspiral(integer)
  17.  
  18. goal
  19.     graphics(1,1,0),
  20.     pencolor(7),
  21.     polyspiral(500).
  22.  
  23. clauses
  24.     polyspiral(X):- !,X<15000,
  25.         forward(X),right(62),Y=X+100,polyspiral(Y).
  26.