Shapes & spaces

Minimum snap polynomial trajectory calculator through timed waypoints

Fit timed septic waypoint trajectories minimizing integrated squared snap, with derivative continuity checks.

Your numbers

Valid JSON. Waypoints are rows of1–3 coordinates; one positive time per segment; derivative arrays order v,a,j.
Valid JSON; preserve the shown array or object structure.
Valid JSON; preserve the shown array or object structure.
Valid JSON; preserve the shown array or object structure.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Snap is the fourth time derivative of position. Penalizing its squared integral discourages abrupt changes in jerk and is useful when a smooth timed path matters. The calculation chooses polynomial coefficients subject to the supplied waypoint and continuity constraints.

THE FORMULAEach segmentdegree7 p(t)=sum c_k t^k inlocalphysicaltime. Snap HessianQkl=(k)_4(l)_4 T^(k+l-7)/(k+l-7) for k,l>=4, zerootherwise (objectivec^TQc). Fixwaypointpositionsbothsides, endpointv/a/j andintersegmentv/a/jcontinuity; solveKKT[2Q,A^T;A,0][c,lambda]=[0,b]. Needindependentconstraints orrankawareKKT. Fixedtimes objectiveconvexsemidefinite andconstraintsremovefreepolymodes; provideconstraintresidual,objective, dualstationarity. ExactrationalT anddata allow rationalKKT; floatconditioningwithscaledtime acceptableifdeclared.

A worked example

With the prefilled inputs, snapIntegral = 100799.99999999601. Waypoints are rows of1–3 coordinates; one positive time per segment; derivative arrays order v,a,j.

Good to know

Degree7 polynomials in local physical segment time,ascending coefficients; fixed waypoint positions,endpoint v/a/j and internal continuity through jerk. No collision,actuator or acceleration constraints.

Why minimize snap

Snap is the fourth time derivative of position. Penalizing its squared integral discourages abrupt changes in jerk and is useful when a smooth timed path matters. The calculation chooses polynomial coefficients subject to the supplied waypoint and continuity constraints.

A minimum-snap curve is a geometric timing construction, not a complete vehicle-control solution. A smooth path can still violate thrust, speed, obstacle or actuator limits. Those limits need their own model and are not certified merely by a low snap objective.

Minimum snap polynomial trajectory calculator through timed waypointsMinimum snap: a one-second unit displacement01 s1p(t) = 35t⁴ − 84t⁵ + 70t⁶ − 20t⁷v = a = j = 0 at both ends; ∫snap²dt = 100800
Scroll across to see the full diagram.
The plotted seventh-degree polynomial is evaluated directly from its exact coefficients. It satisfies position0→1 and zero velocity, acceleration and jerk at both ends; its squared-snap integral is100800.

Compare with the Natural cubic spline interpolation calculator. Minimize integratedsquaredfourthderivative with timedwaypoints andvelocity/accelerationcontinuity; ordinarycubicspline minimizesadifferentorderanddoesnotimposethesameendpointjetconstraints.

Waypoints and segment times

Waypoints are rows of1–3 coordinates; one positive time per segment; derivative arrays order v,a,j.Enter positions for each waypoint and a positive duration no greater than one hundred for every segment, with at most ten segments and one through three spatial axes. The same durations are used on all axes. Position coordinates carry distance units, while durations carry time units; derivatives and the objective inherit powers of those choices.

Endpoint velocity, acceleration and jerk conditions remove ambiguity about how the motion starts and finishes. Interior derivatives are usually chosen by the optimizer while remaining continuous. Constraining every interior derivative independently changes the feasible set and can remove the optimization freedom.

A quadratic coefficient problem

A degree-seven polynomial has eight coefficients per axis and segment. Differentiating it four times makes snap a cubic. Integrating products of these cubic terms gives a quadratic objective with an explicit block for each segment duration.

Waypoint values and derivative continuity are linear equations in those coefficients. Combining the quadratic objective with the equality constraints produces a KKT system. Its residuals should be checked directly, rather than accepting any linear-solver output as an optimal trajectory.

Continuity across a waypoint

Both adjacent pieces must reach the same entered waypoint at the joining time. Their velocity, acceleration and jerk also match under the stated smoothness constraints. Snap itself need not be forced continuous unless that extra condition is explicitly included.

Local segment time must be converted consistently when evaluating derivatives. Coefficients written in normalized time have different derivative scale factors from coefficients written in physical seconds. A missing duration power can make the plotted path correct while its reported objective is wrong.

A single-segment worked polynomial

For a one-second move from zero to one with zero velocity, acceleration and jerk at both ends, the polynomial is 35t to the fourth minus 84t to the fifth plus 70t to the sixth minus 20t to the seventh.

Substitution verifies all eight endpoint conditions. Its integrated squared snap is 100800 in the corresponding distance-squared per time-to-the-seventh units. This exact case checks coefficients, derivative factors and the objective without requiring another numerical optimizer.

Inspecting the certificate and plots

The coefficient table should state its local-time origin and basis ordering. A useful static figure shows position together with derivative traces, marking waypoint times. This reveals a discontinuity that a position-only curve can conceal.

The returned maximum equality residual documents endpoint and joining accuracy. A separate KKT stationarity residual is not returned, so the content should not suggest that users can inspect one in the output. A small objective by itself is not a certificate: the zero curve also has zero snap but generally misses the requested waypoints. Segment coefficients use local physical time starting at zero for each segment. Evaluating a later segment at accumulated global time would give the wrong position and derivative. Convert to local time before substitution. Rescaling all durations changes derivatives and the snap objective substantially, even though the waypoint positions remain fixed. The optimization therefore treats the supplied durations as model inputs rather than free variables.

Conditioning and physical interpretation

Very short segments or large duration ratios can make unscaled polynomial systems poorly conditioned. Time normalization and a careful solve can improve numerical behavior. The current engine uses floating arithmetic rather than exact rational elimination. Exact closed-form examples such as the single-segment polynomial remain independent validation targets, while numerically unresolved duration ratios must be rescaled or rejected.

If the constraints are inconsistent or the KKT system remains unresolved, the result must say so. The page does not choose segment times automatically, avoid obstacles, or guarantee dynamic feasibility. It solves the fixed-time equality-constrained polynomial problem described by the inputs. Degree7 polynomials in local physical segment time,ascending coefficients; fixed waypoint positions,endpoint v/a/j and internal continuity through jerk. No collision,actuator or acceleration constraints.

A few questions, answered

Is a minimum-snap path automatically flyable?

No; actuator, collision and dynamic constraints are outside this fixed-time polynomial problem.

Why use degree seven?

It supplies eight coefficients, matching position and the first three derivatives at both ends of a segment.

Must snap itself be continuous?

Not under the stated position-through-jerk constraints; it requires an additional condition if desired.

Why does changing duration strongly change the objective?

Snap scales with the fourth inverse power of time, and its squared integral scales with time to the minus seventh.

Find your calculator

Start typing to explore the library.