POV-Ray : Newsgroups : povray.newusers : texture_maps and patterns Server Time
2 Nov 2024 05:21:46 EDT (-0400)
  texture_maps and patterns (Message 1 to 4 of 4)  
From: Queex
Subject: texture_maps and patterns
Date: 4 Aug 2004 06:55:00
Message: <web.4110bfef1de0e849cf668310@news.povray.org>
#declare foo = function {
   pattern {
     checker
   }
}

.....

texture {
    foo       //replace built-in pattern with previous declaration
    texture_map {
      [0.3  pigment{Red} finish{phong 1}]
      [0.3  T_Wood11]    //this is a texture identifier
      [0.6  T_Wood11]
      [0.9  pigment{DMFWood4} finish{Shiny}]
    }
}

The above are taken from the documentation. Thanks in advance


Post a reply to this message

From: Queex
Subject: Re: texture_maps and patterns
Date: 4 Aug 2004 07:05:00
Message: <web.4110c1b3e77d62b5cf668310@news.povray.org>
For some reason the following was deleted from the start of my post:

"I want to use a texture map with a user-defined pattern function (as
opposed
to the in-built ones). Is this possible? The texture_map documentation
seems to imply that the pattern you specify is simply a function, and the
documentation on patterns says you can define pattern functions, but when
I've attempted to put the two together the parse fails with an 'expected
pattern, found function' error. Is it shoddy syntax or am I trying to do
the impossible?"


Post a reply to this message

From: Warp
Subject: Re: texture_maps and patterns
Date: 4 Aug 2004 07:10:14
Message: <4110c416@news.povray.org>
Queex <nomail@nomail> wrote:
>     foo       //replace built-in pattern with previous declaration

  The correct syntax for that line is:

      function { foo(x, y, z) }

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Queex
Subject: Re: texture_maps and patterns
Date: 4 Aug 2004 07:30:00
Message: <web.4110c83be77d62b5cf668310@news.povray.org>
Thanks. Thought it would be something that simple.


Post a reply to this message

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