arrows3D {compositions}  R Documentation 
arrows in 3D, based on package rgl
Description
adds 3dimensional arrows to an rgl plot.
Usage
arrows3D(...)
## Default S3 method:
arrows3D(x0,x1,...,length=0.25,
angle=30,code=2,col="black",
lty=NULL,lwd=2,orth=c(1,0.0001,0.0000001),
labs=NULL,size=lwd)
Arguments
x0 
a matrix or vector giving the starting points of the arrows 
x1 
a matrix or vector giving the end points of the arrows 
... 
additional plotting parameters as described in 
length 
a number giving the length of the arrowhead 
angle 
numeric giving the angle of the arrowhead 
code 
0=no arrowhead,1=arrowhead at x0,2=arrowhead at x1,3=double headed 
col 
the color of the arrow 
lty 
Not implemented, here for compatibility reasons with

lwd 
line width in pixels 
orth 
the flat side of the arrow is not unique by x0 and x1. This ambiguity is solved in a way that the arrow seams as wide as possible from the viewing direction orth. 
labs 
labels to be plotted to the endpoints of the arrows 
size 
size of the plotting symbol 
Details
The function is called to plot arrows into an rgl plot. The size of the arrow head is given in a absolute way. Therefore it is important to give the right scale for the length, to see the arrow head and that it does not fill the whole window.
Value
the 3D plotting coordinates of the tips of the arrows displayed, returned invisibly
Author(s)
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
See Also
plot3D
,
rgl::points3d
, graphics::plot
Examples
x < cbind(rnorm(10),rnorm(10),rnorm(10))
if(requireNamespace("rgl", quietly = TRUE)) {
plot3D(x)
x0 < x*0
arrows3D(x0,x)
} ## this function requires package 'rgl'