1924 Submission

(define
  texture "hand.png"
  bmx (interp/build from: [0 canvas/width] to: [0 (bitmap/width from: texture)])
  bmy (interp/build from: [0 canvas/height] to: [0 (bitmap/height from: texture)]))

(on-matrix-stack
  (scale scalar: 1.1)
  (rotate angle: 3)
  (wash colour: (col/rgb r: 0.19 g: 0.83 b: 0.93 alpha: 0.49) ~ (gen/col)))

(on-matrix-stack
  (scale scalar: 1.05)
  (tri-hsl alpha: 0.118 ~ (gen/scalar))
  (tri-lab alpha: 0.062 ~ (gen/scalar)))

(define
  ra (prng/build seed: 42
                 min: -5.472 ~ (gen/stray from: -4 by: 4)
                 max: 3.869 ~ (gen/stray from: 4 by: 4))
  sc 0.801 ~ (gen/scalar min: 0.8 max: 1.1)
  wh 5 ~ (gen/int min: 5 max: 20)
  w wh
  h wh)

(fn (left x: 0 y: 0 w: 0 h: 0 colour: red)
  (poly coords: [[(- x w) (+ y h h)]
                 [(+ x w) (+ y h)]
                 [(- x w) (+ y 0)]
                 [(+ x w) (- y h)]]
        colours: [colour colour colour colour]))

(fn (right x: 0 y: 0 w: 0 h: 0 colour: red)
  (poly coords: [[(+ x w) (+ y h h)]
                 [(- x w) (+ y h)]
                 [(+ x w) (+ y 0)]
                 [(- x w) (- y h)]]
        colours: [colour colour colour colour]))

(fn (left-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
  (define col (col/set-alpha value: strength
                             from: (col/set-e1 value: (* 100 strength)
                                               from: (colour.col/convert format: HSLuv))))
  (on-matrix-stack
    (translate vector: [x y])
    (rotate angle: (ra.prng/value))
    (left x: 0 y: 0 w h colour: col)
    (loop (i to: 3)
      (scale scalar: sc)
      (rotate angle: (ra.prng/value))
      (left x: 0 y: 0 w h colour: col))))

(fn (right-side x: 0 y: 0 w: 0 h: 0 colour: red strength: 1)
  (define col (col/set-alpha value: strength
                             from: (col/set-e1 value: (* 100 strength)
                                               from: (colour.col/convert format: HSLuv))))
  (on-matrix-stack
    (translate vector: [x y])
    (rotate angle: (ra.prng/value))
    (right x: 0 y: 0 w h colour: col)
    (loop (i to: 3)
      (scale scalar: sc)
      (rotate angle: (ra.prng/value))
      (right x: 0 y: 0 w h colour: col))))

(fn (tri-lab alpha: 1)
  (define
    y 400
    r (prng/build min: 0 max: 1 seed: 231)
    colour-scale 771 ~ (gen/int min: 700 max: 900)
    colour-offset (prng/build min: -1 max: 1)
    li (interp/build from: [0 1]
                     to: [68 ~ (gen/int min: 40 max: 120) 11 ~ (gen/int min: 0 max: 70)])
    rma (interp/build from: [0 canvas/width]
                      to: [9 ~ (gen/int min: -10 max: 30) 29 ~ (gen/int min: -10 max: 30)])
    rmb (interp/build from: [0 canvas/height]
                      to: [96 ~ (gen/int min: 60 max: 120) 8 ~ (gen/int min: 0 max: 60)]))

  (loop (y from: 0 to: canvas/height inc: (* 2 h))
    (loop (x from: 0 to: canvas/width inc: (* 4 w))
      (define
        col-bm (texture.bitmap/value position: [(bmx.interp/value t: x)
                                                (bmy.interp/value t: y)])
        strength (col-bm.col/e0)
        l (li.interp/value t: (r.prng/value))
        a (rma.interp/value t: (+ x (* (colour-offset.prng/value) colour-scale)))
        b (rmb.interp/value t: (+ y (* (colour-offset.prng/value) colour-scale)))
        col-1 (col/lab l a b alpha)
        col-2 (col/lab l a b alpha))
      (left-side  x            y w h colour: col-1 strength)
      (right-side x: (+ x w w) y w h colour: col-2 strength))))

(fn (tri-hsl alpha: 1)
  (define
    colour-scale 460 ~ (gen/int min: 400 max: 600)
    colour-offset (prng/build min: -1 max: 1)
    fn-h (interp/build from: [0 canvas/width]
                       to: [228 ~ (gen/int min: 200 max: 360)
                                177 ~ (gen/int min: 100 max: 300)])
    fn-l (interp/build from: [0 canvas/height]
                       to: [0.363 ~ (gen/scalar min: 0.2 max: 0.4)
                                  0.757 ~ (gen/scalar min: 0.7 max: 1)]))

  (loop (y from: 0 to: canvas/height inc: (* 2 h))
    (loop (x from: 0 to: canvas/width inc: (* 4 w))
      (define
        col-bm (texture.bitmap/value position: [(bmx.interp/value t: x)
                                                (bmy.interp/value t: y)])
        strength (col-bm.col/e0)
        s 1
        l (fn-l.interp/value t: (+ y (* (colour-offset.prng/value) colour-scale)))

        col-1 (col/hsl h: (fn-h.interp/value t: (+ x (* (colour-offset.prng/value) colour-scale)))
                       s l alpha)
        col-2 (col/hsl h: (fn-h.interp/value t: (+ x w (* (colour-offset.prng/value) colour-scale)))
                       s l alpha))
      (left-side  x            y w h colour: col-1 strength)
      (right-side x: (+ x w w) y w h colour: col-2 strength))))


(fn (wash vol: 200
          line-width: 70
          line-segments: 5
          colour: (col/rgb r: 0.627 g: 0.627 b: 0.627 alpha: 0.4)
          seed: 272)
  (define
    w/3 (/ canvas/width 3)
    h/3 (/ canvas/height 3)
    tessellation line-segments)
  (loop (d from: -20 to: 1020 inc: 20)
    (bezier tessellation
            line-width
            coords: [[0            (wash-n x: 0            d seed vol)]
                     [w/3          (wash-n x: w/3          d seed vol)]
                     [(* w/3 2)    (wash-n x: (* w/3 2)    d seed vol)]
                     [canvas/width (wash-n x: canvas/width d seed vol)]]
            colour)

    (bezier tessellation
            line-width
            coords: [[(wash-n x: 0             d seed vol) 0]
                     [(wash-n x: h/3           d seed vol) h/3]
                     [(wash-n x: (* h/3 2)     d seed vol) (* h/3 2)]
                     [(wash-n x: canvas/height d seed vol) canvas/height]]
            colour)))

(fn (wash-n x: 0 d: 0 seed: 0 vol: 1)
  (+ d (* vol (prng/perlin x y: d z: seed))))