vibespatial.constructive.affine_transform

GPU-accelerated affine transformations for all geometry types.

Single CUDA kernel applies a 2x3 affine matrix to every coordinate:

x_out = a*x + b*y + xoff y_out = d*x + e*y + yoff

Covers: affine_transform, translate, rotate, scale, skew. All are specializations of the same matrix multiply.

ADR-0033: Tier 1 NVRTC, 1 thread per coordinate. ADR-0002: COARSE class — coordinate transform is exact in fp64, acceptable error budget in fp32 for visualization-grade work.

Attributes

cp

Functions

affine_transform_owned(...)

Apply a 2D affine transformation to all geometries.

translate_owned(...)

Translate all geometries by (xoff, yoff).

rotate_owned(...)

Rotate all geometries by angle around origin.

scale_owned(...)

Scale all geometries by (xfact, yfact) around origin.

skew_owned(→ vibespatial.geometry.owned.OwnedGeometryArray)

Skew all geometries by (xs, ys) angles around origin.

Module Contents

vibespatial.constructive.affine_transform.cp = None
vibespatial.constructive.affine_transform.affine_transform_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, matrix, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray

Apply a 2D affine transformation to all geometries.

Parameters

ownedOwnedGeometryArray

Input geometries.

matrixsequence of 6 or 12 floats

Affine matrix [a, b, d, e, xoff, yoff] (Shapely convention).

vibespatial.constructive.affine_transform.translate_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, xoff: float = 0.0, yoff: float = 0.0, zoff: float = 0.0, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray

Translate all geometries by (xoff, yoff).

vibespatial.constructive.affine_transform.rotate_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, angle: float, origin: str | tuple[float, float] = 'center', use_radians: bool = False, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray

Rotate all geometries by angle around origin.

vibespatial.constructive.affine_transform.scale_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, xfact: float = 1.0, yfact: float = 1.0, zfact: float = 1.0, origin: str | tuple[float, float] = 'center', *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray

Scale all geometries by (xfact, yfact) around origin.

vibespatial.constructive.affine_transform.skew_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, xs: float = 0.0, ys: float = 0.0, origin: str | tuple[float, float] = 'center', use_radians: bool = False, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray

Skew all geometries by (xs, ys) angles around origin.