shadow4.tools.arrayofvectors
Operations on arrays of 3D vectors with shape (n_vectors, 3).
Each function operates element-wise over a batch of vectors so that an entire
ray bundle can be transformed in a single NumPy call. All inputs and outputs
follow the convention v[n_vectors, 3] unless otherwise stated.
Functions
|
Calculate the sum of a vector and a scalar constant. |
|
Calculate the vector cross product. |
|
Creates two unitary vectors pointing on a sigma and pi-polarization directions. |
|
Calculate the difference of two vectors u - v. |
|
Calculate the dot product of two vectors. |
Calculates the modulus of a vector array. |
|
Calculates the modulus of a vector array to the power 2. |
|
|
Calculate the product of a vector by a scalar. |
|
Calculate the normalized vector. |
|
Calculate the reflection of a vector (ray) on a surface. |
|
Calculate the refraction (transmission) vector using Snell's Law in vector form. |
|
Rotates the vector around an axis. |
|
Calculate the scattering of a wavevector. |
|
Calculate the sum of two vectors. |