---
id: "rotation-minimizing-frames"
title: "Rotation-Minimizing Frames"
domain: "geometry"
stage: "geometry"
realtime: "realtime"
platforms: [cpu, webgl2, webgpu, desktop-gpu, blender, unity]
year_introduced: 2008
inputs: [curves]
outputs: [mesh, normals]
style: "both"
dynamic: "both"
cost: "cheap"
authority: "Wang et al., 2008"
url: "https://texelatlas.vercel.app/t/rotation-minimizing-frames/"
sources_verified_at: "2026-11-29"
---
# Rotation-Minimizing Frames (Wang et al., 2008)

> Builds a frame (tangent, normal, binormal) along a 3D curve that twists as little as possible, so tubes, ribbons and sweeps do not flip or spin. Computed with the double-reflection method.

## Reach for it when

- tube or ribbon along a curve twists or flips
- cables and roads spin unexpectedly along splines
- camera on a path rolls unpredictably
- need stable orientation for sweeping geometry along a curve

## How it works

The Frenet frame uses curvature direction as the normal, which flips at inflection points and is undefined on straight segments. A rotation-minimizing frame keeps the normal as close to parallel transport as possible. The double reflection method does this iteratively from sampled points: given frame i with tangent t_i and normal r_i, reflect through the plane perpendicular to the chord between point i and i+1, then reflect again through the plane that maps the reflected tangent to the next tangent. The two reflections yield r_{i+1} with almost no extra twist and fourth-order accuracy. Closed curves need a residual twist correction distributed along the curve so the end frame matches the start. Sweeping a profile along these frames produces tubes and extrusions.

## When to use it

Choose it for tubes, cables, roads, plant stems and camera paths along a spline where you want stable orientation. Prefer a Frenet frame only for planar curves with consistent curvature, and an explicit up-vector or user-set twist keyframes when the artist needs control of roll, such as roller coaster rails.

## Cost

cheap — Constant work per sample point; two reflections.
Measured GPU Weight: 47.85× baseline (heavy) — 1.5742 ms median / 1.7003 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 35.58× baseline (heavy) — 0.5658 ms median (2.78× faster on L4).
Ampere A100 scaling: 27.54× baseline (heavy) — 0.7931 ms median (1.98× faster on A100).

## Failure modes

- Parallel transport accumulates twist on closed curves, leaving a seam unless corrected
- Frames are path-dependent: reversing the curve gives different frames
- Coarse sampling at high curvature loses accuracy
- Cannot satisfy a required roll such as a banked rail without a twist function

## Engine support

