POV-Ray : Newsgroups : povray.pov4.discussion.general : Ideas. New f_distribution inbuilt function. f_hash usage. (povr branch). : Ideas. New f_distribution inbuilt function. f_hash usage. (povr branch). Server Time
18 Oct 2021 23:15:30 EDT (-0400)
  Ideas. New f_distribution inbuilt function. f_hash usage. (povr branch).  
From: William F Pokorny
Date: 15 Aug 2021 10:42:45
Message: <611927e5$1@news.povray.org>
A central intent for f_hash is a method by which we can create pseudo 
random streams from geometric, functional, color or whatever "seeds" - 
on the fly.

A sub aim is to use these f_hash "streams" as input to some of the 
common statistical distributions to create patterns - on the fly.

Elsewhere, I'd mentioned a plan to perhaps replace/extend the 
distributions in rand.inc with those shipped with c++11 onward. This 
idea hasn't panned out well - for a few reasons. Thinking rand.inc will 
stick around as is for a while.

What I've decided to do in the near term is add an f_distribution() 
function from which we can 'run' various distributions. I've only got a 
handful going, but it looks promising.

This means of implementation also allows alternative modes which are 
likely not useful in a purely statistical applications. For example, the 
geometric distribution supports a continuous value return mode in 
addition to the usual discrete value one.

An image is attached showing four of the implemented distributions of 
f_distribution as patterns. Using a cylindrical gradient into f_hash() 
as the initial seed(s) to the stream(s) required.

Bill P.


Post a reply to this message


Attachments:
Download 'distributionstory.jpg' (500 KB)

Preview of image 'distributionstory.jpg'
distributionstory.jpg


 

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