← Macintosh Graphics in Modula 2 1986

Macintosh Graphics in Modula 2 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

Title Macintosh Graphics in Modula-2 Author Russell L. Schnapp P-H PRENTICE-HALL PERSONAL COMPUTING SERIES

A green book cover with a Macintosh-style window bar labeled Title framing the large black title, an author label box reading Russell L. Schnapp, two wireframe and shaded geometric spacecraft-like shapes, and a black footer band with a small Prentice-Hall P-H computer logo and series name.

Reading notes: Author label is printed in a small green-on-black tab; the word Author is stylized and slightly low-contrast.

Languages
English
PDF page 1

Title Macintosh Graphics in Modula-2 Author Russell L. Schnapp P-H PRENTICE-HALL PERSONAL COMPUTING SERIES

A green book cover with a dotted pattern features a beige Mac-style window titled 'Title' containing the book title, a gray 'Author' label box, two wireframe and shaded 3D aircraft-like shapes, and a black footer band with a Prentice-Hall computer logo.

Reading notes: The 'Title' and 'Author' labels are interface-style window captions rather than book text; included as printed. Logo text 'P-H' is small and stylized.

Languages
English
PDF page 2

Macintosh Graphics in Modula-2

Macintosh Graphics in Modula-2 JOHN R. BING Integrated Technical Consultants, 8nc. P.O. Box 547 POOLESVll 1 F:, MARYLAND 20837

Reading notes: No image was provided, so the layout and reading order are inferred only from the supplied extracted text. The line 'POOLESVll 1 F:, MARYLAND 20837' appears garbled by extraction; the place name and state abbreviation are uncertain and should be checked against the original. The headline is inferred as the first two lines ('Macintosh Graphics in Modula-2'); the source does not mark it as a headline. The firm name 'Integrated Technical Consultants, 8nc.' contains a probable OCR error ('8nc.' for 'Inc.').

Printed product names
Macintosh · Modula-2
Languages
English
PDF page 3

Prentice-Hall Personal Computing Series Lance A. Leventhal, series editor Busch, Sorry About the Explosion: A Humorous Guide to Computers Dickey, Kids Travel on Commodore 64 Fabbri, Animation, Games, and Graphics for the Timex-1000 Fabbri, Animation, Games and Sound for the Apple II/lie Fabbri, Animation, Games, and Sound for the Commodore 64 Fabbri, Animation, Games, and Sound for the IBM PC Fabbri, Animation, Games, and Sound for the Tl 99/4A Fabbri, Animation, Games, and Sound for the VIC 20 Glazer, Managing Money with Your Commodore 64 Glazer, Managing Money with Your IBM PC Glazer, Managing Money with Your VIC 20 Harris & Scofield, IBM PC Conversion Handbook of BASIC Lima, dBASE II for Beginners Lima, Mastering dBASE 111 in Less Than a Day Mclaughlin & Boulding, Financial Management with Lotus® 1-2-3® Nitz, Business Analysis and Graphics with Lotus® 1-2-3® Scanlon, EasyWriter II System Made Easy-er Scanlon, Microsoft Word for the IBM PC Scanlon, The IBM PC Made Easy Schnapp, Macintosh Graphics in Modula-2 Schnapp & Stafford, Commodore 64 Computer Graphics Toolbox Schnapp & Stafford, Computer Graphics for the Timex 1000 and Sinclair ZX-81 Schnapp & Stafford, VIC 20 Computer Graphics Toolbox Thro, Making Friends with Apple Writer II

Reading notes: Series name and editor line may be a header rather than a product title Some author surnames are abbreviated or unclear in reading order OCR-style spacing and possible character errors such as 'Tl 99/4A' and '111'

Printed product names
Sorry About the Explosion: A Humorous Guide to Computers · Kids Travel on Commodore 64 · Animation, Games, and Graphics for the Timex-1000 · Animation, Games and Sound for the Apple II/lie · Animation, Games, and Sound for the Commodore 64 · Animation, Games, and Sound for the IBM PC · Animation, Games, and Sound for the Tl 99/4A · Animation, Games, and Sound for the VIC 20 · Managing Money with Your Commodore 64 · Managing Money with Your IBM PC · Managing Money with Your VIC 20 · IBM PC Conversion Handbook of BASIC · dBASE II for Beginners · Mastering dBASE 111 in Less Than a Day · Financial Management with Lotus® 1-2-3® · Business Analysis and Graphics with Lotus® 1-2-3® · EasyWriter II System Made Easy-er · Microsoft Word for the IBM PC · The IBM PC Made Easy · Macintosh Graphics in Modula-2 · Commodore 64 Computer Graphics Toolbox · Computer Graphics for the Timex 1000 and Sinclair ZX-81 · VIC 20 Computer Graphics Toolbox · Making Friends with Apple Writer II
Languages
English
PDF page 4

