Download presentation
Presentation is loading. Please wait.
Published byΦιλύρη Ζωγράφος Modified over 6 years ago
1
Compute the colour at point G – Guraud Shading
(-1, 1) (1, 1) A B F E y = 0 G=(-1, 0) D C (-2, -1) (2, -1) RGB Colours: CA = (100, 200, 100) CB = (50, 100, 200) CC= (100, 100, 200) CD = (200, 100, 50)
2
Compute the colour at point G – Guraud Shading
I(t) I(0) t Line AD x = -1 –t y = 1 –2t y=0 -> t = ½ -> x = -1.5 E = (0, -1.5) Linear interpolate the colours I = I(0) + (I(1) – I(0))t I(1/2) = (I(0) + I(1))/2 Colour at point E CE = (CA + CD)/2 = (150, 150, 75)
3
Compute the colour at point G – Guraud Shading
I(t) I(0) t Line BC x = 1 +t y = 1 –2t y=0 -> t = ½ -> x = 1.5 E = (0, 1.5) Linear interpolate the colours I = I(0) + (I(1) – I(0))t I(1/2) = (I(0) + I(1))/2 Colour at point F CE = (CB + CC)/2 = (75, 100, 200)
4
Compute the colour at point G – Guraud Shading
I(t) I(0) t Line EF x = t y = 0 X=-1 -> t = 1/6 Linear interpolate the colours I = I(0) + (I(1) – I(0))t I(1/6) = I(0)+(I(1)-I(0))/6 Colour at point G CE = (5CE + CF)/6 = (138, 142,96)
5
Compute the normal vector at point G – Phong shading
(-1, 1) (1, 1) A B F E y = 0 G=(-1, 0) D C (-2, -1) (2, -1) Normal Vectors NA = (1, 2, 3) NB = (1, 0, 4) NC= (0, 1, 2) ND = (2, 1, 3)
6
Compute the normal vector at point G – Phong shading
NG = (5NE+NF)/6 = (1.56, 1.56, 3) NE = (NA + ND)/2 = (1.5, 1.5, 3) NF = (NB + NC)/2 = (0.5, 0.5, 3)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.