Closed bathoorn closed 4 months ago
And the code of the snapshots
export async function tetra1() {
return renderWorld(
geoTetrahedralLee()
.parents([-1, 3, 1, 2])
.rotate([115, -54.735610317245346, 90])
.precision(0.1)
.fitSize([width, height], { type: "Sphere" })
);
}
export async function tetra2() {
return renderWorld(
geoTetrahedralLee()
.parents([2, -1, 3, 0])
.angle(90)
.rotate([115, -54.735610317245346, 90])
.precision(0.1)
.fitSize([width, height], { type: "Sphere" })
);
}
export async function tetra3() {
return renderWorld(
geoTetrahedralLee()
.parents([3, 0, -1, 1])
.angle(-30)
.rotate([115, -54.735610317245346, 90])
.precision(0.1)
.fitSize([width, height], { type: "Sphere" })
);
}
export async function tetra4() {
return renderWorld(
geoTetrahedralLee()
.parents([1, 2, 0, -1])
.angle(210)
.rotate([115, -54.735610317245346, 90])
.precision(0.1)
.fitSize([width, height], { type: "Sphere" })
);
}
Are you generating an isolated face? I believe you can solve this with leeRaw directly—without having to go through the polyhedral transform.
However, I do understand adding a parents method if the goal is to detach a side triangle and reattach it to another side, like so:
▲
△▽△ => △▽△▼
Yes i was trying to get isolated faces so i can get them in the laser cutter easier. For most of the other polyhedrons this worked but tetrahedralLee did not support the parents. This indeed also allows different cofigurations which might save on wood when cutting.
I will see if i can also get this to work with leeRaw.
that is a nice one recreating it with the voronoi function.
works great!
I got some little artifacts in the red lines but that is something i do myself using geoInterpolate to draw all the edges of all the faces.
Yes, the raw projection is quite unstable at this vertex — you can use a straight line connecting the projected vertices rather than line interpolation.
this is what i used it for :)
Hi,
i made some changes to TetrahedralLee so i can add parents and it also supports setting the root of the tree in other places than faces[0]. I added it to my fork here if you want to see.
Here are some images created whith the snapshot unittests
i also tried generating svg's but that is not working flawless yet.