POV-Ray : Newsgroups : povray.binaries.images : Pigment Functions : Re: Pigment Functions Server Time
8 Aug 2024 22:12:33 EDT (-0400)
  Re: Pigment Functions  
From: PM 2Ring
Date: 25 Jun 2005 02:40:01
Message: <web.42bcfb43b3a6d0139b7567e60@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> PM 2Ring wrote:

Sorry about the delay replying, I've been unwell.

> > Here's an example or two of using full-colour pigment functions.
>
> Nice demo.

Thanks! It would be even better if I hadn't screwed up the algebra. :)
Fortunately, the error only gives an incorrect scale to the projection. See
the next message for a corrected version.

And BTW, thanks for all the helpful tutorials you've created over the years.

> Note the mechsim include file coming with MegaPOV contains a
> generic Vector_Function() macro that can simplify this kind of thing.
> The version in MegaPOV 1.1 only supports positive function values - here
> is the improved, more universal version:
>
>
> #ifndef (MSim_Fn_Range)
>  #declare MSim_Fn_Range=1e6;
> #end
>
> #macro Vector_Function_Range(Fn_X, Fn_Y, Fn_Z, Range)
>
>  #local PigX=
>  pigment {
>   function { 0.5+Fn_X(x, y, z)*(0.5/Range) }

If only POV would allow the passing of function names... I guess it can be
done in a roundabout way using Parse_String().


Post a reply to this message

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