计算机图形学1及答案

合集下载

计算机图形学-习题库及答案

计算机图形学-习题库及答案

1、计算机图形显示器和绘图设备表示颜色的方法各是什么颜色系统?它们之间的关系如何?1、计算机图形显示器是用RGB方法表示颜色,而绘图设备是用CMY方法来表示颜色的。

它们之间的关系是:两者都是面向硬件的颜色系统,前者是增性原色系统,后者是减性原色系统,后者是通过在黑色里加入一种什么颜色来定义一种颜色,而后者是通过指定从白色里减去一种什么颜色来定义一种颜色2、简述帧缓存与显示器分辨率的关系。

分辨率分别为640×480,1280×1024,和2560×2048的显示器各需要多少字节位平面数为24的帧缓存?2、帧缓存的大小和显示器分辨率之间的关系是:帧缓存的大小=显示器分辨率的大小*帧缓存的3、画直线的算法有哪几种?画圆弧的算法有哪几种?c1)逐点比较法;(2)数值微分法;(3)Bresenham算法。

画弧线的常用方法有:(1)逐点比较法;(2)角度DDA法;(3)Bresenham算法。

4、分别写出平移、旋转、缩放及其组合的变换矩阵。

4、1)平移变换:其中, , , 是物体在三个坐标方向上的位移量。

2)旋转变换:绕Z轴旋转的公式为:绕X轴旋转的公式为:绕Y轴旋转的公式为:如果旋转所绕的轴不是坐标轴,设其为任意两点p1,p2所定义的矢量,旋转角度为。

则可由7个基本变换组合构成:1.使p1,点与原点重合;2.,使轴p1p2落入平面xoz内;3.,使p1p2与z轴重合;4.,执行绕p1p2轴的角旋转;5.,作3的逆变换;6.,作2的逆变换;7.作1的逆变换。

3)缩放变换:其中,,,是物体在三个方向上的比例变化量。

记为。

若对于某个非原点参考点进行固定点缩放变换,则通过如下的级联变换实现:5、如何用几何变换实现坐标系的变换?坐标系的变换,亦即将某一坐标系lcs1中的点变换为另一个坐标系lcs2下的坐标。

若,矩阵的推导分三步。

1)将lcs1中的点变换到世界坐标系的矩阵 ;x_axis, y_axis, z_axis 为lcs1中x,y,z轴矢量在世界坐标系的表示org为lcs1中原点在世界坐标系的表示2)将世界坐标系的点变换到lcs2中的点矩阵 ;x_axis, y_axis, z_axis 为lcs1中x,y,z轴矢量在世界坐标系的表示org为lcs1中原点在世界坐标系的表示a = - x_axis.x * org.x - x_axis.y * org.y - x_axis.z * org.zb = - y_axis.x * org.x - y_axis.y * org.y - y_axis.z * org.zc = - z_axis.x * org.x - z_axis.y * org.y - z_axis.z * org.z6、写出几种线裁剪算法;写出几种多边形裁剪算法。

计算机图形学1及答案

计算机图形学1及答案

计算机图形学作业I一. 判断题1齐次坐标提供了坐标系变换的有效方法,但仍然无法表示无穷远的点;(X )2 •若要对某点进行比例、旋转变换,首先需要将坐标原点平移至该点,在新的坐标系下做 比例或旋转变换,然后在将原点平移回去;(V ) 3. 相似变换是刚体变换加上等比缩放变换; (V ) 4. 保距变换是刚体变换加上镜面反射; (V ) 5. 射影变换保持直线性,但不保持平行性。

(X )二、填空题1. 透视投影的视见体为四棱锥形状;平行投影的视见体为长度无限的四棱柱 ________ 形状。

2. 字符的图形表示可以分为 _______ 点阵 ________ 和 矢量 ___________ 两种形式。

3. 仿射变换保持直线的 _______ 平行性 ________ 。

4. 刚体变换保持 _____ 长度,角度,面积等不变 ___________ 。

5. 保角变换保持 _____ 任意两点间的距离不变 _________ 。

三、单项选择题1.分辨率为1024X 1024的显示器各需要多少字节位平面数为24的帧缓存?( D )A. 512KB ;B. 1MB ;C. 2MB ;D. 3MB ;2. 在透视投影中,主灭点的最多个数是(C )A 1;B 2;C 3;D 43. 以下关于图形变换的论述不正确的是(D )A. 平移变换不改变图形大小和形状,只改变图形位置;B. 拓扑关系不变的几何变换不改变图形的连接关系和平行关系;C. 旋转变换后各图形部分间的线性关系和角度关系不变,变换后直线的长度不变D. 错切变换虽然可引起图形角度的改变,但不会发生图形畸变;2 0 14.使用下列二维图形变换矩阵:T =0 1 1 00 1A. 图形放大2倍;C.沿X 坐标轴方向各移动 2个绘图单位;D.沿X 坐标轴方向放大 2倍,同时沿X 、Y 坐标轴方向各平移1个绘图单位。

将产生变换的结果为(D )B.图形放大2倍,同时沿 X 、Y 坐标轴方向各移动 1个绘图单位;5. 下列有关投影的叙述语句中,正确的论述为(B )A. 透视投影具有近小远大的特点;B. 平行投影的投影中心到投影面距离是无限的;C. 透视投影变换中,一组平行于投影面的线的投影产生一个灭点;D. 灭点可以看作是无限远处的一个点在投影面上的投影。

计算机图形学习题答案

计算机图形学习题答案

k (x k, yk) pk 0 (7, 3) b 2(x 0 +1/2)2+a 2(y 0−1)2−a 2b 2 ≈−23 1 (8, 2) p0−2a 2y1+a 2 +2b 2x1=361 2 (8,1) p1−2a 2y2+a 2 =297 3 (8, 0)
、已知多边形 ABCDEFG 如图 1 所示,请分别使用奇 A 偶性规则和非零环绕数规则鉴别点 P 和 Q 在多边形内部还 D 是在多边形外部。请写出鉴别过程。 C ●P 【解】 G (1)奇偶性规则 ●Q E P :从 P 点出发向右引一条射线(不通过多边形顶点) , F 此时,边 AG 和 DE 与该射线相交,交点数为 2,所以 P B 在多边形的外部。 图1 Q: 从 Q 点出发向右引一条射线 (不通过多边形顶点) , 此时,边 AB 和 DE 与该射线相交,交点数为 2,所以 Q 在多边形的外部。 (2)非零环绕数规则 按照 ABCDEFG 的顺序规定多边形各边的方向。 P :从 P 点出发向右引一条射线(不通过多边形顶点) ,规定环绕数 H =0,当 P 点沿射线方 向移动时,边 GA 从右到左穿过该射线,H =H +1=1,边 DE 从左到右穿过该射线,H =H -1=0, 所以 P 在多边形的外部。 Q :从 Q 点出发向右引一条射线(不通过多边形顶点) ,规定环绕数 H =0,当 Q 点沿射线方 向移动时, 边 AB 从左到右穿过该射线, H =H -1=-1, 边 DE 从左到右穿过该射线, H =H -1=-2, 所以 Q 在多边形的内部。 6、已知线段的端点为(10,15)和(16,20),请使用 Bresenham 画线算法或中点画线算法绘制该线 段,要求有完整的计算过程。 【解】 (1)中点画线算法 (2)Bresenham 画线算法

计算机图形学基础课后部分习题答案

