15h3 Rotate Mirror 2

a variation of 15fe-rotate-mirror with wash added as a background

(meta linear-colour-space: 1)

(define
  coords []
  colours []
  make-colour (col/build-procedural a: {[0.394 0.056 0.377] (gen/scalar)}
                                    b: {[0.453 0.611 0.477] (gen/scalar)}
                                    c: {[0.587 0.435 0.449] (gen/scalar)}
                                    d: {[0.608 0.516 0.252] (gen/scalar)})

  focalpoint ({focal/build-point (gen/select from: '(focal/build-point
                                                     focal/build-hline
                                                     focal/build-vline))}
              position: [{-68 (gen/int min: -300 max: 300)}
                         {212 (gen/int min: -300 max: 300)}]
              distance: {819 (gen/int min: 300 max: 900)}))

(fence (t num: {39 (gen/int min: 5 max: 100)})
  (define
    p1 (interp/bezier t: t
                      coords: {[[-249.550 -79.597] [194.782 -180.117] [21.536 106.905] [-82.513 153.607]]
                                (gen/2d min: -300 max: 300)})
    p2 (interp/bezier t: t
                      coords: {[[90.069 -189.886] [-84.464 59.473] [144.670 -74.757] [182.469 159.561]]
                                (gen/2d min: -300 max: 300)})
    c1 (col/value from: make-colour t: (focal/value from: focalpoint position: p1))
    c2 (col/value from: make-colour t: (focal/value from: focalpoint position: p2)))
  (++ coords p1)
  (++ coords p2)
  (++ colours c1)
  (++ colours c2))

(wash colour: {(col/rgb r: 0.932 g: 0.422 b: 0.096 alpha: 0.204) (gen/col)})

(on-matrix-stack
  (translate vector: [(/ canvas/width 2) (/ canvas/height 2)])
  (scale scalar: {1.602 (gen/scalar min: 0.8 max: 2)})
  (rotate angle: {167.393 (gen/scalar min: 0 max: 360)})
  (repeat/rotate-mirrored fn: (address-of draw)
                          copies: {25 (gen/int min: 1 max: 30)}))

(fn (draw)
  (poly coords: coords colours: colours))

(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))
  (loop (d from: -20 to: 1020 inc: 20)
    (bezier tessellation: line-segments
            line-width: line-width
            coords: [[0            (wash-n x: 0            d: d seed: seed vol: vol)]
                     [w/3          (wash-n x: w/3          d: d seed: seed vol: vol)]
                     [(* w/3 2)    (wash-n x: (* w/3 2)    d: d seed: seed vol: vol)]
                     [canvas/width (wash-n x: canvas/width d: d seed: seed vol: vol)]]
            colour: colour)

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

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