An Introduction to Numerical Methods in C++, Revised Edition

Chapter 15: Graphics

Overview

At this point it is convenient to introduce the elements of graphics, so that functions may be represented graphically and the screen mapped. As every teacher knows, a simple diagram is better than a thousand learned words and no more or less misleading! Of course, many ready-made graphics packages exist, and it may well be that the reader's preferred C++ implementation operates under systems software which includes such a package. For those who dislike black boxes, however, it is helpful to have some idea how such packages work, at least in the simple context of this book; and for those who do not have convenient access to a graphics package, the present chapter provides some remedy.

However, a word of caution is called for. As we explained in chapter 1, input and output in C++ are not part of the language, and to a greater or lesser extent are implementation dependent. At the time of writing, this is especially so in graphics, where PC implementations are likely to be somewhat idiosyncratic. In this book we have used TurboC++, although features peculiar to that implementation have been suppressed wherever possible. Implementation dependent elements inevitably crept in when we considered streams in 6.3. In this chapter we shall write a simple graphics package which may be freely used, within its limitations; but it cannot be written without reference to the chosen implementation. Therefore, we have drawn upon a number of TurboC++ library functions, especially graphics functions. Whenever we have done so, we...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Specialty Business Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.