TanGA
TanGA is a Python and C++ library for interactive technical visualization and geometric algebra (Clifford algebra) — two independent toolkits under one roof.
- Visualization — build animated, interactive 3D and 2D technical scenes in the browser, and export them as standalone HTML (animations included), glTF/GLB, PNG, or MP4. No knowledge of geometric algebra required.
- Geometric algebra / Clifford algebra — sparse multivectors over vector spaces of up to 31 dimensions with arbitrary signature, with explicit support for Euclidean, projective, and conformal spaces (E2/E3, P2/P3, N2/N3, PGA2/PGA3). Backed by a C++ template core with a zero-setup Python interface (pytanga).
→ Full documentation — C++ and Python API guides, architecture overview, notebooks, and developer workflows.
Key Features
Visualization
-
Interactive 3D & 2D scenes — Live WebSocket-driven Three.js visualizer in the browser. Rotate, pan, and zoom; add entities, apply per-entity styles, and work in 3D or 2D (
space_dim=2). Usable without geometric algebra. -
Animations — Frame-by-frame streaming at ~60 FPS and keyframe tweening (
animate_to) with a scene-awareTimelinesequencer. -
Standalone HTML export — Export self-contained, shareable HTML that includes animations, plus embeddable HTML for iframes, glTF/GLB for other 3D tools, PNG screenshots, and MP4 video.
-
Interactivity — Interactive controls (sliders, dropdowns, buttons), pointer-based object interaction (click, drag, scroll), and a simplified
ActPointAPI. Jupyter notebook support with inline iframes.
Geometric Algebra / Clifford Algebra
-
High-dimensional algebras — Sparse blade encoding for vector spaces up to 31 dimensions with arbitrary signature. Storage proportional to non-zero coefficients, not the full $2^D$ blade space.
-
Built-in spaces — Explicit, ready-to-use algebras for Euclidean (E2/E3), projective (P2/P3), and conformal (N2/N3, PGA2/PGA3) spaces.
-
C++ template header library — 100 % C++17 headers with
constexpr-friendly templates. Compile-time dimension and signature let the compiler inline blade arithmetic down to machine instructions. -
On‑demand Python compilation — pytanga generates, compiles, and caches pybind11 bindings on first use. Pre‑compiled wheels for common configurations ship with the package — zero-setup
pip installfor most users. -
GA formula solving — Convert product equations into linear systems, solve with Gaussian elimination (floating-point or modular), and reconstruct the unknown multivector.
-
Matrix and tensor pipelines — Blade-mask-aware matrices and labeled tensors with Einsum-style contractions, broadcasts, and slicing on multivector data.
-
Geometry analysis and creation —
analyze()extracts geometric meaning from a multivector;create()builds one from primitives. Works across E3, P3, N3, and PGA3 algebras. -
galgebra interoperability — Bidirectional conversion between galgebra (sympy‑based) and tanga (numeric) multivectors via
GalgebraBridge. Symbolic derivation → numeric computation → visualization, with support for non‑orthogonal bases.
Installation
pip install tanga-py
No C++ compiler or build tools required. pytanga ships with precompiled bindings for the five most common algebra configurations on Linux (x86_64) and Windows (win_amd64).
If you need a custom algebra not covered by the precompiled set, add the
compile extra (pip install "tanga-py[compile]") — see the
installation guide
for per-platform compiler setup instructions.
AI Tool Documentation Access
When pytanga is installed, the markdown documentation and example scripts are packaged inside the wheel. AI coding tools can expose them by calling:
import pytanga
pytanga.install_docs() # copies docs to .dep-docs/pytanga/
pytanga.install_examples() # copies examples to .dep-examples/pytanga/
License
TanGA is released under the Apache License 2.0.
Every source file carries an SPDX-License-Identifier: Apache-2.0 comment.
Release files for tanga-py 1.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tanga_py-1.8.0-py3-none-any.whl | Python 3 | none | any | Details |
| tanga_py-1.8.0-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| tanga_py-1.8.0-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 |
| tanga_py-1.8.0-cp313-cp313-macosx_14_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 14.0+ ARM64 | Details |
| tanga_py-1.8.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| tanga_py-1.8.0-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 |
| tanga_py-1.8.0-cp312-cp312-macosx_14_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 14.0+ ARM64 | Details |
Total release size: 16.5 MB
Release files / tanga_py-1.8.0-py3-none-any.whl
| Download URL | tanga_py-1.8.0-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d39df0f3838920832f2e615a4e4a38b4f6799ca4c454e20fec16fdb056ba98f
|
|
BLAKE2b-256 checksum How to use checksums |
eac97d9c245de49fef6a037bde8da66465111745bf0ddd6b93118fef8d8b081e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tanga_py-1.8.0-cp313-cp313-win_amd64.whl
| Download URL | tanga_py-1.8.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
537a466e86d21707767a8d3aaddd118a6a23363765315596ff9ee84c5a1606e9
|
|
BLAKE2b-256 checksum How to use checksums |
2158e0f38c2011db3dd9c2604d3d9c49d9a4892e1d44cb98b8e06fa6403d00c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tanga_py-1.8.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tanga_py-1.8.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6b4dfdc7fe50ae25909a77c7748d596fc2e332a32130343f831f7bf5e9d6b272
|
|
BLAKE2b-256 checksum How to use checksums |
500442d7ebde1dd4ac00c8cf39fc5cf5c6a29e3828f40cd465ce5aaa9464de42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tanga_py-1.8.0-cp313-cp313-macosx_14_0_arm64.whl
| Download URL | tanga_py-1.8.0-cp313-cp313-macosx_14_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.13 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f44579cf341b42fc5720ff9e7b9a0b3251d6d851df073e75e55e315ae426f384
|
|
BLAKE2b-256 checksum How to use checksums |
6e2ea13647f5919befe65431a900ce17fef3cbd599cdb11bf7c0fc766b645dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tanga_py-1.8.0-cp312-cp312-win_amd64.whl
| Download URL | tanga_py-1.8.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2b1b80a44cc8cac7ab25fb48bcd00673865f1020c3a8fb4d47d96e966a7ed6ba
|
|
BLAKE2b-256 checksum How to use checksums |
2a25103cf9f0c976fc7efd92ba92dabd90f9c61aa56545a5c83af59fe131b1b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tanga_py-1.8.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tanga_py-1.8.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ba0199cd249901ed705f01bc339fea77a8ac49cf2d4170bc2c31a7a1f0bfef2d
|
|
BLAKE2b-256 checksum How to use checksums |
9efd0b603214080d38d91f5708af90303ad60d6953ad0e1061fc07731d12c767
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tanga_py-1.8.0-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | tanga_py-1.8.0-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6a277721a842b4d7703d9bcb5924b1ec1c1e39556e17be51209549f60d01b2ca
|
|
BLAKE2b-256 checksum How to use checksums |
5ef14624429cf1b3a935508cb4d76a31a6b376af9640800c7e3045091cf3b729
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|