Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hidden_surface(3G)

surface_model(3G)

shade_mode(3G)

viewpoint(3G)

NAME

viewpoint − define eye position in world coordinates for use when calculating specular reflections and back-culling polygons. 

SYNOPSIS

C Syntax:

void viewpoint(fildes,type,x,y,z);
int fildes,type;
float x,y,z;

FORTRAN77 Syntax:

subroutine viewpoint(fildes,type,x,y,z)
integer*4 fildes,type
real x,y,z

Pascal Syntax:

procedure viewpoint(fildes, type:integer; x, y, z:real);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

type Selects DIRECTIONAL or POSITIONAL viewpoint interpretation. 

x,y,z Coordinate position of the viewpoint or a vector pointing to the eye point

Discussion

Viewpoint specifies the location of the viewpoint for use when calculating specular reflections.  Light source equations require a known angle between the viewer and the reflected ray in order to determine the specular reflection. 

The type parameter can be one of the following:

DIRECTIONAL Viewpoint at infinity.  The x,y,z parameters specify a vector anchored at the origin and directed toward the viewpoint.  Note that this vector does not need to be normalized to unit length. 

POSITIONAL Viewpoint close to viewing area.  The x,y,z parameters specify the position of the viewpoint in world coordinates. 

Viewpoint should not be confused with view_camera which allows the user to define a 3-dimensional viewing transformation using a camera model.  The view_camera function calls viewpoint to guarantee that the eyepoint used for specular reflection calculations is consistent with the camera position. 

When set in positional mode, the eyepoint is also used for back-culling calculations when the viewing transformation matrix is a perspective transformation (see hidden_surface). This is required whenever using view_matrix3d to do perspective viewing.  When using view_camera, the viewpoint position set by view_camera is the camera position. 

DEFAULTS

Viewpoint at infinity along the -z axis. 

SEE ALSO

hidden_surface(3G), surface_model(3G), shade_mode(3G), view_camera (3G), Starbase Graphics Techniques. 

Hewlett-Packard Company  —  HP-UX Release 9.03: April 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026