madgui.survey.transform module

Functions

gl_array(data)

Create a PyOpenGL compatible numpy array from list data.

inverted(matrix)

Invert a coordinate system transformation M = T @ R .

look_at(position, target, up)

Return transformation matrix for a camera with specified position, view target and upwards direction.

perspective_projection(fov, aspect_ratio, …)

Return a perspective projection matrix.

qmatrix_to_numpy(qmatrix)

Convert a QMatrix4x4 to a numpy array.

rotate(theta, phi, psi)

Return a rotation matrix for rotation angles as defined in MAD-X.

translate(dx, dy, dz)

Return a translation matrix.

madgui.survey.transform.gl_array(data)[source]

Create a PyOpenGL compatible numpy array from list data.

madgui.survey.transform.inverted(matrix)[source]

Invert a coordinate system transformation M = T @ R .

madgui.survey.transform.look_at(position, target, up)[source]

Return transformation matrix for a camera with specified position, view target and upwards direction.

madgui.survey.transform.perspective_projection(fov, aspect_ratio, near_plane, far_plane)[source]

Return a perspective projection matrix.

madgui.survey.transform.qmatrix_to_numpy(qmatrix)[source]

Convert a QMatrix4x4 to a numpy array.

madgui.survey.transform.rotate(theta, phi, psi)[source]

Return a rotation matrix for rotation angles as defined in MAD-X.

madgui.survey.transform.translate(dx, dy, dz)[source]

Return a translation matrix.