Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptranpt(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

TRANSFORM POINT(3P)  —  SUNPHIGS LIBRARY

NAME

TRANSFORM POINT  − apply a 2D transformation matrix to a specified 2D point

SYNOPSIS

C Syntax

void
ptranpt ( pt, matrix, error_ind, result )
Ppoint∗pt;point
Pmatrixmatrix;transformation matrix
Pint∗error_ind;OUT error indicator
Ppoint∗result;OUT transformed point

FORTRAN Syntax

SUBROUTINE ptp ( XI, YI, XFRMT, ERRIND, XO, YO )
REALXI, YIpoint
REALXFRMT(3, 3)transformation matrix
INTEGERERRINDOUT error indicator
REALXO, YOOUT transformed point

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

Use TRANSFORM POINT to calculate the transformed coordinates of a 2D point. 

C Input Parameters

ptA pointer to a Ppoint data structure containing the coordinates of the point to be transformed.  Ppoint is defined in phigs.h as follows:

typedef struct  {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;

matrixThe 3 x 3 homogeneous transformation matrix to apply to pt.  Pmatrix is defined in phigs.h as follows:

typedef PfloatPmatrix[3][3];

C Output Parameters

error_ind
A pointer to the location to store the error number of any error detected by this function.

resultA pointer to a Ppoint structure in which to store the coordinates of the transformed point. 

FORTRAN Input Parameters

XI, YIThe coordinates of the point to be transformed. 

XFRMT
The 3 x 3 homogeneous transformation matrix to apply to the point defined by (XI, YI). 

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

XO, YO
The coordinates of the transformed point.

Execution

TRANSFORM POINT applies the 3 x 3 homogeneous transformation matrix to the 2D point, and returns the coordinates of the resulting point: transformed point = matrix X point

ERRORS

002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)

SEE ALSO

SET LOCAL TRANSFORMATION 3 (3P)
ROTATE (3P)
SCALE (3P)
TRANSLATE (3P)
BUILD TRANSFORMATION MATRIX (3P)
COMPOSE TRANSFORMATION MATRIX (3P)
COMPOSE MATRIX (3P)
TRANSFORM POINT 3 (3P)

Sun Release 4.0  —  Last change: 2 August 1989

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