File: randtest2.cfdg

package info (click to toggle)
contextfree 3.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,448 kB
  • sloc: cpp: 37,995; lex: 414; makefile: 123; sh: 43; python: 34
file content (42 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (4)
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
startshape colortest

shape colortest
rule { colorbar[] }
rule { colorgrid[] }
rule {graygrid [] }

Sin(A) = sin(A)
R() = 0±180

shape colorbar
{
    loop angle = 300..360 [x 1] {
        CIRCLE [h R() s 10 sat 1
                b 1 y (90*Sin(angle))]
    }
    finally {
        CIRCLE [h(0±180) s(10, 50) sat(1)
                b(1) y(90*Sin(angle))]
    }
}

shape colorgrid
{
    loop row = 180 [y 1] {
        loop col = 180 [x 1] {
            SQUARE [h(30* floor(6 * (sin(row * 10)*
                                     sin(col * 10))))
                    sat(1) b(1)]
        }
    }
}

shape graygrid
{
    loop row = 360 [y 1] {
        loop col = 360 [x 1] {
            SQUARE [b((sin(row * 10) + 
                       sin(col * 10)) * 0.25 + 0.5)]
        }
    }
}