ktk.geometry

ktk.geometry#

Provide 3D geometry and linear algebra functions related to biomechanics.

Note

As a convention, the first dimension of every array is always N and corresponds to time.

Functions

create_point_series

Create an Nx4 point series ([[x, y, z, 1.0], ...]).

create_transform_series

Create an Nx4x4 transform series from multiple input forms.

create_vector_series

Create an Nx4 vector series ([[x, y, z, 0.0], ...]).

get_angles

Extract Euler angles from a transform series.

get_global_coordinates

Express local coordinates in the global reference frame.

get_local_coordinates

Express global coordinates in local reference frames.

get_quaternions

Extract quaternions from a transform series.

is_point_series

Check that the input is an Nx4 point series ([[x, y, z, 1.0], ...]).

is_transform_series

Check that the input is an Nx4x4 series of homogeneous transforms.

is_vector_series

Check that the input is an Nx4 vector series ([[x, y, z, 0.0], ...]).

isnan

Check which samples contain at least one NaN.

matmul

Matrix multiplication between series of matrices.

mirror

Mirror a series of coordinates.

register_points

Find the homogeneous transforms between two series of point clouds.

rotate

Rotate a series of coordinates along given axes.

scale

Scale a series of coordinates.

translate

Translate a series of coordinates.