|
![](/i/fill.gif) |
hello everybody
I shall use the isosurface command whit a user-defined function (called
rbf)...I've defined a macro like this:
#macro rbf (X,Y,Z)
calcola_w(X,Y,Z)
calcola_r(X,Y,Z)
#while (i<N)
#local result=result+(w_[i]*r[i]);
#local i=i+1;
#end
#end
[It's not important the body of calcola_w ad calcola_r...]
I've writed:
#declare f = function(X,Y,Z) { rbf(X,Y,Z) }
I' hoped that using a command like this:
isosurface {
function { rbf(x,y,z) }
...
}
my problem would be solved... but not: I receive a parse error in which
povray say that x,y,z seem (in the body of calcola_w) to be 3 vectors...
So I've downloaded the source code to understand how is constructed the
function provided by povray like f_torus, f_sphere, etc...
In the source code (fnintern.cpp) I've seen that internal function povided
by povray has a sintax like this:
[fnintern.cpp]
DBL f_torus(DBL *ptr, unsigned int) // 70
{
PARAM_X = sqrt(PARAM_X * PARAM_X + PARAM_Z * PARAM_Z) - PARAM(0);
return -PARAM(1) + sqrt(PARAM_X * PARAM_X + PARAM_Y * PARAM_Y);
}
How can I define my rbf function in order to be able to use this function to
build an isosurface???
It's very important for my graduate thesis...please answer me!!!!
Thanks
Leo
Post a reply to this message
|
![](/i/fill.gif) |