|
![](/i/fill.gif) |
"Mathuin" <mat### [at] gmail com> wrote:
> I used to think I knew more about POV-Ray than I apparently do. Either that, or
> this new project is introducing me to new corners of SDL and other interesting
> things.
>
> I find myself making sets of user-defined float functions because I can't figure
> out how to make a user-defined vector function. I end up with stuff like this:
>
> #declare LocX = function(x) { x + 1 }
> #declare LocY = function(y) { y * 2 }
> #declare LocZ = function(z) { z / 3 }
>
> I'd *much* rather have this:
>
> #declare LocXYZ = function(x, y, z) { <x + 1, y * 2, z / 3> }
>
> Any chance there's an easy way to do this? Will I have to use a macro?
I tend to use functions only for pigments, isosurfaces, and the like. If you
are using a vector function, then I presume you are describing a position/path,
color, etc. Both splines and macros are better suited for this in my opinion,
splines if you have a series of points to pass through, macros if you have a
set function (or functions).
Remember that a function of three variables as you have listed will generate a
surface/solid, whereas it seems that you are looking for a single vector at a
given value for the independent variable t (or whatever you use).
-Reactor
Post a reply to this message
|
![](/i/fill.gif) |