Skip to main content

P R I N G L E

Interactive 3D plotting for Python. Define surfaces, vector fields, scatter plots, and dynamical system trajectories using real Python/numpy expressions — then explore them live with sliders and animation.


Install + Run:

pip install pringle

crunch 

Why Pringle?

Real Python — expressions are plain Python/numpy. sin(x)*cos(y), scipy.special.gamma(x), user-defined lambdas — no domain-specific language to learn. Numpy functions are available by name (sin, cos, linspace, random, …) with no prefix required.

Live interactivity — any named scalar assignment (a = 1.0) becomes a slider. Drag it and every dependent expression re-evaluates instantly via a reactive dependency graph, at 60 fps on a background thread.

User controls - Fly through your plot like a video game, using the WASD controls to move around + SPACE/SHIFT to move up and down.

Animate anything — press ▷ on any slider and it loops over its range automatically. Camera orbit and pan stay fluid even while the scene is re-evaluating.

Version-controlled sessions — plot sessions are stored in human-readable YAML files. git diff shows exactly what changed; send a single .yml file to share a visualization with a collaborator.

LLM Compatibility — human readable session files + python-native expressions mean large language models are able to generate sophisticated pringle plots on the fly.

GPU-accelerated rendering — powered by pygfx + wgpu-py. Smooth Phong shading, order-independent transparency, and drop shadows — not matplotlib's software renderer.

Vector fields — native 2D and 3D arrow rendering, auto-detected from array shapes (N, 4) and (N, 6).

Recurrence relations — express ODE trajectories directly: path[n] = path[n-1] + dt * deriv(path[n-1]) with an initial condition sub-cell. Re-evaluates reactively on every slider tick.

Piecewise expressions — z = [f, g, h] with condition sub-cells produces a single unified surface.

Constraint masking — boolean sub-cells clip any surface without touching the expression.

Folders and comments — organize complex sessions; collapsed folders keep the expression panel clean.

Pringle vs. Other Tools

Pringle Desmos 3D matplotlib Axes3D Plotly
Language Python / numpy Custom math notation Python Python
Live sliders ✓ ✓ — Requires Dash
GPU rendering ✓ (wgpu) ✓ (WebGL) — —
Vector fields ✓ — — Limited
Recurrence / ODE paths ✓ Limited Manual Manual
scipy / custom functions ✓ — ✓ ✓
Version-controllable ✓ (YAML) — — —

Installation

pip install pringle

Requires Python ≥ 3.11.

Running Pringle

# Open a saved session
crunch path/to/session.yml

# Open a tutorial
crunch pringle/examples/tutorials/01_hello_surface.yml

# Alternative pringle alias
pringle pringle/examples/tutorials/03_animation.yml

Expression Language

Cells evaluate as plain Python. Spatial variables x, y, u, v are injected as numpy arrays over the evaluation grid. Output type is determined by the magic variable assigned:

Assignment Renders as
z = ... Explicit surface (N, M)
xyz = ... Parametric surface or curve (3, N, M) or (3, N)
points = ... Scatter plot (N, 3) or (N, 2)
f(x, y) = ... Auto-rendered surface + reusable namespace function

Shapes (N, 4) and (N, 6) are auto-detected as 2D and 3D vector fields respectively. They are viewed as N row vectors, with each row having the tail and head coordinates concatenated together.

Tutorials

Step-by-step sessions in pringle/examples/tutorials/:

File Concept
01_hello_surface.yml First surface — explicit z = sin(x) * cos(y)
02_sliders.yml Interactive slider parameters
03_animation.yml Animated slider — traveling wave
04_parametric.yml Parametric surface — sphere via xyz
05_constraints.yml Constraint sub-cells — clipping a surface
06_scatter.yml Scatter plot — helix point cloud
07_vector_field.yml 2D vector field — gradient of a surface
08_recurrence.yml Recurrence relation — integrating an ODE

More complex real-world examples live in pringle/examples/.

Further Reading

Metadata

Release files for pringle 0.2.0

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

Source distribution (sdist)

Source distribution for pringle 0.2.0
File Size Uploaded Provenance Actions
pringle-0.2.0.tar.gz 1.3 MB With provenance Details for pringle-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pringle 0.2.0
File Interpreter ABI Platform Actions
pringle-0.2.0-py3-none-any.whl Python 3 none any Details for pringle-0.2.0-py3-none-any.whl

Total release size: 2.5 MB

Release files / pringle-0.2.0.tar.gz

Download URL pringle-0.2.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
bd2c475ff0ff82d1a9f91e10236dba553ef375ff55415615dc9c6722dfcdf14f
BLAKE2b-256 checksum
How to use checksums
a280b278ea908e08fe305642eda3c7a253da6fc93af8bb1cab4857919d598ae2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 5, 2026.

Transparency log

Release files / pringle-0.2.0-py3-none-any.whl

Download URL pringle-0.2.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b1855456f6a46f5f2f26936d3b52052b95a7d1c8218140bcf7b66875db75c5ae
BLAKE2b-256 checksum
How to use checksums
28de763176f25756e0f49c152c6b21f8330c7c876806ce40a17a1e91ee34d79a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 5, 2026.

Transparency log

Security for pringle 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pringle-0.2.0.tar.gz

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 Jun 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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