Whitrow - OpenGL Graphics Through Applications (Springer, 2008).pdf

(12240 KB) Pobierz
650825092 UNPDF
650825092.001.png
OpenGL Graphics Through Applications
Robert Whitrow
OpenGL Graphics
Through Applications
650825092.002.png
Robert Whitrow BSc, PhD
London Metropolitan University, UK
ISBN: 978-1-84800-022-3
e-ISBN: 978-1-84800-023-0
British Library Cataloguing in Publication Data
A catalogue record for this book is available from the British Library
Library of Congress Control Number: 2007938325
Springer-Verlag London Limited 2008
Apart from any fair dealing for the purposes of research or private study, or criticism or review, as
permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced,
stored or transmitted, in any form or by any means, with the prior permission in writing of the
publishers, or in the case of reprographic reproduction in accordance with the terms of licences issued
by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be
sent to the publishers.
The use of registered names, trademarks, etc. in this publication does not imply, even in the absence of a
specific statement, that such names are exempt from the relevant laws and regulations and therefore free
for general use.
The publisher makes no representation, express or implied, with regard to the accuracy of the information
contained in this book and cannot accept any legal responsibility or liability for any errors or omissions
that may be made.
Printed on acid-free paper
987654321
Springer Science
+
Business Media
springer.com
c
Preface
and
complete programs are provided with suggestions for change to enhance student
understanding. During 30 years of university teaching the author has become aware
of the frustration that many students suffer, of code fragments that ‘never quite
work’ and programs that on a different system require system dependent additions!
With this in mind all the programs given have been tested using MS C
++
++
v6 and
v5.
There are a number of texts which give a more in depth approach to the OpenGL
pipeline and repetition has therefore been avoided by referencing such texts for the
interested reader. The objective is to get students immersed in graphics applications
as rapidly as possible, to develop confidence, which in turn leads to experimenta-
tion, which is so vital to the enthusiastic programmer. Theory and practice have
been developed in parallel so that in many cases the reader begins to understand the
strengths and weaknesses of a particular algorithm.
After a rapid ‘getting started’ introduction we look at the structure of bit map
(.bmp) files as a precursor to understanding audiovisual files (.avi). This work forms
a foundation for later sections on image processing and texturing. These are very
simple file structures that can be converted from other image file formats using
commercially available software packages. The chapter introducing image process-
ing covers edge detection, enhancement and data capture from CAT scans. Theory
and practice can be quite different and some processing appears more of an art than a
science due to the variability in the image quality and the nature of the image itself.
The example of edge finding on CAT scans where different slices may have well
defined edges and other more fuzzy edges due to gray hair is not always apparent to
the eye. We address these problems with alternative solutions with varying degrees
of success to enable readers to comprehend that algorithmic development is still an
inexact science for such applications.
In Chapter 4 we move to the first chapter, which might be considered to be com-
puter graphics with all the mathematics that is required. I do not encourage students
to skip over these areas of understanding for the ‘black box’ approach will only get
you so far and gaps in knowledge at an early stage will come to haunt one later on.
The toil of getting to grips with material will be amply repaid as students grow in
knowledge – although I am aware that many avoid the joys of mathematical rigor!
++
v
This book is the result of teaching computer graphics for one and two semester,
year two/three undergraduate and postgraduate lecture courses in Computer Graph-
ics. Throughout the book, theory is followed by implementation using C/C
most have been tested using Solaris 4.2 and Borland C
Zgłoś jeśli naruszono regulamin