This release is a pre-release and may not be stable for production use.
galaga-anywidget
Interactive AnyWidget visualizations for Galaga geometric algebra.
The first renderer draws direct points, dipoles, lines, and circles in a two-dimensional conformal model. It owns semantic Euclidean point coordinates, so browser drags participate in Marimo's normal reactive execution while the notebook keeps all geometric constructions in Python.
During the Galaga 2 prerelease train:
python -m pip install --pre "galaga-anywidget>=2.0.0a1,<3"
Persistent reactive construction
Construct and render the visualization in a cell that has no dependency on changing geometry:
import galaga_anywidget.viz as viz
circle_viz = viz.CGA2D(
cga,
colors=["#0072B2", "#D55E00", "#009E73", "#7C3AED"],
)
circle_viz
Read named coordinates in another cell and construct ordinary multivectors:
px, py = circle_viz.coordinates("P", default=(-1.75, -0.75))
qx, qy = circle_viz.coordinates("Q", default=(0.25, 1.5))
rx, ry = circle_viz.coordinates("R", default=(1.75, -0.5))
P = cga.up(px, py).named("P")
Q = cga.up(qx, qy).named("Q")
R = cga.up(rx, ry).named("R")
Keep the derived algebra in its own ordinary cell:
C = (P ^ Q ^ R).named("C")
Then synchronize the current values into the persistent widget:
circle_viz.display([P, Q, R], immutable=[C])
The three points are draggable and the dotted circle is read-only. Dragging a point updates the named coordinate pair, which causes Marimo to reconstruct the conformal point and every dependent value. The widget never duplicates the circle construction in JavaScript.
For compact static or one-cell views, use
viz.display([point, dipole, line, circle], model=cga). The lower-level
CGA2DPlot API supports explicit keys, replacements, dependent geometry, and
solid, dashed, or dotted line styles.
The design and interaction lessons are recorded in GALAGA_ANYWIDGET.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file galaga_anywidget-2.0.0a2.tar.gz.
File metadata
- Download URL: galaga_anywidget-2.0.0a2.tar.gz
- Upload date:
- Size: 26.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27657235fc6de2ac3470e9d4ef88ea5e2f2ef3ddb2e081a72e88ed08757d06d8
|
|
| MD5 |
653921c83c19d2f8e7272c31a3166b1d
|
|
| BLAKE2b-256 |
7e96ae047761469363ea94c02dbc8c732f36cf46d6218b345f1e9e28c4c3a25c
|
File details
Details for the file galaga_anywidget-2.0.0a2-py3-none-any.whl.
File metadata
- Download URL: galaga_anywidget-2.0.0a2-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22eea9cc055227a5f093c509d1ecd8202a2f4bd8c9ef09580a056cd50d05963d
|
|
| MD5 |
72eb48073aa732e3a6a4a38abafd954e
|
|
| BLAKE2b-256 |
59134c412cdc6aa8b54c9a95fbb7509b50a74496e077c3c092e23a0ae2686b14
|