rotate_points Subroutine
- Seyed Ali Ghasemi
- BSD 3-Clause
- 51 statements
public pure subroutine rotate_points(points, n, alpha, beta, theta)
Rotate the first n rows of a point array in place.
The same Euler convention as rotation is used. Arrays with at least
three coordinates rotate their first three and leave additional
coordinates unchanged. One- and two-coordinate arrays receive only the
leading principal submatrix of the three-dimensional rotation; that map
is not generally an orthogonal lower-dimensional rotation when omitted
coordinates couple to the selected angles. n is clipped to the
available rows; a negative n changes nothing.
Arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(inout), | contiguous | :: | points(:,:) |
Point rows to modify. |
|
| integer, | intent(in) | :: | n |
Maximum number of leading rows to rotate. |
||
| real(kind=rk), | intent(in) | :: | alpha |
Rotation about x in degrees. |
||
| real(kind=rk), | intent(in) | :: | beta |
Rotation about y in degrees. |
||
| real(kind=rk), | intent(in) | :: | theta |
Rotation about z in degrees. |