[affine] update docs

This commit is contained in:
Jan Petykiewicz 2026-04-01 21:02:51 -07:00
commit 4da3376e63
2 changed files with 5 additions and 2 deletions

View file

@ -35,6 +35,7 @@ Most functions and classes are documented inline.
Geometry helper input contracts:
- `build_tetrahedron()` and `planes_from_tetrahedron()` expect tetrahedron vertices in the helper's documented positive winding.
- `build_box()` and `planes_from_box()` expect `box_corners[0]` to be the per-axis minimum and `box_corners[1]` the per-axis maximum.
- `adze.transform.affine()` accepts a general 4x4 homogeneous transform and applies the perspective divide using the fourth row, so projective transforms are supported.
To read the inline help,
```python3

View file

@ -65,11 +65,13 @@ def scale(poly: poly_t, factor: ArrayLike | float) -> poly_t:
def affine(poly: poly_t, xform: ArrayLike) -> poly_t:
"""
Perform arbitrary affine trasnformation on the polyhedron.
Perform an arbitrary homogeneous 4x4 transformation on the polyhedron.
Args:
poly: Polyhedron to transform. Changed in-place.
xform: 4x4 affine transformation matrix.
xform: 4x4 homogeneous transformation matrix. The transformed homogeneous
coordinates are divided by the fourth row, so projective transforms are
supported in addition to affine ones.
Returns:
Transformed polyhedron.