POV-Ray : Newsgroups : povray.programming : Location of Noise() and VScale() in source? : Re: Location of Noise() and VScale() in source? Server Time
20 Apr 2024 03:11:34 EDT (-0400)
  Re: Location of Noise() and VScale() in source?  
From: clipka
Date: 20 Apr 2019 11:59:39
Message: <5cbb41eb$1@news.povray.org>
Am 20.04.2019 um 14:19 schrieb Bald Eagle:

> I think with fresh eyes, I see that Noise is a call to PortableNoise - so maybe
> that will let me trace the code  :)

(Technically, `Noise` _may or may not_ be a call to `PortableNoise` - 
that depends on how the binary is compiled, and possibly also the 
features of the CPU it is actually run on. But since it is always a call 
to either that function or an optimized variant that gives the same 
results (the infamous "optimized noise generator"), this distinction is 
only relevant when making changes to the function.)

> VScale is called from the Turbulence function in texture.cpp

My, that's some old code there!

`VScale(a,b,c)` was a function that implemented uniform linear scaling 
of a vector back in the days when we used the C-style 3-element array 
type `VECTOR` to store vectors. That type has been superseded by the 
class type `Vector3d`, which provides operator overloading for the same 
purpose, and instead of `VScale(a,b,c)` we would now write `a=b*c`.

(Also, the `Turbulence` function now resides in `noise.cpp`.)


Post a reply to this message

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