Generalization * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 - d = Dx(b-a) d is an integer d 0 use upper pixel d 0 use lower pixel * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 Scan Conversion = Fill How to tell inside from outside Convex easy Nonsimple difficult Odd even test Count edge crossings Winding number odd-even fill * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 Fill at end of pipeline Convex Polygons only Nonconvex polygons assumed to have been tessellated Shades (colors) have been computed for vertices (Gouraud shading) Combine with z-buffer algorithm March across scan lines interpolating shades Incremental work small * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 span C1 C3 C2 C5 C4 scan line C1 C2 C3 specified by glColor or by vertex shading C4 determined by interpolating between C1 and C2 C5 determined by interpolating between C2 and C3 interpolate between C4 and C5 along span * Fill can be done recursively if we know a seed point located inside (WHITE) Scan convert edges into buffer in edge/inside color (BLACK) Then, flood fill it starting from (x, y) flood_fill(int x, int y) { if(read_pixel(x,y)= = WHITE) { write_pixel(x,y,BLACK); flood_fill(x-1, y); flood_fill(x+1, y); flood_fill(x, y+1); flood_fill(x, y-1); } } * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 Can also fill by maintaining a data structure of all intersections of polygons with scan lines Sort by scan line Fill each span vertex order generated by vertex list desired order * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 Ideal rasterized line should be 1 pixel wide Choosing best y for each x (or visa versa) produces aliased raster lines * Angel: Interactive Computer Graphics 5E ? Addison-Wesley 2009 Color multiple pixels for each x depending on coverage by ideal line
您可能关注的文档
- 景观生态学课件II.ppt
- 景区开发与管理1_6景区营销.ppt
- 服装零售与采购(新)2.ppt
- 概率论课后题答案(华南理工大学出版).doc
- 警察科学总论课件.ppt
- HSE教程现代安全管理讲座.ppt
- 2013中级会计模拟试卷.doc
- 前厅与客房管理课件.ppt
- 09~12年高考数学试题分类汇编(概率统计排列组合).doc
- 景区开发与管理1_10景区设施.ppt
- 河北盐山中学等校2025-2026学年上学期高三一模化学试卷(含解析).docx
- 河北正定中学2025-2026学年高一上学期期末考试物理试卷(含解析).docx
- 河北张家口市怀安县2025-2026学年第一学期期末教学综合评价八年级地理试卷(含解析).docx
- 河南安阳市殷都区2025-2026学年第一学期期末教学质量检测七年级地理试卷(含解析).docx
- 河南安阳市滑县2025一2026学年第一学期期末学业质量监测八年级地理试题(含解析).docx
- 河南安阳市林州市2025-2026学年上学期期末考试高一政治试题(含解析).docx
- 河南焦作市武陟县第一中学2025-2026学年高一上学期1月月考语文试卷(含解析).docx
- 河南济源市2025-2026学年上学期期末学业质量调研七年级历史试卷(含解析).docx
- PICC导管并发症的紧急处理与护理.pptx
- 河南鹤壁市2025-2026学年高二上学期期末考试生物试题(含解析).docx
最近下载
- C-V2X与单车智能融合研究.pptx VIP
- 消防改造设计任务书.docx VIP
- 广东省佛山市顺德区2024-2025学年六年级下册期中考试语文试卷(有答案).pdf VIP
- 消防设计任务书.docx VIP
- 实施指南《GB12268-2012危险货物品名表》实施指南.pptx VIP
- 带电作业安全距离PPT课件.pptx VIP
- 林业成果图制作—林业专题图及制图(GIS制图技术).pptx
- 高中英语课件7开课名师-郭贝老师from page to screen.pdf VIP
- 丙种球蛋白被动免疫治疗原因不明性反复自然流产研究.pdf VIP
- (二模)南通市2025届高三第二次调研测试英语试卷(含标准答案).docx
原创力文档

文档评论(0)