Skip to content

Commit

Permalink
Attach likelyhood of connecting lines to affine chance
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Jul 9, 2023
1 parent 394efab commit d36be64
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/shimmers/sketches/window_glimpses.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@
hatch-density (dr/gaussian (* width 0.03) 2.5)
cross-density (dr/gaussian (* width 0.015) 1.5)

boxes (generate bounds (partial gen-box {:affine (dr/chance 0.33)}) 20)
affine (dr/chance 0.33)

boxes (generate bounds (partial gen-box {:affine affine}) 20)
circles (swap-triangles (generate bounds gen-circle 18) (dr/random-int 5))
[windows shapes] (if (dr/chance 0.85)
[boxes circles]
Expand All @@ -269,7 +271,7 @@
windows)
:shapes shapes
:lines lines
:connecting-lines (when (dr/chance 0.5)
:connecting-lines (when (dr/chance (+ 0.33 (if affine 0.33 0)))
(connect-lines lines))
:hatched-lines
(map (fn [line] (vary-meta line assoc :dashed (dr/chance 0.15)))
Expand Down

0 comments on commit d36be64

Please sign in to comment.