POV-Ray : Newsgroups : povray.unofficial.patches : Function problems in MegaPov : Re: Function problems in MegaPov Server Time
1 Sep 2024 22:16:21 EDT (-0400)
  Re: Function problems in MegaPov  
From: Greg M  Johnson
Date: 10 Sep 2000 20:38:09
Message: <39bc2971@news.povray.org>
Okay, I think I got it.  I posted my Volume macro to p.t.s.-f.

Chris Huff wrote:

> In article <39bbf7f1$1@news.povray.org>, "Greg M. Johnson"
> <"gregj;-)56590\""@aol.c;-)om> wrote:
>
> > How do I declare a pattern?
>
> Well, the only way to do it currently is to use either a pigment
> function or pigment_pattern...or put it in a macro. But you don't need
> to declare a pattern here.
>
> > So far I've tried declaring a function and a pigment but no luck in
> > getting pov to accept anything yet.  What is a pattern?
>
> I assume you are talking about using a pigment in a function...how were
> you doing it?
> Something like this *should* work, but it is untested:
>
> #declare MyFunc =
> function {
>     pigment {PATTERN color_map {[0 rgb 0][1 rgb 1]}}
> }
>
> #declare functionVal = eval_pattern(function {MyFunc}, < X, Y, Z>);
>
> You could even make a macro for evaluating declared functions:
> #macro Eval_Function(Func, X, Y, Z)
>     eval_pattern(function {Func}, < X, Y, Z>);
> #end
>
> --
> Christopher James Huff
> Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
> TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
>
> <><


Post a reply to this message

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