[Draft] Extensions to Claycode
Notice: This article is comment to the claycode paper. No code yet. Each section will be updated when there is code.
Companion code repo: https://codeberg.org/iacore/claycode-1
Comment cells
Potentially ignore parts of a tree, for a free-drawing area. I think it is already supported.
- root
- comment
- actual code
Erasure coding
Do erasure coding instead of duplication for trees.
Custom layout
A bunch of points, convex hull, polygon intersection, random walk annealing
each subtree has a convex hull with padding
swap points on polygon intersection
final layout is voronoi cell based on the final points location
Custom footprint function
Assume fixed X size.
Leaf node (parent of 0): 1
Parent of 1 leaf: 9
Parent of 4 leaves: 25
Parent of 9 leaves: 49
Without going turning this into a packing problem, we will interpolate to the formula below.
fd “discount” 9->4 25->9
g(x) = sqr(sqrt(x) - 1)
Node count to area (custom footprint function)
f(x) = (2x-1)^2
Children areas applied fd + f
Custom bitstring to tree encoding
sort all trees (interleaving, since the set is infinite) by footprint.
find a new encoding
graph comparing original encoding and new encoding
custom cells layout Uniformly sample few points (poisson-disk disk sampler (biological cell)) Partition and move points inward Imagine a circle. Points on the outside move inward the most. Point at the center don’t move. Computational, think of layers of fixed sized “borders” from contour to inner. The layers shrink from x1 to x0, linearly. Any polygon can work the same
custom cell layout 2
Give an image full of contours. Keep picking a point and an angle to grow line segment from there with acceptance check.
Custom scanning
Generate a list of contours, with the image border as the root node, generate a tree-with-conflict (some siblings might clash)
Scan all codes from the tree
Adjust adjoining threshold, not scale. get contours in perceptually linear color space. Use adaptive understanding if necessary.