SuperQuadrics Module¶
- class gpdmink.SuperQuadrics.SuperQuadrics(a, eps, quat, tc, num=None)¶
Bases:
GeometryModel- get_gradient_from_cartesian(x)¶
Convert cartesian points to gradient vectors.
- Parameters:
x (numpy.ndarray) – Cartesian points
- Returns:
Gradient vectors
- Return type:
numpy.ndarray
- get_gradient_from_direction(v)¶
Convert direction vectors to gradient vectors.
- Parameters:
v (numpy.ndarray) – Direction vectors
- Returns:
Gradient vectors
- Return type:
numpy.ndarray
- get_gradient_from_hypersphere(u)¶
Convert hypersphere parameters to gradient vectors.
- Parameters:
u (numpy.ndarray) – Hypersphere parameters
- Returns:
Gradient vectors
- Return type:
numpy.ndarray
- get_gradient_from_spherical(theta)¶
Convert spherical coordinates to gradient vectors.
- Parameters:
theta (numpy.ndarray) – Spherical angles (eta, omega)
- Returns:
Gradient vectors
- Return type:
numpy.ndarray
- get_hypersphere_from_gradient(m)¶
Convert gradient vectors to hypersphere parameters.
- Parameters:
m (numpy.ndarray) – Gradient vectors
- Returns:
Hypersphere parameters
- Return type:
numpy.ndarray
- get_implicit_function_canonical(x)¶
Compute implicit function value in canonical frame.
- Parameters:
x (numpy.ndarray) – Point in canonical frame
- Returns:
Implicit function value
- Return type:
float
- get_point_from_gradient(m)¶
Convert gradient vectors to surface points.
- Parameters:
m (numpy.ndarray) – Gradient vectors
- Returns:
Surface points in canonical frame
- Return type:
numpy.ndarray
- get_point_from_normal(n)¶
Convert normal vectors to surface points.
- Parameters:
n (numpy.ndarray) – Normal vectors
- Returns:
Surface points in canonical frame
- Return type:
numpy.ndarray
- get_point_from_spherical(theta)¶
Convert spherical coordinates to surface points.
- Parameters:
theta (numpy.ndarray) – Spherical angles (eta, omega)
- Returns:
Surface points in canonical frame
- Return type:
numpy.ndarray
- get_surf_gradients_canonical()¶
Get surface gradients mesh in canonical frame.
- Returns:
Gradient mesh coordinates (m_x, m_y, m_z)
- Return type:
tuple(numpy.ndarray, numpy.ndarray, numpy.ndarray)
- get_surf_points_canonical()¶
Get surface mesh points in canonical frame.
- Returns:
Mesh coordinates (xx, yy, zz)
- Return type:
tuple(numpy.ndarray, numpy.ndarray, numpy.ndarray)
- get_volume()¶
Compute volume of the superquadric.
- Returns:
Volume value
- Return type:
float