geometry module

gensei.geometry.get_average_semiaxes(volume, length_to_width)
Get semiaxes of an ellipsoid given its volume and length-to-width ratio.
gensei.geometry.get_cylinder_shape(volume, length_to_width)
Get radius r and height h of a cylinder given its volume and length-to-width ratio h / 2r.
gensei.geometry.make_axis_rotation_matrix(direction, angle)

Create a rotation matrix corresponding to the rotation around a general axis by a specified angle.

R = dd^T + cos(a) (I - dd^T) + sin(a) skew(d)

Parameters:

angle : float a direction : array d
gensei.geometry.make_rotation_matrix_hc(mtx)

Extend a rotation matrix to homogenous coordinates.

R_hc = [[R, 0],
[0, 1]]

Parameters:

mtx : 3 x 3 array R
gensei.geometry.make_translation_matrix_hc(point)

Create a matrix whose application corresponds to translation to the point in homogenous coordinates.

T_hc = [[1, 0, 0, x],
[0, 1, 0, y], [0, 0, 1, z], [0, 0, 0, 1]]

Parameters:

point : array (x, y, z)
gensei.geometry.transform_to_pixels(coors, max_coors, resolution)
Transform real coordinates (in [0, max_coors]) to pixel coordinates, given the figure resolution and max. coordinates (block dimensions).

Previous topic

ellipsoid module

Next topic

getch module

This Page