POV-Ray : Newsgroups : povray.general : Help with a spherical container : Re: Help with a spherical container Server Time
4 Aug 2024 02:16:04 EDT (-0400)
  Re: Help with a spherical container  
From: Alain
Date: 5 Nov 2003 09:07:16
Message: <Xns942A5CCBEE01FCaelum@204.213.191.226>
"Wesley Parker" <wes### [at] verizonnet> wrote in
news:3fa8468e@news.povray.org: 

> [...]
> but placing the lights is troubling me. I need the placement to be
> random, but at the same time the lights need to be on the inside of
> [...]

Just another idea for the position.  I think this should distribute quite 
well for your purposes:

(Where 5 is your radius)

5/(1+rand(S))*vnormalize(-1+2*<rand(S),rand(S),rand(S)>)

This was derived from the random distribution:

5*rand(S)*vnormalize(-1+2*<rand(S),rand(S),rand(S)>)

But, given that a sphere will have a higher concentration of points near 
the center, I thought you might prefer to place them inversely 
proportional to the distance from the center.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.