Go to: Synopsis. Return value. Related. MEL examples.
sphrand
[<string>] <float> or <vector>
sphrand is undoable, queryable, and editable.
This command generates random vectors evenly distributed inside a sphere of the specified radius. If a vector argument is given, sphrand scales the output by the components of the vector argument. Multiple random number streams:// This command may be used to generate evenly distributed points on // the surface of a sphere when the output is normalized. $radius = 42; $result=unit(sphrand(1)) * $radius; // Result: <<5.35843, 28.2859, -30.581>> // string $s1 = "stream1"; $result=unit(sphrand($s1,1)) * $radius; // Result: <<5.35843, 28.2859, -30.581>> //