arXiv:2610.12826cs.ROOct 2026

Manuscript Offprint

arXiv:2610.12826

Cubic Spline Interpolation for Smooth Trajectory Generation in Autonomous Motion Systems

Aarush Mandayam, Sriram Aditya Gundla, Elliott Tammaro

Abstract

Trajectories for robots, drones, and other autonomous vehicles must pass through a sequence of prescribed waypoints while remaining physically realizable, meaning the underlying position signal should have continuous velocity and acceleration. Piecewise-linear interpolation between waypoints violates this requirement: velocity changes discontinuously at each waypoint, implying infinite acceleration. We describe a program that fits piecewise cubic splines to a set of waypoints specified as position-time pairs (xi,ti)(x_i, t_i), enforcing continuity of the function value, first derivative, and second derivative across segment boundaries. The spline coefficients are obtained by assembling the interpolation and continuity conditions into a single linear system and solving for the unknown coefficients directly, removing the need to derive the per-segment equations by hand. We demonstrate the approach on two illustrative tasks: generating smooth free-form paths from a sparse set of user-specified points, and reconstructing continuous digital traces of handwritten signatures from sampled pen positions. We discuss the computational cost of the direct linear-system approach relative to the classical tridiagonal (moment-based) formulation, and outline the extensions needed to apply this method to multi-axis robot and drone trajectories subject to velocity and acceleration limits.

Keywords: cubic splines, trajectory generation, motion planning, smooth interpolation, autonomous vehicles

1 Introduction

A recurring problem in robotics, computer animation, and autonomous vehicle control is generating a trajectory that passes through a specified sequence of waypoints while producing motion that is physically executable. A naive solution connects consecutive waypoints with straight line segments (piecewise linear interpolation). This is simple to compute, but it is unsuitable for actuated physical systems: at each interior waypoint, the direction and often the magnitude of the velocity vector changes instantaneously. Since acceleration is the time derivative of velocity, a discontinuous velocity implies an infinite acceleration at that instant, which no real actuator, motor, or propulsion system can produce.

This limitation motivates the use of smoother interpolants. A trajectory that is C1C^{1} continuous (continuous position and velocity) removes the infinite-acceleration problem at the position level, but a trajectory that is C2C^{2} continuous (continuous position, velocity, and acceleration) is preferable for most physical systems, since acceleration commands are what feedback controllers on robots and drones ultimately track. Piecewise cubic polynomials are the lowest-degree polynomials that can be joined together to form a globally C2C^{2} curve while still leaving enough free parameters to interpolate an arbitrary sequence of waypoints; this is the classical cubic spline [1].

In more demanding aerial robotics applications, still higher continuity (up to the fourth derivative, or “snap”) is used so that the commanded thrust and body rates vary smoothly, as in minimum-snap trajectory generation for quadrotors [2]. Cubic splines represent the simplest member of this family: they guarantee only C2C^{2} continuity, but they are correspondingly cheaper to compute and are sufficient for many ground robot, camera path, and animation applications where jerk and higher derivatives are not explicitly constrained.

In this work we describe a program that automates the construction and solution of the cubic spline interpolation problem for a set of waypoints given as (xi,ti)(x_i, t_i) pairs. Rather than deriving the spline coefficients for each new set of waypoints by hand, the program assembles the full linear system of interpolation and continuity constraints, and solves for the coefficient vector directly. We apply the resulting tool to two tasks that are not typically framed as robotics problems, but which exercise exactly the same underlying interpolation machinery: (1) generating smooth free-form curves (“abstract drawings”) from a small set of user-supplied points, and (2) reconstructing a smooth digital trace of a handwritten signature from a sparse set of sampled points lying on the signature. Both tasks illustrate that once a program can turn an arbitrary list of waypoints into a C2C^2 curve, the same machinery is directly reusable for generating feasible motion commands for physical autonomous systems.