VertexAligner
Abstract base for vertex alignment strategies
Alignment strategies determine how to rotate/reorder vertices of the second shape to best match the first shape for smooth morphing.
Constructor
VertexAligner(args, kwargs)
Methods
align
align(
verts1: Points2D,
verts2: Points2D,
context: AlignmentContext
) -> Tuple[Points2D, Points2D]
Align two vertex lists for optimal morphing
Parameters
-
verts1 - First vertex list
-
verts2 - Second vertex list (must have same length as verts1)
-
context - Alignment context with rotation and closure info
Returns
Tuple of (verts1, verts2_aligned) where verts2 is rotated for best match Raises: ValueError: If vertex lists have different lengths