1922 Skull

(meta linear-colour-space: 1)

(define
  texture "skull-a.png"
  rng (prng/build seed: 3208 ~ (gen/scalar min: 1 max: 5000) min: 0 max: 10)
  pass-0-colour (col/hsluv h:  346 ~ (gen/scalar max: 360) s: 51 ~ (gen/scalar max: 100) l: 80 alpha: 0.07)
  pass-1-colour (col/hsluv h: 216 ~ (gen/scalar max: 360) s: 21 ~ (gen/scalar max: 100) l: 80 alpha: 0.07)
  per-pixel-funcs [(address-of pass-0)
                   (address-of pass-1)])


(each (per-pixel-func from: per-pixel-funcs)
      (bitmap/each from: texture
                   position: [500 500]
                   width: 1000
                   height: 1000
                   shuffle-seed: 321
                   fn: per-pixel-func))

(fn (pass-0 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
  (define
    a (col/e0 from: colour)
    angle (+ 7.83 ~ (gen/scalar min: 0 max: 8) (* a math/PI)))
  (line from: [(* -1 ~ (gen/scalar min: -15 max: 15) (math/cos from: angle))
               (* 11 ~ (gen/scalar min: -15 max: 15) (math/sin from: angle))]
        to: [(* -6 ~ (gen/scalar min: -15 max: 15) (math/cos from: angle))
             (* 5 ~ (gen/scalar min: -15 max: 15) (math/sin from: angle))]
        width: (- 7.7 ~ (gen/scalar min: 0.1 max: 15) a)
        brush: brush/c ~ (gen/select from: brush/*)
        brush-subtype: (prng/value from: rng)
        colour: (col/set-e1 from: pass-0-colour value: (* a 100))))

(fn (pass-1 colour: (col/rgb r: 0 g: 0 b: 0 alpha: 0) position: [100 100])
  (define
    b (col/e2 from: colour)
    angle (+ 5.69 ~ (gen/scalar min: 0 max: 8) (* b math/PI)))
  (line from: [(* -2 ~ (gen/scalar min: -10 max: 10) (math/cos from: angle))
               (* 4 ~ (gen/scalar min: -10 max: 10) (math/sin from: angle))]
        to: [(* 1 ~ (gen/scalar min: -10 max: 10) (math/cos from: angle))
             (* 3 ~ (gen/scalar min: -10 max: 10) (math/sin from: angle))]
        width: (- 3.0 ~ (gen/scalar min: 1 max: 3) b)
        brush: brush/b ~ (gen/select from: brush/*)
        brush-subtype: (prng/value from: rng)
        colour: (col/set-e2 from: pass-1-colour value: (* b 100))))