pyoptics.geometry

Geometry helper functions.

Functions

R_onto

Rotation matrix that rotates vector a onto vector b.

R_x

Elementary rotation about x axis.

R_y

Elementary rotation about y axis.

R_z

Elementary rotation about z axis.

cross_prod

Cross product of two vectors a and b.

cross_prod_matrix

Compute the cross product matrix from given vector.

pyoptics.geometry.cross_prod(a, b)[source]

Cross product of two vectors a and b.

Parameters:
a, barrays
Returns:
resarray

Cross-product of a and b (using right-hand rule).

pyoptics.geometry.cross_prod_matrix(v)[source]

Compute the cross product matrix from given vector.

Parameters:
varray
Returns:
v_xarray

Matrix v_x with dot(v_x, b) = v x b.

pyoptics.geometry.R_onto(a, b)[source]

Rotation matrix that rotates vector a onto vector b.

a and b do not need to be unit vectors; the routine normalizes copies of them.

Parameters:
a, barrays
Returns:
Rarray

Rotation matrix that maps a unnit vector along a onto the direction of b.

pyoptics.geometry.R_x(theta)[source]

Elementary rotation about x axis.

Parameters:
thetanumber

Rotation angle

Returns:
R_xarray
pyoptics.geometry.R_y(theta)[source]

Elementary rotation about y axis.

Parameters:
thetanumber

Rotation angle

Returns:
R_yarray
pyoptics.geometry.R_z(theta)[source]

Elementary rotation about z axis.

Parameters:
thetanumber

Rotation angle

Returns:
R_zarray