Commit d573cad
authored
Add matrix.transform-rotate-aer (azimuth/elevation/roll) helper (#1034)
This PR adds a convenience rotation constructor to `matrix`:
`transform-rotate-aer(azimuth, elevation, roll: 0deg)`
## Behavior
- Builds a 4x4 rotation matrix from azimuth/elevation with optional
roll.
- Uses the viewing convention:
- `z` points up
- `x` points toward the viewer
- aligned with the common azimuth/elevation camera interpretation used
by plotting tools (including matplotlib).
- Optional roll around the current viewing axis after azimuth/elevation.
## Implementation
- Added internal helper:
- `_rotate-axis-angle(ax, ay, az, angle)` (axis-angle rotation matrix
using the Rodrigues' formula)
- Added public function:
- `transform-rotate-aer(azimuth, elevation, roll: 0deg)`1 file changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
160 | 195 | | |
161 | 196 | | |
162 | 197 | | |
| |||
0 commit comments