]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/cfdg/models/aqua-star/aqua-star.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / cfdg / models / aqua-star / aqua-star.factor
1
2 USING: kernel namespaces math random opengl.gl opengl.glu ui ui.gadgets.slate
3        random-weighted cfdg ;
4
5 IN: cfdg.models.aqua-star
6
7 : tentacle ( -- )
8 iterate? [
9   { { 1 [ circle
10           [ .23 y .99 s .002 b tentacle ] do ] }
11     { 1 [ circle
12           [ .17 y 2 r .99 s .002 b tentacle ] do ] }
13     { 1 [ circle
14           [ .12 y -2 r .99 s .001 b tentacle ] do ] } }
15   call-random-weighted
16 ] when ;
17
18 : anemone ( -- )
19 iterate? [
20   tentacle
21   [ 10 x -11 r .995 s -.002 b anemone ] do
22 ] when ;
23
24 : anemone-begin ( -- ) [ 196 hue 0.8324 sat 1 b anemone ] do ;
25
26 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
28 : init ( -- )
29   [ -1 b ]             >background
30   { -60 140 -120 140 } >viewport
31   0.1                  >threshold
32   [ anemone-begin ]    >start-shape ;
33
34 : run ( -- ) [ init ] cfdg-window. ;
35
36 MAIN: run