sutherla@qtp.ufl.edu (Scott Sutherland) (08/10/90)
There have been several postings about good references for how to "draw a line" using the Amiga and C. I believe that the original poster mentioned that he/she (I do not recall the person's name) was going to be entering a graphics class (as a graduate student, I think) and wanted to know a good source for how to do this in C on an Amiga. Most of the follow up articles have pointed this person to the RKM set and to books like those by Rob Peck and John Berry. Well, a couple of years ago I was in a bookstore while visiting a friend in another city and I came across a really nice book for this purpose which NEVER gets mentioned when people ask about Amiga graphics either here OR in comp.graphics. This book is: Learning C: Programming Graphics on the Amiga and Atari ST By: Marc B. Sugiyama and Christopher D. Metcalf, 1987. A COMPUTE! Books publication. $18.95, 420 pages, ISBN 0-87455-064-5 Now, this book is NOT a book on how to do double buffering, dual playfields, sprites, Bobs, windows, screens, etc. on the Amiga. They cover the basics needed, but this book emphasizes GRAPHICS PROGRAMMING, the kind of stuff you see in Foley and Van Dam, Rogers, and other "classic" texts. It first introduces you to C, emphasizing those types of elements most important to graphics programming. Then it starts on the fundamentals of computer graphics programming. Homogeneous coordinates, shearing, clipping, rotation matrices, etc. are only a few of the topics covered. It does not have the depth of coverage found in the classic books, but it has ACTUAL working C code. Another nice aspect of this book is that it teaches a programming practice which I find very appealing. It preaches device-independent programs. They put all the Atari or Amiga specific stuff in one file which is included into all the other code examples. The examples themselves are generic and will run with either the Atari or Amiga systems by just changing the name of the include file. I think that this is a really good way to write programs which might be ported to another system. The examples STILL take advantage of the Amigas power, but do so in a way which still makes the programs PORTABLE. Thus, these programs could be easily ported to a Silicon Graphics or Sun system and run flawlessly, while only having to write one INCLUDE program for each platform. For those of you who are interested, here is the table of contents: Foreword.................................................v Preface................................................vii 1. Introduction ........................................ 1 2. Functions ........................................... 9 3. Variables, Operators, and Expressions .............. 29 4. Decision Making Loops .............................. 53 5. Arrays ............................................. 81 6. Structures ........................................ 117 7. Introduction to Graphics .......................... 159 8. Polygon Filling ................................... 173 9. Three Dimensions .................................. 199 10. Displaying Three Dimensions ...................... 223 11. The z-buffer Algorithm ........................... 251 12. Clipping ......................................... 287 13. Advanced Graphics ................................ 317 Appendices ........................................... 327 A. Tables of ASCII, Hex, Binary, Octal ............... 329 B. Tables of C Operator Precedence ................... 333 C. Binary Numbers .................................... 335 D. Setting Up Your Programming Environment ........... 339 E. Typing and Compiling the Machine-Specific Files ... 347 F. Special Compiling Instructions .................... 361 G. Using the Graphics Library ........................ 369 H. stdio.h Functions ................................. 375 I. Amiga Graphics .................................... 385 J. ST Graphics ....................................... 391 K. References ........................................ 399 Another book I just recently found which looks to be a nice follow up to this book (it introduces more sophisticated graphics concepts) is: High Resolution Computer Graphics Using C By: Ian O. Angell, 1990 John Wiley & Sons, ISBN 0-470-21634-4 360 Pages This is a NON-Amiga specific book, but it emphasizes learning the graphics by actually doing programming and includes a lot of code. I have not had a chance to look through it in detail, but it does appear to be a really good "hands on" approach to learning computer graphics in C. I hope this helps some of you who are trying to do GRAPHICS programming but who want to use an Amiga. The other books mentioned (Peck, Berry, RKM) are INVALUABLE for learning how to program the Amiga environment and how to get the MOST out of your Amiga, but the two books I mentioned here will allow you to apply that knowledge to programming graphics. Scott Sutherland sutherla@qtp.ufl.edu