Project Points onto Three-Dimensional Perspective Plots

DESCRIPTION:

Projects points onto a three-dimensional perspective plot, as plotted by persp.

USAGE:

perspp(x, y, z, from.persp) 

REQUIRED ARGUMENTS:

x
vector giving the x coordinates of points to be projected onto the current perspective plot.
y
vector of the y coordinates.
z
vector of the z coordinates.
from.persp
object returned from prior call to persp function.

VALUE:

plot structure containing components named x and y representing the projection of the input coordinates onto 2-dimensional coordinates that match the current perspective plot.

DETAILS:

The perspp function uses information returned by persp; hence perspp can be invoked only after a call to persp, while the graphics device containing the perspective plot is still open.

SEE ALSO:

, , .

EXAMPLES:

# perspective plot from the default viewpoint 
zout <- persp(switzerland)
# plot and label a high-elevation point  
points(perspp(11, 12 , switzerland[11,12], zout))   
text(perspp(11, 12, switzerland[11,12], zout), "High Point", adj = 0)