← Macintosh Graphics And Sound 1986

Macintosh Graphics And Sound 1986

From the originals

13 scans

Machine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.

These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.

Image 1

Osborne McGraw-Hill Macintosh™ GRAPHICS AND SOUND PROGRAMMING IN MICROSOFT® BASIC DAVID A. KATER

A dark teal book cover with a red script 'Macintosh' title and white sans-serif subtitle, featuring a tilted square painting in yellow, green, and blue pastel strokes framed in pink with the text 'PROGRAMMING IN MICROSOFT® BASIC' running along its lower right edge.

Reading notes: The red script word 'Macintosh' is stylized; spelling read as Macintosh with trademark symbol. The small 'AND' in the subtitle is rendered in a smaller size and is transcribed as printed. Publisher name is printed in small type at top left and read as 'Osborne McGraw-Hill'.

Printed product names
Microsoft BASIC
Languages
English
PDF page 1

Osborne McGraw-Hill Macintosh™ GRAPHICS AND SOUND PROGRAMMING IN MICROSOFT® BASIC DAVID A. KATER

A dark teal book cover with a red script 'Macintosh' title and white sans-serif text, featuring a tilted pink-framed square containing a colorful crayon-style illustration of a green and blue tree-like shape against yellow streaks.

Reading notes: Headline is a stylized script logotype; 'Macintosh' is read from the script lettering and may be an approximate reading of the stylized letterforms. The 'AND' between GRAPHICS and SOUND is set in smaller type and is transcribed as shown. Text 'PROGRAMMING IN MICROSOFT® BASIC' is printed diagonally along the tilted frame and is read in its orientation along the frame edge.

Printed product names
Microsoft BASIC
Languages
English
PDF page 2

f'lt ·,I C«.7tv.fev f'1q';l(;<h, (.0 l'f'07 f "*"' Fvr°'i.t.::: :_s<lt4;) C P... ,; , L ..... _____ _

Reading notes: Supplied source text is fragmentary and garbled, with no legible words, names, prices, or dates. Possible date-like span 'l'f'07' is too uncertain to report as a printed date. No headline is identifiable, and the language of the copy cannot be determined. No actual image was attached, so the transcription relies only on the extracted fragments.

PDF page 3

Macintosh™ Graphics and Sound Programming in Microsoft® BASIC

Macintosh™ Graphics and Sound Programming in Microsoft® BASIC David A. Kater Osborne McGraw-Hill Berkeley, California

Reading notes: Heading line break and title arrangement uncertain; headline composed by joining the printed title lines.

Printed product names
Macintosh™ · Microsoft® BASIC
Languages
English
PDF page 4

L_ Disclaimer of Warranties and Limitation of Liabilities The authors have taken due care in preparing this book and the programs in it, includ- ing research, development, and testing to ascertain their effectiveness. The authors and the publisher make no expressed or implied warranty of any kind with regard to these programs nor the supplementary documentation in this book. In no event shall the authors or the publishers be liable for incidental or consequential damages in con- nection with or arising out of the furnishing, performance, or use of any of these programs. COPYRIGHT. This collection of programs and their documentation is copyrighted. You may not copy or otherwise reproduce any part of any program in this collection or its documentation, except that you may load the programs into a computer as an essen- tial step in executing the program on the computer. You may not transfer any part of any program in this collection electronically from one computer to another over a net- work. You may not distribute copies of any program or its documentation to others. Neither any program nor its documentation may be modified or translated without written permission from Osborne/McGraw-Hill. NO WARRANTY OF PERFORMANCE. Osborne/McGraw-Hill does not and cannot warrant the performance or results that may be obtained by using any program in this book. Accordingly, the programs in this collection and their documentation are sold "as is" without warranty as to their performance, merchantability, or fitness for any par- ticular purpose. The entire risk as to the results and performance of each program in the collection is assumed by you. Should any program in this collection prove defective, you (and not Osborne/McGraw-Hill or its dealer) assume the entire cost of all neces- sary servicing, repair, or correction. LIMITATION OF LIABILITY. Neither Osborne/McGraw-Hill nor anyone else who has been involved in the creation, production, or delivery of these programs shall be liable for any direct, incidental, or consequential benefits, such as, but not limited to, loss of anticipated profits or benefits, resulting from the use of any program in this collection or arising out of any breach of any warranty. Some states do allow the exclu- sion or limitation of direct incidental or consequential damages, so the above limitation may not apply to you. Published by Osborne McGraw-Hill 2600 Tenth Street Berkeley, California 94710 U.S.A. For information on translations and book distributors outside of the U.S.A., please write to Osborne McGraw-Hill at the above address. Macintosh is a trademark of Apple Computer, Inc. Microsoft is a registered trademark of Microsoft Corporation. A complete list of trademarks appears on page 271. Macintosh™ Graphics and Sound Copyright ©1986 by McGraw-Hill, Inc. All rights reserved. Printed in the United States of America. Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication. 1234567890 DODO 898765 ISBN 0-07-881177-5 Jonathan Erickson, Acquisitions Editor Kay Luthin, Copy Editor Jan Benes, Text Design Deborah Wilson, Composition Yashi Okita, Cover Design Kay Nelson, Technical Editor

