2.7.11.1 Flat Distributions
SRand(Stream) . "Signed rand()", returns random numbers in the range [-1, 1]. Parameters:
-
Stream = Random number stream.
RRand(Min, Max, Stream) . Returns random numbers in the range [Min, Max]. Parameters:
-
Min = The lower end of the output range.
-
Max = The upper end of the output range.
-
Stream = Random number stream.
VRand(Stream) . Returns random vectors in a box from < 0, 0, 0> to < 1, 1, 1>
Parameters:
-
Stream = Random number stream.
VRand_In_Box(PtA, PtB, Stream) . Like VRand(), this macro returns a random vector in a box, but this
version lets you specify the two corners of the box. Parameters:
-
PtA = Lower-left-bottom corner of box.
-
PtB = Upper-right-top corner of box.
-
Stream = Random number stream.
VRand_In_Sphere(Stream) . Returns a random vector in a unit-radius sphere located at the origin.
Parameters:
-
Stream = Random number stream.
VRand_On_Sphere(Stream) . Returns a random vector on the surface of a unit-radius sphere located at the
origin. Parameters:
-
Stream = Random number stream.
VRand_In_Obj(Object, Stream) This macro takes a solid object and returns a random point that is inside
it. It does this by randomly sampling the bounding box of the object, and can be quite slow if the object occupies a
small percentage of the volume of its bounding box (because it will take more attempts to find a point inside the
object). This macro is best used on finite, solid objects (non-solid objects, such as meshes and bezier patches, do
not have a defined "inside", and will not work). Parameters:
-
Object = The object the macro chooses the points from.
-
Stream = Random number stream.
|