POV-Ray : Newsgroups : povray.beta-test : [doc] language basics in quick ref : Re: [doc] language basics in quick ref Server Time
29 Jul 2024 20:23:50 EDT (-0400)
  Re: [doc] language basics in quick ref  
From:
Date: 14 Mar 2002 06:25:47
Message: <aev09us85o1i12dpi64gepufahnam6rd5q@4ax.com>
On Wed, 13 Mar 2002 20:31:21 -0600, "Robert Chaffe"
<rob### [at] earthlinknet> wrote:
> I like that better anyway.  In the Float Expressions section I have removed the  hf 
from DOT_ITEM and removed my item note.
> The EXPRESSION in the User-Defined Functions section has been modified as suggested
above, and the new FN_DOT_ITEM has been
> added as well.

I have verified this with script and it seems correct as Thorsten said.

#include "functions.inc"

#macro f()
  V #if(params) (a,a,a) #end
#end

#macro F(V,params)
  #local Fx        = function(a){ f() .x        };
  #local Fy        = function(a){ f() .y        };
  #local Fz        = function(a){ f() .z        };
  #local Ft        = function(a){ f() .t        };
  #local Fu        = function(a){ f() .u        };
  #local Fv        = function(a){ f() .v        };
  #local Fred      = function(a){ f() .red      };
  #local Fgreen    = function(a){ f() .green    };
  #local Fblue     = function(a){ f() .blue     };
  #local Ffilter   = function(a){ f() .filter   };
  #local Ftransmit = function(a){ f() .transmit };
  #local Fhf       = function(a){ f() .hf       };
#end

F(1,no)                             // float     - all returns parse error
F(x,no)                             // vector    - all returns parse error
F(red 1,no)                         // color     - all returns parse error
F(function{f_agate(x,y,z)},yes)     // fn_float  - all returns parse error
F(function{transform{scale 1}},yes) // fn_vector - all work fine
F(function{pigment{agate}},yes)     // fn_color  - all work fine

ABX
--
disc{z,-z 5#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e,1))*.1-4#declare
e=e-1;#end#local e=26;pigment{#local g=function(_){ceil(_)-_}function#local//X
k=function{pattern{object{sphere_sweep{linear_spline 13#while(e>0)<O(),O()//AB
>.01#end}}}}{k(g(atan2(x,y)),g(ln((y+x)^2+1e-5)),0)}}finish{ambient 1}}//POV35


Post a reply to this message

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