From: Bruce S. <Bru...@nc...> - 2006-06-25 14:24:46
|
In the new beta VPython, color is red, green, blue, and optionally alpha (meaning opacity, with 0 transparent and 1 opaque). The name "alpha" is historical but is the standard term in professional graphics discourse. I invite discussion of the following proposal. Proposal: Suppose we use the term "opacity" throughout VPython, including documentation (to be written), but permit the use of "alpha" to accommodate those who normally use that term, with documentation pointing out in a footnote that one can use "alpha" as a synonym for "opacity". Rationale: There was already in VPython the label object where opacity is called "opacity", which was chosen to represent the concept because it's ordinary language, whereas "alpha" is technical. In keeping with the existing label opacity attribute, it seems appropriate to use the same word elsewhere for the same concept. Minor issue: In creating a texture object, one of the types is "rgba". In this proposal the standard form would be "rgbo" but as elsewhere with a footnote saying you can use "rgba". Bruce Sherwood P.S. A separate but related point is that currently "color.white" is a triple (1,1,1). Perhaps it should be a quadruple, (1,1,1,1)? It seems a bit unlikely that this would break any existing programs. Technically, the change would consist simply of changing the definitions in the crayola.py file. And the rgb<->hsv conversions would preserve the number of components in the original color. |