1.实验目的和要求

  • 目的:了解简单光照明模型的基本原理,掌握简单光照明模型的计算方法;
  • 要求:读懂WebGL光照示范代码,实现简单物体的光照效果。

2. 实验过程

(1) 示范代码为立方体在一束平行光照射下的漫反射光照效果。结合示范代码,学习掌握简单光照明模型的基本原理与实现;
(2) 修改示范代码,给出不同光照参数和立方体位置,观察与验证光照效果;
(3) 示范代码仅有漫反射光的光照效果,请尝试为其添加环境反射光和镜面反射光效果。

3.实验结果

仅有漫反射光的光照效果如下图所示:

添加环境反射光后的立方体效果如下图所示:

添加环境反射光与镜面反射光后的立方体效果如下图所示:

4.实验分析

简单光照明模型指的是物体表面上一点P反射到视点的光强I为环境光的反射光强IeIeI_{e}、理想漫反射光强IdIdI_{d}、和镜面反射光IsIsI_{s}的总和,即

I=Ie+Id+Is=IaKa+IpKd(L⋅N)+IpKs(R⋅V)nI=Ie+Id+Is=IaKa+IpKd(L⋅N)+IpKs(R⋅V)n

I = I_{e}+I_{d}+I_{s} = I_{a}K_{a}+I_{p}K_{d}(L \cdot N)+I_{p}K_{s}(R \cdot V)^n
其中R,V,N为单位矢量,如下图所示。 IpIpI_{p}为点光源发出的入射光强; IaIaI_{a}为环境光的漫反射光强; KaKaK_{a}为环境光的漫反射系数; KdKdK_{d}为漫反射系数; KsKsK_{s}为镜面反射系数;n为镜面反射指数,用以反映物体表面的光滑程度,表面越光滑,n越大。这些参数与材料表面特性有关。
在用Phong模型进行真实感图形计算时,对物体表面上的每个点P,均需计算光线的反射方向R,再由V计算 (R⋅V)(R⋅V)(R \cdot V)。为减少计算量,常用 (N⋅H)(N⋅H)(N \cdot H)近似 (R⋅V)(R⋅V)(R \cdot V),这里H为L和V的角平分向量,即:

H=L+V|L+V|H=L+V|L+V|

H= \dfrac{L+V}{|L+V|} 在这种简化下,由于对所有的点总共只需计算一次H的值,节省了计算时间。


本次实验中,光线为平行光,光线方向为单位向量L(-0.5, 1, 1),视点在点(0.0, 0.0, 5.0)处,视线方向V需要逐点计算。

5.实验代码

gl-matrix.js 下载地址:http://oty0nwcbq.bkt.clouddn.com/gl-matrix.js

(1) 仅有漫反射光的立方体效果

(i) LightedCube-Parallel.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>WebGl光照</title></head><script id="vertex-shader" type="x-shader/x-vertex">attribute vec4 a_Position;  attribute vec4 a_Color;  attribute vec4 a_Normal;         // Normaluniform mat4 u_MvpMatrix; uniform vec3 u_LightColor;      // Light coloruniform vec3 u_LightDirection;  // Light direction (in the world coordinate, normalized)varying vec4 v_Color; void main() { gl_Position = u_MvpMatrix * a_Position ; // Make the length of the normal 1.0vec3 normal = normalize(a_Normal.xyz); // Dot product of the light direction and the orientation of a surface (the normal)float nDotL = max(dot(u_LightDirection, normal), 0.0); // Calculate the color due to diffuse reflectionvec3 diffuse = u_LightColor * a_Color.rgb * nDotL; v_Color = vec4(diffuse, a_Color.a); } </script><script id="fragment-shader" type="x-shader/x-fragment">#ifdef GL_ES precision mediump float; #endif varying vec4 v_Color; void main() { gl_FragColor = v_Color; } </script><body onload="startup()"><canvas id="myGLCanvas" width="600" height="600"></canvas></body><script type="text/javascript" src="gl-matrix.js"></script><script type="text/javascript" src="LightedCube-Parallel.js"></script>
</html>