Reading notes: Headline ambiguous: 'Disclaimer of Warranties and Limitation of Liabilities' appears as a section title rather than a clear primary heading.

Printed product names
Macintosh · Macintosh™ Graphics and Sound
Printed dates
1986 · 1976
Languages
English
PDF page 5

Contents Introduction vii Chapter 1 Macintosh Graphics 1 Chapter 2 Printing and Plotting 13 Chapter 3 Drawing Basic Shapes and Patterns 51 Chapter 4 Interactive Graphics 93 Chapter 5 Sound 137 Chapter 6 Transferring Images 167 Chapter 7 Animation Techniques 199 Chapter 8 Manipulating Displays and Viewing Objects 223 Chapter 9 Designing Efficient Programs 259 Index 273

Printed product names
Macintosh
Languages
English
PDF page 6

A plain, entirely white blank page with no visible artwork, layout, or markings.

Reading notes: The image appears to be blank with no visible text, so all printed fields are empty.

PDF page 7

Acknowledgments I have especially enjoyed writing this book because it has given me the opportunity to work with a lot of talented people. Thanks to every- one who contributed their time, energy, and creativity. First and foremost, I'd like to thank Renda Ozden for his dedica- tion, creative insight, graphics and programming talent, and companionship throughout this project. Renda designed and imple- mented many of the programs, drew several graphics illustrations, and was an endless source of ideas for graphics applications. This book is very much a product of his fertile imagination. Russel Schnapp, author of Macintosh Graphics in Modula-2 (Prentice-Hall, 1986), gave significant help at a critical time. Nick Galemo, author of the popular Paint Mover program, edited and revised the chapters on sound and on working with screen images. His timely contribution helped to keep the book on schedule. Anthony Mack, President of the UC Irvine Mac Users Group, thoroughly tested each of the program listings in the book, making modifications as needed to give the programs a uniform format. He also drew several illustrations.

Printed product names
Macintosh Graphics in Modula-2 · Paint Mover
Printed dates
1986
Languages
English
PDF page 8

Morgan Davis contributed several programs, including Towers of Hanoi and the cursor editor. Dick Kater, my co-author in Getting the Most Out of Your Epson Printer (McGraw-Hill, 1985) and The Printed Word (Microsoft Press, 1985), made several helpful suggestions. The EduKater staff provided support and encouragement through- out the project. Ramona Garcia managed the office and was tenacious about getting the chapters out on time. Joe Parez took time off from accounting to write several programs. Griselda Engelhorn, Maureen Aldrich, and Tina Vitous kept everyone's spirits high and did what- ever was necessary to keep the project going.

Reading notes: Possible hyphenation at line breaks in 'through-out' and 'what-ever' reflects source layout rather than word division

Printed product names
Getting the Most Out of Your Epson Printer · The Printed Word
Printed dates
1985
Languages
English
PDF page 9

Introduction No matter how you look at it, learning about computers and how to program them takes time; and the more complex the subject, the more draining it can be, except when you have a particular interest in what you are learning. Motivation makes the difference. Fortu- nately, it is easy to get excited about computer graphics and sound, since both appeal to our creative nature. In this book, you have an opportunity to learn about Macintosh graphics and sound by typing and running short programs. You'll find that actively using the programs in the book is the best way to learn how to use graphics statements, so try out the programs. Read the annotated program listings, paying close attention to the ways various statements and functions are used. Above all, don't expect to learn all about computer graphics in one sitting. Be patient, and you will be rewarded with newfound graphics abilities. vii

