File: vectorfunctiontest.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 (13 lines) | stat: -rw-r--r-- 225 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
startshape spiral

vector2 polar2rect(radius, angle) = 
  radius*cos(angle),
  radius*sin(angle)

hueRange = -60, 60

shape spiral {
  loop i = 360 [] {
    SQUARE[x polar2rect(i, i) r i s 5 h rand(hueRange) sat 1 b 1]
  }
}