POV-Ray : Newsgroups : povray.newusers : Calling 'procedures' with variables? : Re: Calling 'procedures' with variables? Server Time
5 Nov 2024 05:23:25 EST (-0500)
  Re: Calling 'procedures' with variables?  
From: Simon de Vet
Date: 29 Aug 2000 21:16:38
Message: <39AC60D1.D4A0E968@istar.ca>
Chris Huff wrote:

> #macro Radial(Rays, ClrA, ClrB)
>     pigment {radial
>         frequency Rays
>         color_map {
>             [0 color ClrA]
>             [1 color ClrB]
>         }
>     }
> #end

I'm using something nearly identical, but it is still not working.

My code is of the form:

#macro PigmentFunc (n)
    #declare Pigment = pigment { bla bla n bla bla }
#end

I then try to call it by using:

PigmentFunc (0.5)
texture {Pigment}


However, Pov still complains when it gets to the first line of the code which
contains the n variable, saying "numeric expression expected but undeclared
identifier 'n' found instead."

Am I missing something fundamental here? Would there be any benifit in my
posing the code?


Simon


Post a reply to this message

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