• No results found

Getting Started p. 1 Introduction p. 1 Access to Libraries p. 2 Data Types p. 2 Terminology p. 3 The OpenGL Utility Toolkit-GLUT p.

N/A
N/A
Protected

Academic year: 2021

Share "Getting Started p. 1 Introduction p. 1 Access to Libraries p. 2 Data Types p. 2 Terminology p. 3 The OpenGL Utility Toolkit-GLUT p."

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Getting Started p. 1

Introduction p. 1

Access to Libraries p. 2

Data Types p. 2

Terminology p. 3

The OpenGL Utility Toolkit-GLUT p. 3

Our First Program p. 4

Drawing Primitives p. 7

Gaps, Lines and Blobs p. 10

Other Line Types p. 11

Surface Patterns and Polygon Stippling p. 12

Character Generation p. 15

Parametric Representation of Curves p. 17

The Growth or Logarithmic Spiral p. 19

Approximation and Processing Efficiency p. 21

Line Drawing p. 22

The Digital Difference Analyser p. 23

Bresenham's Algorithm p. 25

Bresenham's Algorithm for a Circle p. 27

Problem Solving Through Graphics p. 31

The Application Programming Interface (API) p. 34

The OpenGL Utility Toolkit (GLUT) Library p. 34

Mouse Interaction p. 35

Keyboard Interaction p. 36

Exercises p. 37

Conclusion p. 37

Image File Formats p. 39

Introduction p. 39

The Bitmap File p. 39

Bitmap-file Structure p. 40

A Typical File Layout p. 41

Reading and Drawing a Bitmap File p. 42

Creating a Display Window p. 45

Creating the Image for Display p. 46

Monochrome Bitmaps p. 46

A General Class for Input of Bit Map Files p. 47

Manipulating Bit Maps - Embossing p. 49

Audio/Video Interleaved (AVI) File Format p. 51

Chunk Hierarchy p. 53

An Example of Web Cam Display p. 55

(2)

Exercises p. 59 Conclusion p. 59 Image Processing p. 61 Introduction p. 61 Finding Objects p. 61 Edge Detection p. 62 Numerical Implementation p. 63 Sobel Operator p. 63 Convolution p. 64 Laplacian Operator p. 66

Smoothing and Edge Finding p. 69

Histogram Equalisation p. 71

Component (object) Labelling p. 73

Exploring Connectivity (1) p. 74

Exploring Connectivity (2) p. 76

Multiple Regions p. 77

Drawing on the Screen and Data Capture p. 77

Outlining of Areas of Interest on Images p. 80

An Approach to Automating Edge Detection p. 82

Exercises p. 85

Conclusion p. 85

Transformations p. 87

Introduction p. 87

Representing Points and Vectors p. 87

Vector Dot Products p. 89

The Vector Cross Product p. 89

Using the Cross Product to Provide Colour Variation to a Cylinder p. 91

Coordinate Systems p. 94

Transformations p. 95

Rotation p. 96

A Simple Example of Rotation p. 98

General Rotations About Any Point p. 99

The Model View Matrix p. 103

Adding Some Movement p. 103

Movement of Composite Objects p. 104

The Orrery p. 104

The Internal Combustion Engine p. 107

Arms, Robots, Actuators and Movement p. 113

Data Capture of Limb Movement p. 114

Animation - A Walking Robot p. 116

(3)

Exercises p. 124

Conclusion p. 124

Viewing and Projection p. 125

Introduction p. 125

Vertex Pipeline p. 125

The Viewing Process p. 126

Engineering Drawings p. 128

Orthographic or Parallel Projection p. 132

From Real World to Screen Window p. 132

Inside the Matrix p. 134

Getting to Grips with Where Things Are p. 137

Perspective Projection p. 139

Understanding the View p. 143

Exercises p. 145

Conclusion p. 146

Lighting and Colour p. 147

Introduction p. 147

The Electromagnetic Spectrum p. 147

Colour p. 148

Mixing Colours p. 149

The Shading Model p. 150

Lighting and Illumination p. 151

Setting up the Lighting p. 152

Addition of Specular Light p. 157

A Synthetic Face p. 162

Getting the Vertex Coordinates p. 162

Moving the Eye and Light Source Together p. 163

