Generates random vertices inside a 3d sphere.

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

Syntax

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

Parameters

numberOfVertices
Type: System..::.Int32
The number of random points in the set.
radius
Type: System..::.Double
The radius of the sphere.

Return Value

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

See Also