(alt-cols n groups1 groups2)Fills a group-stream with cols from alternative group-streams
Fills a group-stream with cols from alternative group-streams
(alt-cols-grid-layout n groups1 groups2)Every other column from two streams
Every other column from two streams
(alt-rows n groups1 groups2)Fills a group-stream with rows from alternative group-streams
Fills a group-stream with rows from alternative group-streams
(alt-rows-grid-layout n groups1 groups2)Every other row from two streams
Every other row from two streams
(aspect-ratio-framed cols rows corner-pattern edge-pattern inner-pattern)(aspect-ratio-framed cols rows corner-pattern edge-pattern inner-pattern fit-fn)(cart colls)Cartesian Product of two collections
Cartesian Product of two collections
(check-seq n groups1 groups2)returns the appropriate lazy seq of groups for constructing a checkered-grid
returns the appropriate lazy seq of groups for constructing a checkered-grid
(checkered-grid number groups1 groups2)does checks using grid layout (column-wise)
does checks using grid layout (column-wise)
(clock-rotate n group)(clock-rotate n offset group)Circular layout. Returns n copies in a rotation. Optional offset pushes items out from center before rotating.
Circular layout. Returns n copies in a rotation. Optional offset pushes items out from center before rotating.
(diamond-layout-positions number)Diamond grid, actually created like a half-drop
Diamond grid, actually created like a half-drop
(ensure-sequence xs)If xs is a single group/pattern (sequence of SShapes), repeat it. If xs is already a sequence of groups/patterns, return as-is.
If xs is a single group/pattern (sequence of SShapes), repeat it. If xs is already a sequence of groups/patterns, return as-is.
(four-mirror group)Four-way mirroring. Returns the group repeated four times reflected vertically and horizontall
Four-way mirroring. Returns the group repeated four times reflected vertically and horizontall
(frame grid-size corners edges)Frames consist of corners and edges.
Frames consist of corners and edges.
(framed grid-size corners edges inner)Puts a frame around the other group
Puts a frame around the other group
(grid n groups)Takes an n and a group-stream and returns items from the group-stream in an n X n grid (column-wise: top to bottom, then next column)
Takes an n and a group-stream and returns items from the group-stream in an n X n grid (column-wise: top to bottom, then next column)
(grid-layout-positions number)calculates the positions for a grid layout (column-wise: top to bottom, then next column)
calculates the positions for a grid layout (column-wise: top to bottom, then next column)
(h-checkered-grid number groups1 groups2)does checks using h-grid layout (row-wise)
does checks using h-grid layout (row-wise)
(h-grid n groups)Takes an n and a group-stream and returns items from the group-stream in an n X n grid (row-wise: left to right, then next row)
Takes an n and a group-stream and returns items from the group-stream in an n X n grid (row-wise: left to right, then next row)
(h-grid-layout-positions number)calculates the positions for a grid layout (row-wise: left to right, then next row)
calculates the positions for a grid layout (row-wise: left to right, then next row)
(h-mirror group)Reflect horizontally and stretch
Reflect horizontally and stretch
(h-row n margin groups)Takes n (number of groups), margin (spacing between groups), and groups (sequence of patterns). Lays out groups left to right with margin spacing.
Takes n (number of groups), margin (spacing between groups), and groups (sequence of patterns). Lays out groups left to right with margin spacing.
(half-drop-grid n groups)Like grid but with half-drop
Like grid but with half-drop
(half-drop-grid-layout-positions number)Like a grid but with a half-drop every other column
Like a grid but with a half-drop every other column
(hex-grid n groups)Takes an n and a group-stream and returns items in a hexagonal grid layout
Takes an n and a group-stream and returns items in a hexagonal grid layout
(hex-grid-layout-positions number)calculates positions for a hexagonal grid layout (pointy-top hexagons)
calculates positions for a hexagonal grid layout (pointy-top hexagons)
(inner-max inner-w inner-h inner-content)Fills inner rectangle and clips excess (crop to fit)
Fills inner rectangle and clips excess (crop to fit)
(inner-min inner-w inner-h inner-content)Shrinks content to fit within inner rectangle (letterbox/pillarbox)
Shrinks content to fit within inner rectangle (letterbox/pillarbox)
(inner-stretch inner-w inner-h inner-content)Stretches content to exactly fill the inner rectangle
Stretches content to exactly fill the inner rectangle
(iterate-stack n f pattern)Applies a transformation function iteratively to a pattern and stacks all results. Returns n+1 patterns: [original, f(original), f(f(original)), ...] for n iterations.
Examples: (iterate-stack 3 #(groups/scale 0.8 %) pattern) ; progressively smaller (iterate-stack 5 #(groups/translate 0.1 0.1 %) pattern) ; progressive translation (iterate-stack 4 #(groups/rotate (/ maths/PI 8) %) pattern) ; progressive rotation
Applies a transformation function iteratively to a pattern and stacks all results. Returns n+1 patterns: [original, f(original), f(f(original)), ...] for n iterations. Examples: (iterate-stack 3 #(groups/scale 0.8 %) pattern) ; progressively smaller (iterate-stack 5 #(groups/translate 0.1 0.1 %) pattern) ; progressive translation (iterate-stack 4 #(groups/rotate (/ maths/PI 8) %) pattern) ; progressive rotation
(map-stack f patterns)Maps a function across a sequence of patterns and stacks the results. Can accept either a single pattern or a sequence of patterns.
Examples: (map-stack #(groups/scale 0.8 %) [pat1 pat2 pat3]) (map-stack #(groups/rotate (/ maths/PI 4) %) pattern)
Maps a function across a sequence of patterns and stacks the results. Can accept either a single pattern or a sequence of patterns. Examples: (map-stack #(groups/scale 0.8 %) [pat1 pat2 pat3]) (map-stack #(groups/rotate (/ maths/PI 4) %) pattern)
(nested-stack reducer n group & [styles])superimpose smaller copies of a shape
superimpose smaller copies of a shape
(old-ring n offset groups)Legacy ring layout (pre-2026 behavior).
Legacy ring layout (pre-2026 behavior).
(one-col-layout n i groups1 groups2)uses one-x-layout with rows
uses one-x-layout with rows
(one-row-layout n i groups1 groups2)uses one-x-layout with rows
uses one-x-layout with rows
(one-x-layout n i f groups1 groups2)Takes a total number of rows, an index i and two group-streams. Makes an n X n square where row or col i is from group-stream2 and everything else is group-stream1
Takes a total number of rows, an index i and two group-streams. Makes an n X n square where row or col i is from group-stream2 and everything else is group-stream1
(place-groups-at-positions groups positions)Takes a list of groups and a list of positions and puts one of the groups at each position
Takes a list of groups and a list of positions and puts one of the groups at each position
(random-grid n groups & {:keys [random] :or {random default-random}})Takes a group and returns a grid with random quarter rotations
Takes a group and returns a grid with random quarter rotations
(random-turn-groups groups & {:keys [random] :or {random default-random}})(rgrid cols rows groups)Takes cols, rows, and a group-stream and returns items in a rectangular grid with square tiles, filled row-wise (left to right, top to bottom)
Takes cols, rows, and a group-stream and returns items in a rectangular grid with square tiles, filled row-wise (left to right, top to bottom)
(rgrid-layout-positions cols rows)calculates the positions for a rectangular grid layout in row-wise order (left to right, top to bottom)
calculates the positions for a rectangular grid layout in row-wise order (left to right, top to bottom)
(ring rotation-number group)(ring rotation-number radius-offset scale-factor group)Ring layout where each copy keeps its original orientation.
Ring layout where each copy keeps its original orientation.
(ring-out rotation-number group)(ring-out rotation-number radius-offset scale-factor group)Ring layout where each copy faces outward from the center.
Ring layout where each copy faces outward from the center.
(ring-rotate rotation-number group)(ring-rotate rotation-number radius-offset scale-factor group)Ring layout where each copy is rotated by its position (clock-rotate style).
Ring layout where each copy is rotated by its position (clock-rotate style).
(rows row-groups)Lay out a nested vector of rows, left-to-right and top-to-bottom. Short rows are padded with empty patterns to match the longest row.
Lay out a nested vector of rows, left-to-right and top-to-bottom. Short rows are padded with empty patterns to match the longest row.
(stack & groups)superimpose a number of groups
superimpose a number of groups
(superimpose-layout group1 group2)simplest layout, two groups located on top of each other
simplest layout, two groups located on top of each other
(v-mirror group)Reflect vertically and stretch
Reflect vertically and stretch
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |