pyoptics.geometry¶
Geometry helper functions.
Functions
Rotation matrix that rotates vector a onto vector b. |
|
Elementary rotation about x axis. |
|
Elementary rotation about y axis. |
|
Elementary rotation about z axis. |
|
Cross product of two vectors a and b. |
|
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