Published online by Cambridge University Press: 30 March 2010
The Fundamental Algorithms
In the first eight chapters we have explained to you some interesting problems and formulated a large number of exercises, to stimulate your taste for computer graphics experiments. In the chapters following Chapter 11 we provide solutions to the exercises, sometimes as complete programs or else as fragments. The solution, the complete Pascal program, can be obtained by combining the ready-made component fragments, after which you can perform a great number of graphical experiments.
Structured programs are programs in which the founder of the programming language Pascal – the Swiss computer scientist Niklaus Wirth – has always taken a great interest. Such programs are composed only of procedures and functions. The procedures are at most a page long. Naturally such programs are well documented. Any user who reads these programs can understand what they do. The variable names, for example, convey their meaning and are commented at length when necessary. In particular the programs are written in a structured fashion, in which the ‘indentation rules’ and ‘style rules’ for Pascal are strictly adhered to. We hope that you too will write structured programs, and we would like to offer some advice.
Perhaps you have read the entire book systematically up to Chapter 11, to get a good survey of the formulation of the problem; perhaps you have also written the first few programs. By analysing our program description you have surely noticed that the structure of our programs is always the same. The reason is that we have always tried to write structured programs.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.