problem on interpolation of gouraud shading

agassy

New member
Joined
Jul 24, 2007
Messages
1
hi all, I have this problem:



There is a triangle of vertex: P1=(11, 7), P2=(21, 7) e
P3=(16, 12). The colours associate to them ar: C1=(72, 150, 0)RGB, C2=(162, 180, 200)RGB, C3=(92, 165, 100)RGB.

What will be the colour associate to the point Q=(13, 9) e
R=(16, 10)?


There is the solution also but I have not understood it..





The value of the Q point (at 2/5 of the edge)one calculate interpolating on the left edge of the triangle:
QR = (92-72)·2/5+72 = 80
QG = (165-150)·2/5+150 = 156
QB = (100-0)·2/5+0 = 40
and will obtain Q=(80,156,40)RGB.

To calculate the color value of the R point one interpolate on the left and right edge of the triangle in way that obtain the colour value of the extremes of the scan line 10 in wich it lies: there are, respectively ,
(84,159,60) RGB e (120,171,140) RGB, interpolating on the scan-line (R it the central point) one obtain
R=(102,165,100)RGB.


I have not understoot why in the first point one use only an edge while in the second 2 and how it calculate the value 2/5.. What is?? the distance from the vertex or what?

thank and sorry for my english.
 
Top