GeometryModel Module¶
- class gpdmink.GeometryModel.GeometryModel(quat, tc, num=None)¶
Bases:
object- get_gradient_from_cartesian(x)¶
- get_gradient_from_direction(v)¶
- get_gradient_from_hypersphere(u)¶
- get_gradient_from_param(param, opt)¶
- get_gradient_from_spherical(theta)¶
- get_gradients()¶
- get_gradients_canonical()¶
Compute meshed surface gradients in canonical (local) frame :return: Surface gradients
- get_hypersphere_from_gradient(m)¶
- get_implicit_function(x)¶
Compute implicit function value at given point.
- Parameters:
x (numpy.ndarray) – Point in global coordinate space
- Returns:
Implicit function value
- Return type:
float
- get_implicit_function_canonical(x)¶
- get_point_from_gradient(m)¶
- get_point_from_normal(m)¶
- get_point_from_param(param, opt)¶
Convert parameterization to surface points.
- Parameters:
param (numpy.ndarray) – Parameter values
opt (str) – Parameterization type (“spherical”, “gradient”, “normal”)
- Returns:
Surface points in global coordinates
- Return type:
numpy.ndarray
- get_point_from_spherical(theta)¶
- get_points()¶
Get surface points in global coordinate frame.
- Returns:
Array of surface points
- Return type:
numpy.ndarray
- get_points_canonical()¶
Compute meshed surface points in canonical (local) frame :return: Surface points
- get_surf_gradients_canonical()¶
- get_surf_points()¶
Get surface mesh in global coordinate frame.
- Returns:
Mesh coordinates (xx, yy, zz)
- Return type:
tuple(numpy.ndarray, numpy.ndarray, numpy.ndarray)
- get_surf_points_canonical()¶
- get_volume()¶
- set_num_points(num)¶
Set number of surface points for meshing.
- Parameters:
num (list[int]) – Number of points in each parameter direction
- Returns:
Updated mesh grid parameters
- show(num, ax=None, color=None, alpha=None)¶
Display the geometry :param num: Parameter for surface points :param ax: Axis for the plot :param color: Color of the surface :return: Surface object and plot