- babylonjs: builtin — `new BABYLON.Path3D(points) computes smooth tangent, normal, and binormal frames along a 3D curve` (evidence: https://github.com/BabylonJS/Babylon.js/blob/9.38.0/packages/dev/core/src/Maths/math.path.ts, checked 2026-12-01)
- godot: builtin — `Curve3D.up_vector_enabled = true (Curve3D::_bake computes a Parallel Transport Frame along baked points)` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/scene/resources/curve.cpp, checked 2026-12-01)
- threejs: builtin — `curve.computeFrenetFrames(segments, closed)` (evidence: https://github.com/mrdoob/three.js/blob/r187/src/extras/core/Curve.js, checked 2026-12-01) — Parallel-transport frames, used by TubeGeometry.

## Dataflow

- Inputs: curves
- Outputs: mesh, normals
- Platforms: cpu, webgl2, webgpu, desktop-gpu, blender, unity

## Presets

### Rotation-minimizing frames (left) vs Frenet normals (right) along a space curve (glsl-fragment; rendered 2026-11-29)

```json
{
  "STEPS": 56,
  "RIB": 0.07
}
```

```glsl
// Frames along a space curve (orthographic view): left = double-reflection rotation-minimizing frame, right = Frenet normals.
const int STEPS = 56;
const float RIB = 0.07;
vec3 curve(float s) { return vec3(cos(s), sin(s), 0.55 * sin(3.0 * s)); }
vec3 tang(float s) { return normalize(vec3(-sin(s), cos(s), 1.65 * cos(3.0 * s))); }
vec3 acc(float s) { return vec3(-cos(s), -sin(s), -4.95 * sin(3.0 * s)); }
vec2 proj(vec3 p) { return vec2(p.x * 0.866 - p.y * 0.5, p.z * 0.9 + (p.x * 0.5 + p.y * 0.866) * 0.45); }
float segd(vec2 p, vec2 a, vec2 b) {
    vec2 pa = p - a, ba = b - a;
    return length(pa - ba * clamp(dot(pa, ba) / max(dot(ba, ba), 1e-6), 0.0, 1.0));
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord / iResolution.xy;
    bool R = uv.x < 0.5;
    vec2 q = (vec2(fract(uv.x * 2.0), uv.y) - 0.5) * 3.0 * vec2(1.0, 1.0) / 1.25;
    float dc = 1e9, dr = 1e9; float hue = 0.0;
    vec3 x0 = curve(0.0), t0 = tang(0.0);
    vec3 r0 = normalize(cross(t0, vec3(0, 0, 1)));
    vec2 prev = proj(x0);
    for (int i = 1; i <= STEPS; i++) {
        float s = 6.2831853 * float(i) / float(STEPS);
        vec3 x1 = curve(s), t1 = tang(s);
        vec3 v1 = x1 - x0; float c1 = dot(v1, v1);
        vec3 rL = r0 - (2.0 / c1) * dot(v1, r0) * v1, tL = t0 - (2.0 / c1) * dot(v1, t0) * v1;
        vec3 v2 = t1 - tL; float c2 = dot(v2, v2);
        vec3 r1 = c2 > 1e-9 ? rL - (2.0 / c2) * dot(v2, rL) * v2 : rL;
        vec3 a = acc(s); vec3 nf = normalize(a - dot(a, t1) * t1);
        vec3 nn = R ? r1 : nf;
        vec2 p1 = proj(x1);
        dc = min(dc, segd(q, prev, p1));
        float dd = segd(q, p1 - proj(nn * RIB), p1 + proj(nn * RIB));
        if (dd < dr) { dr = dd; hue = float(i) / float(STEPS); }
        prev = p1; x0 = x1; t0 = t1; r0 = r1;
    }
    vec3 col = vec3(0.05, 0.06, 0.09) + 0.03 * uv.y;
    col = mix(col, vec3(0.8), smoothstep(0.012, 0.006, dc));
    vec3 rc = 0.5 + 0.5 * cos(6.2831 * (hue + vec3(0.0, 0.33, 0.67)));
    col = mix(col, rc, smoothstep(0.009, 0.005, dr));
    col = mix(col, vec3(1.0), smoothstep(0.003, 0.0, abs(uv.x - 0.5)));
    fragColor = vec4(pow(col, vec3(0.8)), 1.0);
}

```

Attribution: written for this index

## Combines with

- [Marching Cubes](https://texelatlas.vercel.app/t/marching-cubes.md): Sweep tubes into a volume or SDF and re-mesh with marching cubes for unions of tubes.
- [Catmull-Clark Subdivision](https://texelatlas.vercel.app/t/catmull-clark-subdivision.md): The swept tube grid can be a subdivision cage.

## Combination ideas

- [Overgrown grammar cities](https://texelatlas.vercel.app/ideas/ivy-on-grammar-architecture/)

## Sources

1. [primary] Wenping Wang, Bert Jüttler, Dayue Zheng, Yang Liu (2008) Computation of rotation minimizing frames. ACM Transactions on Graphics. https://doi.org/10.1145/1330511.1330513 (verified via crossref on 2026-11-29)
2. [implementation] mrdoob (2010) mrdoob/three.js. https://github.com/mrdoob/three.js License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "Rotation-Minimizing Frames." https://texelatlas.vercel.app/t/rotation-minimizing-frames/ (accessed 2026-12-01).
