《计算机图形学基础(OpenGL版)》勘误表

注:教材原第6章编写者在6.3.3透视投影章节部分有一些地方介绍不清,另外在推导透视投影时所构建的坐标系也并非最佳方式,因此有可能会造成一些理解困难,在此表示抱歉。关于透视投影的推导及有关知识,可以在本博客上下载我本人的教学课件来学习了解。我构建的坐标系目前应该比较合理,同时也会得出比较漂亮的透视结论😄。有问题欢迎邮件联系我:wpxu08@gmail.com

页码行或位置原内容更正为备注
389(1MB)(128KB)
4116 k = Δ x / Δ y k=\Delta x/\Delta y k=Δx/Δy k = Δ y / Δ x k=\Delta y/\Delta x k=Δy/Δx
439 d ≤ 0 d \leq 0 d0 d ≥ 0 d \geq 0 d0
466 s − t = s Δ x Δ y ( x i + 1 ) + 2 b + 2 y i − 1 s-t = s \frac{\Delta x}{\Delta y}(x_i+1)+2b+2y_i-1 st=sΔyΔx(xi+1)+2b+2yi1 s − t = s Δ x Δ y ( x i + 1 ) + 2 b − 2 y i − 1 s-t = s \frac{\Delta x}{\Delta y}(x_i+1)+2b -2y_i-1 st=sΔyΔx(xi+1)+2b2yi1
46倒数第4行 − 1 ≤ 1 ≤ 0 -1\leq1\leq0 110 0 ≤ k ≤ 1 0\leq k\leq 1 0k1
4726int curx = x1;int curx = x1 + 1;
4812 b = x 0 − x 1 b=x_0-x_1 b=x0x1 b = x 1 − x 0 b=x_1-x_0 b=x1x0
5119 T T T点的坐标为 ( x i , y i ) (x_i, y_i) xi,yi) P P P点的坐标为 ( x i , y i ) (x_i, y_i) xi,yi)
5210,12 y i − 1 y_{i-1} yi1 y i + 1 y_{i+1} yi+1
52倒数第3行Cirpot(x0, y0, x, y)Cirpot(x0, y0, x, y, color)
539Cirpot(x0, y0, x, y)Cirpot(x0, y0, x, y, color)
577FloodFillFloodFill4
5713-16FloodFill4(…, newcolor)FloodFill4(…, newcolor, boundaryColor)
58-5958页倒数第2行~59页第11行见教材从点P向任意方向发出一条射线,若该射线与多边形交点的个数为奇数,则P位于多边形内;若为偶数,则P位于多边形外部。当射线与多边形边界点的交点是多边形顶点时(该交点称为奇点,如图3-13的 P 3 P_3 P3 P 4 P_4 P4 P 5 P_5 P5 P 6 P_6 P6情况),如果把每一个奇点简单地计为一个交点,则交点个数为偶数时P点可能在内部,如图3-13中的 P 4 P_4 P4情况。但若将每一个奇点都简单地计为两个交点,同样会导致错误的结果,如图3-13中的 P 3 P_3 P3 P 5 P_5 P5情况。因此,必须按不同情况区别对待。一般来说,多边形的顶点可分为两类:极值点和非极值点。如果顶点相邻的两边在射线的同侧时,则称该顶点为极值点(如图3-13中的 Q 0 Q_0 Q0 Q 1 Q_1 Q1);否则称该顶点为非极值点(如图3-13中的 Q 2 Q_2 Q2)。为了保证射线法判别结果的正确性,奇点交点的计数可以根据上述分类来采用不同的方式。当奇点是多边形的极值点时,交点按照两个交点计算,否则,按一个交点计算,如图3.13所示。
59图3-13见教材
60图3.16
65倒数第4行图3.22图3.23
65倒数第3行 y i + m / 2 y_i+m/2 yi+m/2 y i − i n t ( y i ) + m / 2 y_i-int(y_i)+m/2 yiint(yi)+m/2
736 y ′ = r s i n ( ϕ + θ ) = r c o s ϕ s i n θ − r s i n ϕ c o s θ y'=rsin(\phi+\theta)=rcos \phi sin \theta - rsin \phi cos \theta y=rsin(ϕ+θ)=rcosϕsinθrsinϕcosθ y ′ = r s i n ( ϕ + θ ) = r c o s ϕ s i n θ + r s i n ϕ c o s θ y'=rsin(\phi+\theta)=rcos \phi sin \theta + rsin \phi cos \theta y=rsin(ϕ+θ)=rcosϕsinθ+rsinϕcosθ
758相对于y轴的反射相对于x轴的反射
82/87式(4.40/57) [ c o s θ − s i n θ 0 s i n θ c o s θ 0 0 0 1 ] \begin{bmatrix} cos\theta & \mathbf{-sin\theta} & 0 \\ \mathbf{sin\theta} & cos\theta & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} cosθsinθ0sinθcosθ0001 [ c o s θ s i n θ 0 − s i n θ c o s θ 0 0 0 1 ] \begin{bmatrix} cos\theta & \mathbf{sin\theta} & 0 \\ \mathbf{-sin\theta} & cos\theta & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} cosθsinθ0sinθcosθ0001
84式(4.51) y r ( 1 − c o s θ ) + x r s i n θ y_r(1-cos\theta)+x_rsin\theta yr(1cosθ)+xrsinθ y r ( 1 − c o s θ ) − x r s i n θ y_r(1-cos\theta)-x_rsin\theta yr(1cosθ)xrsinθ
94图4.30在这里插入图片描述在这里插入图片描述
1172 T = R ( θ ) T ( − x 0 , − y 0 ) = [ c o s θ s i n θ 0 − s i n θ c o s θ 0 0 0 1 ] [ 1 0 − x 0 0 1 − y 0 0 0 1 ] T=R(\theta)T(-x_0, -y_0) =\begin{bmatrix} cos\theta & \mathbf{sin\theta} & 0 \\ \mathbf{-sin\theta} & cos\theta & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} 1 & 0 & -x_0 \\0 & 1 & -y_0 \\0 & 0 & 1 \end{bmatrix} T=R(θ)T(x0,y0)=cosθsinθ0sinθcosθ0001100010x0y01 T = R ( θ ) T ( − x 0 , − y 0 ) = [ c o s θ − s i n θ 0 s i n θ c o s θ 0 0 0 1 ] [ 1 0 − x 0 0 1 − y 0 0 0 1 ] T=R(\theta)T(-x_0, -y_0) = \begin{bmatrix} cos\theta & -sin\theta & 0 \\sin\theta & cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & -x_0 \\0 & 1 & -y_0 \\0 & 0 & 1 \end{bmatrix} T=R(θ)T(x0,y0)=cosθsinθ0sinθcosθ0001100010x0y01
12215 t 1 ′ ′ = ( x R − x 1 ) / d x t_1^{''}=(x_R-x_1)/dx t1=(xRx1)/dx t 1 ′ ′ = ( y B − y 1 ) / d y t_1^{''}=(y_B-y_1)/dy t1=(yBy1)/dy
13024glLoadIdentity()应移至void display(void)中的第1个glColor3f(0.0,0.0,1.0)后参考5.5 Opengl编程实例-红蓝三角形
1311
131图5.17后增加思考内容:“思考:教材中原代码中根据所给三角形顶点坐标,三角形应为一个正角形,为何显示时不是正角形呢?同时,在旋转后的三角形也发生了变形,请分析原因,并给出修改建议。提示:请从"glViewport()"函数入手。”
135(6.2) u = V × n ∣ N ∣ = ( u x , u y , u z ) u=\frac{V \times n}{\mid N \mid} = (u_x, u_y, u_z) u=NV×n=(ux,uy,uz) u = V × n ∣ V × n ∣ = ( u x , u y , u z ) u=\frac{V \times n}{\mid V \times n \mid} = (u_x, u_y, u_z) u=V×nV×n=(ux,uy,uz)
1379O点在xoy平面内的投影为… O s O_s Os点在xoy平面内的投影为…
151(6.29) [ x p y p 0 1 ] = [ 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 ] [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 d 1 ] [ x s y s z s 1 ] = [ x s y s 0 1 + z s d ] \begin{bmatrix}x_p \\ y_p \\ 0 \\ 1 \end{bmatrix} =\begin{bmatrix}1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1\end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & \frac{1}{d} & \mathbf{ 1} \end{bmatrix} \begin{bmatrix} x_s \\ y_s \\ z_s \\ 1 \end{bmatrix} = \begin{bmatrix} x_s \\ y_s \\ 0 \\ \mathbf{1+ \frac{z_s}{d}} \end{bmatrix} xpyp01=100001000000000110000100001d10001xsyszs1=xsys01+dzs [ x p y p 0 1 ] = [ 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 ] [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 d 0 ] [ x s y s z s 1 ] = [ x s y s 0 z s d ] \begin{bmatrix} x_p \\ y_p \\ 0 \\ 1 \end{bmatrix} =\begin{bmatrix}1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\0 & 0 & 0 & 0 \\0 & 0 & 0 & 1\end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & \frac{1}{d} & \mathbf{0}\end{bmatrix} \begin{bmatrix} x_s \\ y_s \\ z_s \\ 1 \end{bmatrix} = \begin{bmatrix} x_s \\ y_s \\ 0 \\ \mathbf{ \frac{z_s}{d} } \end{bmatrix} xpyp01=100001000000000110000100001d10000xsyszs1=xsys0dzs
151(6.31) [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 r 1 ] \begin{bmatrix}1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & r & \mathbf{1}\end{bmatrix} 10000100001r0001 [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 r 0 ] \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & r & \mathbf{0}\end{bmatrix} 10000100001r0000
151(6.33) [ 1 0 0 0 0 1 0 0 0 0 1 0 p 0 0 1 ] \begin{bmatrix}1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\0 & 0 & 1 & 0 \\ p & 0 & 0 & \mathbf{1}\end{bmatrix} 100p010000100001 [ 1 0 0 0 0 1 0 0 0 0 1 0 p 0 0 0 ] \begin{bmatrix}1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ p & 0 & 0 & \mathbf{0 }\end{bmatrix} 100p010000100000
151(6.34) [ 1 0 0 0 0 1 0 0 0 0 1 0 0 q 0 1 ] \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & q & 0 & \mathbf{1}\end{bmatrix} 1000010q00100001 [ 1 0 0 0 0 1 0 0 0 0 1 0 0 q 0 0 ] \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & q & 0 & \mathbf{0}\end{bmatrix} 1000010q00100000
152(6.35)这里写图片描述这里写图片描述
152(6.35)这里写图片描述这里写图片描述
15212线性关系非线性关系
152(6.37) a = − ( z f a r + z n e a r ) z n e a r z f a r − z n e a r a=\frac{-(z_{far}+z_{near})z_{near}}{z_{far}-z_{near}} a=zfarznear(zfar+znear)znear a = z f a r + z n e a r z n e a r ( z f a r − z n e a r ) a=\frac{z_{far}+z_{near}}{z_{near}(z_{far}-z_{near})} a=znear(zfarznear)zfar+znear
195(7.29) . . ∑ i = 0 n . . . ..\sum_{i=0}^{n}... ..i=0n... . . . ∑ l = 0 n . . . ...\sum_{l=0}^{n}... ...l=0n...
195(7.30) 上方二次B样条曲线中,n=2, l = 1, 2, 3…二次B样条曲线中,n=2, l = 0, 1, 2, 当i=0时…
195(7.30) . . ∑ i = 0 2 . . . ..\sum_{i=0}^{2}... ..i=02... . . . ∑ l = 0 2 . . . ...\sum_{l=0}^{2}... ...l=02...
196倒数第2行 . . . + 2 t 2 + . . . ...+2t^2+... ...+2t2+... . . . + 3 t 2 + . . . ...+3t^2+... ...+3t2+...
198第3行 P ′ ( 1 ) = . . . P'(1)=... P(1)=... Q ′ ( 1 ) = . . . Q'(1)=... Q(1)=...
205第2行 [ − 1 3 − 3 1 3 − 6 3 0 − 3 3 0 0 1 0 0 0 ] \begin{bmatrix} -1 & 3 & -3 & 1\\ 3 & -6 & 3 & 0 \\ -3 & 3 & 0 & 0 \\ 1 & 0 & 0 & 0\end{bmatrix} 1331363033001000 [ − 1 3 − 3 1 3 − 6 3 0 − 3 0 3 0 1 4 1 0 ] \begin{bmatrix} -1 & 3 & -3 & 1\\ 3 & -6 & 3 & 0 \\ -3 & 0 & 3 & 0 \\ 1 & 4 & 1 & 0\end{bmatrix} 1331360433311000
2242对于右手坐标系对于OpenGL所采用的左手坐标系烟台大学韩明峰指正
图8.17
8深度缓冲器所有单元均置为最 z值深度缓冲器所有单元均置为最 z值为保持与图8.17一致而修改,原内容也没错,下同
11若z > ZB(x, y),则ZB(x, y)=z若z < ZB(x, y),则ZB(x, y)=z
20ZB(x,y)单元置为最ZB(x,y)单元置为最
26if(z(x,y) > ZB(x,y))if(z(x,y) < ZB(x,y))
242(8.23) I s = 1 x b − x a [ I b ( x b − x s ) + I a ( x s − x a ) ] I_{s}=\frac{1}{x_{b}-x_{a}}[I_{b}(x_{b}-x_{s})+I_{a}(x_{s}-x_{a})] Is=xbxa1[Ib(xbxs)+Ia(xsxa)] I s = 1 x b − x a [ I a ( x b − x s ) + I b ( x s − x a ) ] I_{s}=\frac{1}{x_{b}-x_{a}}[I_{a}(x_{b}-x_{s})+I_{b}(x_{s}-x_{a})] Is=xbxa1[Ia(xbxs)+Ib(xsxa)]

