Pointcloud.from_bounds

classmethod Pointcloud.from_bounds(x, y, z, n)

Construct a point cloud within a given box.

Parameters
  • x (float | tuple[float, float]) – Size of the cloud in the X direction. If a single value, the size is (0, x). If a pair of values, the size is (x[0], x[1]).

  • y (float | tuple[float, float]) – Size of the cloud in the Y direction. If a single value, the size is (0, y). If a pair of values, the size is (y[0], y[1]).

  • z (float | tuple[float, float]) – Size of the cloud in the Z direction. If a single value, the size is (0, z). If a pair of values, the size is (z[0], z[1]).

  • n (int) – The number of points in the cloud.

Returns

compas.geometry.Pointcloud

Notes

The XYZ coordinates of the n points are radnomly chosen within the provided x, y, and z bounds. Thererefor, there is no guarantee that the bounds are part of the resulting coordinates.

Examples

>>>