Shadows - A Projection p. 164

Derivation of the Shadow Outline Using Equation of a Line p. 164

A Polygon Moving Shadow p. 166

Exercises p. 168

Conclusion p. 169

Texture Mapping p. 171

Introduction p. 171

The Mapping Process p. 171

Setting up Textures p. 172

Drawing the Texture p. 174

Mapping onto Curved Surfaces p. 176

Mercator Lines of Projection p. 176

Quadric Surfaces p. 177

(4)

Mapping one Image to Sphere p. 182

Cylinder Texturing Mapping p. 184

Mapping to a Circle p. 185

Mapping to a Cone p. 186

Mapping onto a General Surface p. 189

Mapping onto a Contour Surface p. 191

Adding Some Movement - A Rotating Hemisphere p. 193

Movement via the Mouse p. 196

Using Bit Maps to Provide Context p. 200

Blending p. 202

Manipulating Pixels p. 206

Three-Dimensional Texturing p. 212

Simulation of a Spherical Object p. 213

Building a Solid Model of a Head p. 219

Exercises p. 226

Conclusion p. 226

Objects to Artefacts p. 227

Introduction p. 227

Artefact Hierarchy p. 227

Construction Double Sided Squares p. 228

A Box as a Basic Building Block p. 232

Building a Table p. 233

Integrating to a System p. 235

Changing the Furniture Style p. 243

Exercises p. 247

Conclusion p. 247

Curves, Surfaces and Patterns p. 249

Introduction p. 249

Fitting a Line or a Curve p. 250

Straight Line Fitting to Data Points p. 250

Lagrange Polynomials and Curve Fitting p. 251

A Practical Approach to Curve Fitting p. 251

Curve Fitting Using Cubic Splines p. 252

Surface Construction from Contour Maps p. 256

A Spline Surface Construction p. 258

Bezier Curves p. 260

General Curve Representation p. 263

The Beginning's of a Bezier Surface p. 267

Using Rotation to Sweep Out a Ring p. 271

Patching a Surface p. 271

(5)

Introductory Concepts p. 275

Reduction Copying p. 276

Implementation of a Sierpinski Gasket p. 278

Pascal's Triangle p. 280

The Sierpinski Gasket in 3 Dimensions p. 280

Order Out of Chaos - A Non-deterministic Gasket? p. 284

An Alternative Idea for a Tree or Plant p. 290

Koch Curves p. 292

Further Thoughts on the Koch Snowflake p. 295

Self-Similarity p. 296

Random Koch Fractals p. 298

Back to Trees and Bushes p. 300

Brownian Motion p. 304 Fractalised Lines p. 305 Fractal Surfaces p. 307 Exercises p. 310 Conclusion p. 311 Appendix A p. 313 Starting up VC++ 6.0 p. 313 Appendix B p. 317

Bresenham's Line Algorithm - General Conditions p. 317

Appendix C p. 319

Matrix and Vector Algebra p. 319

Matrix Addition or Subtraction p. 319

Matrix Multiplication p. 319

Matrix Vector Multiplication p. 320

Example of Matrix Multiplication p. 321

Shearing Matrices p. 321 Appendix D p. 323 Equation of a Plane p. 323 References p. 325 Index of Functions p. 327 Index p. 329

References

Related documents

ll-ins) in the U factor can be clustered as dense columns or subcolumns. We discuss the U partitioning strategy as follows. After a L supernode partition has been obtained on a

Patrick Cann , Director of Leisure Services, provided a brief overview of the Department, which oversees Community Development Block Grant (CDBG) funding , capital projects ,

Embracing Teams to Make Meetings Better

17. profitable by understanding. Most traders do not understand volume implications and how vital it is in 20. their analysis of any of the markets. Given at any point of time,

Automating the generation of student models for intelligent tutoring systems p. 701 Supporting learning in games with an open learner

The evolution and design of service robots in health care: evaluating the role of speech and other modalities in human-robot interaction1. A critical analysis of

A sequence of individual duty cycles, whe- re each cycle consists of a start that is sufficiently long to have a significant effect on the motor temperature, a period of

When comparing the measurements of the same motor, it is expected that the energy efficiency level measured with the new method will be a few percentage points less