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

  1. /* Program 39 */
  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
  6.   can 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.   circle(real)
  17.  
  18. goal
  19.   graphics(1,1,0),
  20.   pencolor(7),
  21.   penpos(15000,10000,180),
  22.   circle(1),penpos(17000,18500,-60),
  23.   circle(300).
  24.  
  25. clauses
  26.   circle(360):-!.
  27.   circle(N) :-!,
  28.       forward(100),
  29.       right(1),
  30.       NN=N+1,
  31.       circle(NN).
  32.