[10207] | 1 | <!-- Do not edit with Front Page, it adds too many spaces -->
|
---|
| 2 | <html>
|
---|
| 3 | <head>
|
---|
| 4 | <meta http-equiv="Content-Type"
|
---|
| 5 | content="text/html; charset=iso-8859-1">
|
---|
| 6 | <title>io.c -- input and output operations</title>
|
---|
| 7 | </head>
|
---|
| 8 |
|
---|
| 9 | <body>
|
---|
| 10 | <!-- Navigation links -->
|
---|
| 11 | <p><a name="TOP"><b>Up:</b></a> <a
|
---|
| 12 | href="http://www.qhull.org">Home page</a> for Qhull<br>
|
---|
| 13 | <b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual</a>: Table of Contents <br>
|
---|
| 14 | <b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
|
---|
| 15 | • <a href="../../html/qh-quick.htm#options">Options</a>
|
---|
| 16 | • <a href="../../html/qh-opto.htm#output">Output</a>
|
---|
| 17 | • <a href="../../html/qh-optf.htm#format">Formats</a>
|
---|
| 18 | • <a href="../../html/qh-optg.htm#geomview">Geomview</a>
|
---|
| 19 | • <a href="../../html/qh-optp.htm#print">Print</a>
|
---|
| 20 | • <a href="../../html/qh-optq.htm#qhull">Qhull</a>
|
---|
| 21 | • <a href="../../html/qh-optc.htm#prec">Precision</a>
|
---|
| 22 | • <a href="../../html/qh-optt.htm#trace">Trace</a><br>
|
---|
| 23 | <b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a><br>
|
---|
| 24 | <b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
|
---|
| 25 | <b>To:</b> <a href="qh-geom.htm">Geom</a> • <a href="qh-globa.htm">Global</a>
|
---|
| 26 | • <a href="qh-io.htm#TOC">Io</a> • <a href="qh-mem.htm">Mem</a>
|
---|
| 27 | • <a href="qh-merge.htm">Merge</a> • <a href="qh-poly.htm">Poly</a>
|
---|
| 28 | • <a href="qh-qhull.htm">Qhull</a> • <a href="qh-set.htm">Set</a>
|
---|
| 29 | • <a href="qh-stat.htm">Stat</a> • <a href="qh-user.htm">User</a>
|
---|
| 30 | </p>
|
---|
| 31 | <hr>
|
---|
| 32 |
|
---|
| 33 | <h2>io.c -- input and output operations</h2>
|
---|
| 34 | <blockquote>
|
---|
| 35 |
|
---|
| 36 | <p>Qhull provides a wide range of input
|
---|
| 37 | and output options. To organize the code, most output formats use
|
---|
| 38 | the same driver: </p>
|
---|
| 39 |
|
---|
| 40 | <pre>
|
---|
| 41 | qh_printbegin( fp, format, facetlist, facets, printall );
|
---|
| 42 |
|
---|
| 43 | FORALLfacet_( facetlist )
|
---|
| 44 | qh_printafacet( fp, format, facet, printall );
|
---|
| 45 |
|
---|
| 46 | FOREACHfacet_( facets )
|
---|
| 47 | qh_printafacet( fp, format, facet, printall );
|
---|
| 48 |
|
---|
| 49 | qh_printend( fp, format );
|
---|
| 50 | </pre>
|
---|
| 51 |
|
---|
| 52 | <p>Note the 'printall' flag. It selects whether or not
|
---|
| 53 | qh_skipfacet() is tested. </p>
|
---|
| 54 |
|
---|
| 55 | </blockquote>
|
---|
| 56 | <p><b>Copyright © 1995-2012 C.B. Barber</b></p>
|
---|
| 57 | <hr>
|
---|
| 58 | <p><a href="#TOP">»</a> <a href="qh-geom.htm#TOC">Geom</a> <a name="TOC">•</a>
|
---|
| 59 | <a href="qh-globa.htm#TOC">Global</a> • <b>Io</b> •
|
---|
| 60 | <a href="qh-mem.htm#TOC">Mem</a> • <a href="qh-merge.htm#TOC">Merge</a> •
|
---|
| 61 | <a href="qh-poly.htm#TOC">Poly</a> • <a href="qh-qhull.htm#TOC">Qhull</a> •
|
---|
| 62 | <a href="qh-set.htm#TOC">Set</a> • <a href="qh-stat.htm#TOC">Stat</a> •
|
---|
| 63 | <a href="qh-user.htm#TOC">User</a> </p>
|
---|
| 64 |
|
---|
| 65 | <h3>Index to <a href="io.c">io.c</a> and <a href="io.h">io.h</a></h3>
|
---|
| 66 |
|
---|
| 67 | <ul>
|
---|
| 68 | <li><a href="#iconst">io.h constants and types</a> </li>
|
---|
| 69 | <li><a href="#ilevel">User level functions</a> </li>
|
---|
| 70 | <li><a href="#iprint">Print functions for all output formats</a></li>
|
---|
| 71 | <li><a href="#itext">Text output functions</a> </li>
|
---|
| 72 | <li><a href="#iutil">Text utility functions</a></li>
|
---|
| 73 | <li><a href="#igeom">Geomview output functions</a> </li>
|
---|
| 74 | <li><a href="#iview">Geomview utility functions</a></li>
|
---|
| 75 | </ul>
|
---|
| 76 |
|
---|
| 77 | <h3><a href="qh-io.htm#TOC">»</a><a name="iconst">io.h constants and types</a></h3>
|
---|
| 78 |
|
---|
| 79 | <ul>
|
---|
| 80 | <li><a href="io.h#qh_MAXfirst">qh_MAXfirst</a> maximum length
|
---|
| 81 | of first two lines of stdin </li>
|
---|
| 82 | <li><a href="io.h#qh_WHITESPACE">qh_WHITESPACE</a> possible
|
---|
| 83 | values of white space </li>
|
---|
| 84 | <li><a href="io.h#printvridgeT">printvridgeT</a> function to
|
---|
| 85 | print results of qh_printvdiagram or qh_eachvoronoi</li>
|
---|
| 86 | </ul>
|
---|
| 87 |
|
---|
| 88 | <h3><a href="qh-io.htm#TOC">»</a><a name="ilevel">User level functions</a></h3>
|
---|
| 89 |
|
---|
| 90 | <ul>
|
---|
| 91 | <li><a href="io.c#copyfilename">qh_copyfilename</a>
|
---|
| 92 | copy filename identified by qh_skipfilename
|
---|
| 93 | <li><a href="io.c#eachvoronoi_all">qh_eachvoronoi_all</a>
|
---|
| 94 | visit each Voronoi ridge of the Voronoi diagram
|
---|
| 95 | <li><a href="io.c#prepare_output">qh_prepare_output</a>
|
---|
| 96 | prepare Qhull for output (called by qh_produce_output())
|
---|
| 97 | <li><a href="io.c#printhelp_degenerate">qh_printhelp_degenerate</a>
|
---|
| 98 | prints descriptive message for precision error </li>
|
---|
| 99 | <li><a href="io.c#printhelp_singular">qh_printhelp_singular</a>
|
---|
| 100 | print help message for singular data </li>
|
---|
| 101 | <li><a href="libqhull.c#printsummary">qh_printsummary</a> print
|
---|
| 102 | summary ('s')</li>
|
---|
| 103 | <li><a href="io.c#produce_output">qh_produce_output</a>
|
---|
| 104 | prints out the result of qhull()</li>
|
---|
| 105 | <li><a href="io.c#produce_output">qh_produce_output2</a>
|
---|
| 106 | prints out the result of qhull() without calling qh_prepare_output()</li>
|
---|
| 107 | <li><a href="io.c#readfeasible">qh_readfeasible</a> read
|
---|
| 108 | interior point from remainder and qh fin ('H')</li>
|
---|
| 109 | <li><a href="io.c#readpoints">qh_readpoints</a> read input
|
---|
| 110 | points </li>
|
---|
| 111 | <li><a href="io.c#setfeasible">qh_setfeasible</a> set
|
---|
| 112 | interior point from qh feasible_string ('Hn,n,n')</li>
|
---|
| 113 | <li><a href="io.c#skipfilename">qh_skipfilename</a>
|
---|
| 114 | skip filename in string
|
---|
| 115 | </ul>
|
---|
| 116 |
|
---|
| 117 | <h3><a href="qh-io.htm#TOC">»</a><a name="iprint">Print functions for all
|
---|
| 118 | output formats</a></h3>
|
---|
| 119 |
|
---|
| 120 | <ul>
|
---|
| 121 | <li><a href="io.c#countfacets">qh_countfacets</a> count good
|
---|
| 122 | facets for printing and set visitid </li>
|
---|
| 123 | <li><a href="io.c#markkeep">qh_markkeep</a> mark good facets
|
---|
| 124 | that meet qh.KEEParea ('PAn'), qh.KEEPmerge ('PMn'), and qh.KEEPminArea ('PFn')</li>
|
---|
| 125 | <li><a href="io.c#order_vertexneighbors">qh_order_vertexneighbors</a>
|
---|
| 126 | order neighbors for a 3-d vertex by adjacency ('i', 'o')</li>
|
---|
| 127 | <li><a href="io.c#printafacet">qh_printafacet</a> print facet
|
---|
| 128 | in an output format </li>
|
---|
| 129 | <li><a href="io.c#printbegin">qh_printbegin</a> print header
|
---|
| 130 | for an output format </li>
|
---|
| 131 | <li><a href="io.c#printend">qh_printend</a> print trailer for
|
---|
| 132 | an output format </li>
|
---|
| 133 | <li><a href="user.c#printfacetlist">qh_printfacetlist</a>
|
---|
| 134 | print facets in a facetlist</li>
|
---|
| 135 | <li><a href="io.c#printfacets">qh_printfacets</a> print
|
---|
| 136 | facetlist and/or facet set in an output format </li>
|
---|
| 137 | <li><a href="io.c#printneighborhood">qh_printneighborhood</a>
|
---|
| 138 | print neighborhood of one or two facets ('Po')</li>
|
---|
| 139 | <li><a href="io.c#produce_output">qh_produce_output</a>
|
---|
| 140 | print the results of qh_qhull() </li>
|
---|
| 141 | <li><a href="io.c#skipfacet">qh_skipfacet</a> True if not
|
---|
| 142 | printing this facet ('Pdk:n', 'QVn', 'QGn')</li>
|
---|
| 143 | <li><a href="io.c#facetvertices">qh_facetvertices</a> return
|
---|
| 144 | vertices in a set of facets ('p')</li>
|
---|
| 145 | </ul>
|
---|
| 146 |
|
---|
| 147 | <h3><a href="qh-io.htm#TOC">»</a><a name="itext">Text output functions</a></h3>
|
---|
| 148 | <ul>
|
---|
| 149 | <li><a href="io.c#eachvoronoi">qh_eachvoronoi</a>
|
---|
| 150 | print or visit each Voronoi ridge for an input site of the Voronoi diagram
|
---|
| 151 | <li><a href="io.c#printextremes">qh_printextremes</a> print
|
---|
| 152 | extreme points by point ID (vertices of convex hull) ('Fx')</li>
|
---|
| 153 | <li><a href="io.c#printextremes_2d">qh_printextremes_2d</a> print
|
---|
| 154 | 2-d extreme points by point ID ('Fx')</li>
|
---|
| 155 | <li><a href="io.c#printextremes_d">qh_printextremes_d</a> print
|
---|
| 156 | extreme points of input sites for Delaunay triangulations ('Fx')</li>
|
---|
| 157 | <li><a href="io.c#printfacet">qh_printfacet</a> print all
|
---|
| 158 | fields of a facet ('f')</li>
|
---|
| 159 | <li><a href="io.c#printfacet2math">qh_printfacet2math</a> print
|
---|
| 160 | 2-d Maple or Mathematica output for a facet ('FM' or 'm')</li>
|
---|
| 161 | <li><a href="io.c#printfacet3math">qh_printfacet3math</a>
|
---|
| 162 | print 3-d Maple or Mathematica facet ('FM' or 'm')</li>
|
---|
| 163 | <li><a href="io.c#printfacet3vertex">qh_printfacet3vertex</a>
|
---|
| 164 | print vertices for a 3-d facet ('i', 'o')</li>
|
---|
| 165 | <li><a href="io.c#printfacetheader">qh_printfacetheader</a>
|
---|
| 166 | prints header fields of a facet ('f')</li>
|
---|
| 167 | <li><a href="io.c#printfacetNvertex_nonsimplicial">qh_printfacetNvertex_nonsimplicial</a>
|
---|
| 168 | print vertices for an N-d non-simplicial facet ('i', 'Ft')</li>
|
---|
| 169 | <li><a href="io.c#printfacetNvertex_simplicial">qh_printfacetNvertex_simplicial</a>
|
---|
| 170 | print vertices for an N-d simplicial facet ('i', 'o', 'Ft')</li>
|
---|
| 171 | <li><a href="io.c#printfacetridges">qh_printfacetridges</a>
|
---|
| 172 | prints ridges of a facet ('f')</li>
|
---|
| 173 | <li><a href="io.c#printpoints_out">qh_printpoints_out</a> prints
|
---|
| 174 | vertices for facets by their point coordinates ('p')</li>
|
---|
| 175 | <li><a href="io.c#printridge">qh_printridge</a> print all
|
---|
| 176 | fields for a ridge ('f')</li>
|
---|
| 177 | <li><a href="io.c#printvdiagram">qh_printvdiagram</a> print
|
---|
| 178 | voronoi diagram as Voronoi vertices for each input pair</li>
|
---|
| 179 | <li><a href="io.c#printvertex">qh_printvertex</a> print all
|
---|
| 180 | fields for a vertex ('f')</li>
|
---|
| 181 | <li><a href="io.c#printvertexlist">qh_printvertexlist</a>
|
---|
| 182 | print vertices used by a list or set of facets ('f')</li>
|
---|
| 183 | <li><a href="io.c#printvertices">qh_printvertices</a> print a
|
---|
| 184 | set of vertices ('f')</li>
|
---|
| 185 | <li><a href="io.c#printvneighbors">qh_printvneighbors</a>
|
---|
| 186 | print vertex neighbors of vertices ('FN')</li>
|
---|
| 187 | <li><a href="io.c#printvoronoi">qh_printvoronoi</a> print
|
---|
| 188 | voronoi diagram in 'o' or 'G' format</li>
|
---|
| 189 | </ul>
|
---|
| 190 |
|
---|
| 191 | <h3><a href="qh-io.htm#TOC">»</a><a name="iutil">Text utility functions</a></h3>
|
---|
| 192 | <ul>
|
---|
| 193 | <li><a href="io.c#dfacet">dfacet</a> print facet by ID </li>
|
---|
| 194 | <li><a href="io.c#dvertex">dvertex</a> print vertex by ID </li>
|
---|
| 195 | <li><a href="io.c#compare_facetarea">qh_compare_facetarea</a>
|
---|
| 196 | used by qsort() to order facets by area </li>
|
---|
| 197 | <li><a href="io.c#compare_facetmerge">qh_compare_facetmerge</a>
|
---|
| 198 | used by qsort() to order facets by number of merges </li>
|
---|
| 199 | <li><a href="io.c#compare_facetvisit">qh_compare_facetvisit</a>
|
---|
| 200 | used by qsort() to order facets by visit ID or ID </li>
|
---|
| 201 | <li><a href="io.c#compare_vertexpoint">qh_compare_vertexpoint</a>
|
---|
| 202 | used by qsort() to order vertices by point ID </li>
|
---|
| 203 | <li><a href="io.c#detvnorm">qh_detvnorm</a> determine normal for Voronoi ridge </li>
|
---|
| 204 | <li><a href="io.c#detvridge">qh_detvridge</a> determine Voronoi
|
---|
| 205 | ridge for an input site
|
---|
| 206 | <li><a href="io.c#detvridge3">qh_detvridge3</a> determine 3-d Voronoi
|
---|
| 207 | ridge for an input site
|
---|
| 208 | <li><a href="io.c#facet2point">qh_facet2point</a> return two
|
---|
| 209 | projected temporary vertices for a 2-d facet ('m', 'G')</li>
|
---|
| 210 | <li><a href="io.c#markvoronoi">qh_markvoronoi</a> mark Voronoi
|
---|
| 211 | vertices for printing
|
---|
| 212 | <li><a href="io.c#printcenter">qh_printcenter</a> print
|
---|
| 213 | facet->center as centrum or Voronoi center ('Ft', 'v p', 'FC', 'f') </li>
|
---|
| 214 | <li><a href="io.c#printpoint">qh_printpoint</a>, qh_printpointid, print
|
---|
| 215 | coordinates of a point ('p', 'o', 'Fp', 'G', 'f')</li>
|
---|
| 216 | <li><a href="io.c#printpoint3">qh_printpoint3</a> prints 2-d,
|
---|
| 217 | 3-d, or 4-d point as 3-d coordinates ('G')</li>
|
---|
| 218 | <li><a href="io.c#printvdiagram2">qh_printvdiagram2</a> print
|
---|
| 219 | voronoi diagram for each ridge of each vertex from qh_markvoronoi</li>
|
---|
| 220 | <li><a href="io.c#printvnorm">qh_printvnorm</a> print
|
---|
| 221 | separating plane of the Voronoi diagram for a pair of input sites</li>
|
---|
| 222 | <li><a href="io.c#printvridge">qh_printvridge</a> print
|
---|
| 223 | ridge of the Voronoi diagram for a pair of input sites</li>
|
---|
| 224 | <li><a href="io.c#projectdim3">qh_projectdim3</a> project 2-d
|
---|
| 225 | 3-d or 4-d point to a 3-d point ('G')</li>
|
---|
| 226 | </ul>
|
---|
| 227 |
|
---|
| 228 | <h3><a href="qh-io.htm#TOC">»</a><a name="igeom">Geomview output functions</a></h3>
|
---|
| 229 | <ul>
|
---|
| 230 | <li><a href="io.c#printfacet2geom">qh_printfacet2geom</a>
|
---|
| 231 | print facet as a 2-d VECT object </li>
|
---|
| 232 | <li><a href="io.c#printfacet2geom_points">qh_printfacet2geom_points</a>
|
---|
| 233 | print points as a 2-d VECT object with offset </li>
|
---|
| 234 | <li><a href="io.c#printfacet3geom_nonsimplicial">qh_printfacet3geom_nonsimplicial</a>
|
---|
| 235 | print Geomview OFF for a 3-d nonsimplicial facet. </li>
|
---|
| 236 | <li><a href="io.c#printfacet3geom_points">qh_printfacet3geom_points</a>
|
---|
| 237 | prints a 3-d facet as OFF Geomview object. </li>
|
---|
| 238 | <li><a href="io.c#printfacet3geom_simplicial">qh_printfacet3geom_simplicial</a>
|
---|
| 239 | print Geomview OFF for a 3-d simplicial facet. </li>
|
---|
| 240 | <li><a href="io.c#printfacet4geom_nonsimplicial">qh_printfacet4geom_nonsimplicial</a>
|
---|
| 241 | print Geomview 4OFF file for a 4d nonsimplicial facet </li>
|
---|
| 242 | <li><a href="io.c#printfacet4geom_simplicial">qh_printfacet4geom_simplicial</a>
|
---|
| 243 | print Geomview 4OFF file for a 4d simplicial facet </li>
|
---|
| 244 | <li><a href="io.c#printhyperplaneintersection">qh_printhyperplaneintersection</a>
|
---|
| 245 | print hyperplane intersection as OFF or 4OFF </li>
|
---|
| 246 | <li><a href="io.c#printvoronoi">qh_printvoronoi</a> print
|
---|
| 247 | voronoi diagram in 'o' or 'G' format</li>
|
---|
| 248 | </ul>
|
---|
| 249 | <h3><a href="qh-io.htm#TOC">»</a><a name="iview">Geomview utility functions</a></h3>
|
---|
| 250 | <ul>
|
---|
| 251 | <li><a href="io.c#geomplanes">qh_geomplanes</a>
|
---|
| 252 | return outer and inner planes for Geomview</li>
|
---|
| 253 | <li><a href="io.c#printcentrum">qh_printcentrum</a> print
|
---|
| 254 | centrum for a facet in OOGL format </li>
|
---|
| 255 | <li><a href="io.c#printend4geom">qh_printend4geom</a> helper
|
---|
| 256 | function for qh_printbegin/printend </li>
|
---|
| 257 | <li><a href="io.c#printhyperplaneintersection">qh_printhyperplaneintersection</a>
|
---|
| 258 | print Geomview OFF or 4OFF for the intersection of two
|
---|
| 259 | hyperplanes in 3-d or 4-d </li>
|
---|
| 260 | <li><a href="io.c#printline3geom">qh_printline3geom</a> prints a
|
---|
| 261 | line as a VECT </li>
|
---|
| 262 | <li><a href="io.c#printpointvect">qh_printpointvect</a>
|
---|
| 263 | prints a 2-d or 3-d point as 3-d VECT's </li>
|
---|
| 264 | <li><a href="io.c#printpointvect2">qh_printpointvect2</a>
|
---|
| 265 | prints a 2-d or 3-d point as 2 3-d VECT's </li>
|
---|
| 266 | <li><a href="io.c#printspheres">qh_printspheres</a> prints 3-d
|
---|
| 267 | vertices as OFF spheres </li>
|
---|
| 268 | </ul>
|
---|
| 269 | <p>
|
---|
| 270 | <p><!-- Navigation links --> </p>
|
---|
| 271 | <hr>
|
---|
| 272 | <p><b>Up:</b>
|
---|
| 273 | <a href="http://www.qhull.org">Home page for
|
---|
| 274 | Qhull</a> <br>
|
---|
| 275 | <b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual: Table of Contents</a> <br>
|
---|
| 276 | <b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
|
---|
| 277 | • <a href="../../html/qh-quick.htm#options">Options</a>
|
---|
| 278 | • <a href="../../html/qh-opto.htm#output">Output</a>
|
---|
| 279 | • <a href="../../html/qh-optf.htm#format">Formats</a>
|
---|
| 280 | • <a href="../../html/qh-optg.htm#geomview">Geomview</a>
|
---|
| 281 | • <a href="../../html/qh-optp.htm#print">Print</a>
|
---|
| 282 | • <a href="../../html/qh-optq.htm#qhull">Qhull</a>
|
---|
| 283 | • <a href="../../html/qh-optc.htm#prec">Precision</a>
|
---|
| 284 | • <a href="../../html/qh-optt.htm#trace">Trace</a><br>
|
---|
| 285 | <b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a> <br>
|
---|
| 286 | <b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
|
---|
| 287 | <b>To:</b> <a href="qh-geom.htm">Geom</a> •
|
---|
| 288 | <a href="qh-globa.htm">Global</a> • <a href="qh-io.htm">Io</a>
|
---|
| 289 | • <a href="qh-mem.htm">Mem</a> • <a href="qh-merge.htm">Merge</a>
|
---|
| 290 | • <a href="qh-poly.htm">Poly</a> • <a href="qh-qhull.htm#TOC">Qhull</a>
|
---|
| 291 | • <a href="qh-set.htm">Set</a> • <a href="qh-stat.htm">Stat</a>
|
---|
| 292 | • <a href="qh-user.htm">User</a><br>
|
---|
| 293 | </p>
|
---|
| 294 | <p><!-- GC common information --> </p>
|
---|
| 295 | <hr>
|
---|
| 296 | <p><a href="http://www.geom.uiuc.edu/"><img
|
---|
| 297 | src="../../html/qh--geom.gif" align="middle" width="40" height="40"></a><i>The
|
---|
| 298 | Geometry Center Home Page </i></p>
|
---|
| 299 | <p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
|
---|
| 300 | </a><br>
|
---|
| 301 | Created: May 2, 1997 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
|
---|
| 302 | </body>
|
---|
| 303 | </html>
|
---|