<html>

  <head>
    <title>
      TRI_SURFACE_TO_PLY - Convert data from TRI_SURFACE to PLY format
    </title>
  </head>

  <body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">

    <h1 align = "center">
      TRI_SURFACE_TO_PLY <br> Convert data from TRI_SURFACE to PLY format
    </h1>

    <hr>

    <p>
      <b>TRI_SURFACE_TO_PLY</b>
      is a MATLAB program which
      reads data describing a triangular mesh of a 3D surface,
      reformats it into a PLY data structure,
      and then writes it to a PLY file.
    </p>

    <p>
      A <b>TRI_SURFACE</b> or triangulated mesh surface, is described by a
      pair of arrays:
      <ul>
        <li>
          a <b>node coordinate</b> array containing the coordinates of nodes;
        </li>
        <li>
          a <b>triangle node</b> array containing triples of the indices
          of the nodes used to form each triangle;
        </li>
      </ul>
    </p>

    <p>
      A <b>PLY</b> file contains a sophisticated data structure describing
      a polygonal surface.  A triangulated mesh is a very simply case of
      such a surface; a <b>PLY</b> file can also describe a mesh surface
      involving higher order polygons, and it can contain auxilliary
      information about normal vectors and so on.
    </p>

    <h3 align = "center">
      Usage:
    </h3>

    <p>
      <blockquote>
        <b>tri_surface_to_ply</b> ( <i>prefix</i> )
      </blockquote>
      where
      <ul>
        <li>
          <i>prefix</i><b>_nodes.txt</b> contains the node coordinates.
        </li>
        <li>
          <i>prefix</i><b>_elements.txt</b> contains the indices of nodes
          forming each triangular element.
        </li>
        <li>
          <i>prefix</i><b>.ply</b> is the PLY file created by the command.
        </li>
      </ul>
    </p>

    <h3 align = "center">
      Licensing:
    </h3>

    <p>
      The computer code and data files described and made available on this web page
      are distributed under
      <a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
    </p>

    <h3 align = "center">
      Related Data and Programs:
    </h3>

    <p>
      <a href = "../../m_src/bezier_surface_display/bezier_surface_display.html">
      BEZIER_SURFACE_DISPLAY</a>,
      a MATLAB program which
      reads two files defining a Bezier surface and displays it.
    </p>

    <p>
      <a href = "../../m_src/fem_basis_t3_display/fem_basis_t3_display.html">
      FEM_BASIS_T3_DISPLAY</a>,
      a MATLAB program which
      displays a
      basis function associated with a linear triangle ("T3") mesh.
    </p>

    <p>
      <a href = "../../m_src/fem_basis_t6_display/fem_basis_t6_display.html">
      FEM_BASIS_T6_DISPLAY</a>,
      a MATLAB program which
      reads a quadratic
      triangle mesh and displays any associated basis function.
    </p>

    <p>
      <a href = "../../data/ply/ply.html">
      PLY</a>,
      a data directory which
      contains a description and examples of PLY files.
    </p>

    <p>
      <a href = "../../m_src/ply_display/ply_display.html">
      PLY_DISPLAY</a>,
      a MATLAB program which
      displays an image of a 3D graphics file in PLY format;
    </p>

    <p>
      <a href = "../../c_src/ply_to_obj/ply_to_obj.html">
      PLY_TO_OBJ</a>,
      a C program which
      reads a PLY 3D graphics file and writes an equivalent OBJ graphics file.
    </p>

    <p>
      <a href = "../../m_src/ply_to_tri_surface/ply_to_tri_surface.html">
      PLY_TO_TRI_SURFACE</a>,
      a MATLAB program which
      can read a <b>PLY</b> file, extract
      the polygonal surface information, and return it as a
      TRI_SURFACE dataset.
    </p>

    <p>
      <a href = "../../data/polygonal_surface/polygonal_surface.html">
      POLYGONAL_SURFACE</a>,
      a data directory which
      contains examples of polygonal surface files.
    </p>

    <p>
      <a href = "../../m_src/stla_display/stla_display.html">
      STLA_DISPLAY</a>,
      a MATLAB program which
      reads an ASCII <b>STL</b>
      file and displays it.
    </p>

    <p>
      <a href = "../../data/tri_surface/tri_surface.html">
      TRI_SURFACE</a>,
      a data directory which
      contains examples of TRI_SURFACE files.
    </p>

    <p>
      <a href = "../../m_src/tri_surface_display/tri_surface_display.html">
      TRI_SURFACE_DISPLAY</a>,
      a MATLAB program which
      can display a TRI_SURFACE.
    </p>

    <p>
      <a href = "../../m_src/tri_surface_io/tri_surface_io.html">
      TRI_SURFACE_IO</a>,
      a MATLAB library which
      reads and writes the 3D graphics information
      in a TRI_SURFACE file;
    </p>

    <p>
      <a href = "../../m_src/tri_surface_to_obj/tri_surface_to_obj.html">
      TRI_SURFACE_TO_OBJ</a>,
      a MATLAB program which
      reads a TRI_SURFACE dataset and extracts
      the surface mesh data as an OBJ file.
    </p>

    <p>
      <a href = "../../m_src/tri_surface_to_stla/tri_surface_to_stla.html">
      TRI_SURFACE_TO_STLA</a>,
      a MATLAB program which
      reads a TRI_SURFACE dataset and extracts
      the surface mesh data as an ASCII STL file.
    </p>

    <p>
      <a href = "../../cpp_src/triangulation_display_opengl/triangulation_display_opengl.html">
      TRIANGULATION_DISPLAY_OPENGL</a>,
      a C++ program which
      reads files defining a triangulation and displays an image
      using Open GL.
    </p>

    <h3 align = "center">
      Author:
    </h3>

    <p>
      The functions <b>PLY_WRITE.M</b> and <b>TRI_SURFACE_DATA_TO_PLY_DATA</b> were
      created by Pascal Getreuer.
    </p>

    <h3 align = "center">
      Source Code:
    </h3>

    <p>
      <ul>
        <li>
          <a href = "tri_surface_to_ply.m">tri_surface_to_ply.m</a>
          the program.
        </li>
      </ul>
    </p>

    <h3 align = "center">
      Examples and Tests:
    </h3>

    <p>
      <b>DART</b> is a simple dart shape, involving 5 nodes and 6 triangular faces.
      <ul>
        <li>
          <a href = "../../data/tri_surface/dart_nodes.txt">
          dart_nodes.txt</a>, the node file;
        </li>
        <li>
          <a href = "../../data/tri_surface/dart_elements.txt">
          dart_elements.txt</a>, the triangle file;
        </li>
        <li>
          <a href = "../../data/ply/dart.ply">
          dart.ply</a>, the PLY file;
        </li>
        <li>
          <a href = "../../data/tri_surface/dart.png">
          dart.png</a>,
          a PNG image.
        </li>
      </ul>
    </p>

    <p>
      You can go up one level to <a href = "../m_src.html">
      the MATLAB source codes</a>.
    </p>

    <hr>

    <i>
      Last revised on 25 May 2012.

    </i>

    <!-- John Burkardt -->

  </body>

  <!-- Initial HTML skeleton created by HTMLINDEX. -->

</html>