POV-Ray : Newsgroups : povray.unofficial.patches : Function problems in MegaPov : Re: Function problems in MegaPov Server Time
1 Sep 2024 22:15:40 EDT (-0400)
  Re: Function problems in MegaPov  
From: Chris Huff
Date: 10 Sep 2000 17:39:57
Message: <chrishuff-919033.16414710092000@news.povray.org>
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.