rUniformTetrahedron

rUniformTetrahedron(*args)

Realization of a uniform distribution over a tetrahedron.

Parameters:
asequence of float, in \Rset^n

The first vertex of the triangle.

bsequence of float, in \Rset^n

The second vertex of the triangle.

csequence of float, in \Rset^n

The third vertex of the triangle.

dsequence of float, in \Rset^n

The fourth vertex of the triangle.

sizeint

The number of realizations to generate.

Returns:
realizationsPoint or Sample

The realizations of the uniform disctribution.

Notes

This method samples the barycentric coordinates, allowing to work in any dimension.

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> a = [1, 5, 0]
>>> b = [2, 3, -1]
>>> c = [-1, 2, 2]
>>> d = [1, 2, 1]
>>> r = ot.DistFunc.rUniformTetrahedron(a, b, c, d)
>>> r = ot.DistFunc.rUniformTetrahedron(a, b, c, d, 10)