blob: 4097f07514d999d2f040a38c7c60056909f5ccdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
|