distance3d.random.randn_convex

distance3d.random.randn_convex(random_state, n_vertices=10, center_scale=1.0, min_radius=1.0, radius_scale=1.0)[source]

Sample convex mesh.

We randomly sample points from the surface of an ellipsoid.

Parameters:
random_statenp.random.RandomState

Random number generator.

n_verticesint

Number of points to sample from normal distribution.

center_scalefloat, optional (default: 1)

Scaling factor for center.

min_radiusfloat, optional (default: 1)

Minimum distance of vertices to the origin of the mesh.

radius_scalefloat, optional (default: 1)

Scaling factor for the distance to the origin of the mesh.

Returns:
mesh2originarray, shape (4, 4)

Pose of the mesh.

verticesarray, shape (n_vertices, 3), optional

Vertices of the convex mesh.

trianglesarray, shape (n_triangles, 3)

Vertex indices of faces.