File: pathdefinetest.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 (18 lines) | stat: -rw-r--r-- 315 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
startshape flower

path flower {
    petals = randint(5,9)
    MOVETO(1, 0)
    loop i = petals [r (360/petals)] {
        CURVETO(
            cos(360/petals), sin(360/petals),
            3*cos(180/petals), 3*sin(180/petals)
        )
    }
    CLOSEPOLY(CF::Align)
    STROKE[]
}

shape flower2 {
    flower[]
}