Skip to main content

InterpolatePy

Python PyPI Downloads pre-commit ci-test License: MIT

InterpolatePy is a trajectory-planning and interpolation library for robotics, animation, and scientific computing. It includes scalar splines, B-spline curve tools, bounded motion profiles, quaternion interpolation, and 3D path utilities.

The package has a NumPy/SciPy implementation and an optional C++20 backend. Use the public names exported by interpolatepy; they select the available backend at import time.

Installation

python -m pip install InterpolatePy

InterpolatePy 3.3.1 requires Python 3.11 or newer, NumPy 1.26 or newer, and SciPy 1.11 or newer. Install plotting support when needed:

python -m pip install "InterpolatePy[plot]"

Quick start

import numpy as np

from interpolatepy import CubicSpline
from interpolatepy import DoubleSTrajectory
from interpolatepy import StateParams
from interpolatepy import TrajectoryBounds

# A clamped cubic spline: v0 and vn are endpoint velocities.
spline = CubicSpline(
    [0.0, 1.0, 2.0, 3.0],
    [0.0, 1.5, -0.5, 2.0],
    v0=0.0,
    vn=0.0,
)
times = np.linspace(0.0, 3.0, 100)
positions = spline.evaluate(times)
velocities = spline.evaluate_velocity(times)

# A jerk-limited Double-S motion profile.
state = StateParams(q_0=0.0, q_1=10.0, v_0=0.0, v_1=0.0)
bounds = TrajectoryBounds(v_bound=5.0, a_bound=10.0, j_bound=30.0)
motion = DoubleSTrajectory(state, bounds)
sample_times = np.linspace(0.0, motion.get_duration(), 100)
q, qd, qdd, qddd = motion.evaluate_full(sample_times)

DoubleSTrajectory.evaluate() returns position only. Use evaluate_velocity(), evaluate_acceleration(), and evaluate_jerk() for one component, or evaluate_full() for all four.

What is included

Area Public APIs Typical use
Scalar splines CubicSpline, CubicSmoothingSpline, CubicSplineWithAcceleration1, CubicSplineWithAcceleration2 Smooth scalar waypoint trajectories and noisy data
B-splines BSpline, BSplineInterpolator, CubicBSplineInterpolation, ApproximationBSpline, SmoothingCubicBSpline Parametric curves, interpolation, approximation, and smoothing
Motion profiles DoubleSTrajectory, TrapezoidalTrajectory, PolynomialTrajectory, ParabolicBlendTrajectory Bounded or boundary-conditioned scalar motion
Rotations Quaternion, QuaternionSpline, SquadC2, SpringQuaternionInterpolation, ShootingQuaternionInterpolation, LogQuaternionInterpolation, ModifiedLogQuaternionInterpolation Orientation interpolation without Euler-angle singularities
Paths and utilities LinearPath, CircularPath, Frenet-frame helpers, linear_traj, solve_tridiagonal Geometric paths, moving frames, and numerical helpers

Degrees 3, 4, and 5 of BSplineInterpolator, LogQuaternionInterpolation, and ModifiedLogQuaternionInterpolation support as few as two waypoints in version 3.2.0.

See the algorithm selection guide, the full documentation, and the runnable examples.

Optional C++ backend

Platform wheels include the compiled backend. The package falls back to Python automatically when the extension is absent:

import interpolatepy

print(interpolatepy.HAS_CPP)

Set INTERPOLATEPY_NO_CPP=1 before importing the package to force the Python implementation. Installing a published wheel does not need a compiler. Building from a source distribution or source checkout requires CMake 3.21+, a C++20 compiler, and network access for CMake's fetched dependencies; see the installation guide.

Development

This project uses uv:

git clone https://github.com/GiorgioMedico/InterpolatePy.git
cd InterpolatePy
uv sync
uv run pytest
uv run pre-commit run --all-files

Documentation dependencies are in a separate group:

uv sync --group docs
uv run mkdocs serve

Every Python program in examples/ can also be run directly, for example:

uv run python examples/double_s_ex.py

For the complete workflow, see Contributing.

License and citation

InterpolatePy is distributed under the MIT License.

