POV-Ray : Newsgroups : povray.advanced-users : vturbulence in functions? : Re: vturbulence in functions? Server Time
29 Jul 2024 12:26:40 EDT (-0400)
  Re: vturbulence in functions?  
From: Christopher James Huff
Date: 29 Mar 2002 09:20:18
Message: <chrishuff-E18C28.09210729032002@netplex.aussie.org>
In article <3ca3bb8c@news.povray.org>,
 "Rune" <run### [at] mobilixnetdk> wrote:

> As I said, this will give an uneven distribution. The range of the noise
> will have the shape of a box rather than a sphere.

Noise won't give an even distribution anyway. I think this is the way 
POV combines them though. You can't just throw away bad points and try 
again, like you can with random points. Transforming a cube distribution 
into a spherical one would probably be more trouble than it's worth, and 
slow turbulence down a lot.
You could get something fairly close by simply normalizing the result, 
though.


> I don't understand why turbulence is not directly available in 
> functions somehow. A special warp function would be an obvious 
> addition to the existing pigment function and transform function, 
> which all return vectors.

The vturbulence() function isn't available because it is a vector 
function. The handling of vectors in user-defined functions isn't 
complete yet, that kind of thing will probably happen in later versions.
A warp function analogous to the transform functions would be very 
useful, and I think it's been suggested before...but if you look at the 
code, warps are pretty embedded in patterns. It might have been decided 
it was better to wait until that code was in better shape (or to wait 
for 4.0).


> Except that the pattern wrapper will mod the x, y, and z function to cycle
> in the 0 to 1 range.

I forgot about that...well, the workaround is to scale it down into the 
[0, 1] range in the function and scale it back outside.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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