Tools

Tools, functions and other funny things

pymoskito.tools.rotation_matrix_xyz(axis, angle, angle_dim)[source]

Calculate the rotation matrix for a rotation around a given axis with the angle \varphi.

Parameters:
  • axis (str) – choose rotation axis “x”, “y” or “z”
  • angle (int or float) – rotation angle \varphi
  • angle_dim (str) – choose “deg” for degree or “rad” for radiant
Returns:

rotation matrix

Return type:

numpy.ndarray

pymoskito.tools.get_resource(res_name, res_type='icons')[source]

Build absolute path to specified resource within the package

Parameters:
  • res_name (str) – name of the resource
  • res_type (str) – subdir
Returns:

path to resource

Return type:

str