Last modified: 2025-05-21 14:32:14
< 2025-05-11Back to Isoform today. Where did I get up to?
I think I was about to try and implement o3's "masked clones" blending method from 2025-04-26.
I think one issue with it is that it will "leak" blends past the edge of the blended objects by a distance equal to the blend radius.
But ignore that for now, let's at least see that problem.
I have changed TreeRewriter
so that it turns blends into
TubeNode
s with masks.
For some reason the "mask" reference of the normalised TubeNode
is always null.
Ah! It's because TreeRewriter
turns everything into "just this one"
clones, and a normalised Union of no children is null. OK.
Change N.treeNode.cloneWithSameIds()
to TreeRewriter.toTreeNode(N)
.
Undo is broken.
OK I have the masked blend thing working for the (admittedly easy) case of rounding the corners of a cube. It doesn't leak the blend into the surrounding space, not 100% sure why. The join between blends is not great:
Why am I having so much trouble with this?
The intersection surface is the point where both of the functions give 0.
abs(f)
gives the unsigned distance to the surface.
The "tube" is the region of space where the distance to the surface
of both functions
is less than or equal to the blend radius. Or max(abs(f1),abs(f2))-r
.
Then intersect each child with the tube to find the part of that child
that is blendable, and blend the two children together with
either structmin
or structmax
depending on whether the mask is
a Union or Intersection.
I could normalise the tree so that it only ever contains Unions, on the basis that:
max(a,b) = -min(-a,-b)
And then our tree only has modifiers, primitives, and min
.
I think when we grab out the child nodes to give to TubeNode
, we need
to be applying all of the modifiers between the common ancestor and
the leaf node. Not just the modifiers that apply directly to the leaf.
Can we always push all modifiers down to leaf nodes in general? Should we?
No we can't, because -min(a,b)
is different to min(-a,-b)
.
But we can collect up all the modifiers for the specific case of doing blends.
And now it is working a bit better, but we do see the blend leakage I was talking about:
So now what?
One idea is we just ditch targeted blends entirely and say that you have to construct blends by setting combinator parameters. But that totally sucks.
Masked clones doesn't work because it leaks the blend tubes outside the surface.
Tree rewriting doesn't work because it's not always possible to rewrite the tree to satisfy all requested blends.
Switching blend parameters based on surface id doesn't work because it makes discontinuous fields.
So I guess paths from here are:
I laminated the offcuts of the dial using the "plymetal technique" from https://incoherency.co.uk/blog/stories/heart-decoration.html to make some 6mm brass sheet stock.
It isn't very well joined at the "tips" but the middle was clamped in the vice while the solder was still wet and looks to have come together pretty well. So hopefully I can get a 6mm thick gnomon out of this.
I need to measure it to ensure it is quite close to 6mm thick. If it is too thick then obviously I can machine it down. If it is too thin I don't know what to do. But it needs to be about the right thickness otherwise all the shadows will fall in the wrong places.
< 2025-05-11