porems.geometry

Here basic geometric functions are noted.

Functions

angle(vec_a, vec_b[, is_deg])

Calculate the angle between two vectors \(\boldsymbol{a},\boldsymbol{b}\in\mathbb{R}^n\)

angle_azi(pos[, is_deg])

Calculate the azimuthal angle of a position vector \(\boldsymbol{a}\in\mathbb{R}^3\), which is the angle of the position vector towards the x-y-plane

angle_polar(pos[, is_deg])

Calculate the polar angle of a position vector \(\boldsymbol{a}\in\mathbb{R}^3\), which is the angle of the x-axis towards the reflected position vector on the x-y-plane

cross_product(vec_a, vec_b)

Calculate the cross product of two three-dimensional vectors \(\boldsymbol{a},\boldsymbol{b}\in\mathbb{R}^3\)

dot_product(vec_a, vec_b)

Calculate the dot product of two vectors \(\boldsymbol{a},\boldsymbol{b}\in\mathbb{R}^n\)

length(vec)

Calculate the length of a vector \(\boldsymbol{a}\in\mathbb{R}^n\)

main_axis(inp[, dim])

Return the three-dimensional unit-vector of the main axes.

rotate(data, axis, angle, is_deg[, dim])

Rotate a vector \(\boldsymbol{a}\in\mathbb{R}^3\) along an axis \(\boldsymbol{b}\in\mathbb{R}^3\) with angle \(\alpha\in\mathbb{R}\).

unit(vec)

Transform a vector \(\boldsymbol{a}\in\mathbb{R}^n\) into a unit vector

vector(pos_a, pos_b)

Calculate the vector between to two positions \(\boldsymbol{a},\boldsymbol{b}\in\mathbb{R}^n\)