POV-Ray : Newsgroups : povray.advanced-users : "user-defined" isosurface : "user-defined" isosurface Server Time
28 Jul 2024 10:28:16 EDT (-0400)
  "user-defined" isosurface  
From: Leo80s
Date: 23 Jan 2006 08:15:00
Message: <web.43d4d60ef96a9fb672071f7b0@news.povray.org>
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

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