trans3d

3D to 2D Transformation for Perspective Plots

Projection of 3-dimensional to 2-dimensional points using a 4x4 viewing transformation matrix. Mainly for adding to perspective plots such as persp.

Keywords
dplot
Usage
trans3d(x, y, z, pmat)
Arguments
x, y, z

numeric vectors of equal length, specifying points in 3D space.

pmat

a \(4 \times 4\) viewing transformation matrix, suitable for projecting the 3D coordinates \((x,y,z)\) into the 2D plane using homogeneous 4D coordinates \((x,y,z,t)\); such matrices are returned by persp().

Value

a list with two components

x,y

the projected 2d coordinates of the 3d input (x,y,z).

See Also

persp

Aliases
  • trans3d
Examples
library(grDevices) <!-- %% it would be nice to have an independent example --> ## See help(persp) {after attaching the 'graphics' package} ## -----------
Documentation reproduced from package grDevices, version 3.4.1, License: Part of R 3.4.1

Community examples

Looks like there are no examples yet.