2 USING: kernel namespaces math opengl.gl opengl.glu ui ui.gadgets.slate
7 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13 [ 0.7 b 60 r triangle ] do ;
15 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18 [ 2 x 5 y 3 size square ] do
19 [ 6 x 5 y 3 size circle ] do
20 [ 4 x 2 y 3 size triangle ] do
21 [ 1 y 3 size shapes ] do ;
23 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26 [ 0 x 0 y 5 3 size* square ] do
27 [ 0 x 5 y 2 4 size* square ] do
28 [ 5 x 5 y 3 size square ] do
29 [ 5 x 0 y 2 size square ] do ;
31 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
36 [ 5 x 7 y 30 r square ] do
37 [ 3 x 5 y 0.75 size square ] do
38 [ 5 x 5 y 0.5 b square ] do
39 [ 7 x 6 y 45 r 0.7 size 0.7 b square ] do
40 [ 5 x 1 y 10 r 0.2 size foursquare ] do ;
42 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
46 [ 0.5 size circle ] do
47 [ 0.2 y -3 r 0.995 size spiral ] do
50 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52 : chapter-3 ( -- ) [ 0 x 3 y spiral ] do ;
54 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
62 { 1 [ ] } } random-weighted* do ;
65 { { 1 [ -20 r tree ] }
68 { 1 [ ] } } random-weighted* do ;
70 : branch ( -- ) branch-left branch-right ;
75 { 20 [ [ 0.25 size circle ] do
76 [ 0.1 y 0.97 size tree ] do ] }
81 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
89 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
92 [ 0 x 0 y chapter-1 ] do
93 [ 10 x 0 y chapter-2 ] do
94 [ 0 x -10 y chapter-3 ] do
95 [ 10 x -10 y chapter-4 ] do ;
97 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
101 { -5 25 -15 25 } >viewport
103 [ toc ] >start-shape ;
105 : run ( -- ) [ init ] cfdg-window. ;