Re: [R] adding 3D arrows to 3D plots

2010-01-10 Thread Peter Ehlers
Cool, Barry. I set n=30, col="red" and stuck it into my daiquiri! -Peter Ehlers Barry Rowlingson wrote: Have a go with this: arrow3d <- function(p0=c(0,1,0),p1=c(1,1,1),s=0.1,theta=pi/4,n=3,...){ ##p0: start point ##p1: end point ## s: length of barb as fraction of line length

Re: [R] adding 3D arrows to 3D plots

2010-01-10 Thread Barry Rowlingson
Have a go with this: arrow3d <- function(p0=c(0,1,0),p1=c(1,1,1),s=0.1,theta=pi/4,n=3,...){ ##p0: start point ##p1: end point ## s: length of barb as fraction of line length ## theta: opening angle of barbs ## n: number of barbs ## ...: args passed to lines3d for line styli

Re: [R] adding 3D arrows to 3D plots

2010-01-07 Thread Duncan Murdoch
Eben J. Gering wrote: Greetings, I would like to add 3D arrows (i.e. arrow-headed vectors linking X1Y1Z1 to X2,Y2,Z2) to a 3D plot; ideally the sort of plot that can be rotated interactively. Is this possible using plot3d, or another 3d plotter in R? While it is easy to draw segments in plot3