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

  1. /* Program 37 */
  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 systems
  12.   give different colors. Just explore.
  13. */
  14.  
  15. predicates
  16.     inspiral(integer)
  17.  
  18. goal
  19.     graphics(1,1,0),
  20.     pencolor(7),
  21.     inspiral(70).
  22.  
  23. clauses
  24.     inspiral(X):-
  25.         X < 340, !, forward(5000),right(X),Y=X+1,inspiral(Y).
  26.  
  27.