毕业论文

更新时间:2023-10-09 10:25:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

毕业设计(论文)

课 题 名 称 : 布艺效果仿真系统的研制 学 院 : 计算机科学与技术学院

专 业 : 软件工程 姓 名 : 周铁军 学 号 : 050950525 指 导 教 师 : 曾培峰

二零零八年 十二月 至 二零零九年 六月

布艺效果仿真系统的研制

布艺效果仿真系统的研制

摘要

随着人们生活水平的提高,布艺逐渐成为一种时尚的消费品。布艺在广义上包含三大类:贴缝、拼缝(拼布)和绗缝。传统的布艺是通过手工设计来制作。但是,手工设计不能方便地修改,尤其是尺寸不精确。此外,在设计过程中无法实现最终效果的预览,势必带来人力和物力的大量浪费。因此需要一个功能齐全的布艺效果仿真系统。

本文主要包含布艺编辑器和布艺效果展示器的设计。它集设计与仿真显示于一体。根据仿真的效果,通过计算机修改设计直至得到满意的输出。系统的功能如下:

作为子系统之一的布艺编辑器主要用于设计各种不同风格的布艺。它包括设计底板的设计、布艺的单元模板的设计以及作品的设计三个功能。其中,底板用于简化设计以及基本几何图形的规范化,由网格、线以及点构成。通过底板的规格化,统一了布艺设计结果。布艺的单元模板的设计是建立在底板之上的,在底板的引导下绘制单元模板中的轮廓线以及基本模板。通过填充纹理得到布艺单元模板的平面效果。作品设计则是选择各种单元模板,并对这些单元模板进行复制、缩放、排列以得到需要的布局、设计。由于布艺编辑器只能显示平面效果、而且不提供环境光照下的效果。所有这些功能均在布艺效果展示器中得到实现。它首先导入布艺编辑器的设计成品,计算材料的受光量以及反光系数,在各种环境(光照)下对布艺设计结果进行三维仿真。用户可以从不同角度查看布艺成品,以检查设计的效果。

关键词:布艺,拼布,编辑器,三维仿真,光照仿真

I

布艺效果仿真系统的研制

A RESEARCH ON CLOTH ART SIMULATION SYSTEM

Abstract

With the improvement of living standards, cloth art has become more and more familiar. There are mainly three types of cloth art: welt, edge joint (patchwork), and quilting. Traditionally, cloth art is designed manually. But, such design results can’t be modified freely. The accuracy isn’t satisfying also. The final result of cloth art can only be seen when the designed is finished and the art is produced. Therefore, there is a great deal of waste in such design. Thus, a simulation system for cloth art effects is needed.

In this thesis, the system is divided into two parts, i.e., art designer and cloth art viewer. The design can be modified and improved with the design result viewed.

As a sub-system, the cloth art designer is used to design various styles of cloth arts. It includes several functions including: pattern designing, module designing, and artwork designing. The pattern is used for simplifying design work and composed of grids, points and lines. The module designing is aligned by patterns that used because the pattern is used as guidance during for drawing contour lines and basic templates. Textures are pasted so the cloth can be viewed in 2D. In artwork designing, various modules are copied, aligned and adjusted to produce final result. The designer can only display 2D effect, so the cloth art viewer should be used for 3D and light effect simulation. In the viewer, the artwork is imported, light effect is calculated and the cloth art is simulated in 3D space. It can be viewed from different angles and distances such that the design can be judged.

Key words: cloth art, patchwork, designer, three-dimensional simulation, light simulation

II

布艺效果仿真系统的研制

目 录

1 绪论......................................................................................................................... 1

1.1 1.2 1.3

研究背景 ...................................................................................................... 1 研究内容 ...................................................................................................... 1 论文结构 ...................................................................................................... 2

2 布艺效果仿真系统的特点..................................................................................... 3

2.1 2.2 2.3 2.4

仿真系统的整体结构 .................................................................................. 3 布艺编辑器的特点 ...................................................................................... 3 布艺效果展示器的特点 .............................................................................. 4 小结 .............................................................................................................. 4

3 布艺效果仿真系统的概述..................................................................................... 5

3.1

布艺编辑器概述 .......................................................................................... 5 3.1.1 3.1.2 3.1.3 3.1.4 3.2

矢量图形............................................................................................ 5 底板.................................................................................................... 5 单元模板............................................................................................ 7 作品.................................................................................................... 9

布艺展示器概述 .......................................................................................... 9 3.2.1 3.2.2 3.2.3

三维显示............................................................................................ 9 灯光效果.......................................................................................... 10 浏览.................................................................................................. 10

3.3 小结 ............................................................................................................ 10

4 布艺编辑器设计与实现....................................................................................... 11

4.1 4.2 4.3

MFC ............................................................................................................ 11 GDIPLUS ................................................................................................... 11 整体框架 .................................................................................................... 12 4.3.1 4.3.2

类图的分析与设计.......................................................................... 14 主要算法及实现.............................................................................. 16

III

布艺效果仿真系统的研制

4.4 底板的设计与实现 .................................................................................... 20 4.4.1 4.4.2 4.4.3

点...................................................................................................... 20 直线.................................................................................................. 21 网格.................................................................................................. 21

4.5 单元模板的设计与实现 ............................................................................ 22 4.5.1 4.5.2 4.5.3

吸附.................................................................................................. 22 多边形.............................................................................................. 23 填充.................................................................................................. 23

4.6 小结 ............................................................................................................ 24

5 布艺效果展示器设计与实现............................................................................... 25

5.1

三维显示方案 ............................................................................................ 25 5.1.1 5.1.2 5.1.3 5.2

网格模型显示.................................................................................. 26 法线映射.......................................................................................... 29 视差映射.......................................................................................... 32

灯光效果的实现 ........................................................................................ 33 5.2.1 5.2.2 5.2.3 5.2.4

环境光.............................................................................................. 34 漫反射.............................................................................................. 34 镜面反射.......................................................................................... 35 浏览的设计与实现.......................................................................... 37

5.3 小结 ............................................................................................................ 37

6 总 结..................................................................................................................... 38 7 研究展望............................................................................................................... 39 参考文献...................................................................................................................... 40 致 谢............................................................................................................................ 42

IV

本文来源:https://www.bwwdw.com/article/sm9f.html

Top