MCPcopy Create free account
hub / github.com/Kitware/VTK / axisangle_to_q

Function axisangle_to_q

Web/Python/vtkmodules/web/camera.py:36–44  ·  view source on GitHub ↗
(v, theta)

Source from the content-addressed store, hash-verified

34
35
36def axisangle_to_q(v, theta):
37 v = normalize(v)
38 x, y, z = v
39 theta /= 2
40 w = cos(theta)
41 x = x * sin(theta)
42 y = y * sin(theta)
43 z = z * sin(theta)
44 return w, x, y, z
45
46
47def vectProduct(axisA, axisB):

Callers 1

rotateFunction · 0.85

Calls 3

normalizeFunction · 0.70
cosFunction · 0.50
sinFunction · 0.50

Tested by

no test coverage detected