(ii) LightedCube-Parallel.js

var gl;
function startup(){var canvas = document.getElementById('myGLCanvas');//获取<canvas>元素gl = createGLContext(canvas);setupShaders(); // Write the positions of vertices to a vertex shadervar n = initVertexBuffers(gl);if (n < 0) {console.log('Failed to set the positions of the vertices');return;}// Set clear color and enable hidden surface removalgl.clearColor(0.0, 0.0, 0.0, 1.0);gl.enable(gl.DEPTH_TEST);// Get the storage location of u_MvpMatrixvar u_MvpMatrix = gl.getUniformLocation(gl.program, 'u_MvpMatrix');var u_LightColor = gl.getUniformLocation(gl.program, 'u_LightColor');var u_LightDirection = gl.getUniformLocation(gl.program, 'u_LightDirection');if (!u_MvpMatrix || !u_LightColor || !u_LightDirection) { console.log('Failed to get the storage location');return;}// Set the light color (white)gl.uniform3f(u_LightColor, 1.0, 1.0, 1.0);// Set the light direction (in the world coordinate)var lightDirection = vec3.fromValues(-0.5, 1, 1);vec3.normalize(lightDirection,lightDirection); // Normalizegl.uniform3fv(u_LightDirection, lightDirection);// Set the eye point and the viewing volume// View Matrixvar eye = vec3.fromValues(0.0, 0.0, 5.0);var center = vec3.fromValues(0.0, 0.0, 0.0);var up = vec3.fromValues(0.0, 1.0, 0.0);var vMatrix = mat4.create();mat4.lookAt(vMatrix, eye, center, up);// Model Matrixvar mMatrix = mat4.create();mat4.scale(mMatrix, mMatrix, [1.0, 1.0, 1.0]);mat4.rotate(mMatrix, mMatrix, Math.PI/4, [0.0, 1.0, 0.0]);// Projection Matrixvar pMatrix = mat4.create();mat4.frustum(pMatrix, -1.0, 1.0, -1.0, 1.0, 1.5, 20.0);var mvpMatrix = mat4.create();mat4.multiply(mvpMatrix, vMatrix, mMatrix);mat4.multiply(mvpMatrix, pMatrix, mvpMatrix);// Pass the model view projection matrix to u_MvpMatrixgl.uniformMatrix4fv(u_MvpMatrix, false, mvpMatrix);// Clear color and depth buffergl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);// Draw the cubegl.drawElements(gl.TRIANGLES, n, gl.UNSIGNED_BYTE, 0);}function createGLContext(canvas) {var names = ["webgl", "experimental-webgl"];var context = null;for (var i=0; i < names.length; i++) {try {context = canvas.getContext(names[i]); //获取webgl context绘图上下文} catch(e) {}if (context) {break;}}if (context) {context.viewportWidth = canvas.width;context.viewportHeight = canvas.height;} else {alert("Failed to create WebGL context!");}return context;
}function setupShaders() {    var vertexShader = loadShader(gl.VERTEX_SHADER, "vertex-shader");var fragmentShader = loadShader(gl.FRAGMENT_SHADER, "fragment-shader");var shaderProgram = gl.createProgram();gl.attachShader(shaderProgram, vertexShader);gl.attachShader(shaderProgram, fragmentShader);gl.linkProgram(shaderProgram);if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {alert("Failed to setup shaders");}gl.useProgram(shaderProgram);gl.program= shaderProgram;
}function loadShader(type, ShaderId) {var shaderScript = document.getElementById( ShaderId );var shader = gl.createShader(type);gl.shaderSource( shader, shaderScript.text );gl.compileShader( shader );if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {alert("Error compiling shader" + gl.getShaderInfoLog(shader));gl.deleteShader(shader);   return null;}return shader;
}// 立方体绘制采用《WebGL Programming Guide》第7章示例程序ColoredCube
function initVertexBuffers(gl) {// Create a cube//    v6----- v5//   /|      /|//  v1------v0|//  | |     | |//  | |v7---|-|v4//  |/      |///  v2------v3var vertices = new Float32Array([   // Vertex coordinates1.0, 1.0, 1.0,  -1.0, 1.0, 1.0,  -1.0,-1.0, 1.0,   1.0,-1.0, 1.0,  // v0-v1-v2-v3 front1.0, 1.0, 1.0,   1.0,-1.0, 1.0,   1.0,-1.0,-1.0,   1.0, 1.0,-1.0,  // v0-v3-v4-v5 right1.0, 1.0, 1.0,   1.0, 1.0,-1.0,  -1.0, 1.0,-1.0,  -1.0, 1.0, 1.0,  // v0-v5-v6-v1 up-1.0, 1.0, 1.0,  -1.0, 1.0,-1.0,  -1.0,-1.0,-1.0,  -1.0,-1.0, 1.0,  // v1-v6-v7-v2 left-1.0,-1.0,-1.0,   1.0,-1.0,-1.0,   1.0,-1.0, 1.0,  -1.0,-1.0, 1.0,  // v7-v4-v3-v2 down1.0,-1.0,-1.0,  -1.0,-1.0,-1.0,  -1.0, 1.0,-1.0,   1.0, 1.0,-1.0   // v4-v7-v6-v5 back]);var colors = new Float32Array([     // Colors1, 0, 0,   1, 0, 0,   1, 0, 0,  1, 0, 0,     // v0-v1-v2-v3 front1, 0, 0,   1, 0, 0,   1, 0, 0,  1, 0, 0,     // v0-v3-v4-v5 right1, 0, 0,   1, 0, 0,   1, 0, 0,  1, 0, 0,     // v0-v5-v6-v1 up1, 0, 0,   1, 0, 0,   1, 0, 0,  1, 0, 0,     // v1-v6-v7-v2 left1, 0, 0,   1, 0, 0,   1, 0, 0,  1, 0, 0,     // v7-v4-v3-v2 down1, 0, 0,   1, 0, 0,   1, 0, 0,  1, 0, 0     // v4-v7-v6-v5 back]);var normals = new Float32Array([    // Normal0.0, 0.0, 1.0,   0.0, 0.0, 1.0,   0.0, 0.0, 1.0,   0.0, 0.0, 1.0,  // v0-v1-v2-v3 front1.0, 0.0, 0.0,   1.0, 0.0, 0.0,   1.0, 0.0, 0.0,   1.0, 0.0, 0.0,  // v0-v3-v4-v5 right0.0, 1.0, 0.0,   0.0, 1.0, 0.0,   0.0, 1.0, 0.0,   0.0, 1.0, 0.0,  // v0-v5-v6-v1 up-1.0, 0.0, 0.0,  -1.0, 0.0, 0.0,  -1.0, 0.0, 0.0,  -1.0, 0.0, 0.0,  // v1-v6-v7-v2 left0.0,-1.0, 0.0,   0.0,-1.0, 0.0,   0.0,-1.0, 0.0,   0.0,-1.0, 0.0,  // v7-v4-v3-v2 down0.0, 0.0,-1.0,   0.0, 0.0,-1.0,   0.0, 0.0,-1.0,   0.0, 0.0,-1.0   // v4-v7-v6-v5 back]);var indices = new Uint8Array([       // Indices of the vertices0, 1, 2,   0, 2, 3,    // front4, 5, 6,   4, 6, 7,    // right8, 9,10,   8,10,11,    // up12,13,14,  12,14,15,    // left16,17,18,  16,18,19,    // down20,21,22,  20,22,23     // back]);// Create a buffer objectvar indexBuffer = gl.createBuffer();if (!indexBuffer) return -1;if (!initArrayBuffer(gl, 'a_Position', vertices, 3, gl.FLOAT)) return -1;if (!initArrayBuffer(gl, 'a_Color', colors, 3, gl.FLOAT)) return -1;if (!initArrayBuffer(gl, 'a_Normal', normals, 3, gl.FLOAT)) return -1;// Write the indices to the buffer objectgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);return indices.length;
}function initArrayBuffer (gl, attribute, data, num, type) {// Create a buffer objectvar buffer = gl.createBuffer();if (!buffer) {console.log('Failed to create the buffer object');return false;}// Write date into the buffer objectgl.bindBuffer(gl.ARRAY_BUFFER, buffer);gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);// Assign the buffer object to the attribute variablevar a_attribute = gl.getAttribLocation(gl.program, attribute);if (a_attribute < 0) {console.log('Failed to get the storage location of ' + attribute);return false;}gl.vertexAttribPointer(a_attribute, num, type, false, 0, 0);// Enable the assignment of the buffer object to the attribute variablegl.enableVertexAttribArray(a_attribute);gl.bindBuffer(gl.ARRAY_BUFFER, null);return true;
}

