|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
What is wrong with below syntax ?
#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.
noticed in POV-Ray 3.1g and MegaPOV 0.7
ABX
--
#local A="000114120001121034130151142153134064180060195"#local B=0;#macro G()
#declare B=B+1;val(substr(A,B,1))#end#local S=seed(1);light_source{10,1}blob{
threshold.6#local U=z;#local Y=0;#while(Y<15)#local E=G()*.7+.1e-3;#local V=<
3.5-G(),G()-2.5,-1>;#local X=0;#while(X<1)sphere{<12*X+rand(S)-6,Y+rand(S)-5,
-1>1,1}sphere{U+X*(V-U)+rand(S)E,.3}#local X=X+.01;#end#local U=V;#local Y=Y+
1;#end texture{pigment{rgb 1}normal{agate}}}camera{location z*8look_at 0}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 26 Apr 2001 14:16:32 +0200, Wlodzimierz ABX Skiba wrote:
>#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.
Ambiguity. There's no way for POV to know that the last line isn't an
extra layer on the line before it, so as far as POV knows you're still
declaring A.
The workaround is to put something else in between.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 26 Apr 2001 09:09:21 -0400, Warp wrote:
> Defining a texture alone is an error in itself anyways
Not if it's the result of a macro, or if it's inside of an object definition.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This is one reason why semi-colons should be required in all #declares.
--
#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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker wrote in message ...
> On Thu, 26 Apr 2001 14:16:32 +0200, Wlodzimierz ABX Skiba wrote:
> > #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.
>
> Ambiguity.
Thanks, that was reason.
> The workaround is to put something else in between.
I moved declarations outside object but I agree that it could be possible write
";" after any declaration to finish it
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
>
> This is one reason why semi-colons should be required in all
> #declares.
And why the syntax for declaring a layered texture should be altered.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
John VanSickle <van### [at] erolscom> wrote:
: And why the syntax for declaring a layered texture should be altered.
It doesn't have to be if semicolons are used. A semicolon would end
the declaration, period.
--
#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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> It doesn't have to be if semicolons are used. A semicolon would end
>the declaration, period.
or rather. . .
"It doesn't have to be if semicolons are used. A semicolon would end
the declaration, semicolon."
:D
----------------------------------------
Batronyx ^"^
bat### [at] cadronhsacom
http://www.batronyx.com
Bhuddist monk to hotdog vendor:
"Make me one with everything."
----------------------------------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |