arrow3d | R Documentation |
Draws a 3D arrow in an rgl scene with barbs at the arrow head
arrow3d(
p0 = c(0, 0, 0),
p1 = c(1, 1, 1),
barblen,
s = 0.05,
theta = pi/6,
n = 3,
...
)
p0 |
Initial point (tail of arrow) |
p1 |
Ending point (head of arrow) |
barblen |
Length of each barb, in data units |
s |
length of barb as fraction of line length (unless barblen is specified) |
theta |
opening angle of barbs |
n |
number of barbs |
... |
args passed to lines3d for line styling, e.g., |
Returns (invisibly): integer ID of the line added to the scene
Barry Rowlingson, posted to R-help, 1/10/2010
lines3d
, segments3d
,
arrow3d(c(0,0,0), c(2,2,2), barblen=.2, lwd=3, col="black")
arrow3d(c(0,0,0), c(-2,2,2), barblen=.2, lwd=3, col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.