(2) 添加环境反射光后的立方体效果

(i) LightedCube-ParallelAmbient.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>WebGl光照</title></head><script id="vertex-shader" type="x-shader/x-vertex">attribute vec4 a_Position; attribute vec4 a_Color; attribute vec4 a_Normal;        // Normaluniform mat4 u_MvpMatrix; uniform vec3 u_DiffuseLight;     // Light coloruniform vec3 u_LightDirection; // Light direction (in the world coordinate, normalized)uniform vec3 u_AmbientLight;   // Color of an ambient lightvarying vec4 v_Color; void main() { gl_Position = u_MvpMatrix * a_Position ; // Make the length of the normal 1.0vec3 normal = normalize(a_Normal.xyz); // Dot product of the light direction and the orientation of a surface (the normal)float nDotL = max(dot(u_LightDirection, normal), 0.0); // Calculate the color due to diffuse reflectionvec3 diffuse = u_DiffuseLight * a_Color.rgb * nDotL; // Calculate the color due to ambient reflectionvec3 ambient = u_AmbientLight * a_Color.rgb; // Add the surface colors due to diffuse reflection and ambient reflectionv_Color = vec4(diffuse + ambient, a_Color.a); }</script><script id="fragment-shader" type="x-shader/x-fragment">#ifdef GL_ES precision mediump float; #endif varying vec4 v_Color; void main() { gl_FragColor = v_Color; } </script><body onload="startup()"><canvas id="myGLCanvas" width="600" height="600"></canvas></body><script type="text/javascript" src="gl-matrix.js"></script><script type="text/javascript" src="LightedCube-ParallelAmbient.js"></script>
</html>

