|
|
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
|
|
|
|
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
|
|