POV-Ray : Newsgroups : povray.advanced-users : Parse error: float expected but vector or color expression found. : Re: Parse error: float expected but vector or color expression found. Server Time
28 Jul 2024 12:29:41 EDT (-0400)
  Re: Parse error: float expected but vector or color expression found.  
From: Leo80s
Date: 23 Jan 2006 05:30:00
Message: <web.43d4aed8afb56a7072071f7b0@news.povray.org>
> There's nothing wrong with that code in itself, as long as everything it
> uses are floats and not vectors.
>
> You'll get that error if X, or Y or Z are vectors

X,Y and Z is never defined...their first occourence is there:

isosurface {
        function { rbf(x,y,z) }
        ...
}

and rbf is defined in this way:

#macro rbf (X,Y,Z)
        #local i=0;
        #local result=0;

        calcola_w(X,Y,Z)
        ...
#end

in the body of calcola_w there was this function call:

#local
distanza=dist(X,Y,Z,coordinate[k][0],coordinate[k][1],coordinate[k][2]);

>        or if coordinate[][] is an array of vectors
>            because you can't use vectors in a user defined function
>
>        or if raggi[] is an array of vectors
>            because then denominatore would be a vector, and you can't
>            divide by a vector
>

coordinate and raggi is defined in this way:

#declare coordinate     = array [4524][3];
#declare raggi          = array [4524];

I hope I've explained my problem...X,Y,Z are used to construct an isosurface
using a function defined by myself...


Post a reply to this message

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