1922 Pencil Skull
(meta linear-colour-space: 1)
(define
texture "skull-c.png"
rng (prng/build seed: 1324 ~ (gen/scalar min: 1 max: 5000) min: 0 max: 10)
pass-0-colour (col/hsluv h: 294 ~ (gen/scalar max: 360) s: 65 ~ (gen/scalar max: 100) l: 100 alpha: 0.07)
pass-1-colour (col/hsluv h: 355 ~ (gen/scalar max: 360) s: 41 ~ (gen/scalar max: 100) l: 100 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 (+ 0.93 ~ (gen/scalar min: 0 max: 8) (* a math/PI)))
(line from: [(* 4 ~ (gen/scalar min: -15 max: 15) (math/cos from: angle))
(* 6 ~ (gen/scalar min: -15 max: 15) (math/sin from: angle))]
to: [(* -11 ~ (gen/scalar min: -15 max: 15) (math/cos from: angle))
(* 4 ~ (gen/scalar min: -15 max: 15) (math/sin from: angle))]
width: (- 0.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-e2 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 (+ 0.92 ~ (gen/scalar min: 0 max: 8) (* b math/PI)))
(line from: [(* -6 ~ (gen/scalar min: -10 max: 10) (math/cos from: angle))
(* 6 ~ (gen/scalar min: -10 max: 10) (math/sin from: angle))]
to: [(* 0 ~ (gen/scalar min: -10 max: 10) (math/cos from: angle))
(* -2 ~ (gen/scalar min: -10 max: 10) (math/sin from: angle))]
width: (- 1.3 ~ (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))))