POV-Ray : Newsgroups : povray.pov4.discussion.general : Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0) : Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0) Server Time
3 Dec 2024 11:51:03 EST (-0500)
  Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0)  
From: William F Pokorny
Date: 1 Nov 2024 08:40:58
Message: <6724cc5a$1@news.povray.org>
About a year ago I was playing some with an idea for a facets normal 
perturbation.

Ref:

https://news.povray.org/povray.pov4.discussion.general/thread/%3C652b157c%40news.povray.org%3E/

As part of that work I mentioned using the population count opcode in 
most modern processors as part of a creating a normal-ish / 
sloppy-Gaussian distribution of not more than 64 values.

I had the thought at the time, we could probably extend the technique to 
random noise generation too.

Release (R16) of yuqk is adding a new inbuilt function called 
f_popnrm_rnoise(). Attached is an image of the +-1 noise created (no AA) 
and a histogram of the value distribution.

pigment {
     function { f_popnrm_rnoise(x,y,z,now,1) }
     function_interval
     color_map {
         [-1.0 rgb 0]
         [+1.0 rgb 1]
     }
}

The steps of the technique are certainly visible, but for a really fast, 
normal-ish, random, noise distribution - I think it will often be useful.

Bill P.

Hmmm, I wonder what happens if I use this directly as an isosurface 
function... To a first order, renders a noisy shape constrained by the 
container. Relatively quick, but HUGE max gradients need be ignored. :-) 
Mind running - what if we stick this noise only inside more usual shape 
functions or inbuilt shapes as part of a function. I bet they'd all show 
up... Anyhow. More play to be had I guess.


Post a reply to this message


Attachments:
Download 'f_popnrm_rnoise_story.png' (149 KB)

Preview of image 'f_popnrm_rnoise_story.png'
f_popnrm_rnoise_story.png


 

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