计算机图形学基础课后部分习题答案
DDA 算法: void CMainFrame::OnDdaline() { // TODO: Add your command handler code here CDC* pDC=GetDC(); int xa=0,ya=0,xb=8,yb=6,c=RGB(255,0,0); int x,y; float dx, dy, k; dx=(float)(xb-xa),dy=(float)(yb-ya); k=dy/dx,y=ya; if ((0<k&&k<1)||(-1<k&&k<0)) { for(x=xa;x<=xb;x++) {pDC->SetPixel(x,int(y+0.5),c); y=y+k;} } if(abs(k)>=1) { for(y=ya;y<=yb;y++) {pDC->SetPixel(int(x+0.5),y,c); x=x+1/k;} } ReleaseDC(pDC); } Bresenham 算法: void CMainFrame::OnBresenhamline() { // TODO: Add your command handler code here CDC*pDC=GetDC(); -4-
xi+1 xi+2
第四象限
-6-
d0=F(x0+1,y0-0.5)=-(k+0.5) 令 Di=2dxdi,得 D0=-(dx+2dy),D 与 d 同号 当 Di≥0,下一点(xi,yi-1),Di+1=Di-2dy 当 Di≤0,下一点(xi+1,yi-1),Di+1=Di-2(dx+dy)

计算机图形学1.2章答案

计算机图形学1.2章答案

计算机图形学1.2章答案判断题1.构成图形的要素可分为两类:刻画形状的点、线、面、体的非几何要素与反映物体表面属性或材质的明暗、色彩等的几何要素。

(错误)2.参数法描述的图形叫图形;点阵法描述的图形叫图像。

(正确)3.字符的图形表示分为点阵和矢量两种形式。

(正确)4.LCD表示发光二极管显示器。

(错误)填空题1.图形的输入设备有键盘、鼠标、光笔(至少写三种);图形的显示设备有CRT显示器、LCD、投影仪(至少写三种)。

2.一个交互式计算机图形系统应具有计算、存储、对话、输入和输出等五个方面的功能。

3.字符作为图形有点阵字符和矢量字符之分。

4.平面图形在内存中有两种表示方法,即栅格表示法和矢量表示法。

选择题1.以计算机中所记录的形状参数与属性参数来表示图形的一种方法叫做(),一般把它描述的图形叫做();而用具有灰度或颜色信息的点阵来表示图形的一种方法是(),它强调图形由哪些点组成,并具有什么灰度或色彩,一般把它描述的图形叫做(A)A参数法、图形、点阵法、图像 B点阵法、图像、参数法、图形C参数法、图像、点阵法、图形 D点阵法、图形、参数法、图像2.下列设备中属于图形输出设备的是( B)○1鼠标○2LCD○3键盘○4LED○5打印机○6扫描仪○7绘图仪○8触摸屏A○1○3○6○8 B○2○4○5○7 C○2○5○6○7 D○4○6○7○8问答及计算题1.计算机图形显示器和绘图设备表示颜色的方法各是什么颜色系统?它们之间的关系如何?答:计算机图形显示器是用RGB方法表示颜色,而绘图设备是用CMY方法来表示颜色的。

它们之间的关系是:两者都是面向硬件的颜色系统,前者是增性原色系统,后者是减性原色系统,后者是通过在黑色里加入一种什么颜色来定义一种颜色,而后者是通过指定从白色里减去一种什么颜色来定义一种颜色2.简述帧缓存与显示器分辨率的关系。

分辨率分别为640×480,1280×1024,和2560×2048的显示器欲存储每个像素12位,这些系统各需要多大的帧缓冲器(字节数)?解:480640=48012640?需要的帧缓存为KB4508/10241280=128/1280?需要的帧缓存为KB1024192020482560=8/2048122560?需要的帧缓存为KB76803.为什么要制定图形软件标准?可分为哪两类?答:为了提高计算机图形软件、计算机图形的应用软件以及相关软件的编程人员在不同计算机和图形设备之间的可移植性。

计算机图形学复习题及答案

计算机图形学复习题及答案

第一章计算机图形学概论1.计算机图形学研究的主要内容有哪些?研究图形图像的计算机生成、处理和显示2 .图形学中的图形特点是什么?图形图像有什么区别?图形主要是用矢量表示,图像则是由点阵表示3.计算机图形学发展的主要阶段包括哪些?字符显示->矢量显示->2D光栅显示->3D显示->新的计算机形式4.计算机图形学主要应用哪些方面?你对哪些领域比较熟悉?计算机辅助设计、可视化技术、虚拟现实、地理信息系统、计算机动画与艺术5.颜色模型分为面向用户和__面向设备__两种类型,分别是什么含义?颜色模型是一种在某种特定的上下文中对颜色的特性和行为解释方法。

6.解释三基色原理。

三基色:任意互不相关(任意两种的组合不能产生三种的另一种颜色)的三种颜色构成颜色空间的一组基,三基色通过适当的混合能产生所有颜色。

7.解释加色模型和减色模型的概念。

加色模型:若颜色模型在颜色匹配时只需要将光谱光线直接组合而产生新的颜色类型这种颜色模型称为加色模型,形成的颜色空间称为加色空间减色模型:若颜色模型在匹配是某些可见光会被吸收而产生新的颜色类型,这种颜色模型称为减色模型,形成的颜色空间称为减色空间。

8.RGB表示模型中(1,0,0)(1,1,1)(0,0,0)(0.5,0.5,0.5)分别表示什么颜色?红白黑灰第二章计算机图形的显示与生成1.有哪两种主流的扫描显示方式?光栅扫描随机扫描2.解释屏幕分辩率的概念。

荧光屏在水平方向和垂直方向单位长度上能识别的最大光点数称为分辨率3.CRT产生色彩显示有哪两种技术?分别进行解释。

电子束穿透法:用红—绿两层荧光层涂覆在CRT荧光屏的内层,而不同速度的电子束能穿透不同的荧光粉层而发出不同颜色的光。

荫罩法:在荧光屏每个光点处呈三角形排列着红绿蓝三种颜色的荧光点,三支电子枪分别对应三个荧光点,调节各电子枪发出的电子束强度,即可控制各光点中三个荧光点所发出的红绿蓝三色光的强度。

计算机图形学第三版答案

计算机图形学第三版答案

计算机图形学第三版答案【篇一:《计算机图形学》第1-5章课后习题参考答案】计算机图形学研究的基本内容?答:见课本p5-6页的1.1.4节。

2、计算机图形学、图形处理与模式识别本质区别是什么?请各举一例说明。

答:计算机图形学是研究根据给定的描述,用计算机生成相应的图形、图像,且所生成的图形、图像可以显示屏幕上、硬拷贝输出或作为数据集存在计算机中的学科。

计算机图形学研究的是从数据描述到图形生成的过程。

例如计算机动画制作。

图形处理是利用计算机对原来存在物体的映像进行分析处理,然后再现图像。

例如工业中的射线探伤。

模式识别是指计算机对图形信息进行识别和分析描述,是从图形(图像)到描述的表达过程。

例如邮件分捡设备扫描信件上手写的邮政编码,并将编码用图像复原成数字。

3、计算机图形学与cad、cam技术关系如何?答:见课本p4-5页的1.1.3节。

4、举3个例子说明计算机图形学的应用。

答:①事务管理中的交互绘图应用图形学最多的领域之一是绘制事务管理中的各种图形。

通过从简明的形式呈现出数据的模型和趋势以增加对复杂现象的理解,并促使决策的制定。

②地理信息系统地理信息系统是建立在地理图形基础上的信息管理系统。

利用计算机图形生成技术可以绘制地理的、地质的以及其它自然现象的高精度勘探、测量图形。

③计算机动画用图形学的方法产生动画片,其形象逼真、生动,轻而易举地解决了人工绘图时难以解决的问题,大大提高了工作效率。

5、计算机绘图有哪些特点?答:见课本p8页的1.3.1节。

6、计算机生成图形的方法有哪些?答:计算机生成图形的方法有两种:矢量法和描点法。

①矢量法:在显示屏上先给定一系列坐标点,然后控制电子束在屏幕上按一定的顺序扫描,逐个“点亮”临近两点间的短矢量,从而得到一条近似的曲线。

尽管显示器产生的只是一些短直线的线段,但当直线段很短时,连成的曲线看起来还是光滑的。

②描点法:把显示屏幕分成有限个可发亮的离散点,每个离散点叫做一个像素,屏幕上由像素点组成的阵列称为光栅,曲线的绘制过程就是将该曲线在光栅上经过的那些像素点串接起来,使它们发亮,所显示的每一曲线都是由一定大小的像素点组成的。

【中南大学】计算机图形学习题及答案

【中南大学】计算机图形学习题及答案

计算机图形学作业答案第一章序论第二章图形系统1.什么是图像的分辨率?解答:在水平和垂直方向上每单位长度(如英寸)所包含的像素点的数目。

2.计算在240像素/英寸下640×480图像的大小。

解答:(640/240)×(480/240)或者(8/3)×2英寸。

3.计算有512×512像素的2×2英寸图像的分辨率。

解答:512/2或256像素/英寸。

第三章二维图形生成技术1.一条直线的两个端点是(0,0)和(6,18),计算x从0变到6时y所对应的值,并画出结果。

解答:由于直线的方程没有给出,所以必须找到直线的方程。

下面是寻找直线方程(y =mx+b)的过程。

首先寻找斜率:m =⊿y/⊿x =(y2-y1)/(x2-x1)=(18-0)/(6-0) = 3接着b在y轴的截距可以代入方程y=3x+b求出 0=3(0)+b。

因此b=0,所以直线方程为y=3x。

2.使用斜截式方程画斜率介于0°和45°之间的直线的步骤是什么?解答:(1)计算dx:dx=x2-x1。

(2)计算dy:dy=y2-y1。

(3)计算m:m=dy/dx。

(4)计算b: b=y1-m×x1(5)设置左下方的端点坐标为(x,y),同时将x end设为x的最大值。

如果dx < 0,则x=x2、y=y2和x end=x1。

如果dx > 0,那么x=x1、y=y1和x end=x2。

(6)测试整条线是否已经画完,如果x > x end就停止。

(7)在当前的(x,y)坐标画一个点。

(8)增加x:x=x+1。

(9)根据方程y=mx+b计算下一个y值。

(10)转到步骤(6)。

3.请用伪代码程序描述使用斜截式方程画一条斜率介于45°和-45°(即|m|>1)之间的直线所需的步骤。

假设线段的两个端点为(x1,y1)和(x2,y2),且y1<y2int x = x1, y = y1;float x f, m = (y2-y1)/(x2-x1), b = y1-mx1;setPixel( x, y );/*画一个像素点*/while( y < y2 ) {y++;x f = ( y-b)/m;x = Floor( x f +0.5 );setPixel( x, y );}4.请用伪代码程序描述使用DDA算法扫描转换一条斜率介于-45°和45°(即|m|≤1)之间的直线所需的步骤。

《计算机图形学》1-8章习题解答

《计算机图形学》1-8章习题解答
由于参数方程次数太低会导致控制曲线的灵活性降低,曲线不连续;而次数太高则会导致计算复杂,存储开销增大。因此,为了在计算速度和灵活性之间寻找一个合理的折衷方案,多采用三次参数方程来表示自由曲线。
3.请给出Hermite形式曲线的曲线段i与曲线段i-1及曲线段i+1实现C1连续的条件。
答:参见教材第133页。
(4)进行步骤(2)和(1)的逆变换,变换矩阵为 和 。
设向量 ,则有 ,所以变化矩阵为:
8.如何确定一个点P在观察点的内部还是外部?
答:一个平面将空间分成两部分。平面的一般方程是:
对于任意点 ,若定义一个标量函数 ,有:
如果 ,则说明P点和Q点在同一边(相对平面而言)。令 分别表示顶平面、底平面、右平面、左平面、前平面、后平面。
(a)相对于水平线y=2;
(b)相对于垂直线x=2;
(c)相对于直线y=x+2。
答:
(a)
(b)
(c)
4.请写出一个图例变换,将正方形A(0,0),B(1,0),C(1,1),D(0,1)一半大小的复本放到主图形的坐标系中,且正方形的中心在(-1,-1)点。
答:原正方形的中心在P(1/2,1/2),首先进行关于P点的缩放变换,变换矩阵为M;
对 到 直线上的任意点 ,要证明 在 和 连接的直线上,其中 是 的变换,且 ,(3)
即要证明: ,(4)
将公式(1)、(2)、(3)代入公式(4),经整理得:
因为 满足: ,
由此得到, 在 和 连接的直线上。
6.二次旋转变换定义为先绕x轴旋转再绕y轴旋转的变换:
(a)写出这个变换的矩阵;
(b)旋转的先后顺序对结果有影响吗?
A(0001)B(1000)、C(0000)D(1010)、E(0000)F(0000)、G(0100)H(0010)、I(1001)J(1000)

计算机图形学试题及答案

计算机图形学试题及答案

计算机图形学试题及答案一、选择题1. 下列哪个选项反映了图形学的定义?A. 图形学是研究如何使用计算机生成和操纵图像的学科。

B. 图形学是研究计算机图形硬件的学科。

C. 图形学是研究计算机图像压缩算法的学科。

D. 图形学是研究计算机图形界面设计的学科。

答案:A2. 下列哪个选项不是计算机图形学的核心内容?A. 图形硬件B. 图形算法C. 图形数据结构D. 图形用户界面设计答案:D3. 在计算机图形学中,三维坐标使用下列哪个表示法?A. (x,y,z)B. (x,y)C. (x,y,z,w)D. (x,y,w)答案:A二、简答题1. 什么是光栅化?简述光栅化算法的基本原理。

答:光栅化是将连续的图形转化为离散的像素点的过程。

光栅化算法的基本原理包括以下步骤:- 对于三维图形,首先进行顶点的投影,将三维坐标映射到二维屏幕上。

- 然后,对二维空间中的像素进行遍历,判断每个像素是否被图形覆盖。

- 如果像素被覆盖,则将其填充为图形所要显示的颜色;如果未被覆盖,则保持原来的颜色。

2. 简述几何变换在计算机图形学中的作用,并举例说明。

答:几何变换在计算机图形学中可以用于对图像进行平移、旋转、缩放等操作,改变图形的位置和大小。

例如,通过对一个三角形进行平移,可以将其移动到屏幕的不同位置;通过对一个矩形进行缩放,可以改变其宽度和高度,实现图像的放大或缩小。

三、综合题请根据以下场景,回答问题并进行代码实现。

场景描述:假设有一个二维图形,由一组顶点坐标构成。

现在需要实现一个算法来判断该二维图形是否为凸多边形。

算法实现思路:1. 判断多边形的边是否都是凸角。

遍历多边形的每条边,判断其与相邻两条边形成的夹角是否小于180度,若有任意一条夹角大于180度,则不是凸多边形。

2. 判断多边形的内角是否都是凸角。

遍历多边形的每个顶点,以该顶点为中心,判断其与相邻两条边形成的夹角是否小于180度,若有任意一个内角大于180度,则不是凸多边形。

计算机图形学习题参考答案(完整版)

计算机图形学习题参考答案(完整版)

计算机图形学习题参考答案第1章绪论1、第一届ACM SIGGRAPH会议是哪一年在哪里召开的?解:1974年,在Colorado大学召开了第一届SIGGRAPH年会。

2、计算机图形学之父是谁?解:Sutherland3、列举一些计算机图形学的应用领域(至少5个)。

解:计算机辅助设计、图示图形学、计算机艺术、娱乐、教学与培训、可视化、图像处理、图形用户界面等。

4、简要介绍计算机图形学的研究内容。

解:(1)图形的输入。

如何开发和利用图形输入设备及相关软件把图形输入到计算机中,以便进行各种处理。

(2)图形的处理。

包括对图形进行变换(如几何变换、投影变换)和运算(如图形的并、交、差运算)等处理。

(3)图形的生成和输出。

如何将图形的特定表示形式转换成图形输出系统便于接受的表示形式,并将图形在显示器或打印机等输出设备上输出。

5、简要说明计算机图形学与相关学科的关系。

解:与计算机图形学密切相关的学科主要有图像处理、计算几何、计算机视觉和模式识别等。

计算机图形学着重讨论怎样将数据模型变成数字图像。

图像处理着重研究图像的压缩存储和去除噪音等问题。

模式识别重点讨论如何从图像中提取数据和模型。

计算几何着重研究数据模型的建立、存储和管理。

随着技术的发展和应用的深入,这些学科的界限变得模糊起来,各学科相互渗透、融合。

一个较完善的应用系统通常综合利用了各个学科的技术。

6、简要介绍几种计算机图形学的相关开发技术。

解:(1)OpenGL。

OpenGL是一套三维图形处理库,也是该领域事实上的工业标准。

OpenGL独立于硬件、操作系统和窗口系统,能运行于不同操作系统的各种计算机,并能在网络环境下以客户/服务器模式工作,是专业图形处理、科学计算等高端应用领域的标准图形库。

以OpenGL为基础开发的应用程序可以十分方便地在各种平台间移植;OpenGL与C/C++紧密接合,便于实现图形的相关算法,并可保证算法的正确性和可靠性;OpenGL使用简便,效率高。

计算机图形学及答案

计算机图形学及答案

计算机图形学作业I 一.判断题1.齐次坐标提供了坐标系变换的有效方法,但仍然无法表示无穷远的点;(×)2.若要对某点进行比例、旋转变换,首先需要将坐标原点平移至该点,在新的坐标系下做比例或旋转变换,然后在将原点平移回去;(√)3. 相似变换是刚体变换加上等比缩放变换;(√)4. 保距变换是刚体变换加上镜面反射;(√)5. 射影变换保持直线性,但不保持平行性。

(×)二、填空题1.透视投影的视见体为四棱锥形状;平行投影的视见体为长度无限的四棱柱形状。

2.字符的图形表示可以分为点阵和矢量两种形式。

3.仿射变换保持直线的平行性。

4.刚体变换保持长度,角度,面积等不变。

5.保角变换保持任意两点间的距离不变。

三、单项选择题1. 分辨率为1024×1024的显示器各需要多少字节位平面数为24的帧缓存?(D)A. 512KB;B. 1MB;C. 2MB;D. 3MB ;2. 在透视投影中,主灭点的最多个数是(C)A 1;B 2;C 3;D 43. 以下关于图形变换的论述不正确的是(D)A. 平移变换不改变图形大小和形状,只改变图形位置;B. 拓扑关系不变的几何变换不改变图形的连接关系和平行关系;C.旋转变换后各图形部分间的线性关系和角度关系不变,变换后直线的长度不变D.错切变换虽然可引起图形角度的改变,但不会发生图形畸变;4.使用下列二维图形变换矩阵:将产生变换的结果为(D)A. 图形放大2倍;B. 图形放大2倍,同时沿X、Y坐标轴方向各移动1个绘图单位;C.沿X坐标轴方向各移动2个绘图单位;D.沿X坐标轴方向放大2倍,同时沿X、Y坐标轴方向各平移1个绘图单位。

T =5. 下列有关投影的叙述语句中,正确的论述为(B)A. 透视投影具有近小远大的特点;B. 平行投影的投影中心到投影面距离是无限的;C. 透视投影变换中,一组平行于投影面的线的投影产生一个灭点;D. 灭点可以看作是无限远处的一个点在投影面上的投影。

计算机图形学答案(全面)

计算机图形学答案(全面)

计算机图形学答案(全面)第三章习题答案3.1 计算机图形系统的主要功能是什么?答:一个计算机图形系统应具有计算、存储、输入、输出、交互等基本功能,它们相互协作,完成图形数据的处理过程。

1. 计算功能计算功能包括:1)图形的描述、分析和设计;2)图形的平移、旋转、投影、透视等几何变换;3)曲线、曲面的生成;4)图形之间相互关系的检测等。