附录B 模拟试题及答案

页码位置原内容更正备注
337图B.1
340模2试题,一.单选题,第6题 T = [ 2 0 0 0 1 0 1 1 1 ] T= \left[ \begin{matrix} 2 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 1 & 1 \end{matrix} \right] T=201011001 P ′ = P T = [ x y 1 ] [ 2 0 0 0 1 0 1 1 1 ] P^{'}= PT =\left[ \begin{matrix} x & y & 1 \end{matrix} \right] \left[ \begin{matrix} 2 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 1 & 1 \end{matrix} \right] P=PT=[xy1]201011001
342第13题点坐标采用向量形式点坐标采用向量形式
347四.填空题,第3题点坐标采用向量形式点坐标采用向量形式
349模1答案,二.多选题,第1题答案ABCABCD错切变换是沿坐标轴错切,参考对象仍为坐标原点
350模2答案,一.单选题,第1题答案BC
350一.单选题,第3题答案BC
350一.单选题,第4题答案CD
350二.多选题,第10题答案ACDABCD
350二.多选题,第11题答案CDBCD
350二.多选题,第13题答案ABABD
352模3答案,一.单选题,第1题答案DB
352二.多选题,第1题答案BCEAD
352二.多选题,第2题答案BDB
352二.多选题,第6题答案BDBCD
354第1行 [ 0 0 0 1 1 / 27 1 / 9 1 / 3 0 8 / 27 4 / 9 1 / 3 0 1 1 1 1 ] \begin{bmatrix} 0 & 0 & 0 & 1 \\ 1/27 & 1/9 & 1/3 & 0 \\ 8/27 & 4/9 & 1/3 & 0 \\ 1 & 1 & 1 & 1 \end{bmatrix} 01/278/27101/94/9101/31/311001 [ 0 0 0 1 1 / 27 1 / 9 1 / 3 1 8 / 27 4 / 9 2 / 3 1 1 1 1 1 ] \begin{bmatrix} 0 & 0 & 0 & 1 \\ 1/27 & 1/9 & 1/3 & 1 \\ 8/27 & 4/9 & 2/3 & 1 \\ 1 & 1 & 1 & 1 \end{bmatrix} 01/278/27101/94/9101/32/311111
  • P349, 模拟试题1,第四大题第3小题答案:
    T 1 = [ 1 0 0 0 1 0 − 2 − 4 1 ] T_1= \left[ \begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ -2 & -4 & 1 \end{matrix} \right] T1=102014001

T 2 = [ c o s 60 0 ∘ s i n 60 0 ∘ 0 − s i n 60 0 ∘ c o s 60 0 ∘ 0 0 0 1 ] = [ − 1 / 2 − 3 / 2 0 3 / 2 − 1 / 2 0 0 0 1 ] T_2= \left[ \begin{matrix} cos600^\circ & sin600^\circ & 0 \\ -sin600^\circ & cos600^\circ & 0 \\ 0 & 0 & 1 \end{matrix} \right] =\left[ \begin{matrix} -1/2 & -\sqrt{3}/2 & 0 \\ \sqrt{3}/2 & -1/2 & 0 \\ 0 & 0 & 1 \end{matrix} \right] T2=cos600sin6000sin600cos6000001=1/23 /203 /21/20001

T 3 = [ 1 0 0 0 1 0 2 4 1 ] T_3= \left[ \begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 2 & 4 & 1 \end{matrix} \right] T3=102014001

T = T 1 T 2 T 3 = [ − 1 / 2 − 3 / 2 0 3 / 2 − 1 / 2 0 3 − 2 3 6 + 3 1 ] T= T_1T_2T_3= \left[ \begin{matrix} -1/2 & -\sqrt{3}/2 & 0\\ \sqrt{3}/2 & -1/2 & 0 \\ 3-2 \sqrt{3} & 6+ \sqrt{3} & 1 \end{matrix} \right] T=T1T2T3=1/23 /2323 3 /21/26+3 001
由 $ P^{’}= PT$ 可得: [ A ′ B ′ C ′ ] = [ A B C ] T = [ 2 4 1 4 4 1 4 1 1 ] T = [ 2 4 1 1 4 − 3 1 1 − 3 3 / 2 11 / 2 − 3 1 ] \left[ \begin{matrix} A^{'} \\ B^{'} \\ C^{'} \end{matrix} \right] =\left[ \begin{matrix} A \\ B \\ C \end{matrix} \right] T = \left[ \begin{matrix} 2 & 4 & 1 \\ 4 & 4 & 1 \\ 4 & 1 & 1 \end{matrix} \right] T= \left[ \begin{matrix} 2 & 4 & 1 \\ 1 & 4-\sqrt{3} & 1 \\ 1-3\sqrt{3}/2 & 11/2-\sqrt{3} & 1 \end{matrix} \right] ABC=ABCT=244441111T=21133 /2443 11/23 111

  • P350, 模拟试题1,第四大题第4小题答案:
    由相似三角形关系可得 x ′ x = d d − z \frac{x^{'}} {x} = \frac{d} {d-z} xx=dzd于是
    x ′ = x d d − z = x 1 − z d x^{'} = \frac{xd} {d-z}= \frac{x} {1-\frac{z}{d}} x=dzxd=1dzx
    同理有: y ′ = y 1 − z d y^{'} = \frac{y} {1-\frac{z}{d}} y=1dzy
    另外, z ′ = 0 z^{'}=0 z=0.
    于是有:
    P ′ = [ x ′ y ′ z ′ 1 ] = [ x 1 − z d y 1 − z d 0 1 ] ≡ [ x y 0 1 − z d ] = [ 1 0 0 0 0 1 0 0 0 0 0 0 0 0 − 1 d 1 ] [ x y z 1 ] = T P P^{'} = \left[ \begin{matrix} x^{'} \\ y^{'} \\ z^{'} \\ 1 \end{matrix} \right] =\left[ \begin{matrix} \frac{x} {1-\frac{z}{d}} \\ \frac{y} {1-\frac{z}{d}} \\ 0 \\ 1 \end{matrix} \right] \equiv \left[ \begin{matrix} x \\ y \\ 0 \\ 1-\frac{z}{d} \end{matrix} \right] = \left[ \begin{matrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & -\frac{1}{d} & 1 \\ \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ z \\ 1 \end{matrix} \right] = TP P=xyz1=1dzx1dzy01xy01dz=10000100000d10001xyz1TP
    上式中 T T T即为透视变换矩阵,其中$ \equiv$表示齐次坐标转化。
    顶点坐标计算:以G点为例,G点齐次坐标为(1,1,-1,1),则由透视变换可知:
    G ′ = T G = T [ 1 1 − 1 1 ] = [ 1 0 0 0 0 1 0 0 0 0 0 0 0 0 − 1 d 1 ] [ 1 1 − 1 1 ] = [ 1 1 0 1 + 1 d ] ≡ [ d d + 1 d d + 1 0 1 ] G^{'} = TG =T \left[ \begin{matrix} 1 \\ 1 \\ -1 \\ 1 \end{matrix} \right] = \left[ \begin{matrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & -\frac{1}{d} & 1 \\ \end{matrix} \right] \left[ \begin{matrix} 1 \\ 1 \\ -1 \\ 1 \end{matrix} \right] = \left[ \begin{matrix} 1 \\ 1 \\ 0 \\ 1+\frac{1}{d} \end{matrix} \right] \equiv \left[ \begin{matrix} \frac{d}{d+1} \\ \frac{d}{d+1} \\ 0 \\ 1 \end{matrix} \right] G=TG=T1111=10000100000d1000111111101+d1d+1dd+1d01
    故透视变换后G点变为 G ′ = ( d d + 1 , d d + 1 , 0 ) G^{'}=( \frac{d}{d+1}, \frac{d}{d+1}, 0) G=(d+1d,d+1d,0).

  • P351, 模拟试题2,第五大题第2小题答案:
    c o s i = L ⃗ ⋅ N ⃗ = 0.5 , R ⃗ = 2 c o s i N ⃗ − L ⃗ = ( − 1 / 2 , 1 / 2 , − 2 / 2 ) . cosi=\vec{L} \cdot \vec{N}=0.5, \vec{R} = 2cosi\vec{N}-\vec{L}=(-1/2,1/2,-\sqrt{2}/2). cosi=L N =0.5,R =2cosiN L =(1/2,1/2,2 /2).
    c o s θ = R ⃗ ⋅ V ⃗ = − 2 / 2 < 0 , R ⃗ 与 V ⃗ 夹 角 大 于 90 度 , 因 此 V ⃗ 方 向 上 无 镜 面 反 射 光 , 所 以 c o s θ 取 0. cos\theta= \vec{R} \cdot \vec{V} = -\sqrt{2}/2<0, \vec{R}与\vec{V}夹角大于90度,因此\vec{V}方向上无镜面反射光,所以 cos\theta取0. cosθ=R V =2 /2<0,R V 90V cosθ0.
    ∴ I = I p a k a + I p ( k d c o s i + k s c o s n θ ) = 160 ∗ 0.5 + 175 ( 0.2 ∗ 0.5 + 0 ) = 97.5 \therefore I=I_{pa}k_a+I_p(k_dcosi+k_scos^n\theta)=160*0.5+175(0.2*0.5+0)=97.5 I=Ipaka+Ip(kdcosi+kscosnθ)=1600.5+175(0.20.5+0)=97.5

  • P353, 模拟试题3,第五大题第1小题答案:
    a = y 0 − y 1 = − 4 , b = x 1 − x 0 = 8 , d 0 = a + 0.5 b = 0 ; a + b = 4 , a = − 4 a=y_0-y_1=-4, b=x_1-x_0=8, d_0=a+0.5b=0; a+b=4, a=-4 a=y0y1=4,b=x1x0=8,d0=a+0.5b=0;a+b=4,a=4,当 d i < 0 d_i<0 di<0时,中点M在直线下方,下一点取当前点P的右上方点,记为NE,同时 d i + 1 = d i + a + b d_{i+1}=d_i+a+b di+1=di+a+b;当 d i ≥ 0 d_i\geq0 di0时,中点M在直线上方,下一点取当前点P的右侧点,记为E,同时 d i + 1 = d i + a d_{i+1}=d_i+a di+1=di+a。根据中点线算法原理可得下表:

xy d i d_i diNext Point
210E
310-4=-4NE
42-4+4=0E
520-4=-4NE
63-4+4=0E
730-4=-4NE
84-4+4=0E
940-4=-4NE
105
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

图形空间

文章不错,赞赏鼓励

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值