[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

patch Subroutine

Purpose

Draws a surface patch.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void patch(Matrix geomx, Matrix geomy, Matrix geomz)

FORTRAN Syntax

SUBROUTINE PATCH(geomx, geomy, geomz)
REAL geomx(4,4), geomy(4,4), geomz(4,4)

Description

The patch subroutine draws a surface patch using the current settings from the patchbasis, patchprecision, and patchcurves subroutines. The control points geomx, geomy, and geomz determine the shape of the patch. The rpatch subroutine is essentially the same except that it draws a rational surface patch.

Parameters

geomx Specifies a 4x4 matrix containing the x coordinates of the 16 control points of the patch.
geomy Specifies a 4x4 matrix containing the y coordinates of the 16 control points of the patch.
geomz Specifies a 4x4 matrix containing the z coordinates of the 16 control points of the patch.

Example

The example C language program patch1.c uses the patch subroutine to draw three surface patches after defining the settings for each patch.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/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.

Related Information

Defining a cubic spline basis matrix with the defbasis subroutine.

Setting the current spline surface basis matrices with the patchbasis subroutine.

Setting the number of curves used to represent a patch with the patchcurves subroutine.

Setting the precision at which curves are drawn with the patchprecision subroutine.

Drawing a rational surface patch with the rpatch subroutine.

AIX Graphics Library Overview, Drawing NURBS Curves and Surfaces, and Drawing Wire Frame Curves and Surface Patches.


[ Previous | Next | Contents | Glossary | Home | Search ]