'noise generator
steps = 10 'maximum alpha for one pixel
clustersize = 100
count = 10000
minwidth = 20
minheight = 20
maxntype = 3
ntype
= -1:
DO: ntype
= ntype
+ 1 IF ntype
= 0 THEN count
= count
* 10: steps
= steps
* 20 IF ntype
= 2 THEN steps
= steps
* 10
d
= 0:
DO: d
= d
+ 1 'd serves as index for Drawn pixels
x
(2) = (RND * (clustersize
- minwidth
)) + minwidth
x(2) = x(1) + (x(2) - (x(2) / 2))
y
(2) = (RND * (clustersize
- minheight
)) + minheight
y(2) = y(1) + (y(2) - (y(2) / 2))
IF y
(2) > y
(1) THEN ydif
= y
(2) - y
(1) ELSE ydif
= y
(1) - y
(2) IF x
(2) > x
(1) THEN xdif
= x
(2) - x
(1) ELSE xdif
= x
(1) - x
(2)
PSET (s
, y
(1) + (SIN(s
/ xdif
) * ydif
)), _RGBA(255, 255, 255, t
) PSET (s
, y
(1) + (SIN(s
/ xdif
) * ydif
) + 1), _RGBA(255, 255, 255, t
) LINE (x
(1), y
(1))-(x
(2), y
(2)), _RGBA(255, 255, 255, t
), B
f = c / ydif
'x = xdif - x
LINE (x
(1), y
(1) + c
)-(x
(1) + x
, y
(1) + c
), _RGBA(255, 255, 255, t
)
LOOP UNTIL d
= count
'tries to make good contrast
IF ntype
= 0 THEN count
= count
/ 10: steps
= steps
/ 20 IF ntype
= 2 THEN steps
= steps
/ 10