Open Geometry: OpenGL® + Advanced GeometryThis book is about graphics programming based on OPENGL. The program ming language is C++. The programs will run under various operating systems, among them WINDOWS 9x, ALPHA-STATIONS (Digital workstations) and SILI CON GRAPHICS workstations. Hardware is used if accessible. The book provides a graphics library. This library is based on OPENGL and expands the elemen tary routines. Thus, the reader is enabled to realize direct geometrical thinking without having to care much about implementation. The enclosed modules provide the reader with solutions for: • The most common intersection problems and measuring tasks of both pla nar and spatial geometry. • The creation ofarbitrary geometric objects, e.g., by means ofdifferent kinds of "sweeping." • The creation of the most general solids by means of Boolean operations (intersection, union, and complements of solid polyhedra). The book presents: • A well documented, versatile, and robust geometry library. The reader can use it very easily and expand it in any way he/she likes. vi Preface • A programming course that provides a deeper insight into object-oriented thinking and programming.It contains an introduction to C++ (for begin ners and intermediate programmers) that is influenced by the experience gained from thousands of programming hours (which may even be useful to experienced programmers). |
Contents
Graphics Programming | 1 |
12 OpenGL | 4 |
13 The Programming Language C++ | 5 |
14 How to Develop Solid Code | 22 |
15 The Implementation of a Vector | 25 |
16 Classes That Contain Dynamic Memory | 29 |
Getting Started | 35 |
22 A Simple 3D Program | 42 |
Solids | 177 |
73 Boundary Representation of Polyhedral Models | 181 |
74 Polyhedra in Open Geometry | 185 |
75 Consistency Conditions for Polyhedra | 188 |
Boolean Operations | 191 |
82 Three Main Steps | 193 |
83 Intersection of Faces Generic Case | 195 |
84 The Geometry of Particular Cases | 198 |
23 Simple Animations | 47 |
24 What to Do with Existing OpenGL Code | 53 |
Basic Objects | 59 |
32 Vectors and Points | 71 |
33 Straight Lines | 78 |
34 Planes | 85 |
35 Geometrical Objects | 86 |
36 Circles | 90 |
Curved Lines and Polygons | 97 |
42 Spline Curves | 103 |
43 Closed Polygons | 107 |
44 Texture Mapping | 110 |
45 Complex Polygons Tesselation | 114 |
46 Conics | 121 |
Primitive Elements in Space | 127 |
52 Prisms and Pyramids | 130 |
53 Spheres | 134 |
54 Groups of 3D Objects | 138 |
55 The Virtual Camera | 141 |
Complex Surfaces | 149 |
62 Swept Surfaces | 159 |
63 Surfaces of Revolution | 165 |
64 Helical Surfaces | 167 |
65 Tubular Surfaces | 170 |
66 Function Graphs | 173 |
85 Intersection of Faces Particular Cases | 203 |
86 Steps Two and Three | 209 |
87 Practical Applications | 213 |
KinematicsGeometry of Motion | 227 |
92 Theory of Curvature | 231 |
93 The Elliptic Motion | 233 |
94 The Trochoid Motion | 237 |
95 The Coupler Motion | 240 |
96 Special FourBar Linkages | 243 |
97 Sample Kinematics Programs | 245 |
98 Geometry of Gearing | 258 |
Interesting Classes of Surfaces | 267 |
102 Helispiral Surfaces | 278 |
103 DUPINCyclides | 293 |
104 Rotoid Surfaces | 300 |
Data Exchange Printouts | 305 |
113 How to Add Textures to Your Objects | 314 |
114 Export as BMP File Animated GIF Files | 316 |
115 How to Make Proper Printouts | 318 |
More Classes and Examples | 321 |
122 Sample 3D Programs | 330 |
References | 361 |
Index | 363 |
Other editions - View all
Common terms and phrases
3-space angle array axis Black Boolean operations boundary representation c₁ camera canal surface Circ2d Clothoid complex polygon conic const P2d const P3d &P const Real coordinates cube cyclide cylinder Default constructor define Draw DUPIN-cyclide elliptic motion equation example Figure FrameNum GLdouble GLenum GLfloat Gray helical helispiral implementation include defaults3d.h include opengeom.h inline inline functions inside wedges intersection Listing of program loop member functions methods mixed edges neighboring faces normal OPEN GEOMETRY OPENGL osculating circles param parameter parameterized ParamSurface path curves pixels plane pname pointer polode Poly2d polyhedra polyhedron radius Real y0 RGBA Rotate rotoid shading Solid spheres spiral surface spline straight line StrCat StrL3d Surf surface of revolution tangent texture maps torus trochoid typedef variable vertex vertices virtual void Def Color void Scene void Scene::Draw void Scene::Init z-buffering Zaxis