Skip to content

AMSA v0.2.2 — CGA support, geometric classification, and examples

Choose a tag to compare

@sunkmechie sunkmechie released this 01 May 19:05
· 35 commits to main since this release
9c457ed

What's in 0.2.2

CGA geometry

Point, sphere, plane, translator, line, and circle constructors available as Algebra methods

alg = Algebra.cga3d()
p = alg.point([1.0, 2.0, 3.0])
s = alg.sphere([0.0, 0.0, 0.0], 5.0)
T = alg.translate([3.0, 0.0, 0.0])

Extraction utilities recover Euclidean parameters from CGA multivectors, extract_point normalizes automatically so it works after versor actions:

coords = alg.extract_point(reflected)
center, radius = alg.extract_sphere(s)
normal, distance = alg.extract_plane(plane)

Geometric classification

alg.classify(mv) returns an EntityInfo dataclass with structured geometric interpretation: kind, grades, nullity, normalization, invariants, geometric data, storage metadata, and warnings.

Recognizes 12 CGA entity types:

  • normalized conformal point
  • conformal point
  • point at infinity
  • dual sphere
  • dual plane
  • direct line
  • direct circle
  • translator candidate
  • even versor
  • generic blade
  • zero multivector
  • unknown multivector

Examples

4 new examples in examples/cga/:

  • cga_primitives.py — all CGA primitives in cga3d and cga2d
  • cga_point_distance_batch.py — batched pairwise distance via inner product
  • cga_classify_overview.py — every primitive through classify()
  • cga_versor_actions.py — translate and reflect with classify before/after

Documentation

  • New docs/cga.rst covering constructors, extraction, and classification
  • Main README overhauled with VGA/PGA/CGA quick start snippets and Supported Algebras table
  • Added examples/inspection/README.md
  • Fixed examples/robotics/README.md
  • 3-pass CGA operations roadmap in plans.md

Verification

uv run ruff check  
uv run mypy

Install

uv pip install amsa-ga