POV-Ray : Newsgroups : povray.newusers : usage of #declare Server Time
31 Oct 2024 19:26:31 EDT (-0400)
  usage of #declare (Message 1 to 7 of 7)  
From: dabbler
Subject: usage of #declare
Date: 4 Jun 2007 22:15:01
Message: <web.4664c4dcbdd8b0ac38f605ab0@news.povray.org>
can anyone tell me why this does not work: (the #declare line gets the
yellow overlay)

#declare SourceImage = "F:\apps\POV-Ray for Windows
v3.6\hfields\HF101SizeMaters44.png";

height_field {
  png SourceImage
  translate -0.5
  scale <52,12,52>
  pigment{color rgb <1,1,0> }
}

but this does:

height_field {
  png "F:\apps\POV-Ray for Windows v3.6\hfields\HF101SizeMaters44.png"

  translate -0.5
  scale <52,12,52>
  pigment{color rgb <1,1,0> }
}


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: usage of #declare
Date: 4 Jun 2007 22:35:47
Message: <4664cc03@news.povray.org>
dabbler wrote:
> can anyone tell me why this does not work: (the #declare line gets the
> yellow overlay)

And what is the error message?


Post a reply to this message

From: Marc
Subject: Re: usage of #declare
Date: 5 Jun 2007 02:36:57
Message: <46650489$1@news.povray.org>

4664cc03@news.povray.org...
> dabbler wrote:
>> can anyone tell me why this does not work: (the #declare line gets the
>> yellow overlay)
>
> And what is the error message?

Dabbler, if you are using the windows interface, you have a "Messages" tab.
on the Messages page you should find the error message at the end of the log

Marc


Post a reply to this message

From: Penelope20k
Subject: Re: usage of #declare
Date: 5 Jun 2007 04:11:26
Message: <46651aae$1@news.povray.org>
chnge

#declare SourceImage = "F:\apps\POV-Ray for Windows
v3.6\hfields\HF101SizeMaters44.png";

into

#declare SourceImage = "F:\\apps\\POV-Ray for Windows
v3.6\\hfields\\HF101SizeMaters44.png";


double  the \

should be solve the prob






news:web.4664c4dcbdd8b0ac38f605ab0@news.povray.org...
>
> can anyone tell me why this does not work: (the #declare line gets the
> yellow overlay)
>
> #declare SourceImage = "F:\apps\POV-Ray for Windows
> v3.6\hfields\HF101SizeMaters44.png";
>
> height_field {
>   png SourceImage
>   translate -0.5
>   scale <52,12,52>
>   pigment{color rgb <1,1,0> }
> }
>
> but this does:
>
> height_field {
>   png "F:\apps\POV-Ray for Windows v3.6\hfields\HF101SizeMaters44.png"
>
>   translate -0.5
>   scale <52,12,52>
>   pigment{color rgb <1,1,0> }
> }
>
>
>
>
>


Post a reply to this message

From: Warp
Subject: Re: usage of #declare
Date: 5 Jun 2007 09:13:11
Message: <46656167@news.povray.org>
Penelope20k <pen### [at] caramailfr> wrote:
> #declare SourceImage = "F:\\apps\\POV-Ray for Windows
> v3.6\\hfields\\HF101SizeMaters44.png";

  Just use (single) forward slashes. Easier to write.

-- 
                                                          - Warp


Post a reply to this message

From: Tim Attwood
Subject: Re: usage of #declare
Date: 5 Jun 2007 18:39:33
Message: <4665e625@news.povray.org>
>  Just use (single) forward slashes. Easier to write.

Yeah, the explanation is that backwards slashes are
considered escape sequences for special characters
when they are in string variables, but a string literal
is used as-is in a height_field.
3.2.2.7.2  Text Formatting


Post a reply to this message

From: Thomas de Groot
Subject: Re: usage of #declare
Date: 13 Jun 2007 03:38:08
Message: <466f9ee0$1@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> schreef in bericht 
news:4665e625@news.povray.org...
>>  Just use (single) forward slashes. Easier to write.
>
> Yeah, the explanation is that backwards slashes are
> considered escape sequences for special characters
> when they are in string variables, but a string literal
> is used as-is in a height_field.
> 3.2.2.7.2  Text Formatting
>
>

Strange... I have never had any problem with single backward slashes...

Thomas


Post a reply to this message

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