POV-Ray : Newsgroups : povray.general : Density help : Re: Density help Server Time
2 Aug 2024 10:24:09 EDT (-0400)
  Re: Density help  
From: Mike Thorn
Date: 17 Nov 2004 16:56:58
Message: <419bc92a$1@news.povray.org>
Slime wrote:
>>noisefunc(x,y,z,sqrt(x*x+y*y+z*z)
>>
>>The sqrt() part is the distance to the origin.
> 
> 
> Right.
> 
> 
>>And now you use the noise3d result of the current point, scaled with the
>>inverse of that distance? Could you give some more explanation on how
>>this works? All this function stuff is pretty new to me :)
> 
> 
> Well, when you divide each component (x,y,z) of a vector by the size of that
> vector, you get the normalized vector: that is, a vector pointing the same
> direction away from the origin, but of length 1. (The exception is when you
> try to do this for (0,0,0), which causes a division by zero - this makes
> sense because (0,0,0) doesn't really have a direction.) So the end result is
> that we're sampling the noise function on a sphere of radius 1. Another way
> to think about it is that when you divide out the distance from the origin,
> the distance is no longer a factor in where you're sampling the pattern:
> only the direction is a factor. This causes directional rays of light which
> don't vary according to distance.
> 
> If you want a busier pattern, you should change
> 
> f_noise3d(x/dist,y/dist,z/dist)
> 
> to
> 
> f_noise3d(x/dist * scale,y/dist * scale,z/dist * scale)
> 
> where scale is the amount to make the pattern busier by. This essentially
> increases the radius of the sphere that we're sampling on, so you get more
> variation in the pattern.

I'm totally lost, but that's to be expected. Math never was or will be 
my best subject.

Since Florian has it figured out now and we're on the topic of media 
density, can I ask a question? For a while now I've been wondering how 
one would create a plasma effect similar to this: 
http://van.hep.uiuc.edu/van/demos/Plasma%20Ball/PlasmaBall-small.jpp. 
How would any of you go about doing it?

~Mike


Post a reply to this message

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