]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/cfdg/models/game1-turn6/game1-turn6.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / cfdg / models / game1-turn6 / game1-turn6.factor
1
2 USING: kernel namespaces math opengl.gl opengl.glu ui ui.gadgets.slate
3        random-weighted cfdg ;
4
5 IN: cfdg.models.game1-turn6
6
7 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8
9 : f-triangles ( -- )
10   {
11     [ 0.1 x 0.1 y -0.33 alpha 20 hue 0.7 sat 0.80 b triangle ]
12     [                         10 hue 0.9 sat 0.33 b triangle ]
13     [ 0.9 s                   10 hue 0.5 sat 1.00 b triangle ]
14     [ 0.8 s 5 r f-triangles ]
15   }
16   rule ;
17
18 : f-squares ( -- )
19   {
20     [ 0.1 x 0.1 y -0.33 alpha 250 hue 0.70 sat 0.80 b square ]
21     [                         220 hue 0.90 sat 0.33 b square ]
22     [ 0.9 s                   220 hue 0.25 sat 1.00 b square ]
23     [ 0.8 s 5 r f-squares ]
24   }
25   rule ;
26
27 DEFER: start
28
29 : spiral ( -- )
30   {
31     { 1 [ f-squares ]
32         [ 0.5 x 0.5 y 45 r f-triangles ]
33         [ 1 y 25 r 0.9 s spiral ] }
34             
35     { 0.022 [ 90 flip 50 hue start ] }
36   }
37   rules ;
38
39 : start ( -- )
40   [       spiral ] do
41   [ 120 r spiral ] do
42   [ 240 r spiral ] do ;
43
44 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
45
46 : init ( -- )
47   [ 66 hue 0.4 sat 0.5 b ] >background
48   { -5 10 -5 10 }          >viewport
49   0.001                    >threshold
50   [ start ]                >start-shape ;
51
52 : run ( -- ) [ init ] cfdg-window. ;
53
54 MAIN: run