2. 存储功能使用图形数据库可以存放各种图形的几何数据及图形之间的相互关系,并能快速方便地实现对图形的删除、增加、修改等操作。

3. 输入功能通过图形输入设备可将基本的图形数据(如点、线等)和各种绘图命令输入到计算机中,从而构造更复杂的几何图形。

4. 输出功能图形数据经过计算后可在显示器上显示当前的状态以及经过图形编辑后的结果,同时还能通过绘图仪、打印机等设备实现硬拷贝输出,以便长期保存。

5. 交互功能设计人员可通过显示器或其他人机交互设备直接进行人机通信,对计算结果和图形利用定位、拾取等手段进行修改,同时对设计者或操作员输入的错误给以必要的提示和帮助。

3.2 阴极射线管由哪些部分组成?它们的功能分别是什么?答:CRT 主要由阴极、电平控制器(即控制极)、聚焦系统、加速系统、偏转系统和阳极荧光粉涂层组成,这六部分都在真空管内。

阴极(带负电荷)被灯丝加热后,发出电子并形成发散的电子云。

这些电子被电子聚集透镜聚焦成很细的电子束,在带正高压的阳极(实际为与加速极连通的CRT 屏幕内侧的石墨粉涂层,从高压入口引入阳极高电压)吸引下轰击荧光粉涂层,而形成亮点。

