Grip · Test cube 29
Tire tread
Chevron blocks with a channel down the middle.
I never let go of the plate. These never let go of your hand.
- 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.6 mm
- Smallest size, 0.4 mm nozzle× 0.75
Good for
Toy wheels, grippy bands, rugged desk pieces.
Print notes
- Depth 0.4 to 1.5 mm for a 0.4 mm nozzle (as written: 1.3 mm).
- It has an up and a down: print it on a wall the way it is drawn here (the top of the picture is up).
- 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 tireTread(U: number, V: number, p = 10.0, amp = 1.3) {
const s = frac((V + 4 * tri(U / 20)) / p);
const groove = Math.abs(frac(U / 20) - 0.5) > 0.04 ? 1 : 0; // a channel down the middle
return amp * clamp(Math.min(s, 0.62 - s) / 0.08, 0, 1) * groove;
}The helpers it uses (frac, tri, clamp)
/** The fractional part, 0..1. */
function frac(x: number) {
return x - Math.floor(x);
}/** A triangle wave: 0..1..0. */
function tri(x: number) {
return 1 - 2 * Math.abs(frac(x) - 0.5);
}function clamp(x: number, lo: number, hi: number) {
return Math.min(Math.max(x, lo), hi);
}Printed
Test cube 29 is waiting for the printer. Its photo goes here.