Reorder coordinates so that the axes are rotated with *zdir* along the original z axis. Prepending the axis with a '-' does the inverse transform, so *zdir* can be 'x', '-x', 'y', '-y', 'z' or '-z'.
(xs, ys, zs, zdir)
| 1593 | |
| 1594 | |
| 1595 | def rotate_axes(xs, ys, zs, zdir): |
| 1596 | """ |
| 1597 | Reorder coordinates so that the axes are rotated with *zdir* along |
| 1598 | the original z axis. Prepending the axis with a '-' does the |
| 1599 | inverse transform, so *zdir* can be 'x', '-x', 'y', '-y', 'z' or '-z'. |
| 1600 | """ |
| 1601 | if zdir in ('x', '-y'): |
| 1602 | return ys, zs, xs |
| 1603 | elif zdir in ('-x', 'y'): |
| 1604 | return zs, xs, ys |
| 1605 | else: |
| 1606 | return xs, ys, zs |
| 1607 | |
| 1608 | |
| 1609 | def _zalpha( |
no outgoing calls
no test coverage detected
searching dependent graphs…