Skip to content
ForCADDocumentation

transform_points Subroutine

public pure subroutine transform_points(points, linear, translation, center)

Apply one affine transformation to point rows in place.

For every point , this routine evaluates

where linear is , optional center is , and optional translation is . Missing optional vectors denote zero. Any finite square matrix is accepted, including reflection, shear, anisotropic scaling, and singular maps. A singular map remains an exact affine image but can reduce geometric rank and invalidate an analysis mapping.

One-, two-, and three-coordinate points use specialized scalar kernels. Higher-dimensional points use one automatic row buffer, not a temporary point array. Invalid matrix or vector shapes and nonfinite transformation data leave points unchanged.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout), contiguous :: points(:,:)

Point rows [npoint,ncoord] to transform.

real(kind=rk), intent(in), contiguous :: linear(:,:)

Square linear map [ncoord,ncoord].

real(kind=rk), intent(in), optional, contiguous :: translation(:)

Translation vector [ncoord].

real(kind=rk), intent(in), optional, contiguous :: center(:)

Fixed center [ncoord] about which linear acts.