4.2. Euler transformation
Prev | Up | Chapter 4. Constructors | Home | Next

## 4.2. Euler transformation #

There are two constructor functions for an Euler transformation:

`strans(` | phi, |
| theta, |
| psi`)`; |

`float8 phi`;
`float8 theta`;
`float8 psi`;

`strans(` | phi, |
| theta, |
| psi, |
| axis`)`; |

`float8 phi`;
`float8 theta`;
`float8 psi`;
`character axis`;

where `phi`, `theta` and `psi` are the three angles of Euler transformation. The fourth parameter is the three letter code of Euler the transformation axis. If that parameter is omitted, pgSphere will assume `ZXZ`. For more information about that parameter, see Section 3.3.

Example 4.2. Create an Euler transformation object

Create a transformation object to rotate a spherical object counterclockwise, first 20° around the `x`-axis, second -270° around the `z`-axis, and last 70.5° around the `y`-axis.

    sql> SELECT strans ( 20.0*pi()/180.0, -270.0*pi()/180.0, 70.5*pi()/180.0, 'XZY');

Prev | Up | Next
4.1. Point | Home | 4.3. Circle