亮点维持发光的时间一般为20~40mS 。

电平控制器是用来控制电子束的强弱的,当加上正电压时,电子束就会大量通过,在屏幕上形成较亮的点,当控制电平加上负电压时,依据所加电压的大小,电子束被部分或全部阻截,通过的电子很少,屏幕上的点也就比较暗。

所以改变阴极和控制电平之间的电位差,就可调节电子束的电流密度,改变所形成亮点的明暗程度。

交互式计算机图形学1-7章课后题答案

交互式计算机图形学1-7章课后题答案

Angel: Interactive Computer Graphics, Fifth Edition Chapter 1 SolutionsThe main advantage of the pipeline is that each primitive can be processed independently. Not only does this architecture lead to fast performance, it reduces memory requirements because we need not keep all objects available. The main disadvantage is that we cannot handle most global effects such as shadows, reflections, and blending in a physically correct manner.We derive this algorithm later in Chapter 6. First, we can form the tetrahedron by finding four equally spaced points on a unit sphere centeredat the origin. One approach is to start with one point on the z axis (0, 0, 1). We then can place the other three points in a plane of constant z.One of these three points can be placed on the y axis. To satisfy the requirement that the points be equidistant, the point must be at(0, 2p2/3,−1/3). The other two can be found by symmetry to be at(−p6/3,−p2/3,−1/3) and (p6/3,−p2/3,−1/3).We can subdivide each face of the tetrahedron into four equilateral triangles by bisecting the sides and connecting the bisectors. However, thebisectors of the sides are not on the unit circle so we must push these points out to the unit circle by scaling the values. We can continue this process recursively on each of the triangles created by the bisection process.In Exercise , we saw that we could intersect the line of which the line segment is part independently against each of the sides of the window. We could do this process iteratively, each time shortening the line segmentif it intersects one side of the window.In a one–point perspective, two faces of the cube is parallel to the projection plane, while in a two–point perspective only the edges of the cube in one direction are parallel to the projection. In the general case of athree–point perspective there are three vanishing points and none of the edges of the cube are parallel to the projection plane.Each frame for a 480 x 640 pixel video display contains only about 300k pixels whereas the 2000 x 3000 pixel movie frame has 6M pixels, or about 18 times as many as the video display. Thus, it can take 18 times asmuch time to render each frame if there is a lot of pixel-level calculations.There are single beam CRTs. One scheme is to arrange the phosphorsin vertical stripes (red, green, blue, red, green, ....). The major difficulty isthat the beam must change very rapidly, approximately three times as fast a each beam in a three beam system. The electronics in such a system the electronic components must also be much faster (and more expensive).Chapter 2 SolutionsWe can solve this problem separately in the x and y directions. The transformation is linear, that is xs = ax + b, ys = cy + d. We must maintain proportions, so that xs in the same relative position in the viewport as x is in the window, hencex − xminxmax − xmin=xs − uw,xs = u + wx − xminxmax − xmin.Likewiseys = v + hx − xminymax − ymin.Most practical tests work on a line by line basis. Usually we usescanlines, each of which corresponds to a row of pixels in the frame buffer.If we compute the intersections of the edges of the polygon with a line passing through it, these intersections can be ordered. The first intersection begins a set of points inside the polygon. The second intersection leaves the polygon, the third reenters and so on.There are two fundamental approaches: vertex lists and edge lists. With vertex lists we store the vertex locations in an array. The mesh is represented as a list of interior polygons (those polygons with no other polygons inside them). Each interior polygon is represented as an array ofpointers into the vertex array. To draw the mesh, we traverse the list ofinterior polygons, drawing each polygon.One disadvantage of the vertex list is that if we wish to draw the edges inthe mesh, by rendering each polygon shared edges are drawn twice. We can avoid this problem by forming an edge list or edge array, each element is a pair of pointers to vertices in the vertex array. Thus, we can draw eachedge once by simply traversing the edge list. However, the simple edge listhas no information on polygons and thus if we want to render the mesh in some other way such as by filling interior polygons we must add something to this data structure that gives information as to which edges form each polygon.A flexible mesh representation would consist of an edge list, a vertex listand a polygon list with pointers so we could know which edges belong to which polygons and which polygons share a given vertex.The Maxwell triangle corresponds to the triangle that connects the red, green, and blue vertices in the color cube.Consider the lines defined by the sides of the polygon. We can assign a direction for each of these lines by traversing the vertices in a counter-clockwise order. One very simple test is obtained by noting that any point inside the object is on the left of each of these lines. Thus, if wesubstitute the point into the equation for each of the lines (ax+by+c), weshould always get the same sign.There are eight vertices and thus 256 = 28 possible black/white colorings. If we remove symmetries (black/white and rotational) there are 14 unique cases. See Angel, Interactive Computer Graphics (Third Edition) or the paper by Lorensen and Kline in the references.Chapter 3 SolutionsThe general problem is how to describe a set of characters that might have thickness, curvature, and holes (such as in the letters a and q). Suppose that we consider a simple example where each character can be approximated by a sequence of line segments. One possibility is to use amove/line system where 0 is a move and 1 a line. Then a character can be described by a sequence of the form (x0, y0, b0), (x1, y1, b1), (x2, y2, b2), .....where bi is a 0 or 1. This approach is used in the example in the OpenGL Programming Guide. A more elaborate font can be developed by using polygons instead of line segments.There are a couple of potential problems. One is that the application program can map different points in object coordinates to the same point in screen coordinates. Second, a given position on the screen when transformed back into object coordinates may lie outside the user’s window.Each scan is allocated 1/60 second. For a given scan we have to take 10% of the time for the vertical retrace which means that we start to draw scan line n at .9n/(60*1024) seconds from the beginning of the refresh. But allocating 10% of this time for the horizontal retrace we are at pixel mon this line at time .81nm/(60*1024).When the display is changing, primitives that move or are removed from the display will leave a trace or motion blur on the display as the phosphors persist. Long persistence phosphors have been used in text only displays where motion blur is less of a problem and the long persistence gives a very stable flicker-free image.Chapter 4 SolutionsIf the scaling matrix is uniform thenRS = RS(α, α, α) = αR = SRConsider R x(θ), if we multiply and use the standard trigonometric identities for the sine and cosine of the sum of two angles, we findR x(θ)R x(φ) = R x(θ + φ)By simply multiplying the matrices we findT(x1, y1, z1)T(x2, y2, z2) = T(x1 + x2, y1 + y2, z1 + z2)There are 12 degrees of freedom in the three–dimensional affine transformation. Consider a point p = [x, y, z, 1]T that is transformed top_ = [x_y_, z_, 1]T by the matrix M. Hence we have the relationshipp_ = Mp where M has 12 unknown coefficients but p and p_ are known. Thus we have 3 equations in 12 unknowns (the fourth equation is simply the identity 1=1). If we have 4 such pairs of points we will have 12 equations in 12 unknowns which could be solved for the elements of M. Thus if we know how a quadrilateral is transformed we can determine the affine transformation.In two dimensions, there are 6 degrees of freedom in M but p and p_ have only x and y components. Hence if we know 3 points both before and after transformation, we will have 6 equations in 6 unknowns and thus in two dimensions if we know how a triangle is transformed we can determine the affine transformation.It is easy to show by simply multiplying the matrices that the concatenation of two rotations yields a rotation and that the concatenationof two translations yields a translation. If we look at the product of arotation and a translation, we find that the left three columns of RT are the left three columns of R and the right column of RT is the right column of the translation matrix. If we now consider RTR_ where R_ is a rotation matrix, the left three columns are exactly the same as the left three columns of RR_ and the and right column still has 1 as its bottom element. Thus, the form is the same as RT with an altered rotation (which is the concatenation of the two rotations) and an altered translation. Inductively, we can see that any further concatenations with rotations andtranslations do not alter this form.If we do a translation by -h we convert the problem to reflection about a line passing through the origin. From m we can find an angle by which we can rotate so the line is aligned with either the x or y axis. Now reflect about the x or y axis. Finally we undo the rotation and translation so thesequence is of the form T−1R−1SRT.The most sensible place to put the shear is second so that the instance transformation becomes I = TRHS. We can see that this order makes sense if we consider a cube centered at the origin whose sides are aligned with the axes. The scale gives us the desired size and proportions. The shear then converts the right parallelepiped to a general parallelepiped. Finally we can orient this parallelepiped with a rotation and place it wheredesired with a translation. Note that the order I = TRSH will work too. R = R z(θz)R y(θy)R x(θx) =⎡⎡⎡⎡⎡cos θy cos θz cos θz sin θx sin θy −cos θx sin θz cos θx cos θz sin θy + sin θx sin θz 0cos θy sin θz cos θx cos θz + sin θx sin θy sin θz −cos θz sin θx + cos θx sin θy sin θz 0−sin θy cos θy sin θx cos θx cos θy 00 0 0 1⎡⎡⎡⎡⎡One test is to use the first three vertices to find the equation of the plane ax + by + cz + d = 0. Although there are four coefficients in the equation only three are independent so we can select one arbitrarily or normalize so that a2 + b2 + c2 = 1. Then we can successively evaluate ax + bc + cz + d for the other vertices. A vertex will be on the plane if weevaluate to zero. An equivalent test is to form the matrix⎡⎡⎡⎡⎡1 1 1 1x1 x2 x3 x4y1 y2 y3 y4z1 z2 z3 z4⎡⎡⎡⎡⎡for each i = 4, ... If the determinant of this matrix is zero the ith vertex isin the plane determined by the first three.Although we will have the same number of degrees of freedom in the objects we produce, the class of objects will be very different. For exampleif we rotate a square before we apply a nonuniform scale, we will shear thesquare, something we cannot do if we scale then rotate.The vector a = u × v is orthogonal to u and v. The vector b = u × a isorthogonal to u and a. Hence, u, a and b form an orthogonal coordinate system.Using r = cos θ2+ sin θ2v, with θ = 90 and v = (1, 0, 0), we find forrotation about the x-axisr =√22(1, 1, 0, 0).Likewise, for rotation about the y axisr =√22(1, 0, 1, 0).Possible reasons include (1) object-oriented systems are slower, (2) users are often comfortable working in world coordinates withhigher-levelobjects and do not need the flexibility offered by a coordinate-free approach, (3) even a system that provides scalars, vectors, and points would have to have an underlying frame to use for the implementation.Chapter 5 SolutionsEclipses (both solar and lunar) are good examples of the projection ofan object (the moon or the earth) onto a nonplanar surface. Any time a shadow is created on curved surface, there is a nonplanar projection. All the maps in an atlas are examples of the use of curved projectors. If the projectors were not curved we could not project the entire surface of a spherical object (the Earth) onto a rectangle.Suppose that we want the view of the Earth rotating about the sun. Before we draw the earth, we must rotate the Earth which is a rotation about the y axis. Next we translate the Earth away from the origin. Finally we do another rotation about the y axis to position the Earth in itsdesired location along its orbit. There are a number of interesting variantsof this problem such as the view from the Earth of the rest of the solar system.Yes. Any sequence of rotations is equivalent to a single rotation about a suitably chosen axis. One way to compute this rotation matrix is to form the matrix by sequence of simple rotations, such asR = RxRyRz.The desired axis is an eigenvector of this matrix.The result follows from the transformation being affine. We can also take a direct approach. Consider the line determined by the points(x1, y1, z1) and (x2, y2, z2). Any point along can be written parametricallyas (_x1 + (1 −_)x2, _y1 + (1 −_)y2, _z1 + (1 −_)z2). Consider the simple projection of this point 1d(_z1+(1−_)z2) (_x1 + (1 − _)x2, _y1 + (1 − _)y2)which is of the form f(_)(_x1 + (1 − _)x2, _y1 + (1 − _)y2). This form describes a line because the slope is constant. Note that the function f(_)implies that we trace out the line at a nonlinear rate as _ increases from 0to 1.The specification used in many graphics text is of the angles the projector makes with x,z and y, z planes, the angles defined by the projection of a projector by a top view and a side view.Another approach is to specify the foreshortening of one or two sides of acube aligned with the axes.The CORE system used this approach. Retained objects were kept indistorted form. Any transformation to any object that was defined with other than an orthographic view transformed the distorted object and the orthographic projection of the transformed distorted object was incorrect.If we use _ = _ = 45, we obtain the projection matrixP =266641 0 −1 00 1 −1 00 0 0 00 0 0 137775All the points on the projection of the point , z) in the direction dx, dy, dz) are of the form (x + _dx, y + _dy, z + _dz). Thus the shadow ofthe point (x, y, z) is found by determining the _ for which the line intersects the plane, that isaxs + bys + czs = dSubstituting and solving, we find_ =d − ax − by − czadx + bdy + cdz.However, what we want is a projection matrix, Using this value of _ we findxs = z + _dx =x(bdy + cdx) − dx(d − by − cz)adx + bdy + cdzwith similar equations for ys and zs. These results can be computed by multiplying the homogeneous coordinate point (x, y, z, 1) by the projectionmatrixM =26664bdy + cdz −bdx −cdx −ddx−ady adx + cdz −cdy −ddy−adz −bdz adx + bdy −ddz0 0 0 adx + bdy + cdz37775.Suppose that the average of the two eye positions is at (x, y, z) and the viewer is looking at the origin. We could form the images using the LookAt function twice, that isgluLookAt(x-dx/2, y, z, 0, 0, 0, 0, 1, 0);/* draw scene here *//* swap buffers and clear */gluLookAt(x+dx/2, y, z, 0, 0, 0, 0, 1, 0);/* draw scene again *//* swap buffers and clear */Chapter 6 SolutionsPoint sources produce a very harsh lighting. Such images are characterized by abrupt transitions between light and dark. The ambient light in a real scene is dependent on both the lights on the scene and thereflectivity properties of the objects in the scene, something that cannot becomputed correctly with OpenGL. The Phong reflection term is not physically correct; the reflection term in the modified Phong model is evenfurther from being physically correct.If we were to take into account a light source being obscured by an object, we would have to have all polygons available so as to test for thiscondition. Such a global calculation is incompatible with the pipeline model that assumes we can shade each polygon independently of all other polygons as it flows through the pipeline.Materials absorb light from sources. Thus, a surface that appears red under white light appears so because the surface absorbs all wavelengths oflight except in the red range—a subtractive process. To be compatible withsuch a model, we should use surface absorbtion constants that define the materials for cyan, magenta and yellow, rather than red, green and blue.Let ψ be the angle between the normal and the halfway vector, φ be the angle between the viewer and the reflection angle, and θ be the anglebetween the normal and the light source. If all the vectors lie in the sameplane, the angle between the light source and the viewer can be computer either as φ + 2θ or as 2(θ + ψ). Setting the two equal, we find φ = 2ψ. Ifthe vectors are not coplanar then φ < 2ψ.Without loss of generality, we can consider the problem in two dimensions. Suppose that the first material has a velocity of light of v1 andthe second material has a light velocity of v2. Furthermore, assume that the axis y = 0 separates the two materials.Place a point light source at (0, h) where h > 0 and a viewer at (x, y) where y < 0. Light will travel in a straight line from the source to a point(t, 0) where it will leave the first material and enter the second. It willthen travel from this point in a straight line to (x, y). We must find the tthat minimizes the time travelled.Using some simple trigonometry, we find the line from the source to (t, 0)has length l1 = √h2 + t2 and the line from there to the viewer has length 1l2 = _y2 + (x − t)2. The total time light travels is thus l1v1 + l2v2 .Minimizing over t gives desired result when we note the two desired sines are sin θ1 = h√h2+t2 and sin θ2 = −y √(y2+(x−t)2 .Shading requires that when we transform normals and points, we maintain the angle between them or equivalently have the dot productp ·v = p_ ·v_ when p_ = Mp and n_ = Mp. If M T M is an identity matrix angles are preserved. Such a matrix (M−1 = M T ) is called orthogonal. Rotations and translations are orthogonal but scaling and shear are not.Probably the easiest approach to this problem is to rotate the given plane to plane z = 0 and rotate the light source and objects in the same way. Now we have the same problem we have solved and can rotate everything back at the end.A global rendering approach would generate all shadows correctly. Ina global renderer, as each point is shaded, a calculation is done to see which light sources shine on it. The projection approach assumes that we can project each polygon onto all other polygons. If the shadow of a given polygon projects onto multiple polygons, we could not compute these shadow polygons very easily. In addition, we have not accounted for the different shades we might see if there were intersecting shadows from multiple light sources.Chapter 7 SolutionsFirst, consider the problem in two dimensions. We are looking for an _ and _ such that both parametric equations yield the same point, that is x(_) = (1 − _)x1 + _x2 = (1 − _)x3 + _x4,y(_) = (1 − _)y1 + _y2 = (1 − _)y3 + _y4.These are two equations in the two unknowns _ and _ and, as long as the line segments are not parallel (a condition that will lead to a division byzero), we can solve for _ _. If both these values are between 0 and 1, thesegments intersect.If the equations are in 3D, we can solve two of them for the _ and _ where x and y meet. If when we use these values of the parameters in the two equations for z, the segments intersect if we get the same z from both equations.If we clip a convex region against a convex region, we produce the intersection of the two regions, that is the set of all points in both regions,which is a convex set and describes a convex region. To see this, consider any two points in the intersection. The line segment connecting them must be in both sets and therefore the intersection is convex.See Problem . Nonuniform scaling will not preserve the anglebetween the normal and other vectors.Note that we could use OpenGL to, produce a hidden line removed image by using the z buffer and drawing polygons with edges and interiors the same color as the background. But of course, this method was not used in pre–raster systems.Hidden–line removal algorithms work in object space, usually with either polygons or polyhedra. Back–facing polygons can be eliminated. In general, edges are intersected with polygons to determine any visible parts.Good algorithms (see Foley or Rogers) use various coherence strategies tominimize the number of intersections.The O(k) was based upon computing the intersection of rays with the planes containing the k polygons. We did not consider the cost of filling thepolygons, which can be a large part of the rendering time. If we consider ascene which is viewed from a given point there will be some percentage of1the area of the screen that is filled with polygons. As we move the viewer closer to the objects, fewer polygons will appear on the screen but each will occupy a larger area on the screen, thus leaving the area of the screen that is filled approximately the same. Thus the rendering time will be about the same even though there are fewer polygons displayed.There are a number of ways we can attempt to get O(k log k) performance. One is to use a better sorting algorithm for the depth sort. Other strategies are based on divide and conquer such a binary spatial partitioning.If we consider a ray tracer that only casts rays to the first intersection and does not compute shadow rays, reflected or transmitted rays, then the image produced using a Phong model at the point of intersection will be the same image as produced by our pipeline renderer. This approach is sometimes called ray casting and is used in volume rendering and CSG. However, the data are processed in a different order from the pipeline renderer. The ray tracer works ray by ray while the pipeline renderer works object by object.Consider a circle centered at the origin: x2 + y2 = r2. If we know that a point (x, y) is on the curve than, we also know (−x, y), (x,−y), (−x,−y), (y, x), (−y, x), (y,−x), and (−y,−x) are also on the curve. This observation is known as the eight–fold symmetry of the circle. Consequently, we need only generate 1/8 of the circle, a 45 degree wedge, and can obtain the rest by copying this part using the symmetries. If we consider the 45 degree wedge starting at the bottom, the slope of thiscurve starts at 0 and goes to 1, precisely the conditions used for Bresenham’s line algorithm. The tests are a bit more complex and we have to account for the possibility the slope will be one but the approach is thesame as for line generation.Flood fill should work with arbitrary closed areas. In practice, we can get into trouble at corners if the edges are not clearly defined. Such can bethe case with scanned images.Note that if we fill by scan lines vertical edges are not a problem. Probably the best way to handle the problem is to avoid it completely by never allowing vertices to be on scan lines. OpenGL does this by having vertices placed halfway between scan lines. Other systems jitter the y value of any vertex where it is an integer.Although each pixel uses five rays, the total number of rays has only doubled, . consider a second grid that is offset one half pixel in both thex and y directions.A mathematical answer can be investigated using the notion of reconstruction of a function from its samples (see Chapter 8). However, avery easy to see by simply drawing bitmap characters that small pixels lead to very unreadable characters. A readable character should have some overlap of the pixels.We want k levels between Imin and Imax that are distributed exponentially. Then I0 = Imin, I1 = Iminr,I2 = Iminr2, ..., Ik−1 = Imax = Iminrk−1. We can solve the last equation forthe desired r = ( ImaxImin)1k−1If there are very few levels, we cannot display a gradual change in brightness. Instead the viewer will see steps of intensity. A simple rule ofthumb is that we need enough gray levels so that a change of one step is not visible. We can mitigate the problem by adding one bit of random noise to the least significant bit of a pixel. Thus if we have 3 bits (8 levels),the third bit will be noise. The effect of the noise will be to break up regions of almost constant intensity so the user will not be able to see astep because it will be masked by the noise. In a statistical sense the jittered image is a noisy (degraded) version of the original but in a visualsense it appears better.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

计算机图形学作业I
一.判断题
1.齐次坐标提供了坐标系变换的有效方法,但仍然无法表示无穷远的点;(×)
2.若要对某点进行比例、旋转变换,首先需要将坐标原点平移至该点,在新的坐标系下做比例或旋转变换,然后在将原点平移回去;(√)
3. 相似变换是刚体变换加上等比缩放变换;(√)
4. 保距变换是刚体变换加上镜面反射;(√)
5. 射影变换保持直线性,但不保持平行性。

(×)
二、填空题
1.透视投影的视见体为四棱锥形状;平行投影的视见体为长度无限的四
棱柱形状。

2.字符的图形表示可以分为点阵和矢量两种形式。

3.仿射变换保持直线的平行性。

4.刚体变换保持长度,角度,面积等不变。

5.保角变换保持任意两点间的距离不变。

三、单项选择题
1. 分辨率为1024×1024的显示器各需要多少字节位平面数为24的帧缓存?(D)
A. 512KB;
B. 1MB;
C. 2MB;
D. 3MB ;
2. 在透视投影中,主灭点的最多个数是(C)
A 1;
B 2;
C 3;
D 4
3. 以下关于图形变换的论述不正确的是(D)
A. 平移变换不改变图形大小和形状,只改变图形位置;
B. 拓扑关系不变的几何变换不改变图形的连接关系和平行关系;
C.旋转变换后各图形部分间的线性关系和角度关系不变,变换后直线的长度不变
D.错切变换虽然可引起图形角度的改变,但不会发生图形畸变;
4.
使用下列二维图形变换矩阵:将产生变换的结果为(D)
A. 图形放大2倍;
B. 图形放大2倍,同时沿X、Y坐标轴方向各移动1个绘图单位;
C.沿X坐标轴方向各移动2个绘图单位;
D.沿X坐标轴方向放大2倍,同时沿X、Y坐标轴方向各平移1个绘图单位。

5. 下列有关投影的叙述语句中,正确的论述为(B)
A. 透视投影具有近小远大的特点;
T =
B. 平行投影的投影中心到投影面距离是无限的;
C. 透视投影变换中,一组平行于投影面的线的投影产生一个灭点;
D. 灭点可以看作是无限远处的一个点在投影面上的投影。

6. 下列有关三维物体线框模型表示法的叙述语句中,错误的论述为(A )
A. 物体线框模型由定义物体边界的直线和曲线组成,并存在面的信息;
B. 三维物体线框模型可能出现二义性;
C. 三维物体线框模型所构造出的形体不一定总是简单且有效的;
D. 线框模型不能正确表示曲面信息。

7.下列有关边界表示法的叙述语句中,错误的论述为(C)
A. 定义了物体的边界也就唯一的定义了物体的几何形状边界;
B. 物体的边界上的面是有界的,而且,面的边界应是闭合的;
C. 物体的边界上的面是有向的,面的法向总是指向物体的内部;
D. 物体的边界上的边可以是曲线,但在两端之间不允许曲线自相交。

8.下述绕坐标原点旋转a角的坐标变换矩阵中(B)是错误。

| A B |
| C D |
A. cos a
B.sin a
C.sin a
D.cos a
9.在多边形的逐边裁剪法中,对于某条多边形的边(方向为从端点S到端点P)与某条裁剪线(窗口的某一边)的比较结果共有以下四种情况,分别需输出一些顶点.请问哪种情况下输出的顶点是错误的( A )
A. S和P均在可见的一侧,则输出S和P.
B. S和P均在不可见的一侧,则输出0个顶点.
C. S在可见一侧,P在不可见一侧,则输出线段SP与裁剪线的交点.
D. S在不可见的一侧,P在可见的一侧,则输出线段SP与裁剪线的交点和P.
10.关于Bresenham画圆算法说法正确的是:(B )
A. 该算法可以不使用浮点运算,而只使用整数运算;
B. 该算法必须使用乘法运算;
C. 该算法不易于用硬件实现;
D. 该算法虽然效率比较高,但是不如角度DDA画圆弧方法快;
四、简答
1.正则集的概念
正则运算(r):现对物体取内点,再取闭包;
正则点集:r·A,A为一个点集;
正则集合运算:r·(A op B),A,B为两个二维实体,op为普通的机集合运算。

2.请简述二维观察的观察流程。

通过应用程序建立世界坐标系,然后从世界坐标系转换到观察坐标系,在观察坐标系下指定一个二维矩形窗口,对图形进行裁剪,然后从世界坐标系中的窗口转换到屏幕坐标系中的视区,通过草庙变换后在图形设备上输出。

3.视区:
窗口映射到屏幕或绘图纸上的坐标区域,用来指定窗口内的图形再屏幕上现实的大小及位置。

4.扫描转换
将顶点(参数)表示的图形转换为像素(点阵)表示的图形称为光栅图形的扫描转换。

由图形软件包(SRGP)完成,支持的基本图元包括直线段、折线、多边形、圆弧、字符等。

5.裁剪
由于实际需要或显示屏幕有限,要求开一个矩形区域指定要显示的部分画面,作为显示区。

确定图形中哪些部分落在显示区之内,哪些落在显示区之外,以便只显示落在显示区内的那部分图形的选择过程称为裁剪。

6.请简述三维图形的处理流程
物体最初定义于自己的局部坐标系(模型坐标系)中,经过模型变换,以一定的形状、尺寸存在于世界坐标系的某个位置。

在经过观察变换,获得物体在观察坐标系中的表示。

观察坐标系中的视见体划定了可见物体所在的范围,裁剪之后剩下的物体将被投影到投影平面上的窗口之内,再由窗口到视区的变换将其变换到设备坐标系中用于显示。

7.齐次坐标
将一个原本是n维的向量用一个n+1维向量来表示。

如点(x1 ,x2 ,…… xn)的齐次坐标为(x1 ,x2 ,…… xn ,h),h = 0 时表示n维的无穷远点。

8.反走样
在光栅图形显示器上显示图形时,直线段或图形边界或多或少会呈现锯齿状。

原因是图形信号是连续的,而在光栅显示系统中,用来表示图形的却是一个个离散的像素。

这种用离散的量(像素)表示连续的量(图形)而引起的失真,叫作走样。

用于减少或消除走样的技术,就称为反走样。

9.图像分辨率
一个CRT 在水平和竖直方向单位长度上能识别的最大光点数称为图像分辨率。

10.仿射变换
仿射变换保持两条平行直线间的平行关系,由一个线性变换接上一个平移组成,对于二维变换即:X=ax+by+e , Y=cx+dy+f
五、计算题
1. 如图4-1所示三角形ABC ,将其关于A 点逆时针旋转900,写出其变换矩阵和变换后图形各点的规范化齐次坐标。

(10分)
R (x,y, 900
)= T(x,y)* R (900
)* T (-x ,-y )
= ⎪⎪⎪⎭⎫ ⎝⎛100510201⎪⎪⎪⎪⎭

⎝⎛-10
090cos 90sin 090sin 90cos 0
00⎪⎪⎪⎭⎫
⎝⎛--100510201
=⎪⎪⎪⎭⎫ ⎝⎛100510201⎪⎪⎪⎭⎫ ⎝⎛-100001010⎪⎪⎪⎭⎫
⎝⎛--100510201 =⎪⎪⎪⎭
⎫ ⎝⎛-100301710 齐次坐标: A :(2,5,1) B :(6,4,1) C :(4,9,1)
使用matlab 进行矩阵计算
2.求将图4-3中的空间四面体关于E 点整体放大两倍,写出变换矩阵以及变换后图形各点的规范化齐次坐标。

(10分)
x
图4-3
S (E ;2,2,2)= T (x,y,z )* S (2,2,2)* T (-x,-y,-z )
= ⎪⎪
⎪⎪



⎝⎛---⎪⎪⎪⎪⎪⎭⎫
⎝⎛⎪⎪⎪⎪⎪⎭⎫ ⎝⎛100021002010
2001
100002000020
0002
1000210020102001 = ⎪⎪
⎪⎪


⎫ ⎝
⎛---1000220020202002 齐次坐标:
E :(2,2,2,1)
A:(-2,-2,-2,1)
B:(2,-2,-2,1)
C:(2,2,-2,1)
D:(-2,2,-2,1)
使用matlab进行矩阵计算
3. 如右图所示的多边形,若采用改进的有效边表算法进行填充,在填充时采用“下闭上升”的原则(即删除y=y max的边之后再填充)试画出该多边形的ET表和当扫描线Y=3和Y=8时的AET表。

ET 表
Y=3 和Y=8的AET 表
4
多边形P 0P 1P 2P 3P 4P 5P 6P 0
以x轴为参考轴进行错切:
x’=x+shx*y
y’=y
shx=1/2
再向左平移1个单位:
x’’=x’-1
y’’=y’
5
(3)先求出各顶点变换后的顶点坐标,再依次连接各点。

运用Matlab计算变换后的各点:
(4)glRotatef(45︒,0,0,1) glScalef(1,2,1)。

相关文档
最新文档