(axis, angle, center, point)
| 57 | |
| 58 | |
| 59 | def rotate(axis, angle, center, point): |
| 60 | angleInRad = 3.141592654 * angle / 180.0 |
| 61 | rotation = axisangle_to_q(axis, angleInRad) |
| 62 | tPoint = tuple((point[i] - center[i]) for i in range(3)) |
| 63 | rtPoint = qv_mult(rotation, tPoint) |
| 64 | rPoint = tuple((rtPoint[i] + center[i]) for i in range(3)) |
| 65 | return rPoint |
| 66 | |
| 67 | |
| 68 | # ----------------------------------------------------------------------------- |
no test coverage detected