POV-Ray : Newsgroups : povray.programming : complicated functions : Re: complicated functions Server Time
28 Jul 2024 14:23:37 EDT (-0400)
  Re: complicated functions  
From: Chris Huff
Date: 11 Nov 2000 10:53:53
Message: <chrishuff-8288C3.10540111112000@news.povray.org>
In article <3a0d4d1c@news.povray.org>, "Wlodzimierz ABX Skiba" 
<abx### [at] abxartpl> wrote:

...snip stuff about function parameters...
This looks good. Isosurfaces could automatically add the x, y, and z 
variables so old functions are supported without extra work. What I mean 
is that x, y, and z become available to the function declaration in 
isosurfaces, allowing you to use them in calls to other functions. This 
would also help in allowing functions to be used in other places where 
x, y, and z don't make much sense.


> Perhaps, if it will be possible I will add
> - recursion: Func=function(a,b){a+b+Func(a+1,b-1)}

This shouldn't be too hard, since it is apparently possible to trick the 
parser into allowing this already.


> - registration to use function also during parsing

By this, do you mean something like this?
#declare SineWave = function(v) {sqr(sin(v))}
#declare Val = SineWave(clock*5);

In other words, allowing the function to be called in ordinary scene 
code...this should be pretty easy, I have been trying to figure it out.
BTW, if you ever figure out what TmpFunc and tempfunc are for, tell 
me...as far as I can tell, they don't do anything.

-- 
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.