POV-Ray : Newsgroups : povray.newusers : User-defined vector functions : User-defined vector functions Server Time
28 Jul 2024 14:30:10 EDT (-0400)
  User-defined vector functions  
From: Mathuin
Date: 5 Oct 2008 12:50:00
Message: <web.48e8ef33ae5e4190d8a103ef0@news.povray.org>
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?


Post a reply to this message

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