Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dsupc(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

DSUPC(3g)  —  Subroutines

Name

DSUPC − Creates an array of colors of constant hue and saturation but varying luminance, and sets the weight vector. 

Operating States: PHOP, WSOP, ∗, ∗
Digital PHIGS extension function

Syntax

DSUPC(WKID, INCOL, RANGE, MODEL, WEIGHT, COLOR)

Argument        Data Type     Access     Description
---------------------------------------------------------------------------
WKID            Integer       Read       Workstation identifier
INCOL(3)        Array of      Read       Input color in red, green, and
                reals                    blue (RGB)
RANGE           Integer       Read       Number of entries in the color map
MODEL           Integer       Read       Color model (must be PRGB)
WEIGHTS(3)      Array of      Write      Weight vector
                reals
COLORS(3 x      Array of      Write      Color mapping array
RANGE)          reals
---------------------------------------------------------------------------

Description

DSUPC creates an array of colors of constant hue and saturation but varying in luminance from dark to light, and sets the weight vector as appropriate. 

The INCOL in red, green, and blue (RGB) color space is converted to hue, lightness, and saturation (HLS) format.   This is the COLOUR argument, which should be used as the color for all primitives using this pseudo color mapping. 

The function returns the color map and the weight vector in the output arguments.  Digital PHIGS generates the color map by holding constant the hue and saturation of INCOL and varying the luminance from 0.0 to 1.0.  Digital PHIGS sets the weight vector to

Digital PHIGS applies the weight vector to the resultant color in the output pipeline after the lighting and shading phase in the following manner:

    luminance = red_component ∗ weight(0) +
    blue_component ∗ weight(1) +
    green_component ∗ weight(2)

Digital PHIGS uses the luminance from the previous equation as an index into the pseudo color map for the final color. 

The application can install the color map by calling the DSPC function. 

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