|
|
In article <3A9A89B3.F7059895@spiritone.com>, Josh English
<eng### [at] spiritonecom> wrote:
> something and something else can be vectors, but they will distribute
> within a straight line, so you will have to do this in triplicate for
> three different vectors to fill space.
Triplicate for three different vectors? Not quite, you just need three
calls to rand()...try these macros:
// "signed rand", ranges from -1 to 1
#macro SRand(RS) (rand(RS)*2 - 1) #end
// "ranged rand"
#macro RRand(Mn, Mx, RS) (Mn + rand(RS)*(Mx-Mn)) #end
// random point in cube from Mn to Mx
#macro RandPt(Mn, Mx, RS)
(Mn + < rand(RS), rand(RS), rand(RS)>*(Mx-Mn))
#end
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|