POV-Ray : Newsgroups : povray.general : Translating turbulence : Re: Translating turbulence Server Time
2 Nov 2024 05:17:33 EDT (-0400)
  Re: Translating turbulence  
From: Christopher James Huff
Date: 19 May 2004 17:32:35
Message: <cjameshuff-8046AD.16325219052004@news.povray.org>
In article <Xns94EDD24F1E61Cseed7@news.povray.org>,
 ingo <ing### [at] tagpovrayorg> wrote:

>       translate <3,3,3>
>       warp {
>         turbulence 0.3
>       }
>       translate <-3,-3,-3>

You should also remember that the "warp {}" is necessary...otherwise, 
turbulence will be done first, no matter what its order relative to the 
other transformations is. As I recall, this dates from a time when 
turbulence was a separate feature, before warps were added.

You can package it into a nice little macro:

#macro Turbulence(Amt, Trans)
    transform {Trans inverse}
    warp {
        turbulence Amt
    }
    transform {Trans}
#end

#macro TurbulenceOLO(Amt, Octaves, Lambda, Omega, Trans)
    transform {Trans inverse}
    warp {
        turbulence Amt
        lambda Lambda
        octaves Octaves
        omega Omega
    }
    transform {Trans}
#end

TransformedTurbulence(0.3, transform {translate <-3,-3,-3>})

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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