transform_points Subroutine
- Seyed Ali Ghasemi
- BSD 3-Clause
- 68 statements
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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(inout), | contiguous | :: | points(:,:) |
Point rows |
|
| real(kind=rk), | intent(in), | contiguous | :: | linear(:,:) |
Square linear map |
|
| real(kind=rk), | intent(in), | optional, | contiguous | :: | translation(:) |
Translation vector |
| real(kind=rk), | intent(in), | optional, | contiguous | :: | center(:) |
Fixed center |