POV-Ray : Newsgroups : povray.programming : POV Functions (Thorsten?) : Re: POV Functions (Thorsten?) Server Time
21 Jul 2024 08:05:36 EDT (-0400)
  Re: POV Functions (Thorsten?)  
From: Christopher James Huff
Date: 27 Oct 2002 13:05:21
Message: <chrishuff-A7D750.12583227102002@netplex.aussie.org>
In article <3dbc1972@news.povray.org>,
 "Thorsten Froehlich" <tho### [at] trfde> wrote:

> No, where would they be?  The G functions i know are apparently something
> completely different from those you know...

The "It's alive" thread in .general, and the "Re: Proposal for 4.0 core 
control" thread in .programming. The language is called "G" for now, 
because it is mainly for graphics and I needed a name. I've heard of 
S-expressions, but not G-functions.


> You should not really mess with tables of constant values.  It is
> initialised there in order to determine how many parameters a function
> takes, more information is not necessary. 

The problem isn't the amount of information, but when it is known. The 
POV VM doesn't know how many parameters a G function has until it is 
told, it can't be hard coded at compile time.


> However, I see no clean way to determine how many values got passed 
> to the functions and then take appropriate action.  If you desire 
> such functionality, you should really not add it with such an ugly 
> hack.

It doesn't need to count values passed to the function. It just needs to 
take the parameter count from a different source, because it can vary 
for individual declarations.
Modifying the trap table seems to work fine, it looks like the code only 
uses that value to set the parameter_cnt value in the function, then 
relies on that value. I don't like it either, but it's the only way I 
can see to do it without modifying large chunks of the POV VM code, 
which I am reluctant to do.


> Vectors are not allowed as function parameters, so...

Right...my memory was getting mixed up with thinking about the transform 
functions. My code will see triples of scalar parameters as single 
vector parameters where a vector parameter is needed.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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