CONTENTS Title Page Copyright Page Preface 1 Introducing DEC PHIGS 1.1 Benefits of Using DEC PHIGS 1.2 Understanding Workstations 1.3 Controlling PHIGS Operating States 1.3.1 Opening PHIGS 1.3.2 Selecting and Opening a Workstation 1.3.3 Closing the Workstation 1.3.4 Closing PHIGS 1.4 Setting the Display Update State 1.4.1 Deferral Modes 1.4.2 Modification Modes 1.5 Updating the Workstation 1.6 Including Definition Files 1.7 Understanding Description Tables and State Lists 1.7.1 Description Tables 1.7.2 State Lists 2 Generating Output 2.1 Output Primitives 2.2 Plotting the Points in Your Picture 2.3 Generating Polyline Output 2.4 Controlling Characteristics of Output Primitives 2.5 Changing Polyline Attributes 2.5.1 Changing the Line Width 2.5.2 Changing the Line Color 2.5.3 Changing the Line Type 2.6 Controlling Invisibility, Highlighting, and Detectability of Output Primitives 2.7 Generating Text 2.8 Generating Fill Areas and Fill Area Sets 2.9 Generating Circles and Circular Arcs 3 Developing Structures 3.1 Structure Networks 3.2 Element Pointers 3.3 Centralized Structure Store 3.4 Setting the Edit Mode 3.5 Creating and Editing Structures 3.5.1 Creating Elements 3.5.2 Moving to Element Numbers 3.5.3 Creating Label Elements 3.5.4 Moving to Labels 3.5.5 Moving by Offsets 3.5.6 Deleting Elements 3.6 Copying Structures 3.7 Renaming and Replacing Structures 3.7.1 Changing Structure Identifiers 3.7.2 Changing Structure References 3.7.3 Changing Structure Identifiers and References at Once 3.8 Sharing Structures 3.9 Posting and Traversing Structures 3.10 Deleting Structures 3.11 Archiving Structures 3.11.1 Setting the Conflict Resolution 3.11.2 Storing Structures 3.11.3 Retrieving Archived Structures 3.11.4 Deleting Archived Structures 4 Transforming Pictures 4.1 Coordinate Systems 4.1.1 Modeling Coordinate System 4.1.2 World Coordinate System 4.1.3 View Reference Coordinate System 4.1.4 Normalized Projection Coordinate System 4.1.5 Device Coordinate System 4.2 Composite Modeling Transformations 4.2.1 Sample Composite Modeling Transformation 4.2.2 Composite Modeling Matrices 4.3 View Transformation Details 4.3.1 Projections 4.3.1.1 Perspective Projections 4.3.1.2 Parallel Projections 4.3.2 View Mapping and Clipping 4.4 Multiple Views 4.5 Workstation Transformation Details 5 Using DEC PHIGS Input 5.1 Input Modes 5.1.1 REQUEST Input Mode 5.1.2 SAMPLE Input Mode 5.1.3 EVENT Input Mode 5.2 Prompt and Echo Types and Echo Areas 5.3 Choice Input Class 5.4 Locator Input Class 5.5 Pick Input Class 5.6 String Input Class 5.7 Stroke Input Class 5.8 Valuator Input Class 5.9 Example Using REQUEST Mode Choice Input 5.10 More Complex Input Example 6 Performing Inquiries 6.1 Operating State Inquiries 6.2 PHIGS State List Inquiries 6.3 Workstation State List Inquiries 6.4 Input Device Inquiries 6.5 Structure Content Inquiries 7 Using Advanced Rendering Techniques 7.1 Terminology Associated with Complex Output Primitives 7.2 Advanced Output Primitives 7.2.1 Index Polygons with Data 7.2.2 Quadrilateral Mesh 3 with Data 7.2.3 Triangle Strip 3 with Data 7.2.4 Nonuniform B-Spline Curves and Surfaces 7.2.4.1 Specifying Nonuniform B-Spline Curves 7.2.4.2 Specifying Nonuniform B-Spline Surfaces 7.3 Surface Attributes 7.3.1 Lighting Sources 7.3.2 Surface Properties 7.3.3 Reflection Attributes 7.3.4 Interpolation of Shaded Objects 7.3.5 Interior Style of Shaded Objects 7.4 Rendering Pipeline 7.4.1 Lighting and Shading 7.4.2 Depth Cueing 7.4.3 Color Mapping 7.5 Sample Lighting and Shading Program A The PHIGS Standard A.1 PHIGS Standard A.1.1 PHIGS as a Functional Standard A.1.2 PHIGS as a Syntactical Standard B Specifying Nonuniform B-Spline Curves and Surfaces B.1 Continuity B.2 Specifying B-Splines B.3 Determining Knot Vectors and Control Points B.3.1 Specifying the Curve from A to B B.3.2 Specifying the Curve from B to C B.3.3 Specifying the Curve from C to A B.3.4 Combining Curves B.3.4.1 Concatenating Control Points B.3.4.2 Concatenating Knot Vectors B.4 Spline Surfaces B.5 Trimming Curves C Reflectance Equation C.1 Diffuse Reflection and Ambient Light C.2 Specular Reflection D Mathematical Concepts D.1 Vectors D.1.1 Dot Product Multiplication D.1.2 Cross Product Multiplication D.2 Viewing and Rendering Algorithms D.2.1 Deriving the Viewing Vectors D.2.2 Rendering Light and Shading D.2.3 Deriving the Angle of Incidence D.2.4 Positioning the Unit Light Source D.3 Scale Matrix D.4 Translate Matrix D.5 Rotation D.5.1 X Rotation D.5.2 Y Rotation D.5.3 Z Rotation Glossary EXAMPLES 1-1 Generating Simple Output 2-1 Generating Polylines 2-2 Changing Line Width 2-3 Changing Polyline Color 2-4 Changing Line Type 2-5 Using Name Sets 2-6 Generating Text 2-7 Generating Fill Areas 2-8 Generating Circular Arcs 5-1 Using REQUEST Mode Choice Input 5-2 Using SAMPLE Mode Valuator Input 7-1 Generating a Cubic Nonuniform B-Spline Curve 7-2 Main Program 7-3 Subroutine to Draw Teapot FIGURES 2-1 Default Coordinate Space 3-1 Format of a DEC PHIGS Structure 3-2 Structure Networks 3-3 More Complex Structure Networks 3-4 Effects of INSERT and REPLACE Modes on Structure Editing 3-5 Pointer Position After Opening a Structure 3-6 Pointer Position After a Call to SET ELEMENT POINTER 3-7 Pointer Position After a Call to SET ELEMENT POINTER AT LABEL 3-8 Pointer Position After a Call to OFFSET ELEMENT POINTER 3-9 Effects of a Call to DELETE ELEMENT 3-10 Effects of a Call to DELETE ELEMENT RANGE 3-11 Effects of a Call to COPY ALL ELEMENTS FROM STRUCTURE 3-12 Structure Network Traversal 4-1 DEC PHIGS Transformation Pipeline 4-2 Composite Modeling Transformation 4-3 View Reference Coordinate Systems 4-4 View Transformation 4-5 Establishing a View Reference Point 4-6 View Transformation 4-7 Workstation Transformation 4-8 Car Scene 4-9 Parts of the Car 4-10 CAR Structures 4-11 Perspective Projection 4-12 Parallel Projection 4-13 Unit Cube 4-14 Moving from the Clipping Volume to the Workstation Viewport 4-15 Multiple Views 4-16 View Table 4-17 Creating a Multiple View 4-18 Isotropic Mapping in the Workstation Transformation 4-19 Minimum and Maximum Points 5-1 Examples of Logical Input Devices 5-2 REQUEST Input Mode 5-3 SAMPLE Input Mode 5-4 EVENT Input Mode 7-1 Diagram of a Typical Facet 7-2 Result of an Index Polygons with Data Output Primitive 7-3 Specifying Data for a Cube Index Polygons with Data Primitive 7-4 Example of a Triangle Strip 3 with Data Output Primitive 7-5 Positional Lighting 7-6 Rendering Pipeline 7-7 Depth Cueing 7-8 Scale Factors B-1 Effects of Order on Nonuniform B-Spline Curves B-2 Tape Dispenser Modeled Using Nonuniform B-Spline Curves B-3 Control Points for the Curve From A to B B-4 Control Points for the Curve from B to C B-5 Control Points for the Curve from C to A C-1 Diffuse Reflection C-2 Specular Reflection D-1 Two-Dimensional Translation TABLES 1-1 State of Visual Representation Values 1-2 Deferral Modes 1-3 Modification Modes 1-4 VMS Definition Files for DEC PHIGS 1-5 ULTRIX Definition Files for DEC PHIGS 2-1 Output Primitive Types 3-1 Effects of Setting the Archival and Retrieval Conflict Resolution Flags 4-1 Composite Transformation Symbols 4-2 Composition Types 5-1 DEC PHIGS Logical Input Classes 7-1 Sample Specification for Index Polygons with Data Primitive