POV-Ray : Newsgroups : povray.newusers : declared patterns without pigments ( rvalue ) : Re: declared patterns without pigments ( rvalue ) Server Time
13 May 2024 17:38:56 EDT (-0400)
  Re: declared patterns without pigments ( rvalue )  
From: Thorsten Froehlich
Date: 4 Jan 2014 16:45:01
Message: <web.52c8807784c187767f6553270@news.povray.org>
"Mr" <nomail@nomail> wrote:
> Hi, is there anyway to predeclare a pattern (preferably with its
> transformations) so that it can later be used equally within various normals or
> pigments?

You can use a pattern function, i.e.:

#declare foo = function {
   pattern {
     checker
   }
 }

 #declare MyNormal = normal {
     function { foo(x,y,z) }
}

You find it at the end of section "2.2.1.6.3 Declaring User-Defined Float
Functions" in http://www.povray.org/documentation/view/3.6.1/231/ .


Post a reply to this message

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