POV-Ray : Newsgroups : povray.general : Help with a spherical container : Re: Help with a spherical container Server Time
4 Aug 2024 02:23:49 EDT (-0400)
  Re: Help with a spherical container  
From: Warp
Date: 5 Nov 2003 08:06:28
Message: <3fa8f5d4@news.povray.org>
Tim Nikias v2.0 <tim.nikias (@) nolights.de> wrote:
> Ah, okay, I get it. You mean with the box approach, the points in the
> corners of the box, outside the sphere, will fall out, but in my case,
> they'll be introduced into the sphere. Hence a larger distribution of points
> in the "axis-corners" of the sphere, right?

  I actually rendered an image to see if the difference in distribution
is visible. I placed 20000 dots on the surface of a sphere using the
normalization method. The distribution is quite visible:

http://www.cs.tut.fi/~warp/images/test.jpg

> Then you're both right about that. Still, depending on the amount of
> lightsources required, I'd say there is no need to go into the hassle of the
> more difficult approach with if-statements and all that.

  It's no hassle to use the VRand_In_Sphere() macro in rand.inc.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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