PRNG Patterns

art lisp

Table of Contents

Probability

(with-scene
    (translate-grid 8 16.0
     (translate-grid 8 2.0 (with-prob 0.5 (rect3p (vec2 0.0) (vec2 1.0) 0))))
  (plot-pseudo3d "images/prng_patterns/probability.png" :palette "/home/leon/src/generative/bw.json"))
probability.png

Fixed State

(with-scene
    (translate-grid 8 16.0
     (seed-state 7)
     (translate-grid 8 2.0
      (with-prob 0.4 (rect3p (vec2 0.0) (vec2 1.0) 1))))
  (plot-pseudo3d "images/prng_patterns/fixed.png" :palette "/home/leon/src/generative/bw.json"))
fixed.png

Incremental State

(let ((x 1))
  (with-scene
      (translate-grid 8 16.0
        (seed-state x)
        (incf x 1)
        (translate-grid 8 2.0
          (with-prob 0.3 (rect3p (vec2 0.0) (vec2 1.0) 1))))
    (plot-pseudo3d "images/prng_patterns/incremental.png" :palette "/home/leon/src/generative/bw.json")))
incremental.png

Modular Arithmetic

(let ((x 0))
  (with-scene
      (translate-grid 8 16.0
        (seed-state (mod x 7))
        (incf x 1)
        (translate-grid 8 2.0
          (with-prob 0.3 (rect3p (vec2 0.0) (vec2 1.0) 1))))
    (plot-pseudo3d "images/prng_patterns/mod7.png" :palette "/home/leon/src/generative/bw.json")))
seed_state2.png
(let ((x 0))
  (with-scene
      (translate-grid 8 16.0
        (seed-state (mod x 5))
        (incf x 1)
        (translate-grid 8 2.0
          (with-prob 0.3 (rect3p (vec2 0.0) (vec2 1.0) 1))))
    (plot-pseudo3d "images/prng_patterns/mod5.png" :palette "/home/leon/src/generative/bw.json")))
mod5.png
(let ((x 0))
  (with-scene
      (translate-grid 8 16.0
        (seed-state (mod x 13))
        (incf x 1)
        (translate-grid 8 2.0
          (with-prob 0.3 (rect3p (vec2 0.0) (vec2 1.0) 1))))
    (plot-pseudo3d "images/prng_patterns/mod5.png" :palette "/home/leon/src/generative/bw.json")))
mod5.png

If you have an idea how this page could be improved or a comment send me a mail.