@misc{InterpolatePy,
  author = {Giorgio Medico},
  title  = {InterpolatePy: Trajectory Planning and Interpolation for Python},
  year   = {2026},
  url    = {https://github.com/GiorgioMedico/InterpolatePy}
}

Metadata

Release files for InterpolatePy 3.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for InterpolatePy 3.3.1
File Size Uploaded
interpolatepy-3.3.1.tar.gz 549.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for InterpolatePy 3.3.1
File
interpolatepy-3.3.1-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
interpolatepy-3.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
interpolatepy-3.3.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
interpolatepy-3.3.1-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
interpolatepy-3.3.1-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
interpolatepy-3.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
interpolatepy-3.3.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
interpolatepy-3.3.1-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
interpolatepy-3.3.1-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details
interpolatepy-3.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
interpolatepy-3.3.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
interpolatepy-3.3.1-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details

Total release size: 12.7 MB

Release files / interpolatepy-3.3.1.tar.gz

Download URL interpolatepy-3.3.1.tar.gz
Size 549.5 kB
Tags Source
SHA-256 checksum
How to use checksums
505446586f1b65433910ca9e6e43b27a46b1ec656159e0594fbdeb320f547322
BLAKE2b-256 checksum
How to use checksums
974eca79c58b1655b84e6eb428fbc374373be1afe70cdac7688411878058e787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL interpolatepy-3.3.1-cp313-cp313-musllinux_1_2_x86_64.whl
Size 1.9 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
b0129daefad8f576d2eb42c67f0abaf9b22095d591d87668d392bdf39e523d83
BLAKE2b-256 checksum
How to use checksums
d0c9f429ef9fe83241da3a21080d636962c8773d07ca016f8dce0d0abe4a8432
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL interpolatepy-3.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 821.9 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c9571a869a61b73cb17030cc7fd42127c492eec86edaa7cebdec034704d118f7
BLAKE2b-256 checksum
How to use checksums
75f0313f635ccef4247a91b91a4c14c1cf0d42c9698de15bfb32c3891d725040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL interpolatepy-3.3.1-cp313-cp313-macosx_11_0_arm64.whl
Size 638.9 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c88effdf18eb8fd98e7a54b07bedba10f3ba8084246bf176b6205905fb06d400
BLAKE2b-256 checksum
How to use checksums
b6d0aaf89a7b9f1663bec695c45dc8e77a518e65e9c7cdc0b18dceb152d957cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp313-cp313-macosx_10_13_x86_64.whl

Download URL interpolatepy-3.3.1-cp313-cp313-macosx_10_13_x86_64.whl
Size 711.0 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
613cb3d3a8fb4a7ee4da7dad8efd114181b9f2f0df198d431bb231e41c0fbe6d
BLAKE2b-256 checksum
How to use checksums
355a574b54a412974dd44b5fcdcad992446a828256f10f049fab4d96950a5586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL interpolatepy-3.3.1-cp312-cp312-musllinux_1_2_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
ee195844a3771a5671e98e29dea0c276783435000d2c7b5e175a927c187ae9de
BLAKE2b-256 checksum
How to use checksums
f7fa4192622164fd1cbc5cccf6bbc5af651fe7369756eef4989b65e8c7b14102
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL interpolatepy-3.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 821.7 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5b89489b1bf0588fe943ed3d4c78452e3b90547f5be43cba74a5a66ffabf25ca
BLAKE2b-256 checksum
How to use checksums
bd8d5326ee0ead60e158975b0f1af31b6f1d75aedeed1e73c5de7b396bd6e2ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL interpolatepy-3.3.1-cp312-cp312-macosx_11_0_arm64.whl
Size 638.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6029c6bc6158e985e1fbbe4711a46c4eb31774708247a2f6cdbdf8511c68229c
BLAKE2b-256 checksum
How to use checksums
d5ab91d9a793065c8917c7562372f39011e9a64e208d8bf7fac0be99a1a00065
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp312-cp312-macosx_10_13_x86_64.whl

Download URL interpolatepy-3.3.1-cp312-cp312-macosx_10_13_x86_64.whl
Size 711.0 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
5059643c9e7f361e0eb6fdd064520ad9a780aa0052cfe12e516537d7463cad1c
BLAKE2b-256 checksum
How to use checksums
71463cdf6b086a43e21168926fd1d94b7896db49bf8593d229feedf29322833b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL interpolatepy-3.3.1-cp311-cp311-musllinux_1_2_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
6b4c5db60a0b70a7dafaf4b7bd6236d419b9033496d2dbfe77331c19be2cd0f9
BLAKE2b-256 checksum
How to use checksums
83634f87edd45343c581a407a0a5a5e8d15ef6aed6197711368f43e7037d2589
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL interpolatepy-3.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 815.9 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0e0ac46952c50b9a53a39d1cfedf009789fd0a02bce2c3fecd2cea04928de5f6
BLAKE2b-256 checksum
How to use checksums
3cb2c9f45b003ade2b4170cf605722667412a30a1ff2b2107bee8cef7f2b271d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL interpolatepy-3.3.1-cp311-cp311-macosx_11_0_arm64.whl
Size 636.7 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
da67bcde930f9a8596708397a0b9e84278fd7511adaab5373ba7db4f7703167f
BLAKE2b-256 checksum
How to use checksums
fdbae41d6fc8c9fe75f750e1ebfc855f7c10d25fa19a820752c2976eb390803d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / interpolatepy-3.3.1-cp311-cp311-macosx_10_9_x86_64.whl

Download URL interpolatepy-3.3.1-cp311-cp311-macosx_10_9_x86_64.whl
Size 704.5 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
cf723abd58449ca636f3b2c583a532def7e34bed307578a1f841b915c18b2789
BLAKE2b-256 checksum
How to use checksums
6b8fe7a7aabd869c39158837d9894613d36f827163c679ecd63c0f453f634eaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.3.1 This release

13 release files

3.3.0

13 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page