A Practical Introduction To Computer Gra
A Practical Introduction To Computer Gra
Consulting Editor
Professor F. H. Sumner, University of Manchester
* The titles marked with an asterisk were prepared during the Consulting: Editorship of
Professor J. S. Rohl, University ofWestern Australia.
A Practical Introduction
to Computer Graphics
lan O. AngeH
Department 01 Statistics and Computer Science,
Royal Holloway College,
University 01 London
M
MACMILLAN
© lan O. Angell 1981
Published by
Higher and Further Education Division
MACMILLAN PUBLISHERS LTD
Houndmills, Basingstoke, Hampshire RG21 2XS
and London
Companies and representatives
throughout the world
Preface vii
9. Setup Techniques 97
Index 143
Preface
Until recently, all but the most trivial computer graphics was the province of
specialised research groups. Now with the introduction of reasonably priced
graphics devices, the subject will reach many more users and its full potential
can be realised. Computer-produced pictures always impress the layman, and the
'mysterious' techniques used for drawing them have gained a (false) reputation
for complexity.
This book, as its title implies, is a practical first step in understanding the
methods of computer graphics. After studying the contents and implementing
the examples and exercises, the reader will be ready to attempt most tasks in
graphics, whether these be the production of elementary data graphs, pie charts,
etc., the drawing of patterns or diagrams for books, pamphlets or as teaching
aids (all the diagrams in this book were drawn by computer) or the development
of far more sophisticated design and technical drawing programs used in the
aeronautics, automobile and other industries. Hints on how to tackle some of
these sophisticated programs are also given.
It is assumed that the reader has an elementary knowledge of the Fortran IV
programming language, and of cartesian coordinate geometry. This knowledge
will be used to produce simple diagrams, and to produce the basic programming
tools and routines required for the more 'complicated' designs. Then, hopefully,
the reader will be inspired to seek a greater understanding of geometry and also
to read more advanced works on computer graphics and to use the commercially
available packages.
This book was designed to be completely self-contained, therefore no
references are given. The contents reflect what I consider to be the logical
development of the basic concepts in computer graphics, produced independently
of the preconceived ideas of other authors, although standard terminology is used
where appropriate.
The only way to understand any branch of computer science complete:y is to
study and write a large number of programs ; this is why the format of this book
is that of 'understanding through worked examples'. The chapters are cent red
around numerous examples and the ideas that lead from them. Many students
readily understand the theory behind graphics, but they have great difficulty in
implementing the ideas. Hence great emphasis is placed on the program listings;
over seventy program segments are given - some quite substantial. Total under-
standing will only be achieved by running these programs and experimenting
viii Pre/ace
IAN O. ANGELL
Acknowledgements
I wish to thank Professor H. J. Godwin for his help and encouragement and
John Anderson for his valuable assistance with my computer graphics course.
The photographic reproduction of all the diagrams and program listings in this
book would not have been possible without the untiring work of J. G. Davies, to
whom I am very grateful. Finally I would like to express my gratitude to my wife
Florence for her cheerful support during the writing of this book.