|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The first three plane definitions pass through the parser. The fourth
generates an error. Why?
plane{
<0,0,1>,1
pigment{rgb<1,1,1>}
}
plane{
<0,0,1>
1
pigment{rgb<1,1,1>}
}
plane{
<0,0,1>,-1
pigment{rgb<1,1,1>}
}
plane{
<0,0,1>
-1
pigment{rgb<1,1,1>}
}
Kenneth Hutson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Ken Hutson who wrote:
>The first three plane definitions pass through the parser. The fourth
>generates an error. Why?
>
>plane{
> <0,0,1>
> -1
> pigment{rgb<1,1,1>}
>}
In places where a vector expression is expected, "1" is considered to be
the vector <1,1,1>. So "<0,0,1> -1" means <0,0,1> - <1,1,1>, with the
"-" being interpreted a the binary minus operator rather then the unary
minus. In order to avoid this interpretation, the comma is required.
plane{ <0,0,1> 1 pigment{rgb<1,1,1>}} is OK because the 1 cannot be
parsed as part of a vector expression.
plane{ <0,0,1> +1 pigment{rgb<1,1,1>}} will fail because the 1 is parsed
as part of a vector expression, so a comma would be required.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ken Hutson" <ken### [at] goettingcom> wrote:
> The first three plane definitions pass through the parser. The fourth
> generates an error. Why?
>
> plane{
> <0,0,1>,1
> pigment{rgb<1,1,1>}
> }
>
> plane{
> <0,0,1>
> 1
> pigment{rgb<1,1,1>}
> }
>
> plane{
> <0,0,1>,-1
> pigment{rgb<1,1,1>}
> }
>
> plane{
> <0,0,1>
> -1
> pigment{rgb<1,1,1>}
> }
>
> Kenneth Hutson
4.plane :
You have forgotten "," : it must like that:
plane{
<0,0,1>,
-1
pigment{rgb<1,1,1>}
}
Hasan...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thank you sir!
Kenneth Hutson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Hasan3" <PRO### [at] Yahoocom> wrote in message
news:web.434968689b6ef72cc8a538750@news.povray.org...
> "Ken Hutson" <ken### [at] goettingcom> wrote:
>> The first three plane definitions pass through the parser. The fourth
>> generates an error. Why?
>>
>> plane{
>> <0,0,1>,1
>> pigment{rgb<1,1,1>}
>> }
>>
>> plane{
>> <0,0,1>
>> 1
>> pigment{rgb<1,1,1>}
>> }
>>
>> plane{
>> <0,0,1>,-1
>> pigment{rgb<1,1,1>}
>> }
>>
>> plane{
>> <0,0,1>
>> -1
>> pigment{rgb<1,1,1>}
>> }
>>
>> Kenneth Hutson
>
>
>
> 4.plane :
> You have forgotten "," : it must like that:
>
> plane{
> <0,0,1>,
> -1
> pigment{rgb<1,1,1>}
> }
>
>
> Hasan...
>
Hasan is correct.
Just in case you're wondering why the second example works, it's because
there's no positive or negative sign on the second parameter, so POV-Ray
assumes it's the second parameter and is happy.
With your 4th example the minus sign is taken as a mathematical operation
operating on the vector which evaluates to <-1,-1,0>. Then when POV-Ray
looks for the second parameter it can't find it and complains.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Whoops,
I responded before all of the messages downloaded, so I didn't see that Mike
already said that.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Chris B" <c_b### [at] btconnectcomnospam> wrote in message
news:434a2b5a@news.povray.org...
> Whoops,
> I responded before all of the messages downloaded, so I didn't see that
> Mike already said that.
>
Heh,
I was making the faulty assumption that (somehow) the hard return was
signalling that the second paramater was ready to be passed.
Thanks Chris.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|