POV-Ray : Newsgroups : povray.general : Help with a spherical container : Re: Help with a spherical container Server Time
4 Nov 2024 17:30:15 EST (-0500)
  Re: Help with a spherical container  
From: Kurts
Date: 5 Nov 2003 01:09:18
Message: <kurtzlepirate-B9FAE6.07091605112003@netplex.aussie.org>
In article <3fa8468e@news.povray.org>, "Wesley Parker" <wes### [at] verizonnet> 
wrote:

> Hey, i had an idea for something pretty interesting but I am having problems
> implementing it.  What i did was create a sphere with object media at the
> origin with a radius of five. That part was easy enough, 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 the sphere. If they go outside,
> they light the sphere itself and that destroys the scene. So can anyone help
> me?
> 
> Thanks in advance.
> 
> 
hi,

you can about that :

take a rayon
take a random number from 0 to 360
take an other random number from +90 to -90
then just convert polar coordonates from this 3 number to rectangular <x,y,z>

pretty simply


Post a reply to this message

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