POV-Ray : Newsgroups : povray.general : deforming a texture on a mesh : Re: deforming a texture on a mesh Server Time
29 Jul 2024 20:22:51 EDT (-0400)
  Re: deforming a texture on a mesh  
From: clipka
Date: 6 Sep 2010 22:31:57
Message: <4c85a41d$1@news.povray.org>
Am 07.09.2010 00:12, schrieb Christian Froeschlin:
> esterichia wrote:
>
>> Is it possible to use define fx, fy as macros? The transformation I
>> want to
>> apply depends on some parameters I have defined and parameters can not
>> be passed
>> to functions.
>
> Not quite sure what you mean. This works for me:
>
> #local PARAM = 5;
> #local f_param = function {2*x*PARAM}
> #debug str(f_param(1,0,0),3,0)
> #debug "\n"

Note that strictly speaking, from the function's perspective this is a 
constant, not a parameter, i.e.:

   #local PARAM = 5;
   #local f_param = function {2*x*PARAM}
   #local PARAM = 6; // this will have no effect on the function result
   #debug str(f_param(1,0,0),3,0)
   #debug "\n"


Post a reply to this message

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