Hi the list, I would like to draw some lines with misc3d. I find a lot of tools to draw surfaces, but nothing for simple line... Is it possible? Note that I know that it is possible to draw lines with rgl (using lines3d), but I need to do it with misc3d to export the drawing in .asy format. Any solution? Christophe
misc3d only knows about triangular mesh scenes. For our JSS paper we added pointsTetrahedra that represents data points as small terahedra. You could do something analogous by creating a triangular mesh representation of a long thin bar for your lines. luke On Mon, 19 Apr 2010, Christophe Genolini wrote:> Hi the list, > > I would like to draw some lines with misc3d. I find a lot of tools to draw > surfaces, but nothing for simple line... Is it possible? > Note that I know that it is possible to draw lines with rgl (using lines3d), > but I need to do it with misc3d to export the drawing in .asy format. > Any solution? > > Christophe > > ______________________________________________ > 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. >-- Luke Tierney Chair, Statistics and Actuarial Science Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke at stat.uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu
Thanks. I did write a function cuboid, then 3dLine for joining two points, then 3dLines for more points. I do create an asy file with your function saveTrianglesAsASY, then I include the scene.pre in the LaTeX file. So far, everything works fine. My last problem is that I did not manage to get the starting view I want. It seems very simple, but it does not work. To find what is wrong, I simply draw a cube from point (0,0,0) to (1,1,1), all edge 1. I want the center of the rotation to be at the center of the object, so I set 3Dcoo = 0.5 0.5 0.5 Then I want the camera to be at point 3 -1 2, so I set 3Dc2c = 2.5 -1.5 1.5 to set the axe of the vector ; and 3Droo=3 for the distance between 3Dcoo and 3Dc2c. But I guess that I did not understand something since it does not work at all... Any idea of what is wrong ? Christophe -- View this message in context: http://r.789695.n4.nabble.com/Drawing-a-line-with-misc3d-tp2016135p2071503.html Sent from the R help mailing list archive at Nabble.com.