Suport de curs
Suport de curs
Suport de curs
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Efectul <strong>de</strong> tip spot este cuantificat <strong>de</strong> factorul<br />
⎧<br />
⎨<br />
spotlight effect =<br />
⎩<br />
1, dacă θl = 180 0<br />
0, dacă vobj · vlight < cos θl,<br />
(vobj · vlight) al , în celelalte cazuri.<br />
Cu vobj este notat vectorul unitar orientat <strong>de</strong> la sursa <strong>de</strong> lumină la obiectul iluminat,<br />
iar cu vlight este notat versorul direct¸iei spotului <strong>de</strong> lumină GL SPOT DIRECTION.<br />
Termenul ambiental corespunzător unei surse <strong>de</strong> lumină este<br />
ambient term = ambientlight ∗ ambientmaterial.<br />
Reflexia difuză pentru o sursă <strong>de</strong> lumină este <strong>de</strong>scrisă <strong>de</strong> factorul<br />
<br />
(L · n) · diffuselight ∗ diffusematerial, dacă L · n > 0<br />
diffuse term =<br />
0, dacă L · n ≤ 0,<br />
un<strong>de</strong> L este vectorul unitar orientat <strong>de</strong> la vârf la sursa <strong>de</strong> lumină (în cazul<br />
surselor direct¸ionale este opusul direct¸iei acesteia, normat), iar n este normala<br />
la suprafat¸ă în vârful consi<strong>de</strong>rat. Reflexia speculară este dată <strong>de</strong><br />
<br />
shininess (H · n) · specularlight ∗ specular<br />
specular term =<br />
material, dacă L · n > 0<br />
0, dacă L · n ≤ 0,<br />
un<strong>de</strong> H =<br />
L + V<br />
, iar V este versorul <strong>de</strong>terminat <strong>de</strong> vârful consi<strong>de</strong>rat ¸si<br />
L + V<br />
pozit¸ia observatorului (se presupune că este activat mo<strong>de</strong>lul <strong>de</strong> iluminare cu<br />
observator local, i.e. GL LIGHT MODEL LOCAL VIEWER are valoarea GL TRUE .<br />
21