home *** CD-ROM | disk | FTP | other *** search
Prolog Source | 1986-10-07 | 776 b | 32 lines |
- /* Program 39 */
- /*
- NOTE: all graphics programs are in white on a
- black(blue) background. If you don't like this
- combination it can easily be changed. You
- can change the parameters to the 'graphics'
- predicate, or you can change the drawing
- color. Read page 92 and try some combinations
- of parameters. For example: graphics(1,5,17)
- on a CGA will give you pink letters and a
- white line on a blue background. Other systems
- give different colors. Just explore.
- */
-
- predicates
- circle(real)
-
- goal
- graphics(1,1,0),
- pencolor(7),
- penpos(15000,10000,180),
- circle(1),penpos(17000,18500,-60),
- circle(300).
-
- clauses
- circle(360):-!.
- circle(N) :-!,
- forward(100),
- right(1),
- NN=N+1,
- circle(NN).