Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

depth_cue(3G)

depth_cue_color(3G)

depth_cue_range(3G)

NAME

depth_cue_range − set range for depth cuing

SYNOPSIS

C Syntax:

void depth_cue_range(fildes,hither,yon,hither_scale,yon_scale);
int fildes;
float hither,yon,hither_scale,yon_scale;

FORTRAN77 Syntax:

subroutine depth_cue_range(fildes, hither,yon,hither_scale,yon_scale)

integer∗4 fildes;

real hither,yon,hither_scale,yon_scale

Pascal Syntax:

procedure depth_cue_range(fildes:integer; hither,yon,hither_scale,yon_scale:real);

DESCRIPTION

Input Parameters

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

hither,yon define the reference planes, parallel to the XY plane, at which the depth cue scaling factors are specified.  These values are in perspective VDCs; i.e. the perspective divide occurs after the depth cue calculation. 

hither_scale,yon_scale
define the weights that determine how a primitive’s color is combined with the depth cue color.

Discussion

When primitives are depth cued using the color depth cue model, colors are interpolated toward the color specified in depth_cue_color.  The color of a point in between the hither depth cue plane and the yon depth cue plane is determined by a linear interpolation of the hither_scale and yon_scale factors.  Any points in front of the depth cue hither plane or behind the depth cue yon plane are rendered in a constant color.  The applicable equations:
 

If Z is in front of depth cue hither:

Color = hither_scale ∗ primitive_color + (1 − hither_scale) ∗ depth_cue_color

 
If Z is in back of depth cue yon:

Color = yon_scale ∗ primitive_color + (1 − yon_scale) ∗ depth_cue_color

 
If Z is in between depth cue hither and depth cue yon:

Color = r ∗ primitive_color + (1 − r) ∗ depth_cue_color

Where:

r = yon_scale + ((Z − yon) ∗ (hither_scale − yon_scale)) / (hither − yon)

DEFAULTS

hither = 0.0;  yon = 1.0;  hither_scale = 1.0;  yon_scale = 0.0

SEE ALSO

depth_cue(3G), depth_cue_color(3G). 
Starbase Graphics Techniques. 

 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

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