The Persistence of Vision Raytracer (POVRay).
This is the legacy Bug Tracking System for the POVRay project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.
FS#65  Add support for vectors with functions
Attached to Project:
POVRay
Opened by Christoph Lipka (clipka)  Sunday, 08 November 2009, 01:38 GMT
Last edited by William F Pokorny (wfpokorny)  Thursday, 19 January 2017, 14:31 GMT
Opened by Christoph Lipka (clipka)  Sunday, 08 November 2009, 01:38 GMT
Last edited by William F Pokorny (wfpokorny)  Thursday, 19 January 2017, 14:31 GMT

DetailsBeing able to have functions operate on vectors would be pretty nice to have. 
This task depends upon
The request is difficult to implement with the current code as it was never meant to be as universally useful as it turned out to be. The solution will have to be part of the 4.0 parser rewrite, and one good option will be to base the new function parser on llvm.
If there is a parser rewrite in the future, functions returning vectors/colors could also be implemented (vectors as input are easily separated into components already, but functions returning vectors are now almost inexistent). A standing workaround is
function { pigment { function {} color_map{} }}
which is ugly.
Such functions would simplify all existing syntax. Splines actually already behave as vectorvalued functions of one parameter. Now, one could also specify parametric curves (vectorvalued functions with 1 parameter), parametric surfaces (2 parameters) or patterns (3 parameters), or more parameters, if you need more variables. One could then have
parametric {
}
This would also enable using pigments and functions interchangeably: users could define their own color patterns, or use existing patterns as functions (now this is patched through builtin functions in "functions.inc"). The vectorvalued functions could provide a oneshot solution for displacement warps, normal maps (they would be normalized first by the code), or other
Is there any particular reason that patterns and functions are now treated differently by povray?
Now tracked on github as issue #190.