-
Notifications
You must be signed in to change notification settings - Fork 56
/
ply_io.html
271 lines (234 loc) · 7.2 KB
/
ply_io.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<html>
<head>
<title>
PLY_IO - Read or Write a PLY File
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
PLY_IO <br> Read or Write a PLY File
</h1>
<hr>
<p>
<b>PLY_IO</b>
is a MATLAB library which
reads or writes data describing a polygonal mesh
in a <b>PLY</b> file.
</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>
<p>
A <b>TRI_MESH</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>
<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">
Languages:
</h3>
<p>
<b>PLY_IO</b> is available in
<a href = "../../c_src/ply_io/ply_io.html">a C version</a> and
<a href = "../../m_src/ply_io/ply_io.html">a MATLAB version</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 = "../../c_src/obj_to_ply/obj_to_ply.html">
OBJ_TO_PLY</a>,
a C program which
converts an
<a href = "../../data/obj/obj.html">Wavefront OBJ file</a>
to PLY format.
</p>
<p>
<a href = "../../c_src/plato_ply/plato_ply.html">
PLATO_PLY</a>,
a C program which
creates a Platonic solid
and writes it to an ASCII PLY file, by Greg Turk.
</p>
<p>
<a href = "../../data/ply/ply.html">
PLY</a>,
a data directory which
contains a description and examples of <b>PLY</b> 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_iv/ply_to_iv.html">
PLY_TO_IV</a>,
a C program which
converts a PLY file to INVENTOR 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 = "../../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 = "../../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 OpenGL.
</p>
<h3 align = "center">
Author:
</h3>
<p>
The original versions of the files <b>PLY_READ.M</b>. <b>PLY_WRITE.M</b>
and <b>PLY_TO_TRI_MESH.M</b> were created by Pascal Getreuer.
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "i4mat_transpose_print_some.m">i4mat_transpose_print_some.m</a>,
prints some of the transpose of an I4MAT.
</li>
<li>
<a href = "ply_read.m">ply_read.m</a>
reads a <b>PLY</b> file.
</li>
<li>
<a href = "ply_write.m">ply_write.m</a>
writes a <b>PLY</b> file.
</li>
<li>
<a href = "ply_to_tri_mesh.m">ply_to_tri_mesh.m</a>
converts <b>PLY</b> data to <b>TRI_MESH</b> data.
</li>
<li>
<a href = "r8mat_transpose_print_some.m">r8mat_transpose_print_some.m</a>,
prints some of the transpose of an R8MAT.
</li>
<li>
<a href = "s_len_trim.m">s_len_trim.m</a>
returns the length of a string to the last nonblank.
</li>
<li>
<a href = "timestamp.m">timestamp.m</a>
prints the current YMDHMS date as a time stamp.
</li>
<li>
<a href = "tri_mesh_to_ply.m">tri_mesh_to_ply.m</a>
converts <b>TRI_MESH</b> data to <b>PLY</b> data.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "ply_io_test.m">ply_io_test.m</a>
runs all the tests.
</li>
<li>
<a href = "ply_io_test_output.txt">ply_io_test_output.txt</a>
the output file.
</li>
<li>
<a href = "ply_io_test01.m">ply_io_test01.m</a>
converts data defining a pyramid as a triangular mesh into a PLY
data structure, and used <b>PLY_WRITE</b> to write it
to a file.
</li>
<li>
<a href = "ply_io_test02.m">ply_io_test02.m</a>
reads a <b>PLY</b> file defining a sphere, extracts the
data, and displays it.
</li>
<li>
<a href = "pyramid.ply">pyramid.ply</a>
the <b>PLY</b> file defining a pyramid.
</li>
<li>
<a href = "pyramide.png">pyramid.png</a>
a <a href = "../../data/png/png.html">PNG</b> image
of MATLAB's display of the pyramid.
</li>
<li>
<a href = "sphere.ply">sphere.ply</a>
the <b>PLY</b> file defining a sphere.
</li>
<li>
<a href = "sphere.png">sphere.png</a>
a <a href = "../../data/png/png.html">PNG</b> image
of MATLAB's display of the sphere.
</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 June 2007.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>