POV-Ray : Newsgroups : povray.pov4.discussion.general : Using vector components as function parameters : Re: Using vector components as function parameters Server Time
26 Apr 2024 07:45:51 EDT (-0400)
  Re: Using vector components as function parameters  
From: Simon Copar
Date: 20 May 2013 11:35:00
Message: <web.519a4283b1d79f3465a03f8f0@news.povray.org>
scott <sco### [at] scottcom> wrote:
> How come this doesn't parse:
>
> #local V = <0,1,2>;
> #local f = function(x,y,z){ sin(x*V.x) }
>
> but this does:
>
> #local V = <0,1,2>;
> #local Vx = V.x;
> #local f = function(x,y,z){ sin(x*Vx) }

Vectors don't work in functions. Nothing vector-like will work, except if your
function is a special vector function (defined as a transform or a spline).
Everything else is scalar-only.

This message is better suited for the "newusers" section.


Post a reply to this message

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