(ii) LightedCube-ParallelAmbient.js

var gl;
function startup(){var canvas = document.getElementById('myGLCanvas');//获取<canvas>元素gl = createGLContext(canvas);setupShaders(); // Write the positions of vertices to a vertex shadervar n = initVertexBuffers(gl);if (n < 0) {console.log('Failed to set the positions of the vertices');return;}// Set clear color and enable hidden surface removalgl.clearColor(0.0, 0.0, 0.0, 1.0);gl.enable(gl.DEPTH_TEST);// Get the storage location of u_MvpMatrixvar u_MvpMatrix = gl.getUniformLocation(gl.program, 'u_MvpMatrix');var u_DiffuseLight = gl.getUniformLocation(gl.program, 'u_DiffuseLight');var u_LightDirection = gl.getUniformLocation(gl.program, 'u_LightDirection');var u_AmbientLight = gl.getUniformLocation(gl.program, 'u_AmbientLight');if (!u_MvpMatrix || !u_DiffuseLight || !u_LightDirection || !u_AmbientLight) { console.log('Failed to get the storage location');return;}// Set the light color (white)gl.uniform3f(u_DiffuseLight, 1.0, 1.0, 1.0);// Set the light direction (in the world coordinate)var lightDirection = vec3.fromValues(-0.5, 1, 1);vec3.normalize(lightDirection,lightDirection); // Normalizegl.uniform3fv(u_LightDirection, lightDirection);// Set the ambient lightgl.uniform3f(u_AmbientLight, 0.2, 0.2, 0.2);// Set the eye point and the viewing volume// View Matrixvar eye = vec3.fromValues(0.0, 0.0, 5.0);var center = vec3.fromValues(0.0, 0.0, 0.0);var up = vec3.fromValues(0.0, 1.0, 0.0);var vMatrix = mat4.create();mat4.lookAt(vMatrix, eye, center, up);// Model Matrixvar mMatrix = mat4.create();mat4.scale(mMatrix, mMatrix, [1.0, 1.0, 1.0]);mat4.rotate(mMatrix, mMatrix, Math.PI/4, [0.0, 1.0, 0.0]);// Projection Matrixvar pMatrix = mat4.create();mat4.frustum(pMatrix, -1.0, 1.0, -1.0, 1.0, 1.5, 20.0);var mvpMatrix = mat4.create();mat4.multiply(mvpMatrix, vMatrix, mMatrix);mat4.multiply(mvpMatrix, pMatrix, mvpMatrix);// Pass the model view projection matrix to u_MvpMatrixgl.uniformMatrix4fv(u_MvpMatrix, false, mvpMatrix);// Clear color and depth buffergl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);// Draw the cubegl.drawElements(gl.TRIANGLES, n, gl.UNSIGNED_BYTE, 0);}... // 其他代码相同,故略去

(3) 添加环境反射光与镜面反射光后的立方体效果

(i) LightedCube-ParallelAmbientSpecular.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>WebGl光照</title></head><script id="vertex-shader" type="x-shader/x-vertex">attribute vec4 a_Position;  attribute vec4 a_Color;  attribute vec4 a_Normal;         // Normaluniform mat4 u_MvpMatrix; uniform vec3 u_DiffuseLight;      // Light coloruniform vec3 u_SpecularLight;    // Color of an Mirror lightuniform vec3 u_LightDirection;  // Light direction (in the world coordinate, normalized)uniform vec3 u_AmbientLight;    // Color of an ambient lightuniform float u_Shininess; uniform vec3 u_Eye; varying vec4 v_Color; void main() { gl_Position = u_MvpMatrix * a_Position ; // Make the length of the normal 1.0vec3 normal = normalize(a_Normal.xyz); vec3 viewDirection = normalize(u_Eye - a_Position.xyz); vec3 H = normalize(u_LightDirection + viewDirection); // Dot product of the light direction and the orientation of a surface (the normal)float nDotL = max(dot(u_LightDirection, normal), 0.0); float nDotH = max(dot(H, normal), 0.0); // Calculate the color due to diffuse reflectionvec3 diffuse = u_DiffuseLight * a_Color.rgb * nDotL; vec3 specular = pow(nDotH, u_Shininess) * u_SpecularLight; // Calculate the color due to ambient reflectionvec3 ambient = u_AmbientLight * a_Color.rgb; // Add the surface colors due to diffuse reflection and ambient reflectionv_Color = vec4(diffuse + specular + ambient, a_Color.a);  }</script><script id="fragment-shader" type="x-shader/x-fragment">#ifdef GL_ES precision mediump float; #endif varying vec4 v_Color; void main() { gl_FragColor = v_Color; } </script><body onload="startup()"><canvas id="myGLCanvas" width="600" height="600"></canvas></body><script type="text/javascript" src="gl-matrix.js"></script><script type="text/javascript" src="LightedCube-ParallelAmbientSpecular.js"></script>
</html>

(ii) LightedCube-ParallelAmbientSpecular.js

var gl;
function startup(){var canvas = document.getElementById('myGLCanvas');//获取<canvas>元素gl = createGLContext(canvas);setupShaders(); // Write the positions of vertices to a vertex shadervar n = initVertexBuffers(gl);if (n < 0) {console.log('Failed to set the positions of the vertices');return;}// Set clear color and enable hidden surface removalgl.clearColor(0.0, 0.0, 0.0, 1.0);gl.enable(gl.DEPTH_TEST);// Get the storage location of u_MvpMatrixvar u_MvpMatrix = gl.getUniformLocation(gl.program, 'u_MvpMatrix');var u_DiffuseLight = gl.getUniformLocation(gl.program, 'u_DiffuseLight');var u_LightDirection = gl.getUniformLocation(gl.program, 'u_LightDirection');var u_AmbientLight = gl.getUniformLocation(gl.program, 'u_AmbientLight');var u_SpecularLight = gl.getUniformLocation(gl.program, 'u_SpecularLight');var u_Shininess = gl.getUniformLocation(gl.program, 'u_Shininess');var u_Eye = gl.getUniformLocation(gl.program, 'u_Eye');  if (!u_MvpMatrix || !u_DiffuseLight || !u_LightDirection || !u_AmbientLight ||!u_SpecularLight || !u_Shininess || !u_Eye) { console.log('Failed to get the storage location');return;}// Set the light color (white)gl.uniform3f(u_DiffuseLight, 1.0, 1.0, 1.0);// Set the light direction (in the world coordinate)var lightDirection = vec3.fromValues(-0.5, 1, 1);vec3.normalize(lightDirection,lightDirection); // Normalizegl.uniform3fv(u_LightDirection, lightDirection);// Set the ambient lightgl.uniform3f(u_AmbientLight, 0.2, 0.2, 0.2);gl.uniform3f(u_DiffuseLight, 1.0, 1.0, 1.0);gl.uniform3f(u_SpecularLight, 1.0, 1.0, 1.0);gl.uniform1f(u_Shininess, 20.0);var eye = vec3.fromValues(0.0, 0.0, 5.0);gl.uniform3f(u_Eye, eye[0], eye[1], eye[2]);// Set the eye point and the viewing volume// View Matrixvar center = vec3.fromValues(0.0, 0.0, 0.0);var up = vec3.fromValues(0.0, 1.0, 0.0);var vMatrix = mat4.create();mat4.lookAt(vMatrix, eye, center, up);// Model Matrixvar mMatrix = mat4.create();mat4.scale(mMatrix, mMatrix, [1.0, 1.0, 1.0]);mat4.rotate(mMatrix, mMatrix, Math.PI/4, [0.0, 1.0, 0.0]);// Projection Matrixvar pMatrix = mat4.create();mat4.frustum(pMatrix, -1.0, 1.0, -1.0, 1.0, 1.5, 20.0);var mvpMatrix = mat4.create();mat4.multiply(mvpMatrix, vMatrix, mMatrix);mat4.multiply(mvpMatrix, pMatrix, mvpMatrix);// Pass the model view projection matrix to u_MvpMatrixgl.uniformMatrix4fv(u_MvpMatrix, false, mvpMatrix);// Clear color and depth buffergl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);// Draw the cubegl.drawElements(gl.TRIANGLES, n, gl.UNSIGNED_BYTE, 0);}... // 其他代码相同,故略去

CG实验5 简单光照明模型相关推荐

  1. 多思计组实验实验七 简单模型机实验

    实验七 简单模型机实验 一.实验目的 通过总线将微程序控制器与运算器.存储器等联机,组成一台模型计算机. 用微程序控制器控制模型机数据通路,运行由4条机器指令组成的简单程序. 掌握微指令与机器指令的关 ...

  2. 简易模型计算机性能分析报告,计算机组成原理 实验八 简单模型计算机实验解析.doc...

    实验八 简单模型计算机实验 实验目的 通过实验分析简单模型机结构,了解计算机的工作原理. 掌握计算机微程序控制器的控制方法,掌握计算机指令执行过程 实验原理 基本整机模型数据框图如图所示,计算机数据通 ...

  3. 计算机组成实验八,计算机组成原理 实验八 简单模型计算机实验.doc

    文档介绍: 实验八简单模型计算机实验实验目的通过实验分析简单模型机结构,了解计算机的工作原理.掌握计算机微程序控制器的控制方法,掌握计算机指令执行过程实验原理基本整机模型数据框图如图所示,计算机数据通 ...

  4. keyshot渲染玻璃打光_KeyShot新手的第一次打光,无脑三点打光塑造模型质感

    原标题:KeyShot新手的第一次打光,无脑三点打光塑造模型质感 很多初学 KeyShot 的小伙伴在经历了大量的尝试后,开始不满足于预设的HDR环境照明,或者跃跃欲试希望自己能够开始打光和渲染,那么 ...

  5. Java图形编程实验总结_JAVA实验报告简单绘图程序

    <JAVA实验报告简单绘图程序>由会员分享,可在线阅读,更多相关<JAVA实验报告简单绘图程序(8页珍藏版)>请在人人文库网上搜索. 1.实验三绘制图形一.实验目的学会JBut ...

  6. 电子学:第012课——实验 11:光和声

    电子学:第xx课--实验 11:光和声 是时候让你自己开展第一个功能和目的齐备的项目了.最终你会做成一个非常简单的声音合成器. 需要的物品 面包板.连接线.剪线钳.剥线钳.万用表 9 V 电池和连接器 ...

  7. AI笔记: 计算机视觉之照明模型和颜色模型

    照明模型 光通量 人能够看到周围的世界有2个部分构成:外在光源.光源物体表面的情况 光通量是指人眼所能感觉到的辐射功率,它等于单位时间内某一波段的辐射能力和该波段的相对视见率的乘积 以符号表示,单位是 ...

  8. 视觉系统照明模型 光通量,辐照度,颜色模型(RGB,HSV,CMYK)

    简述对视觉系统照明模型的基本理解 1.光通量 强调光的强度,指人眼所能感受到的辐射功率,他等于单位时间内某一波段的辐射能量和该波段的相对视见率的乘积.符号是φ,单位位lm(流明),通常1lm=0.00 ...

  9. 医学图像体渲染照明2 体照明模型

    这一节里,我们推导了先进的体积照明方法经常使用的体积照明模型.该模型基于Max[1995]推导的光学模型以及Max和Chen[2010]最近描述的扩展.为了清楚起见,我们将模型中使用的定义作为以下参考 ...

最新文章

  1. AXM-Net:用于行人检测的跨模式上下文注意力网络
  2. spring 配置文件位置
  3. PO_标准内部请购内部采购单抛转订单模组(流程)
  4. python opencv imread(filename, flags=None) 读取图像 flags cv::ImreadModes 参数上哪看去?
  5. mysql四种事务隔离级别
  6. andriod之应用内置浏览器 webview
  7. 2020年了,再不会Https就老了
  8. java多线程编程基础
  9. LeetCode —— 145. 二叉树的后序遍历【递归与迭代】(Python)
  10. 视频+笔记+能够跑通的代码,《李宏毅机器学习完整笔记》发布!
  11. 【Spark】大数据+AI mettup【视频笔记】从lambda到HSAP实时数仓的演进 机器学习易用性
  12. Failed to load Idlinux.c32, Boot failed: press any key to retry
  13. Java数据类型转换超详解
  14. python星号直角三角形边长公式_三角形边长计算公式大全
  15. firefly rk3328学习笔记1-samba环境搭建
  16. Matlab随机森林库
  17. 简要视音频发展编年史
  18. DSP6455开发: dsp.lib库使用总结
  19. 通信工程与计算机考研学校排名,2019-2020信息与通信工程专业考研学校排名
  20. 《软件方法》第8章 分析 之 分析类图(3)

热门文章

  1. DWF文件怎么用CAD打开?DWF输入CAD步骤
  2. 杭州iPhone电池已排到周五!旧款iPhone换电池各地揪心指数大比拼
  3. 当着整个商场的面,iPhone电池就这么炸了
  4. Python OpenCV图像处理:❤️转换+梯度❤️边缘检测+图像融合,aplacian金字塔合成新物种
  5. Vue - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
  6. 将iOS刷到Android设备上
  7. 文件图标左下角的黑色时钟和灰色错 叉的意思
  8. JavaScript的算数运算符与比较运算符,附赠课程+题库
  9. DuiLib实现仿微信聊天界面(二)——解决RichEdit自适应高度问题
  10. [附源码]Java计算机毕业设计SSM蛋糕店会员系统