POV-Ray : Newsgroups : povray.advanced-users : Stochastics expertise needed : Re: Stochastics expertise needed Server Time
17 May 2024 02:30:45 EDT (-0400)
  Re: Stochastics expertise needed  
From: lelama
Date: 27 Aug 2016 05:30:00
Message: <web.57c15b268629941b7a63dc9f0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 27.08.2016 um 05:49 schrieb clipka:
> > Am 27.08.2016 um 01:18 schrieb lelama:
> >
> >> You parametrize your sphere by t,y using the formula  x= r cos t, y,z= r sin t
> >> with  y in [-1,1] and r=sqrt(1-y^2).
> >>
> >> Then you choose t uniformly, and for y, you choose your distribution as you want
> >> (this is you free parameter). Then the density around a point x,y,z depends only
> >> on y.
> > ....
> >> This shoud satisfy all your needs if I'm not wrong.
> >
> > Gee, I you have indeed nailed it!
>
> Hm... this still leaves me with a quest for an easy-to-generate random
> distribution in the range [0..1) with a nicely configurable peak at 0,
> and an easy-to-compute probability density function.
>
> I guess I want the derivative of the probability density function to be
> zero at the peak, and ideally also at 1.

Hi,

There is a proposal at the end of my previous message. Using uniform
distribution for y,t,d and throwing away some "bad" points, you get
whatever distribution you want. If you don't like the piecewised
affine d that I suggested (the derivative of the density probabilty is not zero
at y=1, so maybe not suitable for you), you can choose any positive function d
instead with the same construction.

By the way, the parameter c1 is not useful in my formula for the function d. One
can take c1=1 and adjust only the parameters p ( p close to 1 means that the
peak is very localised around y=1 ) and c2 ( the higher the c2, the bigger the
difference of intensity between y=1 and the zone with low uniform intensity).

have a good day,


Post a reply to this message

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