Printed product names
Macintosh
Languages
English
PDF page 10

viii Macintosh Graphics and Sound Using This Book Macintosh Graphics and Sound is designed to usher you into the world of Macintosh graphics and sound by using BASIC. BASIC (short for Beginner's All-purpose Symbolic Instruction Code) is a programming language for beginners. We will develop this book around the first BASIC introduced on the Mac: version 2.0 of Micro- soft BASIC. The challenge for any writer of computer subjects is to bridge the gap between a tutorial and a reference work. A pure reference work is often only marginally useful to the computer novice; a long, drawn- out tutorial is the last thing a polished programmer wants to wade through. Macintosh Graphics and Sound contains a combination of both approaches. The book is organized around graphics concepts. It starts with such basic topics as working with the video display and drawing simple shapes, and then progresses to more advanced topics like rotating two- and three-dimensional objects. It is well indexed so that you can find your way quickly to topics of interest. For those who prefer a 'learn by doing' approach, graphics state- ments and techniques are illustrated with short sample programs. By reading and experimenting with the programs, you can discover what the Macintosh has to offer. Each chapter concludes with several comprehensive programs that apply the concepts and techniques learned in that chapter. System Requirement~ To get the most out of this book, your minimal hardware require- ment is the original Macintosh, which has 128K of memory. You can write short programs, but you will have to be very conscious of memory limitations. Most of the programs in this book work on the 128K Mac; exceptions are carefully noted. For those who have 128K machines, Chapter 9 discusses ways to deal with limited memory. While a dual-drive system is necessary for word processing and some other applications, BASIC programmers can use a single-drive machine. With careful file management, you can store your operating system and BASIC, and still have nearly 200K for program storage. A printer is not an absolute necessity for using BASIC, but it can make life a lot easier. Printouts make your work on the computer somewhat transportable. A printer also allows you to distribute paper copies of your graphics displays.

Printed product names
Macintosh · BASIC
Languages
English
PDF page 11

Introduction ix You may also wish to borrow or purchase a digitizer unit that converts real-life images into digitized form in the Mac. For software, you'll need a copy of Microsoft BASIC. The pro- grams in this book are written in version 2.0 of Microsoft BASIC. You'll occasionally need a graphics program, such as MacPaint or MacDraw, for creating graphics images. READER BACKGROUND This book is designed for all BASIC programmers who want to mas- ter Macintosh's remarkable graphics abilities. On other computers, the subject of graphics is generally avoided by beginning pro- grammers. But the Mac invites even the beginner to participate in the graphics experience. The first few chapters start at a leisurely pace so that the novice programmer can get started with ease. At each stage we develop the tools to prepare the reader for the next section. The book is also care- fully indexed so that advanced programmers will be able to find quickly the sections they want to know about. Newcomers to BASIC and the Mac will find it best to read the chapters in sequence. Take your time and read carefully. You'll find that running each of the sample exercises will help you learn the material in a surprisingly short time and to retain it longer. Working with practice programs lets you get all the catastrophic errors out of your system before you attempt your own programs. Those who wish to minimize typing time in working with the practice programs might consider purchasing the optional program disk. If you are an experienced programmer, you will probably want to proceed at a faster pace. You may want to skim the first few chapters to get familiar with the Mac, and then use the Index and Table of Contents to find topics of interest. The applications programs at the end of each chapter provide examples of how to use the tools intro- duced in that chapter. The optional program disk will allow you to modify the major programs. The Macintosh is a machine that allows us to explore our own creativity. We hope this book will inspire you to push your limits and to make new discoveries about yourself. Program Disk Offer We have made many of the major programs in this book available on disk. The files are stored on a data disk, so single-drive users may want to transfer the files to a system disk.

Reading notes: Some hyphenated line breaks and spacing irregularities in the extracted copy may affect reading order.

Printed product names
Microsoft BASIC · MacPaint · MacDraw · Macintosh
Languages
English