Title Macintosh Graphics in Modula-2 Author Russell L. Schnapp Prentice-Hall, Inc., Englewood Cliffs, New Jersey 07632

A book cover with a Mac-style window labeled Title containing the large title, an Author tab below it, two wireframe and shaded 3D space shuttle images in the middle, and a publisher line at the bottom.

Reading notes: Title window label and Author tab text are small Mac-style interface text, transcribed as shown Publisher line is small fine print at the bottom of the page

Languages
English
PDF page 5

Library of Congress Cataloging-in-Publication Data Schnapp, Russell L. (date) Macintosh graphics in Modula-2. Includes bibliographies and index. 1. Macintosh (Computer)-Programming. 2. Modula-2 (Computer program language) 3. Computer graphics. 1. Title. QA76.8.M3S36 1986 001.64'2 85-12116 ISBN 0-13-542309-0 Editorial/production supervision and interior design: Lisa Schulz Cover design: Russell Schnapp Manufacturing buyer: Gordon Osbourne Macintosh'l'M is a trademark licensed to Apple Computer, Inc. Apple ® is a registered trademark of Apple Computer, Inc. MacModula-2 is a trademark of Modula Corporation. © 1986 by Prentice-Hall, Inc., Englewood Cliffs, New Jersey 07632 The author and publisher of this book have used their best efforts in preparing this book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The author and publisher make no warranty of any kind, expressed or implied, with regard to these programs or the documentation contained in this book. The author and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs. All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 ISBN 0-13-542309-0 01 Prentice-Hall International (UK) Limited, London Prentice-Hall of Australia Pty. Limited, Sydney Bditora Prentice-Hall do Brasil, Ltda., Rio de Janeiro Prentice-Hall Canada Inc., Toronto Prentice-Hall Hispanoamericana, S.A., Mexico Prentice-Hall of India Private Limited, New Delhi Prentice-Hall of Japan, Inc., Tokyo Prentice-Hall of Southeast Asia Pte. Ltd., Singapore Whitehall Books Limited, Wellington, New Zealand

Reading notes: Bditora in publisher listing may be an OCR error Catalog number 001.64'2 and QA76.8.M3S36 are cataloging codes, not dates

Printed product names
Macintosh · MacModula-2
Printed dates
1986 · 85-12116
Languages
English
PDF page 6

The image is a plain, entirely white blank page with no visible artwork, layout, or markings.

Reading notes: No visible text was found on the page, so all printed fields are empty.

PDF page 7

Content;s PREFACE xi ABOUT THE AUTHOR xv ONE: INTRODUCTION TO MODULA-2 1 Fundamental Features of Modula-2 1 MODULEs 2 Separate Compilation 4 Type-Checking 5 Program Control Statements 6 Warnings 7 Why Use Modula-2? 8 Overview of Macintosh Modula-2 8 Using Macintosh Modula-2 9 Creating a Disk for Editing 9 Working with an Internal Drive Only 10 Working with an Internal Plus External Drive 10 The Development Cycle 11 Exercises 17 Bibliography 18 vii

Reading notes: Source appears to be a table of contents rather than advertising copy; headline left null Heading 'Content;s' contains a stray semicolon, possibly an OCR artifact

Languages
English
PDF page 8

viii TWO: MACINTOSH GRAPHICS FACILITIES 20 Macintosh Graphics Hardware 20 A Quickdraw Module 21 Module MiniQD 22 Using MiniQD 29 Module Concentric 29 Patterns 33 Module Patterns 33 Using Patterns 36 Module FillConcen 36 Lines and Text 38 Module Draw 38 A Turtle-Graphics Module 44 Module Turtle 44 Using Turtle 47 Module Boxes: Drawing fractals 48 Exercises 53 Bibliography 53 THREE: ANIMATION AND SIMULATION 54 Moving Simple Elements 54 Module Sweep 55 Simulation of Motion 58 Module Timer 59 Simulation 60 Module Motion 61 Module BounceBall 66 Moving Complex Shapes 72 Module ScrollBall 74 Exercises 78 Bibliography 78 FOUR: INTERACTIVE GRAPHICS 79 What Is a User Interface? 79 Mouse 80 Module Mouse 80 Direct Manipulation with Mouse 82 Module Drag 82 Events 86 Menus 88 Module Menu 88 Module TestMenu 92 Contents

Languages
English
PDF page 9

