Liking cljdoc? Tell your friends :D

thi.ng.morphogen.core


apply-recursivelyclj/s

(apply-recursively tree n path id)

Recursively injects tree into itself n times, starting at given child path. At each subsequent level, the original tree given is injected at index id of the :out child node vector. The initial path is simply given as a seq of indices and will be translated into an actual lookup path using the child-path fn.

Recursively injects tree into itself `n` times, starting at given
child path. At each subsequent level, the original tree given is
injected at index `id` of the `:out` child node vector. The initial
path is simply given as a seq of indices and will be translated into
an actual lookup path using the `child-path` fn.
sourceraw docstring

BoxNodecljs

source

child-pathclj/s

(child-path path)

Takes a seq of child indices and constructs a lookup path/vector for them by interleaving :out in the seq: (child-path [1 0 2]) => [:out 1 :out 0 :out 2]

Takes a seq of child indices and constructs a lookup path/vector
for them by interleaving `:out` in the seq:
    (child-path [1 0 2]) => [:out 1 :out 0 :out 2]
sourceraw docstring

circle-lattice-segclj/s

(circle-lattice-seg n h wall)
source

classify-node-atclj/s

(classify-node-at op-tree cursor)
source

compute-tree-mapclj/s

(compute-tree-map seed tree)
source

compute-tree-map*clj/s

(compute-tree-map* node tree acc path)
source

execute-op-treeclj/s

(execute-op-tree leaf-fn acc node tree max-depth)
source

extrudeclj/s

(extrude & {:keys [dir len out empty?] :or {dir :n len 1.0}})
source

extrude-propclj/s

(extrude-prop & {:keys [dir len out empty?] :or {dir :n len 1.0}})
source

face-oppositeclj/s

source

generate-meshclj/s

(generate-mesh seed tree)
(generate-mesh seed tree max-depth)
source

injectclj/s

(inject t path t')

Almost like assoc-in, but transforms lookup path with child-path.

Almost like assoc-in, but transforms lookup path with `child-path`.
sourceraw docstring

INodeclj/s≠protocol

parentclj/s

(parent _)

Returns the node's parent or nil if node is the root

Returns the node's parent or `nil` if node is the root

with-operator-nodeclj/s

(with-operator-node _ op)

Returns same node with new operator node attached

Returns same node with new operator node attached

face-verticesclj/s

(face-vertices _ face)

Returns vertices for given face ID

Returns vertices for given face ID

tree-depthclj/s

(tree-depth _)

Returns the node's tree depth

Returns the node's tree depth

operator-nodeclj/s

(operator-node _)

Returns related node from operator tree

Returns related node from operator tree

face-topologyclj/s

(face-topology _)

Returns number of vertices used for each face in the node

Returns number of vertices used for each face in the node
source

make-planarclj/s

(make-planar a b c d)
source

map-leavesclj/s

(map-leaves f tree)
(map-leaves f tree depth)

Takes a fn and operator tree, applies f to all leaf nodes. The fn must accept 3 args: the leaf's parent node, the child index of the leaf in the parent and the tree depth. The leaf will be replaced with the fn's return value.

Takes a fn and operator tree, applies f to all leaf nodes. The fn
must accept 3 args: the leaf's parent node, the child index of the
leaf in the parent and the tree depth. The leaf will be replaced
with the fn's return value.
sourceraw docstring

offset-face-pointsclj/s

(offset-face-points [a b c d e f g h] side n)
source

op-tree-depthclj/s

(op-tree-depth tree)
source

operatorclj/s

source

operator-outputclj/s

(operator-output n out empty?)
source

operator-seqclj/s

(operator-seq node)
source

operator-seq-no-leavesclj/s

(operator-seq-no-leaves node)
source

quad-normalclj/s

(quad-normal [a b c d])
(quad-normal a b c d)

Takes 4 points (or a seq of 4 points), returns vector perdendicular to the 2 diagonals of the quad

Takes 4 points (or a seq of 4 points), returns vector perdendicular
to the 2 diagonals of the quad
sourceraw docstring

reflectclj/s

(reflect dir & {:keys [out empty?] :or {dir :n}})
source

reflect-on-planeclj/s

(reflect-on-plane p q n)

Reflects point p on plane defined by point q & normal n. Normal vector must be normalized.

Reflects point p on plane defined by point q & normal n.
Normal vector must be normalized.
sourceraw docstring

reflect-seqclj/s

(reflect-seq dirs & [leaf])

Takes a seq of direction keys and optional leaf tree. Builds a tree encoding a nested reflection sequence in the order given. If leaf is specified, injects it at the end of the nested reflection.

Takes a seq of direction keys and optional `leaf` tree. Builds a
tree encoding a nested reflection sequence in the order given. If
`leaf` is specified, injects it at the end of the nested
reflection.
sourceraw docstring

replicateclj/s

(replicate dir & {:keys [out empty?]})
source

save-obj-meshclj

(save-obj-mesh seed tree)
(save-obj-mesh seed tree path)
(save-obj-mesh seed tree path max-depth)
source

save-ply-meshclj

(save-ply-mesh seed tree)
(save-ply-mesh seed tree path)
(save-ply-mesh seed tree path max-depth)
source

save-stl-meshclj

(save-stl-mesh seed tree)
(save-stl-mesh seed tree path)
(save-stl-mesh seed tree path max-depth)
source

scale-edgeclj/s

(scale-edge edge sym & {:keys [scale len out] :or {scale 0.5}})
source

seed-boxclj/s

(seed-box x)
source

skewclj/s

(skew side ref & {:keys [offset out] :or {offset 0.25}})
source

sphere-latclj/s

(sphere-lat resu resv wall)
source

sphere-lattice-segclj/s

(sphere-lattice-seg n h inset wall)
source

split-displaceclj/s

(split-displace dir ref & {:keys [offset out] :or {offset 0.25}})
source

subdivclj/s

(subdiv &
        {:keys [cols rows slices num out empty?] :or {cols 1 rows 1 slices 1}})
source

subdiv-insetclj/s

(subdiv-inset & {:keys [dir inset out empty?] :or {dir :y inset 0.25}})
source

subdivide-insetclj/s

(subdivide-inset [a b c d e f g h :as points]
                 {i :inset dir :dir :or {i 0.1 dir :y}})
source

subdivide-inset___clj/s

(subdivide-inset___ [a b c d e f g h :as points]
                    {i :inset dir :dir :or {i 0.1 dir :y}})
source

union-meshclj/s

(union-mesh meshes)
(union-mesh target eps meshes)
source

walk-op-treeclj/s

(walk-op-tree f acc node depth)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close