Rebuild the pepper mill as the tube it actually is: a steel collar, a recessed band of vertical flutes, a flat top and a knurled knob.

This commit is contained in:
CRTkafa 2026-09-01 06:01:43 +07:00
parent 59a4559ab2
commit 9ab88aa633
3 changed files with 189 additions and 182 deletions

View file

@ -1,6 +1,6 @@
{ {
"title": "Pepper Mill", "title": "Pepper Mill",
"description": "Turned wooden pepper mill with a fluted waist grip and a stainless hex crown. The cap is its own part hinged on the mill's axis, so the twist action grinds. The waist and its height move it from a squat bistro mill to a tall waiter's mill.", "description": "Table pepper mill: a straight tube with a polished steel collar at the base, a band of vertical flutes cut around the middle for grip, a flat top and a knurled steel knob that turns. The band is a recess with the ribs standing back out of it, so the flutes stop against a machined shoulder and the silhouette stays a clean cylinder.",
"category": "Kitchen", "category": "Kitchen",
"tags": [ "tags": [
"contemporary", "contemporary",
@ -25,25 +25,25 @@
"step": 0.001, "step": 0.001,
"unit": "m" "unit": "m"
}, },
"waist": { "bandDepth": {
"type": "number", "type": "number",
"label": "Waist", "label": "Flute depth",
"min": 0.45, "min": 0.02,
"max": 0.68, "max": 0.12,
"step": 0.01 "step": 0.005
}, },
"waistAt": { "bandAt": {
"type": "number", "type": "number",
"label": "Waist height", "label": "Band height",
"min": 0.42, "min": 0.38,
"max": 0.6, "max": 0.72,
"step": 0.01 "step": 0.01
}, },
"flutes": { "flutes": {
"type": "number", "type": "number",
"label": "Flutes", "label": "Flutes",
"min": 8, "min": 12,
"max": 28, "max": 48,
"step": 1 "step": 1
}, },
"segments": { "segments": {

View file

@ -1,36 +1,44 @@
/** /**
* @contemporary-props/pepper-mill * @contemporary-props/pepper-mill
* *
* Table pepper mill: the longest profile curve in the kit at the lowest cost, * Table pepper mill: the longest profile in the kit at the lowest cost, and
* and the first radial cut. * the first radial cut.
* *
* The body is one lathe and the whole object is decided by where that curve * SECOND VERSION, and the first one built against a photograph. The first was
* turns. Reading from the table up: a drum for the grinder housing, a turn * a turned baluster: a drum, a cove into a waist, a swell back out and a domed
* inward to the waist, a swell back out to an upper belly that stays narrower * head, with the flutes doing the work of telling you it was not a chess
* than the base, then a quick fall into the neck the cap sits over. The upper * piece. It was a good bottle. What a present-day mill actually is, is a
* belly NARROWER than the base is the load-bearing choice: make them equal and * STRAIGHT tube: one cylinder from the collar to the flat top, a polished
* the silhouette is a baluster, make the top wider and it is a chess queen * steel ring at the base, a band of vertical flutes cut around the middle for
* about to tip over. * grip, a flat top and a small knurled steel knob. There is no waist and there
* is no dome, and the profile that has neither is both simpler and right.
* *
* The flutes are what stop it reading as a chess piece even so. A lathe cannot * The flute band is the model's reason for being fourth in the build order:
* cut a groove, so the grip is built the other way round: a radial array of * the catalogue's row for it reads "the flute grip is the first radial cut",
* slim chamfered bars standing a millimetre proud of the waist. Because the * and everything after it that arrays anything around an axis copies what
* waist is the narrowest point of the profile, a straight vertical bar held at * happens here. So the band is not decoration and must not be optional in the
* a fixed radius is proud exactly in the middle and sinks into the body at * sense of being absent by default.
* both ends on its own — no cap, no fade, both ends terminate inside the *
* solid. The proud height is recomputed against the actual profile for every * The band is a RECESS with ribs standing back out of it, not ribs stuck on a
* configuration, so a fat waist under a low bulge cannot push a bar end * plain tube. Two things follow from that and both are visible. The rib ends
* through the surface. * terminate against the step at either end of the recess instead of stopping
* in mid-air, which is what a machined flute does. And the ribs stay under the
* tube's own radius, so the silhouette of the mill is a clean cylinder and the
* flutes read from shading rather than from a bumpy outline.
*
* Proportions are measured, not chosen: the reference is 3.6 diameters tall,
* the steel collar takes the bottom 0.12 of it and the flute band runs from
* 0.31 to 0.79 of the tube. The band is nearly half the height, which is far
* more than it looks like it should be until it is drawn at anything less.
* *
* Parts: `body` and `cap`. The cap is its own part with its origin at the seat * Parts: `body` and `cap`. The cap is its own part with its origin at the seat
* so `cap.anchor.rotation.y` is the grinding action, and the `twist` action * so `cap.anchor.rotation.y` is the grinding action. A smooth head would turn
* does exactly that. A turned dome is rotationally invisible, so the motion is * invisibly, so the knurl on the knob is what carries the motion.
* carried by the crown: the stainless finial nut is a 6-segment lathe — a hex
* acorn — and its facets are what you see move.
*/ */
import { type BufferGeometry } from 'three' import { type BufferGeometry } from 'three'
import { import {
bakeOcclusion,
chamferedBoxGeometry, chamferedBoxGeometry,
createKitModel, createKitModel,
createTinter, createTinter,
@ -42,15 +50,15 @@ import {
} from '../core/index.ts' } from '../core/index.ts'
export interface PepperMillConfig { export interface PepperMillConfig {
/** Overall height, finial included (metres). */ /** Overall height, knob included (metres). */
readonly height: number readonly height: number
/** Radius of the base drum (metres). */ /** Radius of the tube (metres). */
readonly baseRadius: number readonly baseRadius: number
/** Waist radius as a fraction of the base radius. */ /** How deep the flute band is cut, as a fraction of the radius. */
readonly waist: number readonly bandDepth: number
/** Where the waist sits, as a fraction of the body height. */ /** Centre of the flute band, as a fraction of the tube's height. */
readonly waistAt: number readonly bandAt: number
/** Number of grip flutes around the waist. */ /** Number of grip flutes around the band. */
readonly flutes: number readonly flutes: number
/** Sides around the revolve. */ /** Sides around the revolve. */
readonly segments: number readonly segments: number
@ -59,14 +67,19 @@ export interface PepperMillConfig {
export const pepperMillDefaults: PepperMillConfig = { export const pepperMillDefaults: PepperMillConfig = {
height: 0.23, height: 0.23,
baseRadius: 0.03, // 3.65 diameters tall, which is what the reference measures. The first
// The waist is what separates a mill from a rolling pin. Below ~0.5 it // version was 3.8 and the difference is not the point: the point is that
// reads as an hourglass, above ~0.7 the profile goes straight and the // this one is a tube and that one was a baluster.
// flutes are doing all the work alone. baseRadius: 0.0315,
waist: 0.58, bandDepth: 0.075,
waistAt: 0.5, bandAt: 0.55,
flutes: 16, // The reference carries about forty and forty is wrong here, which is the
segments: 32, // difference between copying a photograph and reading one. At prop scale a
// mill is a hundred and fifty pixels wide, half of them facing the camera:
// forty ribs is four pixels each and the band turns into a grey smear.
// Twenty-two is the same object at the size it is actually seen.
flutes: 22,
segments: 40,
seed: 23, seed: 23,
} }
@ -77,20 +90,6 @@ export interface PepperMillActions {
twist(radians?: number): void twist(radians?: number): void
} }
/** Linear read of a lathe profile at an arbitrary height. */
function radiusAt(levels: readonly Level[], y: number): number {
if (y <= levels[0]!.y) return levels[0]!.radius
for (let i = 0; i < levels.length - 1; i += 1) {
const a = levels[i]!
const b = levels[i + 1]!
if (y <= b.y) {
const t = (y - a.y) / Math.max(1e-9, b.y - a.y)
return a.radius + t * (b.radius - a.radius)
}
}
return levels.at(-1)!.radius
}
export function createModel(overrides: Partial<PepperMillConfig> = {}) { export function createModel(overrides: Partial<PepperMillConfig> = {}) {
return createKitModel<PepperMillConfig, 'wood' | 'stainless', PepperMillParts, PepperMillActions>({ return createKitModel<PepperMillConfig, 'wood' | 'stainless', PepperMillParts, PepperMillActions>({
id: 'pepper-mill', id: 'pepper-mill',
@ -102,159 +101,167 @@ export function createModel(overrides: Partial<PepperMillConfig> = {}) {
const H = Math.min(0.45, Math.max(0.12, config.height)) const H = Math.min(0.45, Math.max(0.12, config.height))
// The radius is clamped against the height, not just on its own: a mill // The radius is clamped against the height, not just on its own: a mill
// is between roughly two and six diameters tall. Outside that band the // is between roughly two and six diameters tall. Outside that band the
// squat end turns into a jar on a pedestal and the thin end into a // squat end turns into a jar and the thin end into a taper candle.
// taper candle, and both were seen in a render before this clamp.
const R = Math.min(H * 0.21, Math.max(H * 0.08, Math.min(0.05, Math.max(0.015, config.baseRadius)))) const R = Math.min(H * 0.21, Math.max(H * 0.08, Math.min(0.05, Math.max(0.015, config.baseRadius))))
const segments = Math.max(12, Math.round(config.segments)) const segments = Math.max(12, Math.round(config.segments))
const waistFraction = Math.min(0.68, Math.max(0.45, config.waist)) const flutes = Math.max(12, Math.min(64, Math.round(config.flutes)))
const waistAt = Math.min(0.6, Math.max(0.42, config.waistAt)) const bandDepth = Math.min(0.12, Math.max(0.02, config.bandDepth))
const flutes = Math.max(8, Math.min(28, Math.round(config.flutes))) const bandAt = Math.min(0.72, Math.max(0.38, config.bandAt))
// The cap takes the top ~16% of the height and overlaps the neck by a /* ------------------------------------------------------------ layout */
// few millimetres, so the parting line is a step rather than a seam of // Read bottom up, all as fractions of the whole height: the steel collar
// two coplanar rings. // covers the grinder housing, the tube runs to the seat, the cap disc
const bodyH = H * 0.84 // sits on the seat and the knob stands on the disc.
const seat = bodyH - 0.004 const collarH = H * 0.12
const knobH = H * 0.042
const capDisc = H * 0.028
const seat = H - knobH - capDisc
const bodyH = seat
const W = R * waistFraction const bandHalf = bodyH * 0.24
const waistY = bodyH * waistAt const bandLo = bodyH * bandAt - bandHalf
// The grip is a band, not a point: the waist holds its radius for a const bandHi = bodyH * bandAt + bandHalf
// stretch so the flutes sit on something, and the cove into and out of const recessR = R * (1 - bandDepth)
// it is what makes the profile a mill rather than a bottle.
const bandHalf = bodyH * 0.09
// The upper belly is clearly SMALLER than the drum: the masses must
// step down going up — drum, belly, head — or the object turns into a
// chess bishop. It still follows the waist up when the waist is fat, so
// the swell never dips below the flute tops.
const upperR = R * Math.max(0.72, waistFraction * 1.08)
const upperY = bodyH * 0.74
/* ------------------------------------------------------------- body */ /* -------------------------------------------------------------- tube */
const waistLo = waistY - bandHalf // A step at each end of the recess rather than a ramp: the flutes have
const waistHi = waistY + bandHalf // to stop against something, and on the reference they stop against a
// The shoulder backs off when the waist sits low, so the cove into the // machined shoulder you can see the shadow of.
// grip keeps some run and the drum does not turn into a pedestal.
const shoulderY = Math.min(bodyH * 0.3, waistLo - bodyH * 0.08)
const drumTop = shoulderY - bodyH * 0.1
const bodyLevels: Level[] = [ const bodyLevels: Level[] = [
{ y: 0, radius: R * 0.97 }, { y: 0, radius: R },
// Crisp foot, same reasoning as the vase: the profile must leave the { y: bandLo - 0.0008, radius: R },
// table vertically or the mill looks like it is sinking into it. { y: bandLo, radius: recessR },
{ y: 0.005, radius: R }, { y: bandHi, radius: recessR },
// The grinder drum: a near-cylinder, because that is the one straight { y: bandHi + 0.0008, radius: R },
// stretch a mill has and softening it is what turned the first render { y: bodyH - 0.0012, radius: R },
// into a crayon. // The top edge is broken, not sharp: a tube cut off square catches a
{ y: drumTop, radius: R * 0.985 }, // white line along its rim from every angle.
{ y: shoulderY, radius: R * 0.93 }, { y: bodyH, radius: R * 0.988 },
{ y: (shoulderY + waistLo) / 2, radius: ((R * 0.93 + W) / 2) * 1.015 },
{ y: waistLo, radius: W * 1.01 },
{ y: waistY, radius: W },
{ y: waistHi, radius: W * 1.01 },
// The rise off the grip band is deliberately quick, so the flute bar
// ends go under the surface within a couple of millimetres.
{ y: waistHi + (upperY - waistHi) * 0.4, radius: ((W + upperR) / 2) * 1.02 },
{ y: upperY, radius: upperR },
{ y: bodyH * 0.83, radius: upperR * 0.9 },
// The throat: the belly turns in to a short neck the cap's lip steps
// out over, so the parting line reads as a groove under the head.
{ y: bodyH * 0.91, radius: R * 0.56 },
{ y: bodyH, radius: R * 0.52 },
] ]
const woodBase = tint('wood', jitter(random, 0.02)) const woodBase = tint('wood', jitter(random, 0.02))
const pieces: BufferGeometry[] = [ const pieces: BufferGeometry[] = [
latheGeometry(bodyLevels, segments, [0, 0, 0], woodBase, { latheGeometry(bodyLevels, segments, [0, 0, 0], woodBase, {
colourTop: tint('wood', 0.04), colourTop: tint('wood', 0.035),
capBottom: true, capBottom: true,
capTop: true, capTop: true,
}), }),
] ]
/* ----------------------------------------------------------- flutes */ /* ------------------------------------------------------------ flutes */
// Half the vertical span of a flute bar: the grip band plus enough of // The ribs come back out of the recess and stop just under the tube's
// the cove beyond it for the profile to rise over the bar ends. // own flats. Under, not level: a revolve of `segments` sides has its
const fluteHalf = bodyH * 0.13 // faces at R·cos(pi/segments), and a rib reaching exactly that height
// How far a bar stands proud of the waist. Capped by the profile: the // fights the flat it is sitting on.
// bar ends must stay under the surface, including the flat-to-flat
// shrink of the revolve's polygon.
const inscribed = Math.cos(Math.PI / segments) const inscribed = Math.cos(Math.PI / segments)
const endRadius = Math.min( const ribOuter = R * inscribed * 0.99
radiusAt(bodyLevels, waistY - fluteHalf), const ribDepth = Math.max(0.0004, ribOuter - recessR)
radiusAt(bodyLevels, waistY + fluteHalf), // Nearly touching: the grip reads from the narrow dark gaps between the
) * inscribed // ribs, not from the ribs themselves.
const proud = Math.max(0.0005, Math.min(R * 0.04, endRadius - W - 0.0005)) // 0.78 of the pitch: wide ribs and narrow grooves, the way a machined
const depth = R * 0.22 // grip goes. At 0.66 the lit faces came out narrower than the shadows
// Nearly touching: the grip reads from the narrow dark gaps between // between them and the band read as a picket fence.
// ridges, not from the ridges themselves. const ribWidth = Math.min((2 * Math.PI * recessR) / flutes * 0.78, R * 0.2)
const barWidth = Math.min((2 * Math.PI * W) / flutes * 0.72, R * 0.2) const ribCentre = recessR + ribDepth / 2
const barCentreRadius = W + proud - depth / 2
for (let i = 0; i < flutes; i += 1) { for (let i = 0; i < flutes; i += 1) {
const angle = (i / flutes) * Math.PI * 2 const angle = (i / flutes) * Math.PI * 2
const bar = chamferedBoxGeometry( const rib = chamferedBoxGeometry(
[barWidth, depth], [ribWidth, ribDepth],
[barWidth, depth], [ribWidth, ribDepth],
fluteHalf * 2, bandHi - bandLo,
Math.min(0.0008, barWidth * 0.25), Math.min(0.0005, ribWidth * 0.22),
[0, 0, 0], [0, 0, 0],
// Subtle: the flutes are turned from the same blank as the body, // Turned from the same blank as the tube, so they may not jump in
// so they may not jump in tone. Relief and occlusion carry them. // tone. Relief and occlusion carry them.
tint('wood', jitter(random, 0.015)), tint('wood', jitter(random, 0.012)),
) )
// Built at the origin, turned, then carried out to the waist. rib.rotateY(angle)
bar.rotateY(angle) rib.translate(
bar.translate(Math.sin(angle) * barCentreRadius, waistY, Math.cos(angle) * barCentreRadius) Math.sin(angle) * ribCentre,
pieces.push(bar) (bandLo + bandHi) / 2,
Math.cos(angle) * ribCentre,
)
pieces.push(rib)
} }
/* -------------------------------------------------------------- cap */ /**
// Everything below is LOCAL to the seat: the part's origin sits there * Darken what the ribs shade, before anything is merged.
// so rotation.y grinds. *
const capH = H - seat * Vertical ribs on a vertical tube are the one case where relief alone
const domeH = capH * 0.6 * does nothing: every rib and every groove between them faces the light
const capLevels: Level[] = [ * at the same angle, so a band with a millimetre and a half of real
{ y: 0, radius: R * 0.55 }, * relief still rendered as pale stripes. What separates them on the
// The lip rolls out well past the neck so the cap reads as a * reference is not the highlight, it is the dark in the bottom of each
// separate piece that comes off, not a continuation of the profile. * groove. This is the kit's first use of it and it is the reason the
{ y: 0.004, radius: R * 0.6 }, * band reads at all.
// The head swells a touch before rounding over: a straight-sided cap */
// read as a bottle top, and this is the swell that makes it a turban. bakeOcclusion(pieces, { strength: 0.5 })
{ y: domeH * 0.3, radius: R * 0.61 },
{ y: domeH * 0.6, radius: R * 0.55 }, /* ------------------------------------------------------------ collar */
{ y: domeH * 0.85, radius: R * 0.42 }, // Proud of the tube by a hair, which is what makes it read as a ring
{ y: domeH, radius: R * 0.32 }, // fitted over the bottom rather than as a painted stripe.
const collarLevels: Level[] = [
{ y: 0, radius: R * 0.985 },
{ y: 0.0012, radius: R * 1.012 },
{ y: collarH - 0.0012, radius: R * 1.012 },
{ y: collarH, radius: R * 0.998 },
] ]
const dome = latheGeometry(capLevels, segments, [0, 0, 0], tint('wood', jitter(random, 0.02)), { pieces.push(latheGeometry(
collarLevels, segments, [0, 0, 0],
tint('stainless', jitter(random, 0.02), 0.5),
{ colourTop: tint('stainless', 0.03, 0.5), capBottom: true },
))
/* --------------------------------------------------------------- cap */
// Everything below is LOCAL to the seat: the part's origin sits there so
// rotation.y grinds.
const discLevels: Level[] = [
{ y: 0, radius: R * 0.985 },
{ y: 0.0008, radius: R },
{ y: capDisc - 0.0012, radius: R },
{ y: capDisc, radius: R * 0.988 },
]
const disc = latheGeometry(discLevels, segments, [0, 0, 0], tint('wood', jitter(random, 0.02)), {
colourTop: tint('wood', 0.05), colourTop: tint('wood', 0.05),
capBottom: true, capBottom: true,
capTop: true, capTop: true,
}) })
// The crown: a hex acorn, 6 segments on purpose. Its base is sunk into // The knurled knob. Its sides are a radial array too, at a pitch fine
// the dome, its facets are what make the twist visible. // enough to read as knurling rather than as a nut, and it is the only
const nutR = R * 0.22 // thing on the mill whose rotation is visible.
const nutLevels: Level[] = [ const knobR = R * 0.28
{ y: domeH - 0.003, radius: nutR * 0.72 }, const knurl = Math.max(10, Math.round(knobR / R * 40))
{ y: domeH + 0.0008, radius: nutR }, const knobLevels: Level[] = [
{ y: capH * 0.87, radius: nutR }, { y: capDisc - 0.002, radius: knobR * 0.55 },
{ y: capH * 0.95, radius: nutR * 0.7 }, { y: capDisc + 0.0015, radius: knobR },
{ y: capH, radius: nutR * 0.36 }, { y: capDisc + knobH * 0.82, radius: knobR },
{ y: capDisc + knobH * 0.93, radius: knobR * 0.86 },
{ y: capDisc + knobH, radius: knobR * 0.62 },
] ]
const nut = latheGeometry(nutLevels, 6, [0, 0, 0], tint('stainless', jitter(random, 0.02), 0.5), { const knob = latheGeometry(
colourTop: tint('stainless', 0.04, 0.5), knobLevels, knurl, [0, 0, 0],
capBottom: true, tint('stainless', jitter(random, 0.02), 0.5),
capTop: true, { colourTop: tint('stainless', 0.05, 0.5), capBottom: true, capTop: true },
}) )
// 40 degrees: the revolve and the dome smooth, the foot, the lip, the // 40 degrees: the revolve smooths, and the collar step, the recess
// flute chamfers and the hex facets all turn harder than that and stay // shoulders, the rib chamfers and the knurl facets all turn harder than
// edges. // that and stay edges.
return { return {
body: { slot: 'wood' as const, geometry: smoothNormals(mergeColoured(pieces), 40) }, body: {
slot: 'wood' as const,
geometry: smoothNormals(mergeColoured(pieces.slice(0, pieces.length - 1)), 40),
extras: [{
slot: 'stainless' as const,
geometry: smoothNormals(mergeColoured([pieces[pieces.length - 1]!]), 30),
}],
},
cap: { cap: {
slot: 'wood' as const, slot: 'wood' as const,
geometry: smoothNormals(mergeColoured([dome]), 40), geometry: smoothNormals(mergeColoured([disc]), 40),
extras: [{ slot: 'stainless' as const, geometry: smoothNormals(mergeColoured([nut]), 30) }], extras: [{ slot: 'stainless' as const, geometry: smoothNormals(mergeColoured([knob]), 30) }],
origin: [0, seat, 0] as const, origin: [0, seat, 0] as const,
}, },
} }

View file

@ -116,7 +116,7 @@ const HINT: Record<string, string> = {
'ceramic-vase': 'a plain glazed ceramic vase, empty, with no flowers in it', 'ceramic-vase': 'a plain glazed ceramic vase, empty, with no flowers in it',
'coffee-mug': 'a plain glazed stoneware coffee mug with a loop handle, empty, seen so the handle is to one side', 'coffee-mug': 'a plain glazed stoneware coffee mug with a loop handle, empty, seen so the handle is to one side',
'wine-glass': 'an empty stemmed wine glass in clear glass', 'wine-glass': 'an empty stemmed wine glass in clear glass',
'pepper-mill': 'a contemporary table pepper mill of current design, stainless steel and wood, with a machined ribbed grip band around its waist, a steel knob on top and the grinder collar at its base', 'pepper-mill': 'a contemporary table pepper mill of current design: a straight cylindrical body, a flat top with a small knurled steel knob, a polished steel grinder collar at the base, and a band of VERTICAL machined flutes cut around the middle of the body for grip. The flutes run up and down, not around',
'stockpot': 'a stainless steel lidded stockpot with two riveted side handles', 'stockpot': 'a stainless steel lidded stockpot with two riveted side handles',
'traffic-cone': 'an orange PVC traffic cone with a white reflective band, on its square base', 'traffic-cone': 'an orange PVC traffic cone with a white reflective band, on its square base',