POV-Ray : Newsgroups : povray.bugreports : Textures with declarartions Server Time
23 Jun 2024 15:29:21 EDT (-0400)
  Textures with declarartions (Message 1 to 4 of 4)  
From: Friedemann Schmidt
Subject: Textures with declarartions
Date: 1 Oct 1998 21:18:05
Message: <36141b86.7912930@news.povray.org>
Hi,

With POV-Ray for Windows v3.0 and v3.1 this works:

  sphere {
    0, 1
    texture { 
      #declare X = texture { pigment { color rgb <1, 0, 0> } } 
      #declare Dummy = 1234;
      X
    }
  }

This doesn't work - it causes an error like "Missing pigment"

  sphere {
    0, 1
    texture { 
      #declare X = texture { pigment { color rgb <1, 0, 0> } } 
      X
    }
  }

Bye,
Friedemann



Friedemann Schmidt
F.S### [at] fhtw-berlinde
Raytracing-Gallery: http://www.rz.fhtw-berlin.de/~s0049669/


Post a reply to this message

From: Dan Connelly
Subject: Re: Textures with declarartions
Date: 2 Oct 1998 01:07:11
Message: <3614516E.33BD46D4@flash.net>
It appears to me the problem is that the parser believes you
are defining a recursive compound texture..... butted
textures after a #declare are grouped.

So this may be a fundamental weakness in the syntax rather than
a bug in the implementation.

This should also "fail" :

sphere {
  0, 1
  #declare X = texture { pigment { color rgb 1 } }
  texture { pigment { color rgb 0 } }
}

The solution to this is for ALL "#" directives be semicolon terminated,
or at least all #declares..... I wonder why this wasn't done?

Dan

Friedemann Schmidt wrote:
> 
> Hi,
> 
> With POV-Ray for Windows v3.0 and v3.1 this works:
> 
>   sphere {
>     0, 1
>     texture {
>       #declare X = texture { pigment { color rgb <1, 0, 0> } }
>       #declare Dummy = 1234;
>       X
>     }
>   }
> 
> This doesn't work - it causes an error like "Missing pigment"
> 
>   sphere {
>     0, 1
>     texture {
>       #declare X = texture { pigment { color rgb <1, 0, 0> } }
>       X
>     }
>   }
> 




-- 
http://www.flash.net/~djconnel/


Post a reply to this message

From: Nathan O'Brien
Subject: Re: Textures with declarartions
Date: 2 Oct 1998 06:53:56
Message: <3614A055.CFDF2A5A@no13.net>
I believe there was talk of doing exactly that. But then "small" changes
are easier to implement than "large". Not just for the program but the
USER. 

-- 
regards

Nathan O'Brien
no1### [at] no13net
http://www.no13.net


Dan Connelly wrote:
> 
> 
> The solution to this is for ALL "#" directives be semicolon terminated,
> or at least all #declares..... I wonder why this wasn't done?
> 
> Dan


Post a reply to this message

From: Dan Connelly
Subject: Re: Textures with declarartions
Date: 2 Oct 1998 22:40:23
Message: <3615808A.B7981EA2@flash.net>
Nathan O'Brien wrote:
> 
> I believe there was talk of doing exactly that. But then "small" changes
> are easier to implement than "large". Not just for the program but the
> USER.

Not always.... surgery is usually best done in one session. 
There are arguments on both sides.

Dan
-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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