|
![](/i/fill.gif) |
nomail@nomail news:web.420b7c34c551b3d17485eb850@news.povray.org
> I'd like to call Library-Functions from SDL. Is there already an
> extension to POV-Ray that enables declaration of external user-defined
> functions?
>
I think it would be a greate idea. Hmm how about soemthing like this -
extent funcitons so that could work as a plugins for doing most things, not
only pattern functions (in density, pigment, and so on), but also while
shooting rays for camera and in other places.
Now extent macro language. Would it be very hard to implement minimalistic
C-like language interpreter? Then, on some platforms such funcitons could
be compiled using gcc before rendering to speed it up (someone done this
patch already, AFAIK it was mostnly for isosurfaces on Linux?). On other
platforms - it would be interpreted.
It would work like:
#function Vector3 ShootRay(float x, float y) {
Vector3 r;
r.x = x/2 + sin(y);
//...
return r;
}
#funcion Color Pigment1(float x, float y, float z) {
return ...... ;
}
camera { use { ShootRay } }
sphere { 0 1 pigment { use { Pigment1 } }
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
![](/i/fill.gif) |