Hi all, I just started using the rgl package in R, and I need to know how I connect the dots I created. A simple line from one co?rdinate (x0,y0,z0) to another (x1,y1,z1) will do. I tried using the code rgl.lines, but it doesn't accept lines that don't stem from O (0,0,0). Please help! Thanks! -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-connect-dots-in-the-RGL-package-tp4633123.html Sent from the R help mailing list archive at Nabble.com.
On Jun 12, 2012, at 11:45 AM, Maaike_020 wrote:> Hi all, > > I just started using the rgl package in R, and I need to know how I > connect > the dots I created. A simple line from one co?rdinate (x0,y0,z0) to > another > (x1,y1,z1) will do. I tried using the code rgl.lines, but it doesn't > accept > lines that don't stem from O (0,0,0). Please help!The help page for rgl.lines makes clear that it is a low level function and that line3d is what regular users would be expected to use. > open3d() [1] 2 > points3d(rnorm(10),rnorm(10),rnorm(10)) > > # First add standard axes > axes3d() > lines3d( x=c(-1,1), y=c(-1,1), z=c(-1,1) ,col="red") David Winsemius, MD West Hartford, CT
David Winsemius wrote> > > > open3d() > [1] 2 > > points3d(rnorm(10),rnorm(10),rnorm(10)) > > > > # First add standard axes > > axes3d() > > lines3d( x=c(-1,1), y=c(-1,1), z=c(-1,1) ,col="red") >Thank you so much, it works! I have set a photo as a background by rgl.bg(sphere=TRUE, texture=system.file("textures/sunsleep.png", package="rgl"), back="filled" ) and now the lines barely have any color left (they turned really dark). Do you happen to know how I prevent this from happening? Anyway many thanks! Gr -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-connect-dots-in-the-RGL-package-tp4633123p4633305.html Sent from the R help mailing list archive at Nabble.com.
On Jun 13, 2012, at 4:28 PM, Maaike_020 wrote:> > David Winsemius wrote >> >> >>> open3d() >> [1] 2 >>> points3d(rnorm(10),rnorm(10),rnorm(10)) >>> >>> # First add standard axes >>> axes3d() >>> lines3d( x=c(-1,1), y=c(-1,1), z=c(-1,1) ,col="red") >> > > Thank you so much, it works! I have set a photo as a background by > > rgl.bg(sphere=TRUE, texture=system.file("textures/sunsleep.png", > package="rgl"), back="filled" ) > > and now the lines barely have any color left (they turned really > dark). Do > you happen to know how I prevent this from happening? Anyway many > thanks! GrAnd that is the only problem you see? The background is completely distracting the viewer from the data!!!! Yuck. This is a system for statistics. If you want to make movies go to Pixar. -- David David Winsemius, MD West Hartford, CT
David Winsemius wrote> > > And that is the only problem you see? The background is completely > distracting the viewer from the data!!!! Yuck. This is a system for > statistics. If you want to make movies go to Pixar. > >Wow... well ok.. -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-connect-dots-in-the-RGL-package-tp4633123p4633313.html Sent from the R help mailing list archive at Nabble.com.