Hi below is code for a "simple illumination model". Similar to phong or gouraud shading. My question is do I multiply th

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Hi below is code for a "simple illumination model". Similar to phong or gouraud shading. My question is do I multiply th

Post by answerhappygod »

Hi below is code for a "simple illumination model". Similar to phong or gouraud shading. My question is do I multiply the final "i" variable ( 3.45 in this example) times each RGB component?
thanks
I*R
I*G
I*B
Hi Below Is Code For A Simple Illumination Model Similar To Phong Or Gouraud Shading My Question Is Do I Multiply Th 1
Hi Below Is Code For A Simple Illumination Model Similar To Phong Or Gouraud Shading My Question Is Do I Multiply Th 1 (719.94 KiB) Viewed 43 times
Example 5-1 Simple Illumination Model Recalling Fig. 5-5 assume that at point P on the surface the normal, light, and sight vectors are n = L = S = By inspection the reflection vector R is then R = i +2j+k Assuming that there is only one object in the scene, d = 0 and K = 1. The light source is assumed to be 10 times more intense than the ambient light; i.e., la = 1 and = 10. The surface is to have a shiny metallic appearance. Hence, most of the light will be specularly reflected. Thus, assume k, = 0.8, kdka= 0.15 and n = 5. Note that k, + kd= 0.95, which implies that 5% of the energy from the light source is absorbed. Determining the various elements of the illumination model yields or j i + 2j- k i + 1.5j + 0.5k n. Î= n-L j.(-i+2j-k) √(-1)² + (2)² + (−1)² nL 0 = cos ¹ (2/6)= 35.26° 2 V6
and or Finally then and R.S R-S= RS Here (i+2j+k) (i+1.5j +0.5k) √(1)²+(2)² + (1)²(1)² + (1.5)² + (0.5) 1 = (1)(0.15) + (10/1)[(0.15)(2/6) + (0.8)(4.5/√/21)] = 0.15 + 10(0.12 +0.73) = 8.65 Because the sight vector is almost coincident with the reflection vector, an at the point P. However, if the position observer would see a bright highlig of the observer is changed such that the sight vector is S=i+1.5j-0.5k 4.5 4.5 V6√3.5 V21 a = cos¹ (4.5/√21) = 10.89° R-S= R-S RS 11 a = 40.2° 3.5 V21 /= 0.15 +10(0.12 +0.21) 3.45 Gianntly reduced.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply