Some more examples of Patterning patterns.
The Black Square
This simple black square with some coloured lines illustrates a couple of important points.
Firstly this pattern can exhibit a wide variety of variations based on the several randomized parameters it contains. For this reason it's illustrated with two examples here.
(defn rcol [] {:stroke (rand-nth [ (p-color 127 255 127) (p-color 255 ) (p-color 200 100 200) (p-color 200 200 100) (p-color 102 255 178) (p-color 255 51 255) ; pink (p-color 0 204 204) (p-color 255 51 51) (p-color 255 255 204 ) ]) :stroke-weight 2 } ) (defn dark-fill [style] (conj style {:fill (darker-color (:stroke style))}) ) (defn t1 ([p] (t1 p (rcol))) ([p s] (->> p (stack (drunk-line 10 0.2 s) ) four-round (rotate (/ (rand-int 10) 10)) ) ) ) (stack (rect -1 -1 2 2 {:fill (p-color 0)}) (grid-layout 5 (repeat (t1 [] {:stroke (p-color 250 180 200) :stroke-weight 2})) ) (->> (apply stack (take 3 (iterate t1 (drunk-line 10 0.1 (rcol))) )) four-mirror ) )
(defn rcol [] {:stroke (rand-nth [ (p-color 127 255 127) (p-color 255 ) (p-color 200 100 200) (p-color 200 200 100) (p-color 102 255 178) (p-color 255 51 255) ; pink (p-color 0 204 204) (p-color 255 51 51) (p-color 255 255 204 ) ]) :stroke-weight 2 } ) (defn dark-fill [style] (conj style {:fill (darker-color (:stroke style))}) ) (defn t1 ([p] (t1 p (rcol))) ([p s] (->> p (stack (drunk-line 10 0.2 s) ) four-round (rotate (/ (rand-int 10) 10)) ) ) ) (stack (rect -1 -1 2 2 {:fill (p-color 0)}) (grid-layout 5 (repeat (t1 [] {:stroke (p-color 250 180 200) :stroke-weight 2})) ) (->> (apply stack (take 3 (iterate t1 (drunk-line 10 0.1 (rcol))) )) four-mirror ) )
Chita
Brazilian floral kitsch "Chita" patterns are common for textiles, table coverings etc. Here's a demonstration of how to approximate the style in Patterning.