[R] joining two points in rgl

Nair, Murlidharan T mnair at iusb.edu
Fri Aug 14 22:14:04 CEST 2009


Thanks, for lwd. I could not find rgl 0.85. The latest one I saw was 0.84. Can you tell me where I can download it from? 
Also, is there  a curve3d? I need to join two points in 3d smoothly. 
Thanks ../Murli


-----Original Message-----
From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca] 
Sent: Thursday, August 13, 2009 8:24 PM
To: Nair, Murlidharan T
Cc: r-help at r-project.org
Subject: Re: [R] joining two points in rgl

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