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

pnt Subroutine

Purpose

Draws a point in modeling coordinates.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void pnt
(Coord x, Coord y, Coord z)
void pnti
(Icoord x, Icoord y, Icoord z)
void pnts
(Scoord x, Scoord y, Scoord z)
void pnt2
(Coord x, Coord y)
void pnt2i
(Icoord x, Icoord y)
void pnt2s
(Scoord x, Scoord y)

FORTRAN Syntax

SUBROUTINE PNT(x, y, z)
REAL x, y, z
SUBROUTINE PNTI(x, y, z)
INTEGER*4 x, y, z
SUBROUTINE PNTS(x, y, z)
INTEGER*2 x, y, z
SUBROUTINE PNT2(x, y)
REAL x, y
SUBROUTINE PNT2I(x, y)
INTEGER*4 x, y
SUBROUTINE PNT2S(x, y)
INTEGER*2 x, y
Note: For FORTRAN users, the INTEGER*2 versions of this subroutine, PNTS and PNT2S, should not be called with integer constant parameters. For example, 2 is an integer constant; JJ is an integer variable. The XL FORTRAN compiler, invoked by the xlf command, stores all integer constants as long integers (INTEGER*4), not as short integers (INTEGER*2). Invoking one of the short versions of this subroutine with an integer constant will result in unexpected behavior.

Description

The pnt subroutine draws a point in modeling coordinates. If the point is visible in the current viewport, it is shown as one pixel. The pixel is drawn in the current point attributes: color (if in depth-cue mode, the depth-cued color is used) and writemask. The pnt subroutine updates the current graphics position after it executes. A drawing routine immediately following the pnt subroutine will start drawing from the point specified.

The six different forms for the pnt subroutine are as follows:


2-D 3-D
Int16 pnt2s pnts
Int32 pnt2i pnti
float pnt2 pnt

The syntax for each of the subroutine forms is the same except for the parameter type. They differ only in that pnt expects real coordinates, pnti expects integer coordinates, and pnts expects short integer coordinates. In addition, the pnt2 routines assume a 2-D point instead of a 3-D point.

Parameters

x Specifies the x coordinate of the point.
y Specifies the y coordinate of the point.
z Specifies the z coordinate of the point.

Example

The example C language program depthcue.c uses the pnt subroutine to draw random points.

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

Drawing a line with the draw subroutine.

Moving the current graphics position to a specified point with the move subroutine.

AIX Graphics Library Overview, Drawing with Move-Draw Style Subroutines, Performing Depth-Cueing, Setting Drawing Attributes, and Working with Coordinate Systems.


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