Acorn User


Creative Animation And Graphics On The BBC Micro
By Collins
BBC Model B

 
Published in Acorn User #039

Graphic Guide

Creative Animation And Graphics On The BBC Micro

This book is aimed at those who already have some programming experience and want to learn more about microcomputer graphics. Although a reasonable knowledge of BBC Basic is assumed, the early chapters provide a fairly comprehensive summary of the BBC Micro's most important graphics facilities. The rest of the book is divided into three main sections - animation, co-ordinate graphics and concludes with co-ordinate-free graphics.

The two chapters on animation are confined largely to sprite graphics. While sprites are usually associated with games programs and therefore are liable to be dismissed as trivial, Mike James makes the valid point that computer games have, in fact, forced graphics programming on micros into areas previously considered impossible and which would otherwise not have been attempted.

The sprites dealt with are simple user-defined characters rather than the multi-colour type - understandable as the book confines its programming to Basic and the latter would require the use of machine code.

The way in which the movement of sprites can be controlled is covered in some depth, including position, velocity, acceleration, collisions and explosions.

The major section of the book on co-ordinate graphics, offers quite a few potentially useful routines for those interested in developing their own CAD programs.

The chapter on lines and curves includes a recursive spline curve program which enables smooth curves to be generated by simply defining a few key points - a sort of software 'French curve' if you like. The program allows individual points to be moved by cursor control to influence the overall shape of the curve.

The following chapters deal with two-dimensional transformations and screen windows (mainly from a practical point of view but with a minimum of theory for those interesting in finding out 'why' as well as 'how').

A line and point editor program is developed in several stages, and will allow shapes to be defined and then positioned anywhere on the screen. One possible application for a program like this, as the author illustrates in the book, is the drawing of circuit diagrams.

A chapter on three-dimensional graphics deals with 3D transformations and develops a 3D viewer program which will allow wireframe objects to be viewed from any angle.

The concluding chapter in this section deals with the problems of achieving realism in computer graphics, covering such topics as hidden line removal, shading and stereoscopic images. In contrast with most of the other chapters there are only two practical program examples. The rest is a discussion of various ideas which should nevertheless provide food for thought for the more adventurous programmer.

The final section on 'artistic' or co-ordinate-free graphics concentrates on ways of drawing on the screen interactively, without having to specify co-ordinates - that is controlling the graphics cursor by means of a joystick, the cursor keys or an alternative input device.

A number of ideas on filling and the implementation of various 'brushes' are given, along with 2D and 3D sketchpad programs.

Throughout the book theory is included where it is considered desirable but the main accent is on practical ideas.

Although a number of complete programs are included, the book endeavours to arm the reader with sufficient knowledge to develop his or her own programs. The programs, which are well structured and therefore easily modifiable, could well be considered as starting points for larger projects.

Anyone who meets the requirements of having a reasonable knowledge of Basic and an interest in graphics should be able to benefit from Mike James' book.

Malcolm Banthorpe