This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Mathematica Import/Export Format

PLY (.ply)

3D geometry format.
ASCII or binary format.
Used for storage and interchange of 3D graphical objects.
Known as Stanford Triangle Format.
PLY is an acronym derived from polygon.
Stores a 3D object as a collection of line and polygon primitives and their properties.
Allows user-defined format elements.
  • Import and Export fully support the ASCII and binary PLY file formats.
  • Import["file.ply", elem] imports the specified element from a PLY file.
  • Import["file.ply", {elem, suba, subb, ...}] imports a subelement.
  • Import["file.ply", {{elem1, elem2, ...}}] imports multiple elements.
  • The import format can be specified with Import["file","PLY"] or Import["file", {"PLY", elem, ...}].
  • Export["file.ply", expr, elem] creates a binary PLY file by treating expr as specifying element elem.
  • Export["file.ply", {expr1, expr2, ...}, {{elem1, elem2, ...}}] treats each expri as specifying the corresponding elemi.
  • Export["file.ply", expr, opt1->val1, ...] exports expr with the specified option elements taken to have the specified values.
  • Export["file.ply", {elem1->expr1, elem2->expr2, ...}, "Rules"] uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties and settings
  • Data representation elements:
"Graphics3D"PLY file represented as a Graphics3D object
"GraphicsComplex"PLY file as a GraphicsComplex object
"LineData"the line elements of a PLY file in indexed form, with integer indices referencing the vertices as given by "VertexData"
"LineObjects"list of Line primitives given in absolute coordinates
"PolygonData"the polygon elements in indexed form
"PolygonObjects"list of Polygon primitives given in absolute coordinates
"UserExtensions"used-defined data associated with polygon vertices
"VertexColors"colors associated with each vertex, given as a list of color primitives
"VertexData"list of vertex coordinates
"VertexNormals"normal vectors corresponding to the vertices given by "VertexData"
  • Import and Export use the "Graphics3D" element by default for PLY files.
  • The "VertexData" element corresponds to the first argument of GraphicsComplex.
  • When rendering a PLY color model, Import automatically uses the setting Lighting->"Neutral".
  • User-defined elements:
"VertexInformation"names of user-defined data fields, given as a list of strings
"VertexInformation",fielduser-defined data field as a list of values associated to each vertex as given by "VertexData"
BackgroundAutomaticwhat background color to use
ImageSizeAutomaticoverall size of the graphics to display
LightingAutomaticwhat simulated lighting to use in coloring 3D surfaces
  • Advanced options:
"BinaryFormat"Truewhether the file is in ASCII or binary format
"DataFormat"Automaticdata types used in the binary format
"InvertNormals"Falsewhether to invert the orientation of vertex normals
"VerticalAxis"{0,0,1}orientation to assume for the coordinate system used in the file
  • Binary PLY files normally store data as IEEE single-precision floating-point numbers, which correspond to the setting "DataFormat"->"Real32".
  • With the setting "DataFormat"->"Real34", vertices and normal vectors are stored as double-precision numbers.
  • The data types used for the vertex coordinates and for the normal vectors can be specified explicitly with "DataFormat" -> {vtype, ntype} or "DataFormat"-> {{vtypex, vtypey, vtypez}, {ntypex, ntypey, ntypez}}.
  • By default, Mathematica assumes that in the coordinate system used by the PLY format the vertical axis corresponds to the third coordinate.
  • With the setting "VerticalAxis"->{0, 1, 0}, Mathematica will apply the transformation {x, y, z}->{x, -z, y} to all graphics coordinates when importing from PLY, and the inverse transformation when exporting to PLY.