Application of simple light illumination model to generate realistic graphics

The light illumination model refers to a formula for calculating the brightness and color composition of each point on the scene surface in the eyes of the observer according to the laws of optical physics and the like. Divided into a simple light illumination model and an overall light illumination model. The simple light illumination model only considers light source illumination, also known as local light illumination model. In addition to the illumination of the source, the overall illumination model should also consider the environmental impact.

1 When the light source is incident normally, the brightness of the light is reflected by the ambient light. The formula 1=13 is that it is generated based on ambient light that is uniformly reflected around, and is constant.

Specular reflection light brightness calculation formula 1 3 brightness in the specular reflection direction 0 angle between the line of sight and the specular reflection direction, the convergence index, the smoothness of the surface property is related to the viewpoint, the proportional coefficient of the nature of the surface is determined by the light vector art, unit After the unitization of the gaze line vector, the access reflection vector 1 is unitized and then the normal vector is 1 unitized, and then it is noted. 0=è™”, the position of the view vector vector of the vector is calculated, 2, the face point 2, then the line of sight direction can be agreed to be again, 7,21 reflection vector known art, hold, seek.

The key to generating a realistic shape MiCkeyM0Use using the Ph0ne model is to generate an ellipsoid. The generation process of the ellipsoid is as follows: l enter the radius of each parameter sphere, the position of the light source Lx, Ly, U, the position of the viewpoint Vx, Vy, VZ2. The program reference frame determines whether it is a back surface point, if it is a back point, it passes, not necessarily Calculate the brightness, calculate the 01 model, calculate the brightness of 7 and 2, and calculate the position of the phantom, 5, 3; in 3, 8, the 1 MiCkeyMOUse components include the left ear, the right ear, the head, and the eyes. And the nose, they are all ellipsoids. When setting the favorite color and position of the light source, the difficulty lies in the ambient light parameter diffuse light parameter, the specular reflection light parameter 13 and the ambient light color, the diffuse light color, and the specular reflection light color. The comprehensive coordination makes the ellipsoid have a sense of three-dimensionality and realism, which requires both a certain physics knowledge and repeated debugging.

Give the program of the left ear of the river elbow, the main part of the program. The rest is much the same.

The initial value of the variable is 0.5; such as = 0.95; ambient light, diffuse reflection, specular reflection parameters to generate point calculation on the spherical surface, 2 projection position on the screen ifzOVzjxs = xO; ys = yO; l line of sight coincides with the Z axis, 7, 2 unitization + vzOzzO; line of sight vector and normal vector angle cosine ifNdotDO.Ocontinue; back point through +lyOyyO + kOz20; ray vector and normal vector angle cosine line of sight vector and reflection vector angle cosine cool line vector and reflection vector clip The convergence of the cosine of the angle is the power of the index. The sacred convergence index is calculated by the model. The 2 luminosity 1 program runs through the 31.++60 environment to generate a stereoscopic real-life shape using the simple light illumination model 1 model without considering the environmental impact and Objects reflect light from each other, so the shape is more isolated and has no background. If the progress is through the overall light illumination model, plus the background ambient light perception.

Portable Energy Storage For Camping

Langrui Energy (Shenzhen) Co.,Ltd , https://www.langruienergy.com