     POV-Ray : Newsgroups : povray.binaries.misc : Stochastic Spreadsheet Server Time 4 Feb 2023 09:56:47 EST (-0500) Stochastic Spreadsheet (Message 1 to 3 of 3)         From: Bald Eagle Subject: Stochastic Spreadsheet Date: 2 Sep 2016 00:10:00 Message:    ```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.57c8fabeab8df165e7df57c0%40news.povray.org",
"dateCreated": "2016-09-02T04:10:00+00:00",
"datePublished": "2016-09-02T04:10:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
Here's a little spreadsheet to very simply illustrate how I'm thinking about
this.

Hold down F9 and watch the iterations of random sampling cycle.
Lower the tightness value to increase the clustering at the higher values.

sqrt(x) is a nice little function ranging between 0 & 1 over 0 to 1.
The probability ranges from 0 to 2/3.

I calculate the function, and its probability and that's the top graph.

Next, the probability gets normalized then raised to a fractional power
representing the tightness term.
That importance-modified probability corresponds to an x value, which itself
corresponds to an F(x) value.
That gets plotted on the lower graph.

sin (x*(pi/2)) would give a (radially symmetric) spherical coordinate.

That's my implementation of employing the probability.  Choosing a suitable
function to evaluate that has the same shape as the BRDF is challenge 1, and
choosing it so that it can be easily and quickly integrated is the second
challenge.

Perhaps some sort of sigmoid shape would give you the peak and the F'(x)=0 at
y=1
```

Attachments:    From: clipka Subject: Re: Stochastic Spreadsheet Date: 2 Sep 2016 01:26:21 Message: <57c90d7d\$1@news.povray.org>    ```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#57c90d7d%241%40news.povray.org",
"dateCreated": "2016-09-02T05:26:21+00:00",
"datePublished": "2016-09-02T05:26:21+00:00",
"author": {
"@type": "Person",
"name": "clipka"
}
}
Am 02.09.2016 um 06:06 schrieb Bald Eagle:
> Here's a little spreadsheet to very simply illustrate how I'm thinking about
> this.

That's actually a pretty neat spreadsheet to illustrate why that
approach is wrong.

You generate a set of non-uniformly distributed random numbers by
applying a transformation function F(x)=sqrt(x), and you give a
probability density function f(x)=(2/3)*x^(2/3) (which I presume matches
the transformation function). So far so good.

But then you take those non-uniformly distributed random numbers and
apply a second transformation function, G(x)=x^n, and this time you fail
to account for the fact that this transformation again changes the
numbers' distribution.

Been there, done that. Doesn't work, I can tell you from experience ;)
```    From: Bald Eagle Subject: Re: Stochastic Spreadsheet Date: 2 Sep 2016 07:30:00 Message:    ```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.57c961e7abe4d54e5e7df57c0%40news.povray.org",
"dateCreated": "2016-09-02T11:30:00+00:00",
"datePublished": "2016-09-02T11:30:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
clipka <ano### [at] anonymous org> wrote:

> That's actually a pretty neat spreadsheet to illustrate why that
> approach is wrong.

They say stick with what you're good at.  ;)
"I have not failed. I've just found 10,000 ways that won't work."

> But then you take those non-uniformly distributed random numbers and
> apply a second transformation function, G(x)=x^n, and this time you fail
> to account for the fact that this transformation again changes the
> numbers' distribution.

Ah.  Because now you don't have a function describing the probability of the
G(x) data.  Right.
```        