Generates random vertices inside a 3d cube.

Namespace:  ceometric.ComputationalGeometry
Assembly:  ceometric.ComputationalGeometry (in ceometric.ComputationalGeometry.dll) Version: 2.4.0.0 (2.4.0.0)

Syntax

C#
public static PointSet RandomInCube(
	int numberOfVertices,
	double length,
	double width,
	double height
)
Visual Basic (Declaration)
Public Shared Function RandomInCube ( _
	numberOfVertices As Integer, _
	length As Double, _
	width As Double, _
	height As Double _
) As PointSet
Visual C++
public:
static PointSet^ RandomInCube(
	int numberOfVertices, 
	double length, 
	double width, 
	double height
)

Parameters

numberOfVertices
Type: System..::.Int32
The number of random points in the set.
length
Type: System..::.Double
The side length in x-direction.
width
Type: System..::.Double
The side length in y-direction.
height
Type: System..::.Double
The side length in z-direction.

Return Value

Returns a 3d set of points in the form of a cube. The points randomly lie inside the cube or on the surface of the cube. The center of the cube is (0,0,0).

See Also