On 6/10/2009 1:44 PM, kapo coulibaly wrote:
I'm trying to make sense of the following example in the package rgl:vertices <- c( -1.0, -1.0, 0, 1.0, 1.0, -1.0, 0, 1.0, 1.0, 1.0, 0, 1.0, -1.0, 1.0, 0, 1.0 ) indices <- c( 1, 2, 3, 4 ) open3d() wire3d( qmesh3d(vertices,indices) ) One would think that each vertex would have 3 coordinates (x,y,z) what does the fourth one in the definition of the variable vertices stand for.
By default qmesh3d uses 4-coordinate homogeneous coordinates, because that's the coordinate system used by OpenGL. See the ?rgl::matrices help topic for a description of how they work.
Duncan Murdoch ______________________________________________ [email protected] 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.

