DEC PHIGS Developer's Guide

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  Part I

  1      Introduction to DEC PHIGS

  1.1     Language Bindings

  1.2     Function Descriptions

  1.3     Argument Passing Convention

  1.4     C Binding Header Files

  2      Basic PHIGS Concepts

  2.1     Structures

  2.2     Workstations
    2.2.1      Opening PHIGS
    2.2.2      Opening a Workstation
    2.2.3      Closing a Workstation

  2.3     Posting Structures

  2.4     Regeneration and Traversal

  2.5     Updating the Display

  3      Structures

  3.1     Creating Structures

  3.2     Closing Structures

  3.3     Deleting Structures

  3.4     Structure Contents
    3.4.1      Primitive Elements
    3.4.2      Attribute Elements
    3.4.3      Set Transformation Elements
    3.4.4      Structure Invocation Elements

  3.5     Default View

  3.6     Structure Editing

  3.7     Modeling Transformation

  3.8     Composite Modeling Transformation

  3.9     PHIGS Matrix Utilities
    3.9.1      ROTATE X
    3.9.2      ROTATE Y
    3.9.3      ROTATE Z
    3.9.4      SCALE 3
    3.9.5      TRANSLATE 3
    3.9.6      BUILD TRANSFORMATION MATRIX 3
    3.9.7      COMPOSE MATRIX 3
    3.9.8      COMPOSE TRANSFORMATION MATRIX 3
    3.9.9      TRANSFORM POINT 3

  3.10    Program Examples

  4      Workstations

  4.1     Opening and Closing the Workstation

  4.2     Updating the Workstation
    4.2.1      Explicit Regeneration
    4.2.2      Implicit Regeneration and Display Update State

  4.3     Device Independence

  4.4     Workstation Databases
    4.4.1      Workstation Description Table

  5      Viewing and Workstation Transformations

  5.1     Composite Modeling Transformation

  5.2     View Orientation Transformation

  5.3     View Mapping Transformation
    5.3.1      View Representation
    5.3.2      View Index

  5.4     Workstation Transformation

  5.5     Program Examples

  6      Structure Archives and Metafiles

  6.1     Archive Files

  6.2     Metafiles

  7      PHIGS Databases

  7.1     Centralized Structure Store

  7.2     Workstation State Lists

  7.3     Workstation Description Tables

  7.4     Traversal State List

  7.5     PHIGS State List

  7.6     PHIGS Description Table

  7.7     Error State List

  7.8     PHIGS Operating States

  8      Inquiry Functions

  9      Color Models

  9.1     Color Approximation

  10     Three-Dimensional Primitives

  10.1    Text and Marker Primitives
    10.1.1     TEXT 3
      10.1.1.1     Text Font Attributes
      10.1.1.2     Character Up Vector Attribute
      10.1.1.3     Character Height and Width Attributes
      10.1.1.4     Character Spacing Attribute
      10.1.1.5     Text Path Attribute
      10.1.1.6     Text Alignment Attribute
      10.1.1.7     Text Precision Attribute
      10.1.1.8     Text Color Attribute
    10.1.2     ANNOTATION TEXT RELATIVE 3
      10.1.2.1     Annotation Text Attributes
      10.1.2.2     Annotation Style Attribute
    10.1.3     POLYMARKER 3
      10.1.3.1     Marker Type Attribute
      10.1.3.2     Marker Size Scale Factor Attribute
      10.1.3.3     Polymarker Color Attribute

  10.2    Line and Curve Primitives
    10.2.1     POLYLINE 3
    10.2.2     CIRCLE and CIRCULAR ARC
      10.2.2.1     Curve Approximation Criteria Attribute
    10.2.3     POLYLINE SET 3 WITH DATA
      10.2.3.1     Polyline Color Attribute
      10.2.3.2     Polyline Shading Method Attribute

  10.3    Fill Area Primitives
    10.3.1     Fill Area Attributes
    10.3.2     Polygon Properties
    10.3.3     FILL AREA 3
    10.3.4     FILL AREA SET 3
      10.3.4.1     Face Distinguishing Mode Attribute
      10.3.4.2     Geometric Calculation Mode Attribute
      10.3.4.3     Face Culling Mode Attribute
      10.3.4.4     Interior Style Attribute
      10.3.4.5     Interior Style Index Attribute
      10.3.4.6     Interior Color Attribute
      10.3.4.7     Interior Color Index Attribute
      10.3.4.8     Interior Reflectance Equation Attribute
      10.3.4.9     Surface (Area) Properties Attribute
      10.3.4.10    Light Source State Attribute
      10.3.4.11    Interior Shading Method Attribute

  10.4    WITH DATA Fill Area Primitives
    10.4.1     INDEX POLYGONS WITH DATA
    10.4.2     QUADRILATERAL MESH 3 WITH DATA and TRIANGLE STRIP 3 WITH DATA
      10.4.2.1     QUADRILATERAL MESH 3 WITH DATA
      10.4.2.2     TRIANGLE STRIP 3 WITH DATA
    10.4.3     FILL AREA 3 WITH DATA and FILL AREA SET 3 WITH DATA Primitives
      10.4.3.1     Rendering WITH DATA Fill Area Primitives

  10.5    Nonuniform Rational B-Spline Curves

  10.6    Nonuniform Rational B-Spline Surfaces

  10.7    Other Rendering Considerations
    10.7.1     Depth Cueing
    10.7.2     Hidden Line and Hidden Surface Removal
    10.7.3     Double Buffering

  10.8    Program Examples

  11     Attribute Bundling

  11.1    Example Programs

  12     Name Sets, Highlighting, and Invisibility

  12.1    Name Sets

  12.2    Highlighting

  12.3    Invisibility

  12.4    Detectability

  13     PHIGS Input

  13.1    Logical Input Devices

  13.2    Logical Input Classes

  13.3    Logical Device Numbers

  13.4    Input Operation Modes
    13.4.1     Request Mode
    13.4.2     Sample Mode
    13.4.3     Event Mode

  13.5    Input and Display Update

  13.6    Device Initialization and Prompt-and-Echo Types

  13.7    Locator Class Input
    13.7.1     Locator Measure
    13.7.2     Locator Devices and Prompt-and-Echo Types

  13.8    Pick Class Input
    13.8.1     Pick Hits and Pick Aperture
    13.8.2     Pick Identifiers
    13.8.3     Pick Measure
    13.8.4     Pick Initialization
    13.8.5     Pick Prompt and Echo
    13.8.6     Pick Hit Test

  13.9    Stroke Class input
    13.9.1     Stroke Measure
    13.9.2     Stroke Control
    13.9.3     Stroke Prompt-and-Echo Types

  13.10   Valuator Class Input

  13.11   Choice Class Input
    13.11.1    Choice Control
    13.11.2    Choice Measure
    13.11.3    Choice Device Numbers

  13.12   String Class Input

  13.13   Program Examples

  14     Immediate Mode

  14.1    DEC PHIGS Immediate Mode Functions

  14.2    Benefits and Costs of Immediate Mode

  15     The Rest of DEC PHIGS

  15.1    PHIGS Escapes

  15.2    Color Approximation

  15.3    Annotation Pixmaps

  15.4    Error-Handling Functions

  Part II

  16     Coordinate Systems

  16.1    Distance and Anisotropic Coordinates
    16.1.1     Homogeneous Coordinates
    16.1.2     Coordinate System Handedness
    16.1.3     Coordinate Transformations
    16.1.4     Coordinate Translation
    16.1.5     Coordinate Rotation
    16.1.6     Scaling and Reflection
    16.1.7     Composition of Transformations
    16.1.8     Linear Transformations: Homogeneous and Inhomogeneous
    16.1.9     Matrices
    16.1.10    Matrix Multiplication
    16.1.11    Inverse and Identity Transformations and Matrices

  16.2    Transformations as Mappings
    16.2.1     Noninvertible Linear Mappings
    16.2.2     Vectors
    16.2.3     Vector Components
    16.2.4     Vector Addition
      16.2.4.1     Multiplication of a Vector by a Number
      16.2.4.2     Vector Component Multiplication
      16.2.4.3     Vector Length and Unit Vectors
      16.2.4.4     Dot Product
      16.2.4.5     Vector Cross Product

  17     Polynomials and Rational Functions

  17.1    Intervals

  17.2    Functions of One Real Variable

  17.3    Continuity and Differentiability

  17.4    Functions of Two Real Variables

  17.5    Parametric Curves

  17.6    Parametric Surfaces

  18     Modeling

  18.1    Geometric Modeling

  18.2    Piecewise-Linear Models

  18.3    Surface Normal Vectors

  18.4    Spline Curves
    18.4.1     Piecewise Polynomials

  18.5    Spline Degree
    18.5.1     Kinds of Splines
    18.5.2     Nonuniform Rational B-Spline (NURBS) Curves
    18.5.3     NURBS Surfaces

  19     Projections

  19.1    Windowing and Clipping

  19.2    Hidden Lines and Surfaces
    19.2.1     Back Face Culling
    19.2.2     Depth-Sort Hidden Surface Algorithms
    19.2.3     Z-Buffer

  20     Rendering

  20.1    Brightness, Hue, and Color

  20.2    Computational Color Models
    20.2.1     RGB Color Model
    20.2.2     CIE Color Model
    20.2.3     HSV and HLS Color Models

  20.3    Interaction of Light with Material Surfaces
    20.3.1     Reflectance Model
    20.3.2     Specular and Diffuse Reflection
    20.3.3     Reflectance and Shading
    20.3.4     Lighting
    20.3.5     Reflectance Formula

  20.4    Shading Method

  20.5    Depth Cueing of Lines and Surfaces

  20.6    Rendering Pipeline

  20.7    Rendering Beyond PHIGS PLUS
    20.7.1     Shadows
    20.7.2     Texture Mapping
    20.7.3     Ray Tracing and Radiosity

  Glossary
    aliasing . . . attribute
    attribute bundle . . . bundle
    Cartesian coordinate system . . . color index
    color model . . . constant parametric subdivision
    constructive solid geometry (CSG) . . . current element
    current event report . . . diffuse reflection
    direct color . . . element
    element pointer . . . facet
    facet normal . . . front plane distance
    general color . . . hole
    homogeneous coordinates . . . infinite light source
    inherit . . . inverse
    invisibility . . . linear transformation
    line type . . . measure
    metafile . . . object
    oblique parallel projection . . . parallel projection
    parametric curve . . . pick hit
    pick identifier . . . plane polygon
    point source . . . projection viewport
    projective coordinates . . . reflectance normals
    reflection mapping . . . scaling
    shading . . . specular reflection
    spline curve . . . structure network
    structure state list . . . transformation
    transformation pipeline . . . value
    vector . . . viewport
    view reference coordinate (VRC) system . . . workstation description table
    workstation identifier . . . Z-buffer

  EXAMPLES

  3-1        Hello PHIGS

  3-2        Execute Structure

  3-3        Roll Wheel

  3-4        Structure Robot

  5-1        See View

  5-2        Perspective

  5-3        Multiple Views

  10-1       TEXT 3 Attributes

  10-2       ANNOTATION TEXT Attributes

  10-3       Diamond with Back Face Culling

  10-4       Diamond with Shading

  10-5       QUADRILATERAL MESH 3 WITH DATA with Smooth Shading

  10-6       Depth Cueing

  10-7       NURBS Example

  10-8       Specular Highlighting

  11-1       Bundled Attributes

  13-1       Request Locator Example

  13-2       Pick Path Example

  FIGURES

  3-1        EXECUTE STRUCTURE Output

  3-2        Structure Robot

  5-1        PHIGS Transformation Pipeline

  5-2        Perspective Output

  10-1       Text Alignment

  10-2       Character Alignment

  10-3       Convex Simple Polygons

  10-4       Nonconvex Simple Polygons

  10-5       Complex Polygons

  10-6       Interior Test-Simple Polygon

  10-7       Interior Test-Complex Polygon

  10-8       Fill Area Set with Holes and Islands

  10-9       Quadrilateral Mesh

  10-10      Triangle Strip

  10-11      Diamond with Back Face Culling

  10-12      Diamond with Face Shading

  10-13      QUADRILATERAL MESH 3 WITH DATA Output

  10-14      Depth Cueing Output

  10-15      NURBS Program Input

  10-16      NURBS Program Output

  13-1       Pick Path Example

  16-1       Cartesian Coordinates of a Point

  16-2       Three-Dimensional Distance Formula

  16-3       Translated Coordinate System

  16-4       Rotated Coordinate System

  16-5       Rotation About the Z-Axis

  16-6       Plane View of Z-Rotation

  16-7       Rotation About the Y-Axis

  16-8       Rotation About the X-Axis

  16-9       Rotation and Translation

  16-10      Transformations of an Object

  16-11      Noncommutativity of Rotations About Different Axes

  16-12      Noncommutativity of Rotation and Translation

  16-13      General Composition of Mappings

  16-14      Vectors

  16-15      Vector Addition

  16-16      Transformation Vector Addition

  17-1       Graphs of Polynomial Functions

  17-2       Graphs of Rational Functions

  17-3       Parametric Curve

  17-4       Parametric Surface

  18-1       Closed Polygonal Surfaces

  18-2       Open Polygonal Surfaces

  18-3       Approximation of a Smooth Curve

  18-4       Approximation of a Sphere

  18-5       Normal Vectors

  18-6       Degree 1 Normalized B-spline Basis Functions

  18-7       Degree 2 Normalized B-spline Basis Functions

  18-8       NURBS Curve with Equal Knot Spacing

  18-9       NURBS Curve with Last Knots Moved

  18-10      NURBS Curve with Equal Interior Knots

  18-11      NURBS Curve Without Multiple Knots

  18-12      NURBS Curve-Large Relative Weights

  18-13      NURBS Curve-Small Relative Weights

  18-14      NURBS Curve-Very Small Weights

  19-1       Parallel Projection

  19-2       Perspective Projection

  19-3       Variation of Projected Length

  19-4       Similar Triangles in Perspective Projection

  19-5       Hidden Line Removal

  19-6       Ambiguous Wire Frames

  19-7       Back Face Culling for HLHSR

  19-8       Problems for Painter's Algorithms

  20-1       RGB Cube

  20-2       HSV Hexagonal Cone

  20-3       Incident Light Ray

  20-4       Specular Reflection

  20-5       Diffuse Reflection

  20-6       Diffuse Reflection Illuminates Surface

  20-7       Mirror Reflection

  20-8       Specular Highlight Position

  20-9       Rough Surface Diffuse

  20-10      Lambert's Law

  20-11      Graphs of cos n x

  20-12      Specular Dependence on Angle

  1 Convex Geometric Figures

  2 Nonconvex Geometric Figure

  TABLES

  1-1        Binding Function Names for the OPEN PHIGS Function

  11-1       Geometric Attributes

  11-2       Attribute Bundles