POV-Ray : Newsgroups : povray.general : bug or trivial mistake ? : Re: bug or trivial mistake ? Server Time
7 Aug 2024 23:16:45 EDT (-0400)
  Re: bug or trivial mistake ?  
From: Warp
Date: 26 Apr 2001 09:09:21
Message: <3ae81e01@news.povray.org>
Wlodzimierz ABX Skiba <abx### [at] abxartpl> wrote:
: #declare P=.5;
: #declare C=texture{pigment{color rgb 1}finish{ambient.5}}
: #declare B=texture{pigment{color rgb 0}finish{ambient 0}}
: #declare A=texture{average texture_map{[(1-P) C][P B]}}
: texture{gradient y texture_map{[0 B][.5 A][1 C]}}

: it causes error: ] expected but undeclared identifier 'A' found instead.

  The problem is that two contiguous textures define a layered texture.
So you are defining a layered texture names 'A' and you are using 'A'
inside it.

  Defining a texture alone is an error in itself anyways, so you can get rid
of both errors by defining the last line like:

#declare MyTexture = texture{gradient y texture_map{[0 B][.5 A][1 C]}}

-- 
#local D=array[6]{11117333955,7382340,3358,3900569407,970,4254934330}
#local I=0;#macro M()<mod(D[I],13)-6,mod(div(D[I],13),8)-3,10>#end
#while(I<6)cylinder{M()#local D[I]=div(D[I],104);M().1
pigment{rgb M()}}#local I=(D[I]>99?I:I+1);#end              /*- Warp -*/


Post a reply to this message

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