POV-Ray : Newsgroups : povray.windows : Nested While Loops Bug? Problem with arrays? Server Time
28 Jul 2024 18:12:09 EDT (-0400)
  Nested While Loops Bug? Problem with arrays? (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Nathan Kopp
Subject: Re: Nested While Loops Bug? Problem with arrays?
Date: 25 Oct 1998 00:41:01
Message: <36329D69.B50F77B@Kopp.com>
I agree that it should be changed.  The reason is probably that four- and
five- element vectors were originally intended for colors only.  However,
many users can probably think of far more uses.

Actually, fixing this 'bug' would require some changes to some of the
assumptions made by POV.  First, colors (4d or 5d vectors) and coordinates
(2d or 3d vectors) are considered different by POV.  Using one in place of
another usually generates errors.  This may not be the best way to handle
the issue, but it is what was chosen by the POV-Ray team long ago and
would require a bit of work to change.

-Nathan


Dan Connelly wrote:
> 
> It is a bug, intentional or otherwise, if it is inconsistent with the
> documentation, and I don't know where the documentation indicates
> that 4-d vectors must be associated with the color keyword.
> 
> What is the purpose of such a restriction?
> 
> Dan


Post a reply to this message

From: Nathan Kopp
Subject: Re: Nested While Loops Bug? Problem with arrays?
Date: 25 Oct 1998 00:43:55
Message: <36329E17.6F9044CF@Kopp.com>
One thing to add... this is basically a question of whether POV should be
a 'strongly typed' language or not.  In other words, should we allow
implicit conversions (color <-> vector) or not.

-Nathan


Post a reply to this message

From: Dan Connelly
Subject: Re: Nested While Loops Bug? Problem with arrays?
Date: 25 Oct 1998 05:56:56
Message: <363303C1.84E81FA7@flash.net>
Nathan Kopp wrote:
> 
> One thing to add... this is basically a question of whether POV should be
> a 'strongly typed' language or not.  In other words, should we allow
> implicit conversions (color <-> vector) or not.


I would leave the assignment of color status to the rgb* and/or
color keywords.

Vector->color conversions are trivial, but color->vector conversions
must be done with certain assumptions, such as rgbft.

But if there is no problem with vector<->color conversions,
why not allow them?  What is wrong with

  pigment { color rgb vrotate(<1, 0, 0>, <0, 0, clock*360>) }

or

  #local c = color rgb <1, 0, 0>;
  vlength(c)

for example?

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


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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