POV-Ray : Newsgroups : povray.advanced-users : Implicit loops in function(x,y,z) : Re: Implicit loops in function(x,y,z) Server Time
5 Jul 2024 14:54:51 EDT (-0400)
  Re: Implicit loops in function(x,y,z)  
From: CoucouHibou
Date: 28 Sep 2008 10:05:01
Message: <web.48df8ec326dbfbf05fa61cfc0@news.povray.org>
Hi all,

after some research, I finally found this discussion which talks about a subject
very close to my problem.

I am currently trying to generate a function that interpolates the values of a
physical parameter from a 3-dimensional array. I have the same kind of error
message as what has been posted here, when I use the following code (my array
is named SapceSample, and it has nx*ny*nz elements):

#declare ExtrapFunc=function(px,py,pz){

.... SpaceSample[floor(px)[floor(py)][floor(pz)] ...;

}

The error message is:

Parse Error: ... undeclared identifier 'px'.

So I suppose that when POV-Ray hits the '[', it goes back to the SDL language,
as Warp explained in message #4.

Does anyone know any simple means to go round this problem? Is the only solution
to get a continuous representation of my parameter to define nx*ny*nz functions?

Otherwise, I read some things about the 'density_file' and df3 files. It seems
like that kind of stuff could work for my interpolation, but also that it can
only be used in the scattering media. Is it possible to generate a function
from that?

Thanks a lot for your help,

Hibou


Post a reply to this message

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