Nature · Test cube 38
Bamboo
Round canes side by side, with a ridge at every joint.
Nothing in nature repeats exactly. Neither do these. Relax into it.
- Prints well with a 0.4 mm nozzle.
25 mm, with your size and depth. Prints upright, no supports. About 4 MB.
- Depth as written1.3 mm
- Narrowest partabout 1.3 mm
- Smallest size, 0.4 mm nozzle× 0.95
Good for
Pen pots, chopstick rests, planters.
Print notes
- Depth 0.4 to 1.5 mm for a 0.4 mm nozzle (as written: 1.3 mm).
- Best on walls, printed upright. On a flat top, use thin layers (0.12 mm or less).
- Fade it out over the bottom 3 mm so the first layers are flat and stick to the plate.
- Not printed yet: these notes come from the geometry. The test cube will tell us more.
The formula
The real code this page runs: give it a point (U mm across, V mm up) and it returns the height there, in mm. Push the surface out by that much and the texture is real geometry.
function bamboo(U: number, V: number, w = 8.0, seg = 18.0, amp = 1.2) {
const s = frac(U / w) - 0.5;
const node = Math.exp(-(((frac(V / seg) - 0.5) / 0.035) ** 2));
return amp * (0.75 * dome((s / 0.47) ** 2) + 0.35 * node * (Math.abs(s) < 0.47 ? 1 : 0));
}The helpers it uses (frac, dome, clamp)
/** The fractional part, 0..1. */
function frac(x: number) {
return x - Math.floor(x);
}/** A round bump: 1 in the middle (r2 = 0), 0 at the edge (r2 = 1). */
function dome(r2: number) {
return Math.sqrt(clamp(1 - r2, 0, 1));
}function clamp(x: number, lo: number, hi: number) {
return Math.min(Math.max(x, lo), hi);
}Printed
Test cube 38 is waiting for the printer. Its photo goes here.