POV-Ray : Newsgroups : povray.general : Your preferences: an error message or 0.1*x+0.1==<0.2,0.1,0.1> Server Time
8 Aug 2024 16:15:16 EDT (-0400)
  Your preferences: an error message or 0.1*x+0.1==<0.2,0.1,0.1> (Message 1 to 6 of 6)  
From: Greg M  Johnson
Subject: Your preferences: an error message or 0.1*x+0.1==<0.2,0.1,0.1>
Date: 8 Dec 2000 10:05:37
Message: <3A30F760.81B55943@my-dejanews.com>
I had some code where I meant to say 0.1*x+0.1*z  but typed instead
0.1*z+0.1 .  It took me the longest time to figure this out.  I would
have hoped that povray would have given me an error message if I were to
mix variable types in an expression.

What say ye?
a)  Should the following text output  0.20=x,   0.10=y,   0.10=z,
OR
b) Should it give an error: mixed variable types
?

I'd certainly prefer b)!


Post a reply to this message

From: Greg M  Johnson
Subject: the code
Date: 8 Dec 2000 10:08:16
Message: <3A30F80A.3F8B040F@my-dejanews.com>
By the following code I meant:

#declare aaa=0.1*x+0.1;
#debug str(aaa.x,3,2)
#debug " =x,   "
#debug str(aaa.y,3,2)
#debug " =y,   "
#debug str(aaa.z,3,2)
#debug " =z,   "


Post a reply to this message

From: Ron Parker
Subject: Re: Your preferences: an error message or 0.1*x+0.1==<0.2,0.1,0.1>
Date: 8 Dec 2000 10:25:55
Message: <slrn931vc4.shn.ron.parker@fwi.com>
On Fri, 08 Dec 2000 09:59:44 -0500, Greg M. Johnson wrote:
>I had some code where I meant to say 0.1*x+0.1*z  but typed instead
>0.1*z+0.1 .  It took me the longest time to figure this out.  I would
>have hoped that povray would have given me an error message if I were to
>mix variable types in an expression.

That would sorta defeat the whole purpose of promoting scalars to vectors.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Your preferences: an error message or 0.1*x+0.1==<0.2,0.1,0.1>
Date: 8 Dec 2000 10:44:12
Message: <3A31006C.66375F74@my-dejanews.com>
Ron Parker wrote:

> That would sorta defeat the whole purpose of promoting scalars to vectors.

A)
I like being able to say
   camera { look_at 0
when I really mean:
   camera { look_at <0,0,0>

B)
I don't like pov accepting in expressions
    #declare a=0.1^0.5+0.1^x;
    #declare b=0.1^0.5+0.1*x;
    #declare c=0.1^0.5+x^<2,5,3>;

It's possible that this is impossible to "fix" B) without ruining A), or that
B). It's possible that B) is also "correct math." But it bugs me, I must
respectfully insist.


Post a reply to this message

From: Ron Parker
Subject: Re: Your preferences: an error message or 0.1*x+0.1==<0.2,0.1,0.1>
Date: 8 Dec 2000 10:56:55
Message: <slrn932168.siv.ron.parker@fwi.com>
On Fri, 08 Dec 2000 10:38:20 -0500, Greg M. Johnson wrote:
>B)
>I don't like pov accepting in expressions
>    #declare a=0.1^0.5+0.1^x;
>    #declare b=0.1^0.5+0.1*x;
>    #declare c=0.1^0.5+x^<2,5,3>;

POV, of course, doesn't accept any of these.  But I assume you're just
tweaking me now.

I'm not even sure what a or c should evaluate to, even in MegaPOV.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Your preferences: an error message or 0.1*x+0.1==<0.2,0.1,0.1>
Date: 8 Dec 2000 11:18:14
Message: <3A310871.E95D6011@my-dejanews.com>
Ron Parker wrote:

> POV, of course, doesn't accept any of these.  But I assume you're just
> tweaking me now.

Yikes, sorry, once again assuming that mega 0.5 without any version
statements==3.1g, which I guess is not true.

3.1g DOES accept:
     #declare aaa=0.1*0.1+<1,1,1>;

which is imho counterintuitive and I'd prefer here an error message, but
perhaps its standard math . . .


Post a reply to this message

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