(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.
(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]
(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`.
(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-node _ op)
Returns same node with new operator node attached
Returns same node with new operator node attached
(face-vertices _ face)
Returns vertices for given face ID
Returns vertices for given face ID
(tree-depth _)
Returns the node's tree depth
Returns the node's tree depth
(operator-node _)
Returns related node from operator tree
Returns related node from operator tree
(face-topology _)
Returns number of vertices used for each face in the node
Returns number of vertices used for each face in the node
(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.
(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
(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.
(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.
(save-obj-mesh seed tree)
(save-obj-mesh seed tree path)
(save-obj-mesh seed tree path max-depth)
(save-ply-mesh seed tree)
(save-ply-mesh seed tree path)
(save-ply-mesh seed tree path max-depth)
(save-stl-mesh seed tree)
(save-stl-mesh seed tree path)
(save-stl-mesh seed tree path max-depth)
(subdivide-inset [a b c d e f g h :as points]
{i :inset dir :dir :or {i 0.1 dir :y}})
(subdivide-inset___ [a b c d e f g h :as points]
{i :inset dir :dir :or {i 0.1 dir :y}})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close