计算机图形学设计报告(黄轩)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

计算机图形学设计报告专业班级:软工.NET101学号:200907082116姓名:黄轩指导老师:杜俊俐中原工学院软件学院2011年6月20日2目录项目一:国旗的绘制..................................................................2一、设计目的...........................................................................................................................3二、设计内容...........................................................................................................................3三、设计方案与实现...............................................................................................................3四、设计结果...........................................................................................................................4五、设计总结...........................................................................................................................4六、附录...................................................................................................................................4项目二:交通灯的绘制............................................................10一、设计目的.........................................................................................................................10二、设计内容.........................................................................................................................10三、设计方案与实现.............................................................................................................10四、设计结果.........................................................................................................................12五、设计总结.........................................................................................................................12六、附录.................................................................................................................................12项目三:自创图形的绘制........................................................16一、设计目的.........................................................................................................................16二、设计内容.........................................................................................................................16三、设计方案与实现.............................................................................................................16四、设计结果.........................................................................................................................17五、设计总结.........................................................................................................................17六、附录.................................................................................................................................17项目四:画图工具的绘制………………………………………23一、设计目的.........................................................................................................................23二、设计内容.........................................................................................................................23三、设计方案与实现.............................................................................................................23四、设计结果.........................................................................................................................24五、设计总结.........................................................................................................................24六、附录.................................................................................................................................243项目一:国旗的绘制一、设计目的1、练习2D图形的绘制技术;2、练习2D图形的几何变换技术3、练习2D图形的填充技术二、设计内容编程使用c#语言,实现五星红旗的绘制。三、设计方案与实现1、设计中的基本绘图功能及绘图函数,设计的总体安排基本绘图功能:实现五星红旗的绘制。绘图函数:initialize()方法初始化了红旗,paint()方法实现了红旗的绘制。设计的总体安排:在pictureBox确定大五角星的位置,,并根据大五角星的位置确定五个小五角星的位置,并画出图形。2、图形数据及确定五角星:五个五角星,位置由initialize()方法中坐标来控制。3、设计流程确定大五角星的位置以及大小确定五小角星的位置以及大小4四、设计结果五、设计总结在红旗的绘制中,主要问题就是五个五角星的绘制,程序中采用坐标画直线的方法画出五个五角星,程序使用c#语言编程,利用编程语言画图实现红旗的绘制,以及对图形颜色的填充。六、附录usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Drawing.Imaging;usingSystem.Drawing.Drawing2D;namespaceWindowsApplication15{publicpartialclassForm1:Form{publicForm1(){InitializeComponent();}privatevoidpbxCanvas_Paint(objectsender,PaintEventArgse){INationFlagchinaFlag=newChinaFlag(pbxCanvas.Width);e.Graphics.DrawImage(chinaFlag.GetFlagImage(),0,0);}privatevoidpbxCanvas_Resize(objectsender,EventArgse){pbxCanvas.Invalidate();}privatevoidForm1_Load(objectsender,EventArgse){}#regionINationFlagpublicinterfaceINationFlag{floatWidthProportion{get;}floatHeightProportion{get;}SizeFSize{get;set;}voidAdjustFlagSizeF(intwidth);ImageGetFlagImage();}#endregion#regionChinaFlagclassChinaFlag:INationFlag{#region-INationFlagMembers-publicfloatWidthProportion{get{return3F;}}publicfloatHeightProportion{get{return2F;}}SizeFsize=SizeF.Empty;publicSizeFSize{get{returnsize;}6set{if(size!=value)size=value;}}publicvoidAdjustFlagSizeF(intw){intwidth=w+w%(int)WidthProportion;intheight=(int)(HeightProportion*width/WidthProportion);Size=newSizeF(width,height);}publicImageGetFlagIm

1 / 24
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功