Sets the current normal vector.
void normal(Coord narray)
SUBROUTINE NORMAL(narray) REAL narray(3)
The normal subroutine sets the current normal vector. The x, y, and z modeling coordinates stored in the parameter narray are transformed into eye coordinates using the inverse transpose of the current viewing matrix. These numbers are used to set the value for the current vertex normal.
The passed parameter (narray) becomes the current normal and is used when the lighting algorithm is rerun for all subsequent vertices. It is not necessary to respecify a normal if it is unchanged. For example, a single call to the n3f subroutine is sufficient for a flat-shaded polygon. However, the n3f subroutine must be called before the first vertex subroutine.
Lighting calculations assume that the specified normal is of unit length, as shown in the following equation:
x2 + y2 + z2 = 1.0
If the normal does not equal 1.0, or if no lighting model is active, the results are unpredictable.
The normal and n3f subroutines are the same in all respects.
|narray|| Specifies the address of an array containing three floating point numbers representing the x, y, and z model coordinates. Corresponding indexes for these coordinates are:
This subroutine is part GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.
|/usr/include/gl/gl.h||Contains C language constant and variable type definitions for GL.|
|/usr/include/gl/fgl.h||Contains FORTRAN constant and variable type definitions for GL.|
Binding a new material, light, or lighting model definition with the lmbind subroutine.
Defining a new material, light, or lighting model with the lmdef subroutine.
Specifying a normal for lighting calculations with the n3f subroutine.
AIX Graphics Library Overview, Creating Lighting Effects, Drawing with Begin-End Style Subroutines, and Understanding the Hardware Used by GL in GL3.2 Version 4 for AIX: Programming Concepts.