POV-Ray : Newsgroups : povray.advanced-users : Manipulating Density Functions : Re: Manipulating Density Functions Server Time
8 Jul 2024 19:06:04 EDT (-0400)
  Re: Manipulating Density Functions  
From: slehar
Date: 25 Jul 2007 08:30:02
Message: <web.46a74221fbdcbb4ff75a90cb0@news.povray.org>
"Tom York" <alp### [at] zubenelgenubi34spcom> wrote:
> You can do this directly without all that tedious mucking about with
> waveform tricks and gradients. Scalar functions can be used directly as
> patterns (in POV v3.6.1's manual, this is section 3.5.11.15:  "Function as
> pattern").
>
> For your sine example I'm guessing the density would look like this:
>
> density {
>   function { 0.5 *(1 + sin(y*4*(2*pi))) }
>   color_map {
>     [0 color red 1]
>     [1 color green 1]
>   }
> }
>

Wow, thanks Tom! That looks like exactly what I am looking for!

I went round and round for days through the documentation and never ran into
that one!

Thanks!

  Steve


Post a reply to this message

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