Models
human_foot.scad
Source: human_foot.scad
/**
* @file human_foot.scad
* @brief Stylized parametric human foot — teaching / visualization model.
* @author Cameron K. Brooks
* @copyright 2026
*
* Self-contained: config, parameters, and geometry all live in this file.
* Built from hulled ellipsoids — a heel + ball body, a flat-topped ankle stump,
* and five toes. Origin is at the heel centre on the ground plane (z = 0);
* +x points toward the toes, +z up, +y is medial (the hallux side).
* Modelled as a right foot.
*/
/* [Render] */
$fn = $preview ? 48 : 96;
zFite = $preview ? 0.1 : 0; // z-fighting avoidance in preview
/* [Foot] */
// Heel-back to ball-front length; toes extend beyond this [mm]
foot_length = 180;
/* [Heel] */
heel_length = 70;
heel_width = 58;
heel_height = 62;
/* [Ball] */
ball_length = 82;
ball_width = 95;
ball_height = 36;
/* [Arch] */
arch_height = 18; // medial arch lift carved into the sole [mm]
/* [Ankle] */
ankle_x = 56; // stump position, measured from the back of the heel
ankle_diameter = 64;
ankle_height = 115; // cut off flat at the top
/* [Malleoli] */
malleolus_diameter = 26; // ankle-bump size
malleolus_elong = 1.25; // vertical stretch — bumps are a bit taller than wide
malleolus_out = 24; // sideways offset of the bump centre from the ankle axis (protrudes ~10% less)
malleolus_med_z = 60; // medial (inner) bump height — sits higher
malleolus_lat_z = 48; // lateral (outer) bump height — sits lower
malleolus_shift = 6; // fore/aft: medial sits forward (+x), lateral back (-x)
/* [Toes] */
hallux_length = 42; // big-toe length; the others taper shorter
toe_diameter = 26;
toe_splay = 14; // total fan of the toe tips, degrees
toe_gap = -3; // adjacent-toe packing: centre spacing = radii sum + this; negative overlaps [mm]
/* [Toenails] */
nail_length = 0.38; // nail length as a fraction of the toe length
nail_width = 0.8; // nail width as a fraction of the toe diameter
nail_raise = 0.9; // height the nail stands proud of the toe [mm]
human_foot();
// --- geometry ----------------------------------------------------------------
module human_foot() {
//! Draw the human foot from the parameters above
heel = [heel_length, heel_width, heel_height];
ball = [ball_length, ball_width, ball_height];
heel_c = [heel_length / 2, 0, heel_height / 2]; // back of heel at x = 0
ball_c = [foot_length - ball_length / 2, 0, ball_height / 2];
// main body: heel blended into the ball, with the medial arch carved out below
difference() {
union() {
hull() {
translate(heel_c) ellipsoid(heel);
translate(ball_c) ellipsoid(ball);
}
// ankle: an instep blend ellipsoid pulled up into a flat-topped stump
hull() {
translate([ankle_x, 0, ball_height * 0.5])
ellipsoid([ankle_diameter * 1.4, heel_width * 0.95, ball_height]);
translate([ankle_x, 0, ankle_height - ankle_diameter / 2])
cylinder(d=ankle_diameter, h=ankle_diameter / 2 + zFite);
}
malleoli();
}
arch_cutter();
}
toes();
}
module malleoli() {
//! The two ankle bumps. Medial (inner, +y) is higher + forward; lateral
//! (outer, -y) is lower + further back — the anatomical asymmetry.
bump = [malleolus_diameter, malleolus_diameter, malleolus_diameter * malleolus_elong];
translate([ankle_x + malleolus_shift, malleolus_out, malleolus_med_z]) ellipsoid(bump);
translate([ankle_x - malleolus_shift, -malleolus_out, malleolus_lat_z]) ellipsoid(bump);
}
toe_count = 5; // human foot
function toe_frac(i) = toe_count > 1 ? i / (toe_count - 1) : 0; // 0 = hallux, 1 = little toe
function toe_dia_at(i) = toe_diameter * (1 - toe_frac(i) * 0.42); // size falloff toward the little toe
function toe_len_at(i) = hallux_length * (1 - toe_frac(i) * 0.30); // length falloff
// cumulative centre-to-centre offset from the hallux; spacing tracks each toe's radius
function toe_off(i) = i <= 0 ? 0 : toe_off(i - 1) + (toe_dia_at(i - 1) + toe_dia_at(i)) / 2 + toe_gap;
module toes() {
//! Five hull-of-two-spheres toes; hallux medial (+y) and largest.
//! Spacing is diameter-aware (see toe_off) so crowding is uniform fat-to-thin.
span = toe_off(toe_count - 1);
y_first = span / 2; // centre the toe fan across the ball
intersection() {
union() for (i = [0:toe_count - 1]) {
f = toe_frac(i);
d = toe_dia_at(i); // this toe's diameter
len = toe_len_at(i); // this toe's length
y = y_first - toe_off(i); // diameter-aware spread from +y (medial) to -y (lateral)
x0 = foot_length - ball_length * 0.24 - f * 6; // lateral toes set slightly back
z0 = ball_height * 0.32; // ride up near the ball front, then angle down to the tip
splay = (0.5 - f) * toe_splay; // fan the tips outward in y
hull() {
translate([x0, y, z0]) sphere(d=d * 1.05); // proximal knuckle, merges into the ball
translate([x0 + len * cos(splay), y + len * sin(splay), d / 2 * 0.85]) sphere(d=d * 0.82);
}
toenail(d, len, x0, y, z0, splay);
}
translate([foot_length, 0, ankle_height / 2])
cube([foot_length, ball_width * 2, ankle_height], center=true); // clamp toes to z >= 0 so they rest flat
}
}
module toenail(d, len, x0, y, z0, splay) {
//! Oval nail plate centred on the dorsal surface of the distal phalanx
nl = len * nail_length; // nail length along the toe
nw = d * nail_width; // nail width across the toe
nz = nail_raise + 3; // z-thickness; most of it sinks into the toe so it fuses (thin plate)
t = 1.0; // fraction along the toe (proximal 0 -> tip 1): sits on the distal phalanx, near the tip
ax = x0 + len * cos(splay);
ay = y + len * sin(splay);
az = z0 + (d / 2 * 0.85 - z0); // toe centreline
r = 0.525 * d + (0.41 * d - 0.525 * d); // toe radius at
top = az + r; // actual dorsal surface height
translate([ax, ay, top + nail_raise - nz / 2])
rotate([0, 0, splay]) ellipsoid([nl, nw, nz]);
}
module arch_cutter() {
//! Scoops the underside between heel and ball, biased medial (+y), to form the arch
x0 = heel_length * 0.6; // start just forward of the heel
x1 = foot_length - ball_length * 0.6; // stop just behind the ball
xc = (x0 + x1) / 2;
len = (x1 - x0) * 1.2; // elongated lengthwise; tapered ends keep heel + ball in contact
wid = ball_width * 0.65; // narrow trough along the medial border
yc = ball_width * 0.42; // biased medial; foot centre + lateral sole stay flat
zext = arch_height + 14; // shallow scoop; its upper dome is the arch surface
zc = arch_height - zext / 2; // top of the scoop sits at z = arch_height
translate([xc, yc, zc]) ellipsoid([len, wid, zext]);
}
module ellipsoid(dims) {
//! Axis-aligned ellipsoid spanning dims = [dx, dy, dz]
scale(dims) sphere(d=1);
}
dog_foot.scad
Source: dog_foot.scad
/**
* @file dog_foot.scad
* @brief Stylized parametric dog foot (digitigrade, front paw) — teaching model.
* @author Cameron K. Brooks
* @copyright 2026
*
* Self-contained: config, parameters, and geometry all live in this file.
* Digitigrade posture: a compact paw rests flat on the ground while a short,
* fairly upright pastern rises to the carpus, with the leg cut off flat above.
* Signature anatomy: 4 clawed digits, digital pads + a big metacarpal pad on the
* sole, a small carpal pad, and a raised dewclaw.
* Origin at the paw's ground contact (z = 0); +x forward (toes), +z up,
* +y medial. Right foot. Angles are degrees from the ground. Clamped to z >= 0.
*/
/* [Render] */
$fn = $preview ? 48 : 96;
zFite = $preview ? 0.1 : 0; // z-fighting avoidance in preview
/* [Paw] */
paw_length = 62; // fore-aft length of the paw mass
paw_width = 54; // side-to-side width
paw_height = 30; // thickness of the paw mass
paw_lift = 3; // paw mass raised so the pads protrude down to the ground (small = pads sunk in)
/* [Digits] */
digit_count = 4;
digit_length = 18; // middle digits; outer ones taper shorter
digit_diameter = 18;
digit_spread = 0.82; // fraction of paw width the digits fan across
digit_reach = 6; // how much further forward the middle digits sit
/* [Claws] */
claw_length = 12;
claw_base = 8;
claw_droop = 38; // downward tilt of the claw, degrees
/* [Pads] */
show_pads = true;
met_pad = [36, 42, 12]; // metacarpal (main) pad [len, wid, height]
digital_pad = [16, 15, 13]; // one under each digit
carpal_pad = [15, 16, 13]; // small pad on the back of the pastern
show_dewclaw = true;
/* [Pastern] */
pastern_length = 44; // short + fairly upright (digitigrade)
pastern_diameter = 36;
pastern_angle = 74; // steepness from the ground
/* [Carpus] */
joint_diameter = 34; // wrist joint
/* [Leg] */
leg_length = 55; // stump above the carpus (cut off flat)
leg_diameter = 30;
leg_angle = 84; // near-vertical, leaning slightly forward
dog_foot();
// --- geometry ----------------------------------------------------------------
// key points from the paw up to the cut leg top
pastern_base = [-paw_length * 0.18, 0, paw_lift + paw_height * 0.7];
joint_pos = pastern_base + pastern_length * [-cos(pastern_angle), 0, sin(pastern_angle)];
leg_top = joint_pos + leg_length * [cos(leg_angle), 0, sin(leg_angle)];
module dog_foot() {
//! Draw the digitigrade dog foot from the parameters above
intersection() {
union() {
paw_mass();
digits();
if (show_pads) pads();
if (show_dewclaw) dewclaw();
limb_segment(pastern_base, joint_pos, pastern_diameter * 1.1, joint_diameter); // pastern
limb_segment(joint_pos, leg_top, joint_diameter * 0.9, leg_diameter); // lower leg
}
// slab: keep ground (z >= 0) up to a flat cut at the leg top
translate([pastern_base[0], 0, leg_top[2] / 2])
cube([paw_length * 4, paw_width * 3, leg_top[2]], center=true);
}
}
module paw_mass() {
//! The chunky paw block, blended up into the pastern
hull() {
translate([0, 0, paw_lift + paw_height / 2]) ellipsoid([paw_length, paw_width, paw_height]);
translate(pastern_base) sphere(d=pastern_diameter);
}
}
// digit centreline geometry, shared by the toes and their pads
function digit_arc(i) = 1 - abs(i - (digit_count - 1) / 2) / ((digit_count - 1) / 2); // 0 outer, 1 middle
function digit_y(i) = paw_width * 0.5 * digit_spread * ((digit_count - 1) / 2 - i) / ((digit_count - 1) / 2);
function digit_len(i) = digit_length * (0.8 + 0.2 * digit_arc(i));
function digit_dia(i) = digit_diameter * (0.85 + 0.15 * digit_arc(i));
function digit_x0(i) = paw_length / 2 - digit_diameter * 0.3 + digit_arc(i) * digit_reach;
module digits() {
//! Forward-pointing clawed digits; middle two longest + furthest forward
for (i = [0:digit_count - 1]) {
d = digit_dia(i);
len = digit_len(i);
x0 = digit_x0(i);
y = digit_y(i);
ztip = d / 2 * 0.9;
hull() {
translate([x0, y, paw_lift + paw_height * 0.32]) sphere(d=d * 1.1); // knuckle into the paw
translate([x0 + len, y, ztip]) sphere(d=d); // toe tip
}
claw([x0 + len, y, ztip]);
}
}
module claw(tip, yaw = 0) {
//! A tapered claw curving down-forward from a digit tip; yaw swings it in-plane
translate(tip) rotate([0, 0, yaw]) rotate([0, 90 + claw_droop, 0])
cylinder(d1=claw_base, d2=claw_base * 0.12, h=claw_length);
}
module pads() {
//! Sole pads: one digital pad per digit, the big metacarpal pad, a carpal pad.
//! Each protrudes down to the ground; the z >= 0 clamp gives it a flat contact.
for (i = [0:digit_count - 1]) {
len = digit_len(i);
translate([digit_x0(i) + len * 0.55, digit_y(i), digital_pad[2] / 2 - 3]) ellipsoid(digital_pad);
}
translate([paw_length * 0.04, 0, met_pad[2] / 2 - 3]) ellipsoid(met_pad); // metacarpal pad
translate(pastern_base + [-pastern_diameter * 0.4, 0, -paw_lift]) // carpal pad, back of pastern
ellipsoid(carpal_pad);
}
module dewclaw() {
//! The raised inner dewclaw, up the medial (+y) side of the pastern, angled outward
base = [pastern_base[0] + 2, paw_width * 0.4, paw_lift + paw_height * 0.78]; // medial, at the paw-pastern junction
tip = base + [6, 8, -6]; // juts outward (+y) and down, set behind the digit row
hull() {
translate(base) sphere(d=digit_diameter * 0.7);
translate(tip) sphere(d=digit_diameter * 0.5);
}
claw(tip, yaw=48); // claw droops down-and-outward like the reference
}
module limb_segment(p0, p1, d0, d1) {
//! A tapered capsule (hulled spheres) between two points
hull() {
translate(p0) sphere(d=d0);
translate(p1) sphere(d=d1);
}
}
module ellipsoid(dims) {
//! Axis-aligned ellipsoid spanning dims = [dx, dy, dz]
scale(dims) sphere(d=1);
}
chicken_foot.scad
Source: chicken_foot.scad
/**
* @file chicken_foot.scad
* @brief Stylized parametric chicken foot (anisodactyl) — teaching model.
* @author Cameron K. Brooks
* @copyright 2026
*
* Self-contained: config, parameters, and geometry all live in this file.
* Anisodactyl: a tall tarsometatarsus (shank) cut off flat at the top, three
* long thin forward toes splayed on the ground, and one backward hallux — each
* toe segmented and tipped with a curved claw.
* Origin at the toe hub on the ground (z = 0); +x forward (middle toe), +z up,
* +y is one side. Angles are degrees from the ground. Clamped to z >= 0.
*/
/* [Render] */
$fn = $preview ? 40 : 88;
zFite = $preview ? 0.1 : 0; // z-fighting avoidance in preview
/* [Shank] */
shank_length = 96; // tarsometatarsus, cut off flat at the top
shank_dia_bottom = 22;
shank_dia_top = 16;
shank_angle = 82; // near-vertical, slight forward lean (degrees from ground)
/* [Hub] */
hub_size = 20; // the mass where the toes and shank meet
hub_z = 15; // height of the hub above the ground
/* [Front toes] */
toe_length = 68; // middle toe (III); the side toes scale off this
toe_diameter = 12; // thin
toe_spread = 33; // degrees each side toe splays from the middle
toe_segments = 3; // knuckle segments per toe
side_toe_scale = 0.86; // side toes (II, IV) length vs the middle
/* [Hallux] */
hallux_length = 30; // the short backward toe
hallux_diameter = 11;
/* [Claws] */
claw_length = 14;
claw_base = 7;
claw_droop = 34; // downward curl of the claw, degrees
chicken_foot();
// --- geometry ----------------------------------------------------------------
hub = [0, 0, hub_z];
shank_dir = [cos(shank_angle), 0, sin(shank_angle)];
shank_top = hub + shank_length * shank_dir;
module chicken_foot() {
//! Draw the anisodactyl chicken foot from the parameters above
intersection() {
union() {
translate(hub) ellipsoid([hub_size, hub_size * 0.9, hub_size * 0.8]); // hub
limb_segment(hub, shank_top, shank_dia_bottom, shank_dia_top); // shank
toe(0, toe_length, toe_diameter); // III, middle
toe(toe_spread, toe_length * side_toe_scale, toe_diameter * 0.95); // II, inner
toe(-toe_spread, toe_length * side_toe_scale, toe_diameter * 0.95); // IV, outer
toe(180, hallux_length, hallux_diameter); // hallux, backward
}
// slab: keep ground (z >= 0) up to a flat cut at the shank top
translate([shank_top[0], 0, shank_top[2] / 2])
cube([toe_length * 3, toe_length * 3, shank_top[2]], center=true);
}
}
module toe(ang, length, base_dia) {
//! A segmented toe running out from the hub along the ground, tipped with a claw
hub_r = hub_size * 0.35; // toe starts at the edge of the hub
ground = base_dia * 0.4; // resting height of the toe centreline near the tip
nodes = [for (s = [0:toe_segments])
let(t = s / toe_segments, rad = hub_r + length * t)
[cos(ang) * rad, sin(ang) * rad, hub_z * (1 - t) + ground * t, base_dia * (1 - 0.4 * t)]];
for (i = [0:toe_segments - 1])
hull() {
translate([nodes[i][0], nodes[i][1], nodes[i][2]]) sphere(d=nodes[i][3]);
translate([nodes[i + 1][0], nodes[i + 1][1], nodes[i + 1][2]]) sphere(d=nodes[i + 1][3]);
}
tip = nodes[toe_segments];
claw([tip[0], tip[1], tip[2]], ang);
}
module claw(tip, yaw = 0) {
//! A tapered claw curling down-forward from a toe tip; yaw aims it in-plane
translate(tip) rotate([0, 0, yaw]) rotate([0, 90 + claw_droop, 0])
cylinder(d1=claw_base, d2=claw_base * 0.12, h=claw_length);
}
module limb_segment(p0, p1, d0, d1) {
//! A tapered capsule (hulled spheres) between two points
hull() {
translate(p0) sphere(d=d0);
translate(p1) sphere(d=d1);
}
}
module ellipsoid(dims) {
//! Axis-aligned ellipsoid spanning dims = [dx, dy, dz]
scale(dims) sphere(d=1);
}