Analytical Derivation of The Over Operator
Porter and Duff gave a geometric interpretation of the alpha compositing formula by studying orthogonal coverages. Another derivation of the formula, based on a physical reflectance/transmittance model, can be found in a 1981 paper by Bruce A. Wallace.
A third approach is found by starting out with two very simple assumptions. For simplicity, we shall here use the shorthand notation for representing the over operator.
The first assumption is that in the case where the background is opaque (i.e. ), the over operator represents the convex combination of and :
The second assumption is that the operator must respect the associative rule:
Now, let us assume that and have variable transparencies, whereas is opaque. We're interested in finding
- .
We know from the associative rule that the following must be true:
We know that is opaque and thus follows that is opaque, so in the above equation, each operator can be written as a convex combination:
Hence we see that this represents an equation of the form . By setting and we get
which means that we have analytically derived a formula for the output alpha and the output color of .
An even more compact representation is given by noticing that :
It is also interesting to note that the operator fulfills all the requirements of a non-commutative monoid, where the identity element is chosen such that (i.e. the identity element can be any tuple with .)
Read more about this topic: Alpha Compositing
Famous quotes containing the word analytical:
“I have seen too much not to know that the impression of a woman may be more valuable than the conclusion of an analytical reasoner.”
—Sir Arthur Conan Doyle (18591930)