欢迎来到天天文库
浏览记录
ID:44243049
大小:177.57 KB
页数:6页
时间:2019-10-20
《直线中点Bresenham算法实验报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实验报告课程名称计算机图形图像处理学年2015-2016学期1口/2口课程类别专业必修口限选□任选□实践口实验时间201年月F1实验名称实验一直线中点Bresenham算法实验目的和要求•(1)掌握中点Bresenham绘制直线的原理;•(2)设计中点Bresenham算法•(3)编写Mbline()子函数实验软硬件要求Windows7以及VC++6.0实验内容、方法和步骤(可附页)1.案例描述使用屮点Bresenham算法绘制斜率为OWkW1的肓线。2.案例效果图案例输入对话框及效果如图2-1所示。3.功能说明(1)要求使用对话框输入直线的起点和终点坐标。(
2、2)直线的颜色为蓝色。4.绘制点(x,y),判断d的符号。若dvO,则(x,y)更新为(x+1,y+1),d更新为d+1-k;否则(x,y)更新为(x+1,y),d更新为d—k。5.如果当前点x小于",重复步骤⑷,否则结束。实验结果(可附页)见附页小结评定成绩:批阅教师::pspojojdJ!Pg#Usuoo(op^>ix9)uo3diunQ3)diunQpiOAjunuiatjsuooOpyc^xisssvpiOAjunuiAon9aa_ppj!#i()M9iAlS9LD-i^nyiA:oi[qnduoi)e)u3iu9iduii//lVniHIA~XJV{
3、{//Xoju[d^ojupuujopad*3a3)§u!Ju!JdPuau0P!«apnuiA:(ojuid^ojupuud3Q(jd*DaD)nuiniuduiS3guoP!()ap?njjiA:(oju[d#ojuiJUUd3)Sunuud0JBdQj4、Unj.IIA:3i(qnd(M9iA)saionvniHIA_XHV})//5、SOppjQAOuoijounjpniJIAp9)UJ9U9§pJVZIASSU6、3//SSpiJJSAO//廉I臾ill叫uosaig字小褊阜〃:()ou![qpjpiOA:3i(qndsuonujado//tOlusiunooapoQo(pso丄o:oi[qndsoinqunv//(M9iAjs9i3)aivaHDNAa~3HVlDaaA】s紅0K[UOUOIlVZipuOSIUOJJ91E9J3//:p9)09)0jd)oiiqnd:阴处jsojlqsscp制兀孤JU里赵〃“q唱IQindui"apnpui#00017、#93UOBiu^ejd#00018、OM91AJS913。屮JO93VJJ91UI:q-A9l人杼紅//:9、》兀1]MQ!10、A1SOJO•【汾二出G巍逅一doublex(),yO,xl,yl;〃直线的起点和终点坐标//Generatedmessagemapfunctionsprotected://{{AFX_MSG(CTestView)afx_msgvoidOnMENUMbiine();//}}AFX_MSGDECLARE_MESSAGE_MAP());#ifndef_DEBUG//debugversioninTestView.cppinlineCTestDoc*CTestView::GetDocument(){return(CTestDoc*)m_pDocument;)#endi11、flllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll//{{AFX_INSERT_LOCATION})//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline・#endif//!defined(AFXTESTVIEWHA75FDCFB621C4E38A154C344803E6372INCLUDED)2.CTestView.epp文件//TestVi12、ew.cpp:implementati
4、Unj.IIA:3i(qnd(M9iA)saionvniHIA_XHV})//
5、SOppjQAOuoijounjpniJIAp9)UJ9U9§pJVZIASSU
6、3//SSpiJJSAO//廉I臾ill叫uosaig字小褊阜〃:()ou![qpjpiOA:3i(qndsuonujado//tOlusiunooapoQo(pso丄o:oi[qndsoinqunv//(M9iAjs9i3)aivaHDNAa~3HVlDaaA】s紅0K[UOUOIlVZipuOSIUOJJ91E9J3//:p9)09)0jd)oiiqnd:阴处jsojlqsscp制兀孤JU里赵〃“q唱IQindui"apnpui#00017、#93UOBiu^ejd#00018、OM91AJS913。屮JO93VJJ91UI:q-A9l人杼紅//:9、》兀1]MQ!10、A1SOJO•【汾二出G巍逅一doublex(),yO,xl,yl;〃直线的起点和终点坐标//Generatedmessagemapfunctionsprotected://{{AFX_MSG(CTestView)afx_msgvoidOnMENUMbiine();//}}AFX_MSGDECLARE_MESSAGE_MAP());#ifndef_DEBUG//debugversioninTestView.cppinlineCTestDoc*CTestView::GetDocument(){return(CTestDoc*)m_pDocument;)#endi11、flllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll//{{AFX_INSERT_LOCATION})//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline・#endif//!defined(AFXTESTVIEWHA75FDCFB621C4E38A154C344803E6372INCLUDED)2.CTestView.epp文件//TestVi12、ew.cpp:implementati
7、#93UOBiu^ejd#00018、OM91AJS913。屮JO93VJJ91UI:q-A9l人杼紅//:9、》兀1]MQ!10、A1SOJO•【汾二出G巍逅一doublex(),yO,xl,yl;〃直线的起点和终点坐标//Generatedmessagemapfunctionsprotected://{{AFX_MSG(CTestView)afx_msgvoidOnMENUMbiine();//}}AFX_MSGDECLARE_MESSAGE_MAP());#ifndef_DEBUG//debugversioninTestView.cppinlineCTestDoc*CTestView::GetDocument(){return(CTestDoc*)m_pDocument;)#endi11、flllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll//{{AFX_INSERT_LOCATION})//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline・#endif//!defined(AFXTESTVIEWHA75FDCFB621C4E38A154C344803E6372INCLUDED)2.CTestView.epp文件//TestVi12、ew.cpp:implementati
8、OM91AJS913。屮JO93VJJ91UI:q-A9l人杼紅//:
9、》兀1]MQ!
10、A1SOJO•【汾二出G巍逅一doublex(),yO,xl,yl;〃直线的起点和终点坐标//Generatedmessagemapfunctionsprotected://{{AFX_MSG(CTestView)afx_msgvoidOnMENUMbiine();//}}AFX_MSGDECLARE_MESSAGE_MAP());#ifndef_DEBUG//debugversioninTestView.cppinlineCTestDoc*CTestView::GetDocument(){return(CTestDoc*)m_pDocument;)#endi
11、flllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll//{{AFX_INSERT_LOCATION})//MicrosoftVisualC++willinsertadditionaldeclarationsimmediatelybeforethepreviousline・#endif//!defined(AFXTESTVIEWHA75FDCFB621C4E38A154C344803E6372INCLUDED)2.CTestView.epp文件//TestVi
12、ew.cpp:implementati
此文档下载收益归作者所有