Algorithm for General Polygon Clipping and Its Applications in Civil Engineering
- Author
- LiHaiZuo
- Advisor
- ZhangWeiJin
- School
- East China Jiaotong University
- Major
- Structural Engineering
- Classification
- TU17 Electronic computer in the building
- Degree
- Master's thesis
- Year
- 2005
- Downloads
- 215
- Citations
- 1
Abstract
Clipping algorithm is an basic algorithm in the Computer Graphics and the base of a lot of important task. Some algorithms of line clipping have been very perfect, especially the algorithms about line clipping by the rect window, but the line clipping algorithms of general polygons window haven’t been developed well. What’s more, polygon clipping algortithm of the polygon window haven’t been widely noticed. But both of the latter have much more weighty practical meaning in the Computer Graphic and engineering pracitce. Especially, literature about the algorithm which describes how to a polygon window clip a polygon with a or more arc edge hasn’t been found yet, however, which is the main operation in the three dimensions visualization budget software in the civil engineering.So, firstly, a minitype vector graphics system is empoldered with Visual C++ language and Open Graphics Library(Open GL) in this paper, which provides a graphic flat for the continued algorithm design, debugging and application.Second, an algorithm about general polygons clipped by the general polygon window is designed in the paper. Above all, this algorithm can be used to process general polygons such as protruding polygons, concave polygons, polygons with holes inside and polygon with at least one arc edge named widesense polygon in this paper. Next, the technology involving box, and the technology of calculating insection of line segments, radial methods in the computational geometry are used in the paper, which greatly predigest the computing procedure. What’s more, objects of CObList Class and CArray class supported well by Vicual C++ Language are used for storing data in the algorighm, which makes the single list date structure possible and less memory and running time required. Sign function is introduced which cut off the course of error transfer and insure the computing precision. Finally, aiming at the deficiency of the member function of Microsoft Foundation Class Library, a new function is compiled which can be used to judge the postiotn relation between the given point and the widesence polygon, which effectively eliminates the lethal error caused by the member function mentioned above. Last, an algorithm with much geometrical adaptability and lower time and space complexity is finished.Lastly, the new algorithm is used in the three dimensions visualization budget software of the civil engineering, which successfully realizes the deduction between the wall and wall, wall and beam, wall and pole and wall and board in the three dimensions dynamic intersection.
Table of contents
The first chapter 11-17
1.1 subject background 11-12
1.1.1 issues of significance 1.1.2 Development Status nbsp 11
; 11
1.1.3 realistic demand 11-12
1.2 domestic and international trends and research level 12-14
1.2.1 rectangular window line cutting algorithm 12
1.2.2 General Polygon Line Clipping algorithm 12-14
1.3 The main research work 14-17
1.3. 1 The purpose of the thesis 14
1.3.2 hardware platform and software platform of choice 14-15
the 1.3.3 system development core technology 15-16
1.3.4 Introduction to thesis work 16-17
small vector graphics system designed 17-34
2.1 vector graphics system development methodology to select 17-19
2.1.1 Visua1 C language select the 17-18 2.1.2 OpenGL graphics system choice
18-19
2.2 functionality and interface design 19-22
2.2.1 Toolbar Description 20
2.2.2 Basic operation the 20-21 2.2.3 Introduction
21-22
2.3 based on the document - the view of the structure of the class 22-25
2.3.1 main window (CMainFrame) 23-24
2.3.2 documentation (CMyFrameDoc) class are found; the nbsp 24-25
the 2.3.3 the view class (CMyFrameView); 25
2.4 system overall structure of 25-26
2.5 system class hierarchy design 26-27
2.6 system library structure to achieve 27-32
2.6.1 Mechanism of Realization - polymorphism 27
2.6.2 basic primitives to achieve 27-31
2.6.3 Polygon class build 31
2.6.4 wall class implementations build 31-32
2.7 system data structures 32-33
2.8 Chapter Summary 33-34
Chapter polygon build 34-46
3.1 build polygon class significance are found; 34
3.2 data structure 34-35
330 polygons class constructor 35-37
3.3 .1 statement 35
3.3.2 realization the 35-37 member function
3.3.3 Introduction 37
3.4 polygon drawing 37-40
3.4.1 polymorphism mechanism 37
the 3.4.2 complex polygon drawing 37-39
3.4.3 the polygon drawing mechanism 39-40
3.5 polygons selected 40-41
3.6 polygon area calculation 41-43
3.6.1 Algorithms ideas 41-42
3.6.2 source code 42-43
3.7 polygon around to the judgment 43-45
3.7.1 fold line segment Shui to judgment; nbsp 43
3.7.2 polygonal, around to the judgment the 43-45 3.8 Chapter Summary
45-46
Chapter computational geometry in clipping algorithm 46-54
the 4.1 clipping algorithm definition and classification 46
4.1.1 clipping algorithm defined 46
4.1.2 Clipping Algorithm Classification 46
4.2 clipping algorithm execution process 46-47
4.3 line clipping algorithm overview and classic algorithm analysis 47-49
4.3. a convex polygon window line clipping algorithm 47-48
4.3.2 concave, polygon window line clipping algorithm 48-49
4.4 Polygon polygon clipping algorithm overview and insufficient Analysis the 49-52
4.4.1 rectangular window polygon clipping algorithm the 50-52
4.4.2 General Polygon polygon clipping algorithm 52
4.5 Summary 52
4.6 the algorithm proposed 52-54
Chapter polygon clipping algorithm 54-70
5.1 algorithm outlined 54-58
5.1.1 basic concepts and definitions 54-55
5.1.2 data structure the the 55-56
5.1.3 algorithm described 56-58
5.2 core step approach to use 58-65
5.2.1 bounding box removed disjoint edges 59
5.2.2 Point linear position determination 59-60
5.2.3 a fast algorithm to determine the segment positional relationship 60-63
5.2.4-ray method to determine point is within the polygon 63-64
5.2.5 coincidence boundary treatment 64
5.2.6 intersection of sorting and cutting segment display 64-65
5.3 The algorithms compare 65-67
5.3.1 space complexity 65-66
5.3.2 The time complexity 66-67
5.3 .3 In this paper, the advantages of the algorithm 67
5.4 example the alternative library functions PtInRegion 67-70
Chapter 70-79
6.1 library function BOOL PtInRegion (POINT point) Introduction 70-72
6.1.1 function prototype 70
6.1.2 Function 70-71
6.1 .3 function parameters 71
6.1.4 Notes 71
6.1.5 function pseudo code 71-72
6.2 library functions exist Analysis nbsp 72
6.2.1 data types; 72
6.2.2 Scope limited, low computational efficiency 72
6.3 function int PInsideRgn (MyPoint p, int tag) About 72-74
6.3.1-ray principle the 72-73
6.3.2 of function points illustrate 73-74
6.3.3 algorithm described 74
6.4 program tracking example 74-77
6.5 program complexity analysis 77-78
6.6 Summary 78-79
Chapter VII polygon clipping application 79-84
7.1 wall deductible 79-82
7.1.1 manually Calculation of Wall difficulties 79
7.1.2 system approach the 79-82
7.2 walls and pillars deductible 82-83
7.3 columns and beams, columns and plates deductible 83-84
Chapter VIII conclusion 84-86
8.1 freeform polygon clipping algorithm 84 < br /> 8.2 polygon clipping algorithm in civil engineering 84
8.3 of this article innovations 84-85
8.3.1 Design of a polygon class 84
8.3.2 the freeform polygon clipping algorithm 84
8.3.3 Design of the alternative function of a library function 84-85
8.4 nbsp pending further study of the problem; 85-86
the 8.4.1 system functions to be further enhanced 85
8.4.2 memory leak detection and elimination of 85
8.4.3 data structure design capacity need to be further improve 85-86
Acknowledgements to References 86-87
87-90
personal Resume in published academic papers read during 90
Related dissertations
- Based on VC++and OpenGL Antenna Pattern Visualization Software Design and Implementation
- Research on Daylight in Building Based on OpenGL
- Research on 3D Simulation System of NC Turning on the Basis of OpenGL
- Software Design of a Certain Experience Platform Multi-parameter Monitoring System
- The Design and Implementation on Network-based Remote Control System of XY Table
- Research and Design for the Simulator and Offline-programme System of Transfer Robot Based on OPENGL
- A Professional Technology Institute Virtual Design and Realization of the System
- Particle Systems’ Applied and Achieved in the Virtual Environment
- Design and Implement of Visual Simulation System Based on OpenGL for Rehabilitation Training
- The Control Based on the Brain Computer Interface and Research of Virtual Scene Application
- Natural Landscape Simulation Research Based on Particle System
- Research and Application of Vector Visualization Method Based on OpenGL
- The Unified Data Model of the Single and Multiple Z Value of Geological Bodies and3D Visualization、Spatial Analysis Research
- The Application and Research of Three-Dimensional Reconstruction Technology Based on Opengl in Medical Image System
- Based on the Embedded System OpenGL Anti-aliasing Technology Research and Application
- Implementation of3D Graphics Modeling and Displaying Based on OpenGL on the Android Platform
- The Design and Implementation of a Network Communication Game on Linux
- Arcengine with OA Integrated Urban Planning Information Platform
- Design and Implementation of Bank Archives Management System
- Design and Research of3D Visualization Microcomputer Interface of Virtual Experimental System