diff options
Diffstat (limited to 'ipl/gprocs/randfigs.icn')
-rw-r--r-- | ipl/gprocs/randfigs.icn | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ipl/gprocs/randfigs.icn b/ipl/gprocs/randfigs.icn new file mode 100644 index 0000000..4097f07 --- /dev/null +++ b/ipl/gprocs/randfigs.icn @@ -0,0 +1,48 @@ +############################################################################ +# +# File: randfigs.icn +# +# Subject: Procedures to generate random figures +# +# Author: Ralph E. Griswold +# +# Date: March 27, 1993 +# +############################################################################ +# +# This file is in the public domain. +# +############################################################################ +# +# These procedures generate random geometrical figures. +# +############################################################################ +# +# Links: gobject +# +############################################################################ + +link gobject + +# +# random_points(width, height) generates an infinite sequence of +# randomly chosen points within the area bounded by 0, 0 and width - 1, +# height - 1. + +procedure random_points(width, height) + + suspend |Point(?width - 1, ?height - 1) + +end + +# +# random_lines(width, height) generates an infinite sequence of +# randomly chosen lines within the area bounded by 0, 0 and width - 1, +# height - 1. + +procedure random_lines(width, height) + + suspend |Line(Point(?width - 1, ?height - 1), + Point(?width - 1, ?height - 1)) + +end |