Tuesday, May 20, 2008

Assignment #3, Question2

For this question Varvara Nika's blog was useful. I looked at their entry and compared it with my class notes and arrived at a better understanding, for myself, of this question.

To give credit to Varvara, I have taken their solution and tried to 'fill' in details as to what they were doing in the hopes that others might use our solution to help them out on their own assignment. You will notice that I have taken segments of Varvara's solution and added my own details.

In class prof Zabrocki gave us the following example:

0.7(x_1, y_1) + 0.2(x_2, y_2) + 0.1(x_3, y_3) = an average = a specific colour within that triangle in the chromaticity diagram

We have to use this note to help us specialize to only 2 colour cases.

For this question it is given that c_1 and c_2 are two valid colours in the chromaticity diagram with coordinates (x_1, y_1) and (x_2, y_2), respectively.

We also know that a colour 'c' is located on a line from c_1 to c_2, and has coordinates (x, y).



Based on our note from class, this colour c is a combination of c_1 and c_2 (will write c1 and c2 from here on), which can be described in what percent of c1 and c2 are in c.

How do we calculate the relative percentages of c1 and c2 which make the colour c?

Well, we need to calculate the distance from c1 to c2, the distance from c to c1 and lastly c to c2.

Recall that the distance formula is:



Once we have this, we can find a distance ratio in the form of (c to c1) divided by (c1 to c2) [Varvara calls this m_1] and then multiply by 100 to get the percent of c1 in c. Similarly we find the percent of c2 in c by calulating (c to c2) divided by (c1 to c2) [Varvara calls this m_2] multiplied by 100.

Writing this explanation algebraically we get (as given by Varvara):



This is a general expression for computing the relative percentages of c1 and c2 in a colour c laying on a straight line joining c1 and c2, if given the (x,y) coordinates of c1 and c2 within the chromaticity diagram.

Another general expression we can use is simply a modification of what Prof. Zabrocki gave us in class (for only 2 colours)

x = m_1(x_1) + m_2(x_2)

y= m_1(y_1) + m_2(y_2)

Written as one expression: (x,y)=m_1(x_1, y_1) + m_2(x_2, y_2).

No comments: