writePLY
function
does the necessary conversions.writePLY(con, format = c("little_endian", "big_endian", "ascii"), pointRadius = 0.005, pointShape = icosahedron3d(), lineRadius = pointRadius, lineSides = 20, pointsAsEdges = FALSE, linesAsEdges = pointsAsEdges, withColors = TRUE, withNormals = !(pointsAsEdges || linesAsEdges), ids = NULL)
pointRadius
.
rgl.ids
) of the
objects to write. If NULL
, try to write everything.
The defaults for pointsAsEdges
and linesAsEdges
have been
chosen because Blender (http://www.blender.org) does not import
lines, only polygons. If you are exporting to other software you
may want to change them.
Since the PLY format only allows one object per file, all RGL objects are combined into a single object when output.
The output file is readable by Blender and Meshlab; the latter can write in a number of other formats, including U3D, suitable for import into a PDF document.
scene3d
saves a copy of a scene to an R variable;
writeWebGL
, writeASY
, writeOBJ
and writeSTL
write the scene to a file in various other formats.
filename <- tempfile(fileext = ".ply")
open3d()
shade3d( icosahedron3d(col = "magenta") )
writePLY(filename)
Run the code above in your browser using DataLab