TruchetTiles

ThoughtStorms Wiki

Pattern made by combinations of simple rotated triangles

https://en.wikipedia.org/wiki/Truchet_tiles

DominiqueDouat wrote about them

The following is some Patterning code for playing with them.


(defn qt [P] (rotate (/ 3.14159 2) P) )

(def A [(->SShape
       {:fill (p-color 0) :stroke (p-color 0) }
       [[-1 1] [-1 -1] [1 1]])])

(def B (qt A))
(def C (qt B))
(def D (qt C))

(def E [(->SShape
       {:fill (p-color 127) :stroke (p-color 127) }
       [[-1 1] [-1 -1] [1 1]])])

(def F (qt E))

(defn r-lay [a b c d ]
   (stack
      (->> a (scale 0.5) (translate -0.5 -0.5))
      (->> b (scale 0.5) (translate 0.5 -0.5))
      (->> c (scale 0.5) (translate 0.5 0.5))
      (->> d (scale 0.5) (translate -0.5 0.5))
   )
)

(defn h-ref [tiles] 
    (map h-reflect tiles)
)

(defn v-ref [tiles]
   (map v-reflect tiles)
)

(defn b-ref [tiles]
  (map h-ref (map v-ref tiles))
)

(def order [A B D A])

(->
(grid-layout 3
  (cycle [
       (apply r-lay order)
       (apply r-lay (v-ref order ))
  ])
)
four-mirror
)

Backlinks (2 items)