POV-Ray : Newsgroups : povray.general : recursively defined objects and memory : Re: recursively defined objects and memory Server Time
29 Jul 2024 10:31:55 EDT (-0400)
  Re: recursively defined objects and memory  
From: Ger
Date: 19 Aug 2013 11:38:23
Message: <52123bef$1@news.povray.org>
On 08/19/2013 09:47 AM, clipka wrote:
> Am 19.08.2013 14:55, schrieb scott:
>>>    #declare Cut = object { CuttingPlane translate y * Displacement
>>> rotate <AngleX, AngleY, AngleZ> };
>>
>> ....
>>
>>>    #declare PlaneAngleX = rand(RandAngle) * 360;
>>>    #declare PlaneAngleY = rand(RandAngle) * 360;
>>>    #declare PlaneAngleZ = rand(RandAngle) * 360;
>>
>> On a separate note, are you sure that method of choosing the plane
>> orientation gives a uniform random distribution...?
>
> #declare Cut = object { CuttingPlane translate
> VRand_On_Sphere(RandAngle) * Displacement };
>
> should do the trick.
>
Using 3 separate rand()'s gave me a better result than a single rand(), 
but by no means uniform. But then again, that was not the problem I was 
trying to solve :)

-- 
Cheers
Ger


Post a reply to this message

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