POV-Ray : Newsgroups : povray.advanced-users : user defined function : Re: user defined function Server Time
28 Jul 2024 12:31:01 EDT (-0400)
  Re: user defined function  
From: kurtz le pirate
Date: 11 Jan 2006 06:25:40
Message: <43c4eb34$1@news.povray.org>

web.43c4e70d47b9b0fe72071f7b0@news.povray.org...
> Hello everybody,
>
> I need to understand exactly how can I specify in POV-RAY a
> user-defined-function...I read many guide and tutorial and I have 
> not
> understand if it's possible or not...for example: I need to define a
> function that take 3 parameters (a,b,c) and give in output sqrt
> (a^2+b^2+c^2)...Can somebody send me an example and tell me exactly 
> where I
> have to put this function's code in a povray source file?

#macro myFunction(a,b,c)
    sqrt(a*a+b*b+c*c)
#end



...
#declare foo=myFunction(3,4,5);

hope that help,
klp


Post a reply to this message

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