[R] joining two points in rgl

Duncan Murdoch murdoch at stats.uwo.ca
Fri Aug 14 02:24:11 CEST 2009

Nair, Murlidharan T wrote:
> Hi!!
> I need to draw a cylinder/tube joining two points. I am trying to make something presentable, I have been able to do it using lines3d. But is it possible to 
> increase the thickness of the lines? The size parameter does not work. Does any one have any suggestions?
There's a new function cylinder3d  (in rgl 0.85) that probably does 
exactly what you want, but lwd is the parameter that controls line width.

Duncan Murdoch
> Thanks ../Murli
> library(rgl)
> pts<-structure(list(x = c(-0.975688, -0.975688), y = c(9.258795, -9.258795
> ), z = c(-1.8, 1.8)), .Names = c("x", "y", "z"), class = "data.frame", row.names = c(NA,
> -2L))
> plot3d(pts$x,pts$y,pts$z, col="grey", size=2, box=FALSE, axes=FALSE, type="s")
> lines3d(pts$x,pts$y,pts$z, col="grey", size=2)
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list