ix Windows 96 Module Windows 97 Module TestWindow 105 Interactive Graphics 108 Module MicroDraw 109 Exercises 121 Bibliography 123 FIVE: THE THIRD DIMENSION 124 Basics of Three-Dimensional Graphics 124 Coordinates 124 Projection 124 Scaling 126 Rotation 126 Translation 128 Module ThreeDee 128 Drawing Wire-Frame Objects 131 Module Draw3D 132 Hidden Edges 140 Module SolidCube 140 Shading 144 Module PolyQD 145 Module ShadedCube 147 A More General Hidden-Edge Display Technique 151 Module RegionQD 151 Module Poly3D 154 Exercises 163 Bibliography 164 A: IMPORTANT QUICKDRAW PROCEDURES 166 B: IMPORTANT TOOLBOX PROCEDURES 174 C: GLOSSARY 179 INDEX 185 DISKETTE OFFER 190 Contents

Reading notes: Heading 'Contents' is a table-of-contents page with page numbers only; no advertised products or prices present.

Languages
English
PDF page 10

Preface This book is a about three subjects: • Computer graphics. • The Modula-2 language. • The Apple® Macintosh TM personal computer. It is intended both as an example of applying Modula-2 to a task and as an introduction to Macintosh graphics, with a Modula-2 orientation. You will learn how to edit, compile, and run programs with the Macintosh Modula-2 package. You will see how to take advantage of unique aspects of Modula-2, such as modules, abstract data types, and separate compilation. You will also find explanations and examples of key built-in Macintosh tools. This book describes many of the Macintosh's graphics and user inter- face procedures. This book assumes you have at least the following equipment: • Any Macintosh computer (the 128K version will do). A single-drive machine is adequate, although it requires a lot of disk swapping. • The Macintosh Modula-2 package, from Modula Corporation. This in- cludes a program editor, compiler, linker, and some uncompiled and precompiled modules and interfaces. • A copy of the book, Programming in Modula-2 (Springer-Verlag, 1982) by Niklaus Wirth. This is the standard reference for Modula. xi

Reading notes: Possible OCR spacing artifacts in 'Macintosh TM' and 'inter-face' lines

Printed product names
Apple® Macintosh · Macintosh Modula-2 package · Programming in Modula-2
Printed dates
1982
Languages
English
PDF page 11

xii Preface You might also want an ImageWriter or equivalent printer. If this is your first encounter with Modula, you should at least be familiar with Pascal. Note that you can buy a disk containing the modules and programs described in this book. It will save you a lot of typing and debugging time. For ordering information, see page 190. This book is organized as follows: Chapter 1 introduces the Modula-2 language. After describing Modula-2's major features, it discusses the Macintosh implementation and goes through the development cycle for a sample program. Chapter 2 introduces Macintosh graphics. This chapter presents a Modula interface to the Macintosh QuickDraw graphics routines. It develops and demonstrates a module that provides fill patterns. The chapter then describes a turtle graphics module and tests it with a program that draws a fractal curve. Chapter 3 discusses animation and the simulation of motion. It presents techniques for calculating the path, velocity, and acceleration of objects. The chapter contains examples of a moving line and a rubber ball. Chapter 4 covers interactive graphics. It presents a module that gives Modula programmers access to some Macintosh user interface software. This chapter also describes the use of the mouse to control the size and place- ment of graphic elements, and select from pop-up menus. It also explains how to use windows in your programs. Finally, it develops a graphic editing program that allows you to save, load, and edit pictures. Chapter 5 presents techniques used in representing and displaying three- dimensional objects. It includes a module that performs rotation, scaling, translation, and perspective mapping on 3-D coordinates. It then develops and demonstrates hidden-line and shading techniques. This book provides you with several "toolbox" modules that you can use in your own programs. By the time you finish, you should also have gained a solid understanding of Macintosh's QuickDraw and user interface software. ACKNOWLEDGMENTS First, to my spouse: Thank you, Brig! I really do recognize and appreciate the value of your patience and suggestions. Next: I approach the acknowledgment of corporations with trepida- tion. They tend toward fickleness more than individuals. Still, these companies went out on a limb to improve the state of the art of the market- place. The first, as you may guess, is Apple Computer. The Macintosh is a truly fine piece of software and hardware engineering. Also, my thanks go to Microsoft Corporation. Their Microsoft Word product is a tremendous leap forward, and the MS-DOS version helped me greatly in the preparation

Reading notes: Page number 'xii' and some hyphenated line breaks may affect reading order Some line spacing in the source appears irregular, possibly from extraction

Printed product names
Modula-2 · Macintosh · ImageWriter · Pascal · QuickDraw · Microsoft Word · MS-DOS · Apple Computer
Languages
English