distance3d.random.randn_rectangle

distance3d.random.randn_rectangle(random_state, center_scale=1.0, length_scale=1.0)[source]

Sample rectangle.

Parameters:
random_statenp.random.RandomState

Random number generator.

center_scalefloat, optional (default: 1)

Scale the center point by this factor.

length_scalefloat, optional (default: 1)

Scale the lengths by this factor.

Returns:
rectangle_centerarray, shape (3,)

Center point of the rectangle sampled from a normal distribution with standard deviation ‘center_scale’.

rectangle_axesarray, shape (2, 3)

Each row is a vector of unit length, indicating the direction of one axis of the rectangle. Both vectors are orthogonal. One direction is sampled from a normal distribution. The other one is generated from it.

rectangle_lengthsarray, shape (2,)

Lengths of the two sides of the rectangle sampled from a uniform distribution on the interval (0, length_scale].