Calculator: Axis-angle to quaternion

Enter the labelled inputs to calculate: Value w; Value x; Value y; Value z.

Value w
6.123233996e-17
Value x
0
Value y
0
Value z
1

How the calculation works

q=(cos(θ/2), û sin(θ/2))

Coordinates use one common length unit. Rotation axes are normalized and angles are degrees. Quaternion order is w,x,y,z. Lines are infinite, not rays; parallel/coincident line-plane cases are rejected. Circumspheres require noncoplanar vertices. Solid-angle vectors originate at the observer; spherical triangles are convex minor-arc triangles.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Frequently asked questions

How is the result calculated?

q=(cos(θ/2), û sin(θ/2))

What assumptions apply?

Coordinates use one common length unit. Rotation axes are normalized and angles are degrees. Quaternion order is w,x,y,z. Lines are infinite, not rays; parallel/coincident line-plane cases are rejected. Circumspheres require noncoplanar vertices. Solid-angle vectors originate at the observer; spherical triangles are convex minor-arc triangles.

How precise are the displayed results?

Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

How we verified this calculator

The calculator is checked against 3 reference cases computed independently of its code. Last passed: .

# Inputs Expected result
1
Values (spaces or semicolons; decimal point) u = 0 0 1
Angle (°) = 180
Value w: 0
Value x: 0
Value y: 0
Value z: 1
2
Values (spaces or semicolons; decimal point) u = 1 1 0
Angle (°) = 60
Value w: 0.8660254038
Value x: 0.3535533906
Value y: 0.3535533906
Value z: 0
3
Values (spaces or semicolons; decimal point) u = 1 2 3
Angle (°) = -45
Value w: 0.9238795325
Value x: -0.1022764494
Value y: -0.2045528988
Value z: -0.3068293482

How we test our calculators →

Also try:

Back to category →