[gts] 01/25: Import Upstream version 0.5.1

Andreas Tille tille at debian.org
Tue Jan 31 12:40:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository gts.

commit 7081c264fc883e2b4874171a6d2c24c514e24f1a
Author: Andreas Tille <tille at debian.org>
Date:   Tue Jan 31 11:38:43 2017 +0100

    Import Upstream version 0.5.1
---
 AUTHORS                                            |     7 +
 COPYING                                            |   482 +
 ChangeLog                                          |   517 +
 INSTALL                                            |   182 +
 Makefile.am                                        |     3 +
 Makefile.in                                        |   378 +
 NEWS                                               |    96 +
 README                                             |    66 +
 THANKS                                             |    17 +
 TODO                                               |    35 +
 acconfig.h                                         |    59 +
 acinclude.m4                                       |   197 +
 aclocal.m4                                         |   772 +
 config.guess                                       |  1121 +
 config.h.in                                        |    35 +
 config.sub                                         |  1232 +
 configure                                          |  3052 +++
 configure.in                                       |   184 +
 doc/Makefile.am                                    |    41 +
 doc/Makefile.in                                    |   231 +
 doc/html/book1.html                                |   337 +
 doc/html/c11561.html                               |   238 +
 doc/html/c12040.html                               |   238 +
 doc/html/c13060.html                               |   238 +
 doc/html/c13676.html                               |   238 +
 doc/html/c1865.html                                |   300 +
 doc/html/c1908.html                                |   300 +
 doc/html/c4.html                                   |   248 +
 doc/html/c8089.html                                |   228 +
 doc/html/c8393.html                                |   228 +
 doc/html/c9511.html                                |   243 +
 doc/html/c9853.html                                |   243 +
 doc/html/dummy.html                                |     1 +
 doc/html/gts-binary-heaps.html                     |  1198 +
 doc/html/gts-boolean-operations.html               |  1300 +
 doc/html/gts-bounding-boxes-trees.html             |  5787 +++++
 doc/html/gts-containee-classes.html                |  1231 +
 doc/html/gts-container-classes.html                |  1786 ++
 ...ay-and-constrained-delaunay-triangulations.html |  2257 ++
 doc/html/gts-edges.html                            |  2595 ++
 doc/html/gts-extended-binary-heaps.html            |  2319 ++
 doc/html/gts-faces.html                            |  1649 ++
 doc/html/gts-first-in-first-out-heaps.html         |  1264 +
 doc/html/gts-graph-class.html                      |  5119 ++++
 doc/html/gts-graph-partitioning.html               |  2509 ++
 doc/html/gts-hierarchical-surfaces.html            |  1606 ++
 doc/html/gts-hierarchical-vertex-split.html        |  1230 +
 doc/html/gts-isosurfaces-from-3d-functions.html    |  2032 ++
 doc/html/gts-kd-trees.html                         |   625 +
 .../gts-miscellaneous-macros-and-functions.html    |   573 +
 doc/html/gts-object-class.html                     |  3149 +++
 doc/html/gts-out-of-core-simplification.html       |  2251 ++
 doc/html/gts-points.html                           |  3867 +++
 doc/html/gts-progressive-graph.html                |  2750 ++
 doc/html/gts-progressive-surfaces.html             |  2686 ++
 doc/html/gts-segments.html                         |  1848 ++
 doc/html/gts-simple-statistics.html                |   899 +
 .../gts-surface-simplification-and-refinement.html |  2164 ++
 doc/html/gts-surfaces.html                         |  4981 ++++
 doc/html/gts-triangles.html                        |  4744 ++++
 doc/html/gts-vectors-and-matrices.html             |  2699 ++
 doc/html/gts-vertex-split.html                     |  1972 ++
 doc/html/gts-vertices.html                         |  2659 ++
 doc/html/gts-weighted-graph.html                   |  1696 ++
 doc/html/index.sgml                                |   606 +
 examples/Makefile.am                               |    21 +
 examples/Makefile.in                               |   454 +
 examples/cartesian.c                               |   452 +
 examples/cleanup.c                                 |   224 +
 examples/coarsen.c                                 |   301 +
 examples/delaunay.c                                |   481 +
 examples/gtstoc.c                                  |    80 +
 examples/iso.c                                     |   199 +
 examples/oocs.c                                    |    79 +
 examples/partition.c                               |   220 +
 examples/set.c                                     |   137 +
 examples/transform.c                               |   253 +
 examples/traverse.c                                |   269 +
 examples/volume.c                                  |   102 +
 install-sh                                         |   251 +
 ltconfig                                           |  3078 +++
 ltmain.sh                                          |  4012 +++
 missing                                            |   190 +
 mkinstalldirs                                      |    40 +
 src/Makefile.am                                    |    90 +
 src/Makefile.in                                    |   495 +
 src/NOTES                                          |     3 +
 src/bbtree.c                                       |  1218 +
 src/boolean.c                                      |   844 +
 src/cdt.c                                          |   915 +
 src/config.h.win32                                 |    26 +
 src/container.c                                    |   455 +
 src/edge.c                                         |   481 +
 src/eheap.c                                        |   466 +
 src/face.c                                         |   265 +
 src/fifo.c                                         |   178 +
 src/graph.c                                        |  1247 +
 src/gts-config.in                                  |   107 +
 src/gts-private.h                                  |    39 +
 src/gts.def                                        |   361 +
 src/gts.h                                          |  2108 ++
 src/gts.m4                                         |   194 +
 src/gtsconfig.h                                    |    13 +
 src/heap.c                                         |   258 +
 src/hsurface.c                                     |   405 +
 src/iso.c                                          |   455 +
 src/kdtree.c                                       |   152 +
 src/makefile.msc                                   |    94 +
 src/matrix.c                                       |   405 +
 src/misc.c                                         |   171 +
 src/named.c                                        |   209 +
 src/object.c                                       |   377 +
 src/oocs.c                                         |   387 +
 src/partition.c                                    |  1164 +
 src/pgraph.c                                       |   584 +
 src/point.c                                        |   796 +
 src/predicates.c                                   |  2696 ++
 src/predicates.h                                   |    41 +
 src/predicates_init.c                              |   108 +
 src/psurface.c                                     |   471 +
 src/refine.c                                       |   416 +
 src/rounding.h                                     |    52 +
 src/segment.c                                      |   233 +
 src/split.c                                        |  1774 ++
 src/stripe.c                                       |   167 +
 src/surface.c                                      |  2056 ++
 src/triangle.c                                     |  1060 +
 src/vertex.c                                       |   648 +
 src/vopt.c                                         |   515 +
 stamp-h.in                                         |     1 +
 test/Makefile.am                                   |     3 +
 test/Makefile.in                                   |   301 +
 test/boolean/1.gts                                 |  7233 ++++++
 test/boolean/2.gts                                 | 25550 +++++++++++++++++++
 test/boolean/Makefile.am                           |    73 +
 test/boolean/Makefile.in                           |   360 +
 test/boolean/boole.c                               |   169 +
 test/boolean/boole.sh                              |    19 +
 test/boolean/boole_cube_cube1                      |    52 +
 test/boolean/boole_cube_cube1.sh                   |     5 +
 test/boolean/boole_cube_cube5                      |    52 +
 test/boolean/boole_cube_cube5.sh                   |     5 +
 test/boolean/cube                                  |    39 +
 test/boolean/cube1                                 |    39 +
 test/boolean/cube2                                 |    39 +
 test/boolean/cube4                                 |    39 +
 test/boolean/cube5                                 |    39 +
 test/boolean/cube6                                 |    39 +
 test/boolean/cube7                                 |    39 +
 test/boolean/cutter                                |   183 +
 test/boolean/loc1                                  |    15 +
 test/boolean/loc2                                  |    15 +
 test/boolean/p1                                    |    39 +
 test/boolean/p2                                    |   111 +
 test/boolean/set.c                                 |   218 +
 test/boolean/set.sh                                |    35 +
 test/boolean/set_1_2.sh                            |     5 +
 test/boolean/set_cube6_cube7.sh                    |     5 +
 test/boolean/set_cube_cube1                        |    13 +
 test/boolean/set_cube_cube1.sh                     |     5 +
 test/boolean/set_cube_cube2                        |    13 +
 test/boolean/set_cube_cube2.sh                     |     5 +
 test/boolean/set_cube_cube4.sh                     |     5 +
 test/boolean/set_loc1_loc2.sh                      |     5 +
 test/boolean/set_p1_p2.sh                          |     5 +
 test/boolean/set_sponge_cutter.sh                  |     5 +
 test/boolean/set_t11_t16                           |    13 +
 test/boolean/set_t11_t16.sh                        |     5 +
 test/boolean/set_t14_t15                           |    13 +
 test/boolean/set_t14_t15.sh                        |     5 +
 test/boolean/set_t17_t18                           |    13 +
 test/boolean/set_t17_t18.sh                        |     5 +
 test/boolean/set_t19_t20                           |    13 +
 test/boolean/set_t19_t20.sh                        |     5 +
 test/boolean/set_t19_t21                           |    13 +
 test/boolean/set_t19_t21.sh                        |     5 +
 test/boolean/set_t1_t10                            |    13 +
 test/boolean/set_t1_t10.sh                         |     5 +
 test/boolean/set_t1_t11                            |    13 +
 test/boolean/set_t1_t11.sh                         |     5 +
 test/boolean/set_t1_t12                            |    13 +
 test/boolean/set_t1_t12.sh                         |     5 +
 test/boolean/set_t1_t13                            |    13 +
 test/boolean/set_t1_t13.sh                         |     5 +
 test/boolean/set_t1_t2                             |    13 +
 test/boolean/set_t1_t2.sh                          |     5 +
 test/boolean/set_t1_t22                            |    13 +
 test/boolean/set_t1_t22.sh                         |     5 +
 test/boolean/set_t1_t23                            |    13 +
 test/boolean/set_t1_t23.sh                         |     5 +
 test/boolean/set_t1_t24                            |    13 +
 test/boolean/set_t1_t24.sh                         |     5 +
 test/boolean/set_t1_t3                             |    13 +
 test/boolean/set_t1_t3.sh                          |     5 +
 test/boolean/set_t1_t4                             |    13 +
 test/boolean/set_t1_t4.sh                          |     5 +
 test/boolean/set_t1_t5                             |    13 +
 test/boolean/set_t1_t5.sh                          |     5 +
 test/boolean/set_t1_t6                             |    13 +
 test/boolean/set_t1_t6.sh                          |     5 +
 test/boolean/set_t1_t7                             |    13 +
 test/boolean/set_t1_t7.sh                          |     5 +
 test/boolean/set_t1_t9                             |    13 +
 test/boolean/set_t1_t9.sh                          |     5 +
 test/boolean/set_t25_t26.sh                        |     5 +
 test/boolean/set_t27_t28                           |    13 +
 test/boolean/set_t27_t28.sh                        |     5 +
 test/boolean/sponge                                |    39 +
 test/boolean/t1                                    |     8 +
 test/boolean/t10                                   |     8 +
 test/boolean/t11                                   |     8 +
 test/boolean/t12                                   |    12 +
 test/boolean/t13                                   |    12 +
 test/boolean/t14                                   |    31 +
 test/boolean/t15                                   |    16 +
 test/boolean/t16                                   |    12 +
 test/boolean/t17                                   |     8 +
 test/boolean/t18                                   |     8 +
 test/boolean/t19                                   |    12 +
 test/boolean/t2                                    |     8 +
 test/boolean/t20                                   |    12 +
 test/boolean/t21                                   |    12 +
 test/boolean/t22                                   |     8 +
 test/boolean/t23                                   |     8 +
 test/boolean/t24                                   |     8 +
 test/boolean/t25                                   |     8 +
 test/boolean/t26                                   |     8 +
 test/boolean/t27                                   |    29 +
 test/boolean/t28                                   |    31 +
 test/boolean/t3                                    |    12 +
 test/boolean/t4                                    |    12 +
 test/boolean/t5                                    |    12 +
 test/boolean/t6                                    |     8 +
 test/boolean/t7                                    |     8 +
 test/boolean/t9                                    |    12 +
 test/coarsen/Makefile.am                           |    12 +
 test/coarsen/Makefile.in                           |   381 +
 test/coarsen/c1.c                                  |   191 +
 test/coarsen/c2.c                                  |   200 +
 test/coarsen/c3.c                                  |   153 +
 test/coarsen/cartesian.c                           |    84 +
 test/coarsen/double_prism.c                        |    94 +
 test/coarsen/flat.sh                               |     7 +
 test/coarsen/flat1.sh                              |     7 +
 test/delaunay/Makefile.am                          |    17 +
 test/delaunay/Makefile.in                          |   352 +
 test/delaunay/cartesian.c                          |    99 +
 test/delaunay/cartesian.sh                         |     5 +
 test/delaunay/cartesian_speed.sh                   |    33 +
 test/delaunay/random.c                             |    90 +
 test/delaunay/random_speed.sh                      |    51 +
 test/delaunay/too_close.gts                        |     9 +
 test/delaunay/too_close.sh                         |     5 +
 test/delaunay/two_segments.gts                     |     9 +
 test/delaunay/two_segments.sh                      |     5 +
 tools/Makefile.am                                  |     8 +
 tools/Makefile.in                                  |   339 +
 tools/gts2oogl.c                                   |   618 +
 tools/gtscompare.c                                 |   500 +
 259 files changed, 160662 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..0d46f1b
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,7 @@
+Original Authors
+----------------
+St�phane Popinet   <popinet at lmm.jussieu.fr>
+
+Contributors
+------------
+Jonathan R. Shewchuk: robust geometric predicates.
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..bf50f20
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,482 @@
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+

+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+

+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+

+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+

+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+

+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+

+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+

+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+

+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+

+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the 
+    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
+    Boston, MA  02111-1307  USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..c9ffe30
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,517 @@
+2001-11-12 Stephane Popinet <s.popinet at niwa.cri.nz> 
+
+	* gts: release of version 0.5.1.
+	
+	* tools/gts2oogl.c: Chaining of isolines segments. New default
+ 	"jet" colormap.
+
+2001-10-08  Stephane Popinet  <s.popinet at niwa.cri.nz>
+	
+	* gts: Release of version 0.5.0.
+
+	* src/Makefile.am: Now builds shared libraries (thanks to
+ 	Volodymyr Babin), rebuilds gts.def before making a distribution,
+ 	includes a gts-config script (a la glib) and gts.m4 autoconf
+ 	macros.
+
+	* tools/srf2oogl.c: Renamed to gts2oogl.c.
+
+2001-09-17  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/point.c (gts_point_is_inside_surface): New function.
+
+	* src/triangle.c (gts_triangle_is_stabbed): New function.
+
+	* src/bbtree.c (gts_bb_tree_stabbed, gts_bbox_is_stabbed): New
+ 	functions.
+
+2001-09-03  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* tools/srf2oogl.c (write_isolines): Function to draw isolines
+ 	(option -i or --isolines).
+
+2001-08-31  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* examples/transform.c: New "revert" option to turn surface inside out.
+
+2001-08-30  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/face.c (gts_face_link): New link() method.
+
+	* src/boolean.c (gts_surface_inter_new): Links back new faces to
+ 	original faces using the link() method of GtsFaceClass.
+
+	* examples/set.c (main): Use new gts_bb_tree_surface function.
+
+	* src/bbtree.c (gts_bb_tree_is_overlapping): New function.
+	(gts_bb_tree_surface): New function.
+        (gts_bb_tree_point_distance): Now takes the absolute value of the
+ 	distance function, which allows for signed distances.
+	
+2001-08-03  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* tools/srf2oogl.c: New option for coloring vertices according to
+ 	z coordinate.
+
+2001-08-02  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* examples/transform.c: scaling operations for x, y, z axis.
+
+2001-07-03  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* examples/delaunay.c (shuffle_array): Randomizes the order in
+ 	which vertices are inserted. Greatly increase speed in
+ 	pathological cases (i.e. cartesian meshes).
+
+2001-06-20  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* test/delaunay/Makefile.am: Added "two segments" test.
+
+2001-06-19  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/Makefile.am: added graph.c, pgraph.c, partition.c source files.
+
+2001-06-07  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/eheap.c: Can now be initialized with a NULL GtsKeyFunc.
+	(gts_eheap_randomized): New function.
+
+2001-06-06  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/fifo.c (gts_fifo_top): New function.
+
+	* src/heap.c (gts_heap_top): New function.
+
+2001-05-31  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/eheap.c (gts_eheap_remove): Now returns the removed element.
+
+2001-05-30  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/face.c (gts_face_foreach_neighbor): New function.
+
+	* examples/traverse.c: New example.
+
+	* src/surface.c (gts_surface_traverse_new): New functions.
+
+2001-05-29  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/surface.c (gts_surface_write_oogl_boundary): New function.
+
+2001-05-24  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* examples/delaunay.c (delaunay_remove_holes): New option to
+ 	remove holes in the triangulation.
+
+	* src/surface.c (gts_surface_foreach_face_remove): New function.
+
+	* src/boolean.c (next_compatible_face): Fixed bug in the case of
+ 	an open surface (with boundary edges).
+
+2001-05-22  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/surface.c (gts_surface_write_oogl): Now output colors as
+ 	specified by the color() method of objects.
+
+	* src/object.c (object_class_init): Added color() virtual method.
+
+	* tools/srf2oogl.c: <unistd.h> is included only if it's there.
+
+	* src/matrix.c (gts_matrix_assign): New function.
+
+2001-05-21  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* examples/delaunay.c: Checks for duplicate vertices.
+
+2001-05-18  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/cdt.c (gts_delaunay_add_constraint): Now checks that a real
+ 	GtsConstraint is passed as argument.
+
+2001-05-15  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/gts.h: Change read() method of GtsObject.
+
+	* src/object.c (gts_object_class_from_name): New function.
+
+2001-05-14  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/surface.c (gts_range_update): corrected bug in case of a nul
+ 	variance.
+
+	* src/gts.h: Added flags field to GtkObject and modified
+ 	GTS_OBJECT_DESTROYABLE etc...
+
+2001-05-11  Stephane Popinet  <s.popinet at niwa.cri.nz>
+
+	* src/triangle.c (gts_triangle_circumcircle_center): now takes the
+ 	point class as an extra argument.
+
+	* src/eheap.c (gts_eheap_key): new function.
+
+	* src/surface.c (surface_class_init): add_face and remove_face are
+ 	now methods.
+
+	* src/fifo.c: FIFO queue implementation.
+
+2001-02-04  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/oocs.c (cluster_index): Now uses triplet of integers.
+
+2001-02-03  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* examples/oocs.c: New example for out-of-core simplification via
+ 	vertex clustering.
+
+2001-02-02  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/oocs.c: Implementation of the out-of-core simplification
+ 	algorithm of Lindstrom and Turk.
+
+	* src/bbtree.c (gts_bbox_surface): New function.
+
+2001-02-01  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/boolean.c (gts_surface_inter_new): Fixed bug for reset of
+ 	reserved pointer in edges.
+
+	* test/boolean/set.c (main): Added test for correctness of
+ 	vertices, edges and faces of surfaces after operation.
+
+	* src/segment.c (gts_segment_is_ok): Fixed bug in testing for
+ 	duplicate.
+
+	* src/bbtree.c 
+	(gts_bbox_set): New function.
+	(gts_bbox_new): Added check for class.
+
+	* test/boolean: Added extra test by T. Binder.
+
+2001-01-31  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* gts: Release of version 0.4.0.
+
+2001-01-04  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/template.c: Template for the creation of new object classes.
+
+2001-01-03  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/rounding.h: Added untested support for Win32 and non-intel 
+	systems.
+
+2000-12-22  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/eheap.c (gts_eheap_insert_with_key): New function.
+
+2000-11-22  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* examples/transform.c: New example.
+
+	* src/matrix.c (gts_matrix_product): New function.
+
+2000-11-09  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/named.c: Named vertex, edge, face classes.
+
+2000-11-07  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/point.c (gts_segment_triangle_intersection): New parameter to 
+	take into account the boundary of the triangle.
+
+2000-11-03  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/surface.c 
+	(gts_surface_foreach_vertex)
+	(gts_surface_foreach_edge)
+	(gts_surface_foreach_face):
+	Removal of faces during one of these will now cause an assertion
+	failure.
+	
+2000-11-02  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/boolean.c: New file containing functions for boolean operations 
+	between surfaces.
+
+2000-11-01  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* examples/delaunay.c: New example.
+
+	* src/cdt.c: New implementation.
+
+2000-09-11  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* tools/gtscompare.c: New utility program.
+
+	* src/surface.c (gts_surface_distance): New function.
+
+	* src/bbtree.c (gts_bb_tree_point_closest_bboxes, 
+	gts_bb_tree_point_distance, 
+	gts_bb_tree_point_closest, 
+	gts_bb_tree_triangle_distance, 
+	gts_bb_tree_segment_distance, 
+	gts_bb_tree_surface_distance, 
+	gts_bb_tree_surface_boundary_distance): New functions.
+
+2000-07-31  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/progress.c (gts_psurface_new, gts_psurface_add_edge, 
+	gts_psurface_remove_edge): New functions for progressive surfaces.
+
+2000-07-27  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_resize): New function.
+
+	* src/ (gts_point_resize, gts_segment_resize): Now checks if the newly
+ 	allocated space is located at the same place as the old one.
+
+2000-07-26  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_read): Added a line argument returning 
+	the line number in case of error.
+
+2000-07-25  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/gts.h (gts_triangle_points): Added (t) everywhere.
+
+2000-07-24  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* gts: Release of version 0.3.0
+	
+	* tools/srf2oogl.c: "boundary" option now outputs boundary edges 
+	instead of coloring boundary triangles.
+
+	* src/vopt.c: Changed relative weighting of boundary and volume costs.
+
+2000-07-22  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/predicates.c, src/predicates_init.c: Floating point rounding and
+ 	precision behaviour control now uses symbolic constants.
+
+2000-07-20  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/iso.c: Implementation of isosurfaces of a function f(x, y, z).
+
+2000-07-18  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_coarsen, gts_surface_refine): 
+	New stopping interface.
+
+2000-07-17  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* examples/coarsen.c: New options for using memoryless simplification.
+
+	* src/vopt.c: Implementation of Lindstrom and Turk memoryless 
+	simplification functions.
+
+	* src/surface.c (gts_surface_read): Error checking in case indices are
+ 	equal to zero.
+
+2000-07-05  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/matrix.c (gts_vector_print): New function.
+
+2000-07-04  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/point.c 
+	(gts_point_is_boundary): New function.
+	(gts_point_neighbors): New function.
+
+2000-07-02  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/eheap.c (gts_eheap_remove_top): Now takes an extra @key argument.
+
+	* src/surface.c 
+	(gts_segment_collapse_is_valid): New function.
+	(gts_surface_coarsen): Now stops if the key of the segment to be 
+	collapsed is equal to G_MAXDOUBLE.
+
+	* src/triangle.c (gts_triangle_use_segments): New function.
+
+2000-06-04  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/segment.c (gts_segment_is_boundary): Now works with a NULL 
+	argument for surface.
+
+	* tools/srf2oogl.c: New `boundary' option to color triangles which 
+	have a boundary edge.
+
+2000-06-02  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/matrix.c: Matrix operations have been moved to this new file.
+	(gts_matrix_new): The order of the arguments has been transposed.
+
+	* src/: All the source files have been modified to use only GSList 
+	and not GList. The memory saving is about 20% for a triangulated 
+	surface.
+
+2000-06-01  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/point.c (gts_point_triangles): Now takes a list as an extra
+	argument.
+
+2000-03-07  Stephane Popinet  <popinet at lmm.jussieu.fr>
+
+	* src/point.c (gts_segment_triangle_intersection): Removed the
+	part which was specific to the surface intersection stuff. This
+	function can now be used on its own as it should.
+
+	* src/: Changed data identifier to private in _GtsPoint,
+	_GtsSegment, _GtsTriangle.
+
+	* src/surface.c (gts_surface_foreach_triangle): Now takes a
+	GtsFunc as a callback function as it should have from the start.
+
+2000-03-03  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_triangle_number): New function.
+
+	* src/point.c (gts_point_is_in_triangle): Now returns GTS_IN,
+	GTS_ON, GTS_OUT.
+
+	* src/segment.c (gts_segments_are_intersecting): Now returns
+	GTS_IN, GTS_ON, GTS_OUT.
+
+2000-02-18  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* examples/coarsen.c: New example.
+
+	* tools/srf2oogl.c: Now takes an --incomp option for coloring
+	incompatible triangles.
+
+	* src/surface.c (gts_surface_coarsen): Fixed a bug when the
+	collapse went down to two similar triangles (back to back).
+
+	* src/surface.c (gts_surface_read): Don't stupidly use hash tables
+	anymore use simple arrays instead (simpler, faster, better).
+
+2000-02-17  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/point.c (gts_points_merge): Rewritten. Now destroys merged
+	points and returns the updated list of points. Much faster.
+
+	* src/surface.c (gts_surface_coarsen): Bug fix in the case of
+	input surface with degenerate or duplicate edges.
+
+	* src/segment.c (gts_segment_is_duplicate): Bug fix for the case
+	when the input segment is degenerate.
+
+	* examples/cleanup.c: New example.
+
+	* src/triangle.c (gts_triangle_is_duplicate): New function.
+
+2000-02-14  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_write): Does not use hash tables
+	anymore. Simpler, more memory efficient and slightly faster.
+
+	* src/surface.c (gts_surface_coarsen): New type GtsStopFunc is now 
+	used as a stopping criterium. Two functions
+	gts_coarsen_number_stop() and gts_coarsen_length_stop() are
+	provided.
+
+	* src/surface.c (gts_surface_refine): New type GtsStopFunc is now 
+	used as a stopping criterium. Two functions
+	gts_refine_number_stop() and gts_refine_length_stop() are
+	provided.
+
+2000-02-12  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_volume): New function.
+
+	* examples/volume.c: New example.
+
+	* src/surface.c (gts_surface_stats): New fields
+	n_boundary_segments, n_non_manifold_segments.
+
+	* src/surface.c: New functions for topological properties:
+	manifold, orientable, closed.
+
+2000-02-10  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_remove_triangle): New function.
+
+2000-02-09  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* examples/: A new examples directory has been created.
+
+2000-02-03  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/point.c (gts_segment_triangle_intersection): Now uses robust 
+	orientation tests. Obviously a great improvement for the
+	robustness of the set operations on surfaces.
+
+2000-02-02  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* gts: Release of version 0.2.0.
+
+	* src/stripe.c (gts_surface_strip): implementation of a simple
+	but efficient triangle strips generation algorithm.
+
+2000-01-28  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/triangle.c: New functions gts_triangle_neighbor_number() and 
+	gts_triangle_neighbors().
+
+	* src/surface.c (gts_surface_coarsen): Now uses extended binary
+	heaps (speedup is at least a factor of two). The interface is more 
+	generic and allows for user-defined cost, stopping criterium and
+	midpoint functions.	
+
+	* src/eheap.c: An implementation of extended binary heaps. Allows
+	0(log n) removal of elements.
+
+	* src/segment.c (gts_segment_midpoint): is now a function.
+
+2000-01-20  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_refine): User-defined sorting and
+	stopping functions can now be specified.
+
+2000-01-19  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/surface.c (gts_surface_refine): Now uses binary heaps. Speed
+	up of at least 2 compared with the version using binary trees plus 
+	simpler and more robust.
+
+	* src/heap.c: Implementation of binary heaps.
+
+2000-01-17  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* gts: Release of version 0.1.0.
+	
+	* src/surface.c: The gts_surfaces_intersection and union no longer 
+	assume that the data field of the triangles is NULL but still
+	assume that the data field of the edges of the triangles is
+	NULL. The methods have been checked against memory leaks.
+	
+	* src/triangle.c: The destroy method now takes one extra argument
+	giving the possibility to "descend" the hierarchy and destroy any
+	unused segment or endpoints recursively.
+	
+	* src/segment.c: The destroy method now takes one extra argument
+	giving the possibility to "descend" the hierarchy and destroy any
+	unused endpoint.
+	
+	* src/cdt.c: The data field of the constraints is not supposed to
+	contain NULL initially anymore. Some cosmetic changes.
+
+	* src/bbtree.c: The leaves of the bounding box tree can now be
+	freed as well. The methods have been checked against memory leaks.
+
+2000-01-11  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* doc/: Updated documentation.
+
+2000-01-06  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	* src/kdtree.c (gts_kdtree_range): Fixed a
+	bug. gts_point_is_in_rectangle was 2D not 3D.
+
+	* src/bbtree.c (gts_bb_tree_destroy): Creation of this function
+	which was obviously missing. Needs testing.	
+
+1999-12-06  Stephane Popinet <popinet at lmm.jussieu.fr>
+
+	*  Creation of the initial CVS repository.
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..b42a17a
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..9596350
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,3 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src tools examples doc test
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..96a4f35
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,378 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+SUBDIRS = src tools examples doc test
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
+Makefile.am Makefile.in NEWS THANKS TODO acconfig.h acinclude.m4 \
+aclocal.m4 config.guess config.h.in config.sub configure configure.in \
+install-sh ltconfig ltmain.sh missing mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in  acinclude.m4
+	cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+	@if test ! -f $@; then \
+		rm -f stamp-h; \
+		$(MAKE) stamp-h; \
+	else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
+	     $(SHELL) ./config.status
+	@echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+	@if test ! -f $@; then \
+		rm -f $(srcdir)/stamp-h.in; \
+		$(MAKE) $(srcdir)/stamp-h.in; \
+	else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+	cd $(top_srcdir) && $(AUTOHEADER)
+	@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+	-rm -f config.h
+
+maintainer-clean-hdr:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+ at SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive  \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+	  rev="$$subdir $$rev"; \
+	  test "$$subdir" = "." && dot_seen=yes; \
+	done; \
+	test "$$dot_seen" = "no" && rev=". $$rev"; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+   if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+   fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	-rm -rf $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	dc_install_base=`cd $(distdir)/=inst && pwd`; \
+	cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist
+	-rm -rf $(distdir)
+	@banner="$(distdir).tar.gz is ready for distribution"; \
+	dashes=`echo "$$banner" | sed s/./=/g`; \
+	echo "$$dashes"; \
+	echo "$$banner"; \
+	echo "$$dashes"
+dist: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+dist-all: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+distdir: $(DISTFILES)
+	-rm -rf $(distdir)
+	mkdir $(distdir)
+	-chmod 777 $(distdir)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    chmod 777 $(distdir)/$$subdir; \
+	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile config.h
+all-redirect: all-recursive-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am:  clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am:  distclean-hdr distclean-tags distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-recursive
+	-rm -f config.status
+
+maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-tags \
+		maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..64956c2
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,96 @@
+08/10/2001:
+
+Release of version 0.5.0.
+
+Configuration and compilation have been cleaned and updated. Now
+builds both shared and static libraries.
+
+A new `gts-config' script allows simpler use of the library (a la
+glib), together with a gts.m4 macro definition for your own autoconf
+usage.
+
+A number of new features have been added:
+
+- Configurable out-of-core simplification framework for surfaces
+larger than the main memory.
+
+- Conforming constrained Delaunay triangulation and Delaunay
+refinement by addition of Steiner points.
+
+- Simple implementation of FIFOs (First-In First-out queues).
+
+- New graph objects and operations on graphs. In particular efficient
+graph partitioning routines.
+
+- "Stabbing" functions have been added to bounding box trees, which
+now allows for efficient testing whether a point lies inside or outside
+a surface.
+
+A number of bug fixes and improvements have also been added:
+
+- More generic object methods for surfaces.
+
+- Easily definable inheritance of face attributes (in particular for
+boolean operations).
+
+- Bug fixes for boolean operations.
+
+The srf2oogl converter has been renamed to gts2oogl and an 'isolines'
+functionality was added.
+
+31/01/2001: 
+
+Release of version 0.4.0. Much has happened since 0.3.0. A
+new object structure inspired by GTK allows to use classical
+inheritance mechanisms and virtual functions. As a consequence the
+object hierarchy has been restructured and now uses points, vertices,
+segments, edges, triangles, faces and surfaces.
+
+The Delaunay triangulation has been entirely re-written and is now
+fully-dynamic (insertion or deletion of vertices). The constrained
+Delaunay triangulation is semi-dynamic (insertion of vertices and
+constraints).
+
+Boolean operations between surfaces have also been re-written and are
+more robust (and also benefit from a much more robust implementation
+of the Delaunay triangulation).
+
+Surface coarsening routines have been improved both in term of a more
+generic interface and in order to avoid artefacts such as folds in the
+simplified surface.
+
+An interesting new extension is the implementation of progressive
+surfaces which allow dynamic real-time continuous level-of-detail
+representation of a surface. Progressive transmission of surfaces is
+also possible. The first building blocks for a hierarchical surface
+extension have been written. This will allow for dynamic
+view-dependent simplification of surfaces.
+
+The floating-point control interface necessary for robust geometric
+predicates has been cleaned and GTS should now build on any (touch
+wood) UNIX-based machine.
+
+Preliminary support has been added for win32 compilation using
+Microsoft C.
+
+Please note that the html reference manual is now distributed with the
+sources.
+
+15/02/2000: 
+
+Samples geometry files are avalaible at
+http://gts.sourceforge.net/samples.html
+
+02/02/2000: 
+
+Release of version 0.2.0. New data structures and algorithms including
+triangle strips and binary heaps. The algorithms for surface
+coarsening and refinement are more efficient and general. See
+Changelog for a more complete history.
+
+17/01/2000: 
+
+Release of version 0.1.0. GTS has officially moved to
+gts.sourceforge.net. A number of bug fixes. A few interface
+changes. Most of the functions have been checked for memory
+leaks. Nearly all the functions are now documented.
diff --git a/README b/README
new file mode 100644
index 0000000..5e7707f
--- /dev/null
+++ b/README
@@ -0,0 +1,66 @@
+General Information
+===================
+
+This is the GTS library. GTS stands for the GNU Triangulated
+Surface Library. It includes a number of useful functions to deal with
+triangulated surfaces including, but not limited to, multi-resolution
+models, Delaunay and Constrained Delaunay triangulations, set operations on
+surfaces (intersection, union etc ...), bounding-boxes trees for efficient
+collision and intersection detection, triangle strips generation for fast
+rendering.
+
+The official web site is:
+http://gts.sourceforge.net
+
+Copying
+=======
+
+The GTS library is distributed under the terms of the Library General
+Public License which is compliant with the guidelines of the Open
+Source and Free Software Fundations. See the file COPYING for details.
+
+The robust geometric predicates code (src/predicates.c) was written
+and placed in the public domain by Jonathan R. Shewchuk. The original
+version of the code can be found at
+
+http://www.cs.cmu.edu/~quake/robust.html
+
+Installation
+============
+
+Unix users:
+
+./configure
+make
+make install
+
+See the file 'INSTALL' for generic configure instructions.
+
+Windows users:
+If you have Microsoft C try:
+
+cd src
+nmake -f makefile.msc install
+
+Using GTS
+=========
+
+From version 0.5.0 you can use the `gts-config' script in order to
+obtain the compile flags and link flags necessary to use the GTS
+library (� la Glib).
+
+- To compile add `gts-config --cflags` to your compiler flags.
+- To link add `gts-config --libs` to your linker flags.
+
+When developping code using GTS you probably want to enable control
+over casting operations between objects of the GTS object
+hierarchy. This can be done easily by defining GTS_CHECK_CASTS either
+in the CFLAGS environement variable (CFLAGS=-DGTS_CHECK_CASTS) or on
+the command-line of your compiler.
+
+This will slow down your code but will warn you when you try to
+perform illegal casts between GtsObjects.
+
+You can also to do that using the `--check' option of gts-config,
+i.e. by adding `gts-config --cflags --check' to your compiler flags.
+
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..a4f2c11
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,17 @@
+GTS would not have been as good :) without the contributions of the following 
+people (in random order):
+
+Mike Loehr
+Bertrand Petit
+Jose Miguel Espadero
+Jordi Rovira i Bonet
+Sergey Y. Kazakov
+Florian Hars
+Peter Lindstrom
+Martin Herren
+Navneet Dalal
+Thomas Binder
+Helmut Cantzler
+Johannes Beigel
+Darie Aron
+Gary R. Van Sickle
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..56a4bc0
--- /dev/null
+++ b/TODO
@@ -0,0 +1,35 @@
+This is a non-exhaustive list of things to do.
+
+- cleanup of GHashTable hack in cdt.c.
+
+- Specialized hash tables for surface->triangles?
+
+- Error status when reading GTS file.
+
+- Homogeneous coordinates?
+
+- Boolean operations: check problems for some degenerate cases.
+
+- More generic interface for gts_surface_inter_new().
+
+- Tutorial for the creation of new GtsObject classes.
+
+- Implicit dependencies for hierarchical surfaces.
+
+- More generic interface for isosurface computation (user-control of
+  vertex generation).
+
+- GtsContainer class?
+
+- Graph partitioning
+	* optimisation BKL -> BKL(1,*) (Karypis & Kumar)
+	* k-way partitioning
+	* bug for memplus.graph, add20.graph
+
+- Doc: private fields of structures.
+
+- Include Volodymyr Babin's gts-iso-toy code.
+
+- Apply Norman Vine cygwin patch
+
+- Apply Patch for gts_triangles_angle
diff --git a/acconfig.h b/acconfig.h
new file mode 100644
index 0000000..0d22ab9
--- /dev/null
+++ b/acconfig.h
@@ -0,0 +1,59 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+/* acconfig.h
+   This file is in the public domain.
+
+   Descriptive text for the C preprocessor macros that
+   the distributed Autoconf macros can define.
+   No software package will use all of them; autoheader copies the ones
+   your configure.in uses into your configuration header file templates.
+
+   The entries are in sort -df order: alphabetical, case insensitive,
+   ignoring punctuation (such as underscores).  Although this order
+   can split up related entries, it makes it easier to check whether
+   a given entry is in the file.
+
+   Leave the following blank line there!!  Autoheader needs it.  */
+

+
+/* Other stuff */
+
+/* #undef HAVE_FPU_CONTROL_H */
+/* #undef HAVE_FLOATINGPOINT_H */
+/* #undef HAVE_GETOPT_H */
+
+#undef GTS_MAJOR_VERSION
+#undef GTS_MINOR_VERSION
+#undef GTS_MICRO_VERSION
+#undef GTS_INTERFACE_AGE
+#undef GTS_BINARY_AGE
+
+#undef WIN32
+#undef NATIVE_WIN32
+
+/* #undef PACKAGE */
+/* #undef VERSION */
+
+
+
+

+/* Leave that blank line there!!  Autoheader needs it.
+   If you're adding to this file, keep in mind:
+   The entries are in sort -df order: alphabetical, case insensitive,
+   ignoring punctuation (such as underscores).  */
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..c9761a5
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,197 @@
+# Configure paths for GLIB
+# Owen Taylor     97-11-3
+
+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or 
+dnl gthread is specified in MODULES, pass to glib-config
+dnl
+AC_DEFUN(AM_PATH_GLIB,
+[dnl 
+dnl Get the cflags and libraries from the glib-config script
+dnl
+AC_ARG_WITH(glib-prefix,[  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)],
+            glib_config_prefix="$withval", glib_config_prefix="")
+AC_ARG_WITH(glib-exec-prefix,[  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
+            glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
+AC_ARG_ENABLE(glibtest, [  --disable-glibtest       Do not try to compile and run a test GLIB program],
+		    , enable_glibtest=yes)
+
+  if test x$glib_config_exec_prefix != x ; then
+     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
+     if test x${GLIB_CONFIG+set} != xset ; then
+        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
+     fi
+  fi
+  if test x$glib_config_prefix != x ; then
+     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
+     if test x${GLIB_CONFIG+set} != xset ; then
+        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
+     fi
+  fi
+
+  for module in . $4
+  do
+      case "$module" in
+         gmodule) 
+             glib_config_args="$glib_config_args gmodule"
+         ;;
+         gthread) 
+             glib_config_args="$glib_config_args gthread"
+         ;;
+      esac
+  done
+
+  AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
+  min_glib_version=ifelse([$1], ,0.99.7,$1)
+  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+  no_glib=""
+  if test "$GLIB_CONFIG" = "no" ; then
+    no_glib=yes
+  else
+    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
+    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
+    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x$enable_glibtest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $GLIB_CFLAGS"
+      LIBS="$GLIB_LIBS $LIBS"
+dnl
+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
+dnl checks the results of glib-config to some extent
+dnl
+      rm -f conf.glibtest
+      AC_TRY_RUN([
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int 
+main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.glibtest");
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_glib_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_glib_version");
+     exit(1);
+   }
+
+  if ((glib_major_version != $glib_config_major_version) ||
+      (glib_minor_version != $glib_config_minor_version) ||
+      (glib_micro_version != $glib_config_micro_version))
+    {
+      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
+             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+             glib_major_version, glib_minor_version, glib_micro_version);
+      printf ("*** was found! If glib-config was correct, then it is best\n");
+      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
+      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+      printf("*** required on your system.\n");
+      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
+      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
+      printf("*** before re-running configure\n");
+    } 
+  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+	   (glib_minor_version != GLIB_MINOR_VERSION) ||
+           (glib_micro_version != GLIB_MICRO_VERSION))
+    {
+      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+      printf("*** library (version %d.%d.%d)\n",
+	     glib_major_version, glib_minor_version, glib_micro_version);
+    }
+  else
+    {
+      if ((glib_major_version > major) ||
+        ((glib_major_version == major) && (glib_minor_version > minor)) ||
+        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+      {
+        return 0;
+       }
+     else
+      {
+        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+               glib_major_version, glib_minor_version, glib_micro_version);
+        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+	       major, minor, micro);
+        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+        printf("***\n");
+        printf("*** If you have already installed a sufficiently new version, this error\n");
+        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
+        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
+        printf("*** correct copy of glib-config. (In this case, you will have to\n");
+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** so that the correct libraries are found at run-time))\n");
+      }
+    }
+  return 1;
+}
+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_glib" = x ; then
+     AC_MSG_RESULT(yes)
+     ifelse([$2], , :, [$2])     
+  else
+     AC_MSG_RESULT(no)
+     if test "$GLIB_CONFIG" = "no" ; then
+       echo "*** The glib-config script installed by GLIB could not be found"
+       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
+       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
+       echo "*** full path to glib-config."
+     else
+       if test -f conf.glibtest ; then
+        :
+       else
+          echo "*** Could not run GLIB test program, checking why..."
+          CFLAGS="$CFLAGS $GLIB_CFLAGS"
+          LIBS="$LIBS $GLIB_LIBS"
+          AC_TRY_LINK([
+#include <glib.h>
+#include <stdio.h>
+],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
+        [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+          echo "***"
+          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+          echo "*** came with the system with the command"
+          echo "***"
+          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
+          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
+          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GLIB_CFLAGS=""
+     GLIB_LIBS=""
+     ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(GLIB_CFLAGS)
+  AC_SUBST(GLIB_LIBS)
+  rm -f conf.glibtest
+])
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..b60b687
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,772 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4
+
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Configure paths for GLIB
+# Owen Taylor     97-11-3
+
+dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or 
+dnl gthread is specified in MODULES, pass to glib-config
+dnl
+AC_DEFUN(AM_PATH_GLIB,
+[dnl 
+dnl Get the cflags and libraries from the glib-config script
+dnl
+AC_ARG_WITH(glib-prefix,[  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)],
+            glib_config_prefix="$withval", glib_config_prefix="")
+AC_ARG_WITH(glib-exec-prefix,[  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
+            glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
+AC_ARG_ENABLE(glibtest, [  --disable-glibtest       Do not try to compile and run a test GLIB program],
+		    , enable_glibtest=yes)
+
+  if test x$glib_config_exec_prefix != x ; then
+     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
+     if test x${GLIB_CONFIG+set} != xset ; then
+        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
+     fi
+  fi
+  if test x$glib_config_prefix != x ; then
+     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
+     if test x${GLIB_CONFIG+set} != xset ; then
+        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
+     fi
+  fi
+
+  for module in . $4
+  do
+      case "$module" in
+         gmodule) 
+             glib_config_args="$glib_config_args gmodule"
+         ;;
+         gthread) 
+             glib_config_args="$glib_config_args gthread"
+         ;;
+      esac
+  done
+
+  AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
+  min_glib_version=ifelse([$1], ,0.99.7,$1)
+  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+  no_glib=""
+  if test "$GLIB_CONFIG" = "no" ; then
+    no_glib=yes
+  else
+    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
+    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
+    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x$enable_glibtest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $GLIB_CFLAGS"
+      LIBS="$GLIB_LIBS $LIBS"
+dnl
+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
+dnl checks the results of glib-config to some extent
+dnl
+      rm -f conf.glibtest
+      AC_TRY_RUN([
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int 
+main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.glibtest");
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_glib_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_glib_version");
+     exit(1);
+   }
+
+  if ((glib_major_version != $glib_config_major_version) ||
+      (glib_minor_version != $glib_config_minor_version) ||
+      (glib_micro_version != $glib_config_micro_version))
+    {
+      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
+             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+             glib_major_version, glib_minor_version, glib_micro_version);
+      printf ("*** was found! If glib-config was correct, then it is best\n");
+      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
+      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+      printf("*** required on your system.\n");
+      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
+      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
+      printf("*** before re-running configure\n");
+    } 
+  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+	   (glib_minor_version != GLIB_MINOR_VERSION) ||
+           (glib_micro_version != GLIB_MICRO_VERSION))
+    {
+      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+      printf("*** library (version %d.%d.%d)\n",
+	     glib_major_version, glib_minor_version, glib_micro_version);
+    }
+  else
+    {
+      if ((glib_major_version > major) ||
+        ((glib_major_version == major) && (glib_minor_version > minor)) ||
+        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+      {
+        return 0;
+       }
+     else
+      {
+        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+               glib_major_version, glib_minor_version, glib_micro_version);
+        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+	       major, minor, micro);
+        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+        printf("***\n");
+        printf("*** If you have already installed a sufficiently new version, this error\n");
+        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
+        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
+        printf("*** correct copy of glib-config. (In this case, you will have to\n");
+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** so that the correct libraries are found at run-time))\n");
+      }
+    }
+  return 1;
+}
+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_glib" = x ; then
+     AC_MSG_RESULT(yes)
+     ifelse([$2], , :, [$2])     
+  else
+     AC_MSG_RESULT(no)
+     if test "$GLIB_CONFIG" = "no" ; then
+       echo "*** The glib-config script installed by GLIB could not be found"
+       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
+       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
+       echo "*** full path to glib-config."
+     else
+       if test -f conf.glibtest ; then
+        :
+       else
+          echo "*** Could not run GLIB test program, checking why..."
+          CFLAGS="$CFLAGS $GLIB_CFLAGS"
+          LIBS="$LIBS $GLIB_LIBS"
+          AC_TRY_LINK([
+#include <glib.h>
+#include <stdio.h>
+],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
+        [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+          echo "***"
+          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+          echo "*** came with the system with the command"
+          echo "***"
+          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
+          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
+          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GLIB_CFLAGS=""
+     GLIB_LIBS=""
+     ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(GLIB_CFLAGS)
+  AC_SUBST(GLIB_LIBS)
+  rm -f conf.glibtest
+])
+
+
+# Do all the work for Automake.  This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "[$]*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "[$]*" != "X $srcdir/configure conftestfile" \
+      && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "[$]2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+   $1=$2
+   AC_MSG_RESULT(found)
+else
+   $1="$3/missing $2"
+   AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated.  We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+  case " <<$>>CONFIG_HEADERS " in
+  *" <<$>>am_file "*<<)>>
+    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+    ;;
+  esac
+  am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+
+# serial 40 AC_PROG_LIBTOOL
+AC_DEFUN(AC_PROG_LIBTOOL,
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+
+# Save cache, so that ltconfig can load it
+AC_CACHE_SAVE
+
+# Actually configure libtool.  ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| AC_MSG_ERROR([libtool configure failed])
+
+# Reload cache, that may have been modified by ltconfig
+AC_CACHE_LOAD
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+])
+
+AC_DEFUN(AC_LIBTOOL_SETUP,
+[AC_PREREQ(2.13)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+#
+# the following will cause an existing older ltconfig to fail, so
+# we ignore this at the expense of the cache file... Checking this 
+# will just take longer ... bummer!
+#libtool_flags="--cache-file=$cache_file"
+#
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
+[libtool_flags="$libtool_flags --enable-dlopen"])
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[libtool_flags="$libtool_flags --enable-win32-dll"])
+AC_ARG_ENABLE(libtool-lock,
+  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+])
+esac
+])
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN(AC_ENABLE_SHARED, [dnl
+define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)])
+
+# AC_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN(AC_ENABLE_STATIC, [dnl
+define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
+])
+
+# AC_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)])
+
+
+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
+#   `yes'.
+AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
+define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(fast-install,
+changequote(<<, >>)dnl
+<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac],
+enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
+])
+
+# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)])
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AC_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  ac_prog=`($CC -print-prog-name=ld) 2>&5`
+  case "$ac_prog" in
+    # Accept absolute paths.
+changequote(,)dnl
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+changequote([,])dnl
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      ac_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])
+
+AC_DEFUN(AC_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  ac_cv_prog_gnu_ld=yes
+else
+  ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AC_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  ac_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -B"
+	break
+      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -p"
+	break
+      else
+	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+])
+
+# AC_CHECK_LIBM - check for math library
+AC_DEFUN(AC_CHECK_LIBM,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case "$lt_target" in
+*-*-beos* | *-*-cygwin*)
+  # These system don't have libm
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, main, LIBM="-lm")
+  ;;
+esac
+])
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library, adds --enable-ltdl-convenience to
+# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case "$enable_ltdl_convenience" in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
+  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+])
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library, and adds --enable-ltdl-install to
+# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, main,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
+    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    INCLTDL=
+  fi
+])
+
+dnl old names
+AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
+AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
+AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
+
+dnl This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])dnl
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN(AM_MAINTAINER_MODE,
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT($USE_MAINTAINER_MODE)
+  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi])
+
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..e1b5871
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1121 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+#   Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner at cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to <autoconf-patches at gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+  if test x"$HOST_CC" != x; then
+    CC_FOR_BUILD="$HOST_CC"
+  else
+    if test x"$CC" != x; then
+      CC_FOR_BUILD="$CC"
+    else
+      CC_FOR_BUILD=cc
+    fi
+  fi
+fi
+
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	cat <<EOF >$dummy.s
+	.globl main
+	.ent main
+main:
+	.frame \$30,0,\$26,0
+	.prologue 0
+	.long 0x47e03d80 # implver $0
+	lda \$2,259
+	.long 0x47e20c21 # amask $2,$1
+	srl \$1,8,\$2
+	sll \$2,2,\$2
+	sll \$0,3,\$0
+	addl \$1,\$0,\$0
+	addl \$2,\$0,\$0
+	ret \$31,(\$26),1
+	.end main
+EOF
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		./$dummy
+		case "$?" in
+			7)
+				UNAME_MACHINE="alpha"
+				;;
+			15)
+				UNAME_MACHINE="alphaev5"
+				;;
+			14)
+				UNAME_MACHINE="alphaev56"
+				;;
+			10)
+				UNAME_MACHINE="alphapca56"
+				;;
+			16)
+				UNAME_MACHINE="alphaev6"
+				;;
+		esac
+	fi
+	rm -f $dummy.s $dummy
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-cbm-sysv4
+	exit 0;;
+    amiga:NetBSD:*:*)
+      echo m68k-cbm-netbsd${UNAME_RELEASE}
+      exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    arc64:OpenBSD:*:*)
+	echo mips64el-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hkmips:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    arm32:NetBSD:*:*)
+	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	exit 0 ;;
+    SR2?01:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:NetBSD:*:*)
+	echo m68k-atari-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor 
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    sun3*:NetBSD:*:*)
+	echo m68k-sun-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:NetBSD:*:*)
+	echo m68k-apple-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:NetBSD:*:*)
+        echo powerpc-apple-netbsd${UNAME_RELEASE}
+        exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i?86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:4)
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=4.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+              sed 's/^              //' << EOF >$dummy.c
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+	rm -f $dummy.c $dummy
+	esac
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i?86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    hppa*:OpenBSD:*:*)
+	echo hppa-unknown-openbsd
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*X-MP:*:*:*)
+	echo xmp-cray-unicos
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE}
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE}
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE}
+	exit 0 ;;
+    CRAY-2:*:*:*)
+	echo cray2-cray-unicos
+        exit 0 ;;
+    F300:UNIX_System_V:*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    F301:UNIX_System_V:*:*)
+       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+       exit 0 ;;
+    hp3[0-9][05]:NetBSD:*:*)
+	echo m68k-hp-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	if test -x /usr/bin/objformat; then
+	    if test "elf" = "`/usr/bin/objformat`"; then
+		echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+		exit 0
+	    fi
+	fi
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    *:NetBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i386-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    *:Linux:*:*)
+
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	ld_help_string=`cd /; ld --help 2>&1`
+	ld_supported_emulations=`echo $ld_help_string \
+			 | sed -ne '/supported emulations:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported emulations: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_emulations" in
+	  *ia64)
+		echo "${UNAME_MACHINE}-unknown-linux"
+		exit 0
+		;;
+	  i?86linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0
+		;;
+	  i?86coff)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0
+		;;
+	  sparclinux)
+		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+		exit 0
+		;;
+	  armlinux)
+		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+		exit 0
+		;;
+	  elf32arm*)
+		echo "${UNAME_MACHINE}-unknown-linux-gnu"
+		exit 0
+		;;
+	  armelf_linux*)
+		echo "${UNAME_MACHINE}-unknown-linux-gnu"
+		exit 0
+		;;
+	  m68klinux)
+		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
+		exit 0
+		;;
+	  elf32ppc)
+		# Determine Lib Version
+		cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+     int argc;
+     char *argv[];
+{
+#if defined(__GLIBC__)
+  printf("%s %s\n", __libc_version, __libc_release);
+#else
+  printf("unkown\n");
+#endif
+  return 0;
+}
+EOF
+		LIBC=""
+		$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+		if test "$?" = 0 ; then
+			./$dummy | grep 1\.99 > /dev/null
+			if test "$?" = 0 ; then
+				LIBC="libc1"
+			fi
+		fi	
+		rm -f $dummy.c $dummy
+		echo powerpc-unknown-linux-gnu${LIBC}
+		exit 0
+		;;
+	esac
+
+	if test "${UNAME_MACHINE}" = "alpha" ; then
+		sed 's/^	//'  <<EOF >$dummy.s
+		.globl main
+		.ent main
+	main:
+		.frame \$30,0,\$26,0
+		.prologue 0
+		.long 0x47e03d80 # implver $0
+		lda \$2,259
+		.long 0x47e20c21 # amask $2,$1
+		srl \$1,8,\$2
+		sll \$2,2,\$2
+		sll \$0,3,\$0
+		addl \$1,\$0,\$0
+		addl \$2,\$0,\$0
+		ret \$31,(\$26),1
+		.end main
+EOF
+		LIBC=""
+		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+		if test "$?" = 0 ; then
+			./$dummy
+			case "$?" in
+			7)
+				UNAME_MACHINE="alpha"
+				;;
+			15)
+				UNAME_MACHINE="alphaev5"
+				;;
+			14)
+				UNAME_MACHINE="alphaev56"
+				;;
+			10)
+				UNAME_MACHINE="alphapca56"
+				;;
+			16)
+				UNAME_MACHINE="alphaev6"
+				;;
+			esac
+
+			objdump --private-headers $dummy | \
+			  grep ld.so.1 > /dev/null
+			if test "$?" = 0 ; then
+				LIBC="libc1"
+			fi
+		fi
+		rm -f $dummy.s $dummy
+		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+	elif test "${UNAME_MACHINE}" = "mips" ; then
+	  cat >$dummy.c <<EOF
+#ifdef __cplusplus
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+  printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+  printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+	  rm -f $dummy.c $dummy
+	else
+	  # Either a pre-BFD a.out linker (linux-gnuoldld)
+	  # or one that does not give us useful --help.
+	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+	  # If ld does not provide *any* "supported emulations:"
+	  # that means it is gnuoldld.
+	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+	  case "${UNAME_MACHINE}" in
+	  i?86)
+	    VENDOR=pc;
+	    ;;
+	  *)
+	    VENDOR=unknown;
+	    ;;
+	  esac
+	  # Determine whether the default compiler is a.out or elf
+	  cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+	  rm -f $dummy.c $dummy
+	fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+    i?86:DYNIX/ptx:4*:*)
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i?86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i?86:*:5:7*)
+        # Fixed at (any) Pentium or better
+        UNAME_MACHINE=i586
+        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
+	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
+	else
+	    echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+	fi
+	exit 0 ;;
+    i?86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    pc:*:*:*)
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                           # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:*:6*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-qnx-qnx${UNAME_VERSION}
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+  printf ("vax-dec-bsd\n"); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..091675f
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,35 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if you have <unistd.h>.  */
+#undef HAVE_UNISTD_H
+
+/* Define if you need to in order for stat and other things to work.  */
+#undef _POSIX_SOURCE
+
+/* Define if you have the ANSI C header files.  */
+#undef STDC_HEADERS
+
+/* #undef HAVE_FPU_CONTROL_H */
+/* #undef HAVE_FLOATINGPOINT_H */
+/* #undef HAVE_GETOPT_H */
+
+#undef GTS_MAJOR_VERSION
+#undef GTS_MINOR_VERSION
+#undef GTS_MICRO_VERSION
+#undef GTS_INTERFACE_AGE
+#undef GTS_BINARY_AGE
+
+/* Define if you have the getopt_long function.  */
+#undef HAVE_GETOPT_LONG
+
+/* Define if you have the <floatingpoint.h> header file.  */
+#undef HAVE_FLOATINGPOINT_H
+
+/* Define if you have the <fpu_control.h> header file.  */
+#undef HAVE_FPU_CONTROL_H
+
+/* Define if you have the <getopt.h> header file.  */
+#undef HAVE_GETOPT_H
+
+/* Define if you have the <unistd.h> header file.  */
+#undef HAVE_UNISTD_H
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..28426bb
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1232 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+	echo Configuration name missing. 1>&2
+	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+	echo "or     $0 ALIAS" 1>&2
+	echo where ALIAS is a recognized configuration type. 1>&2
+	exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+	*local*)
+		echo $1
+		exit 0
+		;;
+	*)
+	;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  linux-gnu*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+		| 580 | i960 | h8300 \
+		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+		| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
+		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
+		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+		| mips64vr5000 | miprs64vr5000el | mcore \
+		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+		| thumb | d10v | fr30)
+		basic_machine=$basic_machine-unknown
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i[34567]86)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	# FIXME: clean up the formatting here.
+	vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+	      | xmp-* | ymp-* \
+	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+	      | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
+	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+	      | clipper-* | orion-* \
+	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+	      | mips64el-* | mips64orion-* | mips64orionel-* \
+	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+	      | mipstx39-* | mipstx39el-* | mcore-* \
+	      | f301-* | armv*-* | t3e-* \
+	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-cbm
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-cbm
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-cbm
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	cray2)
+		basic_machine=cray2-cray
+		os=-unicos
+		;;
+	[ctj]90-cray)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i[34567]86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i[34567]86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i[34567]86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i[34567]86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	i386-go32 | go32)
+		basic_machine=i386-unknown
+		os=-go32
+		;;
+	i386-mingw32 | mingw32)
+		basic_machine=i386-unknown
+		os=-mingw32
+		;;
+	i386-qnx | qnx)
+		basic_machine=i386-qnx
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mipsel*-linux*)
+		basic_machine=mipsel-unknown
+		os=-linux-gnu
+		;;
+	mips*-linux*)
+		basic_machine=mips-unknown
+		os=-linux-gnu
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	msdos)
+		basic_machine=i386-unknown
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+        pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexen)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexen-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=rs6000-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+	        ;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+	        ;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sparclite-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=t3e-cray
+		os=-unicos
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xmp)
+		basic_machine=xmp-cray
+		os=-unicos
+		;;
+        xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	mips)
+		if [ x$os = x-linux-gnu ]; then
+			basic_machine=mips-unknown
+		else
+			basic_machine=mips-mips
+		fi
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sparc | sparcv9)
+		basic_machine=sparc-sun
+		;;
+        cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	c4x*)
+		basic_machine=c4x-none
+		os=-coff
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-ns2 )
+	        os=-nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+        -qnx)
+		os=-qnx4
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+        -*mint | -*MiNT)
+	        os=-mint
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+        pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+        *-gould)
+		os=-sysv
+		;;
+        *-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+        *-sgi)
+		os=-irix
+		;;
+        *-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f301-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -*MiNT)
+				vendor=atari
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
diff --git a/configure b/configure
new file mode 100755
index 0000000..9231b0e
--- /dev/null
+++ b/configure
@@ -0,0 +1,3052 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+# Making releases:
+#   GTS_MICRO_VERSION += 1;
+#   GTS_INTERFACE_AGE += 1;
+#   GTS_BINARY_AGE += 1;
+# if any functions have been added, set GTS_INTERFACE_AGE to 0.
+# if backwards compatibility has been broken,
+# set GTS_BINARY_AGE and GTS_INTERFACE_AGE to 0.
+#
+GTS_MAJOR_VERSION=0
+GTS_MINOR_VERSION=5
+GTS_MICRO_VERSION=1
+GTS_INTERFACE_AGE=1
+GTS_BINARY_AGE=1
+GTS_VERSION=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION.$GTS_MICRO_VERSION
+ac_help="$ac_help
+  --enable-shared[=PKGS]  build shared libraries [default=yes]"
+ac_help="$ac_help
+  --enable-static[=PKGS]  build static libraries [default=yes]"
+ac_help="$ac_help
+  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
+ac_help="$ac_help
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
+  --disable-libtool-lock  avoid locking (might break parallel builds)"
+ac_help="$ac_help
+  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer"
+ac_help="$ac_help
+  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)"
+ac_help="$ac_help
+  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)"
+ac_help="$ac_help
+  --disable-glibtest       Do not try to compile and run a test GLIB program"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir="$ac_optarg" ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$ac_optarg" ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file="$ac_optarg" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix="$ac_optarg" ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he)
+    # Omit some internal or obsolete options to make the list less imposing.
+    # This message is too long to be a string in the A/UX 3.1 sh.
+    cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$ac_optarg" ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir="$ac_optarg" ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir="$ac_optarg" ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir="$ac_optarg" ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir="$ac_optarg" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir="$ac_optarg" ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir="$ac_optarg" ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir="$ac_optarg" ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix="$ac_optarg" ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix="$ac_optarg" ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix="$ac_optarg" ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name="$ac_optarg" ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir="$ac_optarg" ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir="$ac_optarg" ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site="$ac_optarg" ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir="$ac_optarg" ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir="$ac_optarg" ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes="$ac_optarg" ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries="$ac_optarg" ;;
+
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=src/gts.h
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+
+
+
+
+
+# libtool versioning
+LT_RELEASE=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION
+LT_CURRENT=`expr $GTS_MICRO_VERSION - $GTS_INTERFACE_AGE`
+LT_REVISION=$GTS_INTERFACE_AGE
+LT_AGE=`expr $GTS_BINARY_AGE - $GTS_INTERFACE_AGE`
+
+
+
+
+
+# For automake.
+VERSION=$GTS_VERSION
+PACKAGE=gts
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:610: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+	  if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  else
+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
+	    break 2
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:663: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "$*" != "X $srcdir/configure conftestfile" \
+      && test "$*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+   fi
+
+   test "$2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
+else
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:720: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+	@echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=$PACKAGE
+
+VERSION=$VERSION
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:759: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+   ACLOCAL=aclocal
+   echo "$ac_t""found" 1>&6
+else
+   ACLOCAL="$missing_dir/missing aclocal"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:772: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+   AUTOCONF=autoconf
+   echo "$ac_t""found" 1>&6
+else
+   AUTOCONF="$missing_dir/missing autoconf"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:785: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+   AUTOMAKE=automake
+   echo "$ac_t""found" 1>&6
+else
+   AUTOMAKE="$missing_dir/missing automake"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:798: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+   AUTOHEADER=autoheader
+   echo "$ac_t""found" 1>&6
+else
+   AUTOHEADER="$missing_dir/missing autoheader"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:811: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+   MAKEINFO=makeinfo
+   echo "$ac_t""found" 1>&6
+else
+   MAKEINFO="$missing_dir/missing makeinfo"
+   echo "$ac_t""missing" 1>&6
+fi
+
+
+
+# Specify a configuration file
+
+
+
+
+cat >> confdefs.h <<EOF
+#define GTS_MAJOR_VERSION $GTS_MAJOR_VERSION
+EOF
+
+cat >> confdefs.h <<EOF
+#define GTS_MINOR_VERSION $GTS_MINOR_VERSION
+EOF
+
+cat >> confdefs.h <<EOF
+#define GTS_MICRO_VERSION $GTS_MICRO_VERSION
+EOF
+
+cat >> confdefs.h <<EOF
+#define GTS_INTERFACE_AGE $GTS_INTERFACE_AGE
+EOF
+
+cat >> confdefs.h <<EOF
+#define GTS_BINARY_AGE $GTS_BINARY_AGE
+EOF
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_shared=yes
+fi
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_static=yes
+fi
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_fast_install=yes
+fi
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:927: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:948: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:968: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:998: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1028: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_prog_rejected=no
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+	continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1079: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1111: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1122 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1153: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1158: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1186: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1229: checking for ld used by GCC" >&5
+  ac_prog=`($CC -print-prog-name=ld) 2>&5`
+  case "$ac_prog" in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1253: checking for GNU ld" >&5
+else
+  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1256: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      ac_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+  echo "$ac_t""$LD" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1291: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  ac_cv_prog_gnu_ld=yes
+else
+  ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1307: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  ac_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -B"
+	break
+      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -p"
+	break
+      else
+	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi
+fi
+
+NM="$ac_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1343: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+#
+# the following will cause an existing older ltconfig to fail, so
+# we ignore this at the expense of the cache file... Checking this 
+# will just take longer ... bummer!
+#libtool_flags="--cache-file=$cache_file"
+#
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+  :
+fi
+
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 1397 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:1419: checking whether the C compiler needs -belf" >&5
+if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1424 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  lt_cv_cc_needs_belf=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+
+esac
+
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+
+# Actually configure libtool.  ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:1534: checking whether to enable maintainer-specific portions of Makefiles" >&5
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+  
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+  MAINT=$MAINTAINER_MODE_TRUE
+  
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1560: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1590: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_prog_rejected=no
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+	continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1641: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1673: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1684 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1720: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1748: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+
+
+if test x$GCC = xyes ; then
+  CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1789: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AWK="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+  echo "$ac_t""$AWK" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AWK" && break
+done
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1819: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+  echo "$ac_t""yes" 1>&6
+  ISC=yes # If later tests want to check for ISC.
+  cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+  if test "$GCC" = yes; then
+    CC="$CC -posix"
+  else
+    CC="$CC -Xp"
+  fi
+else
+  echo "$ac_t""no" 1>&6
+  ISC=
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1840: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 1855 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 1872 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 1889 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1920: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1925 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1950 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1968 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1989 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
+else
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+
+if test x$with_glib = xyes ; then
+  { echo "configure: error: 
+*** Directory must be specified for --with-glib" 1>&2; exit 1; }
+fi
+
+if test x$with_glib = x ; then 
+  # Look for separately installed glib
+
+  # Check whether --with-glib-prefix or --without-glib-prefix was given.
+if test "${with_glib_prefix+set}" = set; then
+  withval="$with_glib_prefix"
+  glib_config_prefix="$withval"
+else
+  glib_config_prefix=""
+fi
+
+# Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
+if test "${with_glib_exec_prefix+set}" = set; then
+  withval="$with_glib_exec_prefix"
+  glib_config_exec_prefix="$withval"
+else
+  glib_config_exec_prefix=""
+fi
+
+# Check whether --enable-glibtest or --disable-glibtest was given.
+if test "${enable_glibtest+set}" = set; then
+  enableval="$enable_glibtest"
+  :
+else
+  enable_glibtest=yes
+fi
+
+
+  if test x$glib_config_exec_prefix != x ; then
+     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
+     if test x${GLIB_CONFIG+set} != xset ; then
+        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
+     fi
+  fi
+  if test x$glib_config_prefix != x ; then
+     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
+     if test x${GLIB_CONFIG+set} != xset ; then
+        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
+     fi
+  fi
+
+  for module in . gmodule gthread
+  do
+      case "$module" in
+         gmodule) 
+             glib_config_args="$glib_config_args gmodule"
+         ;;
+         gthread) 
+             glib_config_args="$glib_config_args gthread"
+         ;;
+      esac
+  done
+
+  # Extract the first word of "glib-config", so it can be a program name with args.
+set dummy glib-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2104: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GLIB_CONFIG" in
+  /*)
+  ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
+  ;;
+esac
+fi
+GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
+if test -n "$GLIB_CONFIG"; then
+  echo "$ac_t""$GLIB_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  min_glib_version=1.2.0
+  echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
+echo "configure:2139: checking for GLIB - version >= $min_glib_version" >&5
+  no_glib=""
+  if test "$GLIB_CONFIG" = "no" ; then
+    no_glib=yes
+  else
+    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
+    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
+    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+    if test "x$enable_glibtest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $GLIB_CFLAGS"
+      LIBS="$GLIB_LIBS $LIBS"
+      rm -f conf.glibtest
+      if test "$cross_compiling" = yes; then
+  echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2162 "configure"
+#include "confdefs.h"
+
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int 
+main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.glibtest");
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_glib_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_glib_version");
+     exit(1);
+   }
+
+  if ((glib_major_version != $glib_config_major_version) ||
+      (glib_minor_version != $glib_config_minor_version) ||
+      (glib_micro_version != $glib_config_micro_version))
+    {
+      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
+             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+             glib_major_version, glib_minor_version, glib_micro_version);
+      printf ("*** was found! If glib-config was correct, then it is best\n");
+      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
+      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+      printf("*** required on your system.\n");
+      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
+      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
+      printf("*** before re-running configure\n");
+    } 
+  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+	   (glib_minor_version != GLIB_MINOR_VERSION) ||
+           (glib_micro_version != GLIB_MICRO_VERSION))
+    {
+      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+      printf("*** library (version %d.%d.%d)\n",
+	     glib_major_version, glib_minor_version, glib_micro_version);
+    }
+  else
+    {
+      if ((glib_major_version > major) ||
+        ((glib_major_version == major) && (glib_minor_version > minor)) ||
+        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+      {
+        return 0;
+       }
+     else
+      {
+        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
+               glib_major_version, glib_minor_version, glib_micro_version);
+        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
+	       major, minor, micro);
+        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+        printf("***\n");
+        printf("*** If you have already installed a sufficiently new version, this error\n");
+        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
+        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
+        printf("*** correct copy of glib-config. (In this case, you will have to\n");
+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** so that the correct libraries are found at run-time))\n");
+      }
+    }
+  return 1;
+}
+
+EOF
+if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  no_glib=yes
+fi
+rm -fr conftest*
+fi
+
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_glib" = x ; then
+     echo "$ac_t""yes" 1>&6
+     :     
+  else
+     echo "$ac_t""no" 1>&6
+     if test "$GLIB_CONFIG" = "no" ; then
+       echo "*** The glib-config script installed by GLIB could not be found"
+       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
+       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
+       echo "*** full path to glib-config."
+     else
+       if test -f conf.glibtest ; then
+        :
+       else
+          echo "*** Could not run GLIB test program, checking why..."
+          CFLAGS="$CFLAGS $GLIB_CFLAGS"
+          LIBS="$LIBS $GLIB_LIBS"
+          cat > conftest.$ac_ext <<EOF
+#line 2272 "configure"
+#include "confdefs.h"
+
+#include <glib.h>
+#include <stdio.h>
+
+int main() {
+ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
+; return 0; }
+EOF
+if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+   echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+          echo "***"
+          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
+          echo "*** came with the system with the command"
+          echo "***"
+          echo "***    rpm --erase --nodeps gtk gtk-devel" 
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+   echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
+          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
+          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" 
+fi
+rm -f conftest*
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GLIB_CFLAGS=""
+     GLIB_LIBS=""
+     { echo "configure: error: 
+*** GLIB 1.2.0 or better is required. The latest version of GLIB
+*** is always available from ftp://ftp.gtk.org/." 1>&2; exit 1; }
+  fi
+  
+  
+  rm -f conf.glibtest
+
+
+  # we do not want to make all gts progs to link to thread or module libraries.
+  glib_cflags=`$GLIB_CONFIG glib --cflags`
+  glib_thread_cflags="$GLIB_CFLAGS"
+  glib_libs=`$GLIB_CONFIG glib --libs`
+  glib_thread_libs="$GLIB_LIBS"
+  GLIB_LIBS="$glib_libs"
+  GLIB_DEPLIBS="$glib_libs"
+else
+  # Use uninstalled glib (assume they got the version right)
+
+  GLIB_CONFIG=$with_glib/glib-config
+  if test -x $GLIB_CONFIG ; then 
+    :
+  else
+    { echo "configure: error: GLIB directory ($with_glib) not present or not configured" 1>&2; exit 1; }
+  fi
+
+  # For use in gts-config
+  glib_cflags=`$GLIB_CONFIG --cflags`
+  glib_thread_cflags=`$GLIB_CONFIG --cflags gthread`
+  glib_libs=`$GLIB_CONFIG --libs`
+  glib_thread_libs=`$GLIB_CONFIG --libs gthread`
+
+  glib_release=`$GLIB_CONFIG --version | sed 's%\\.[0-9]*$%%'`
+
+  # canonicalize relative paths
+  case $with_glib in 
+    /*)
+      glib_dir=$with_glib
+      ;;
+    *)
+      glib_dir="\$(top_builddir)/$with_glib"
+      ;;
+  esac
+
+  GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
+  GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule.la"
+  GLIB_DEPLIBS=
+
+  
+  
+fi
+
+
+
+
+
+
+
+CFLAGS="$CFLAGS $glib_cflags"
+LDFLAGS="$LDFLAGS $glib_libs"
+
+
+
+
+
+
+
+for ac_hdr in fpu_control.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2385: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2390 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_FPU_CONTROL_H 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in floatingpoint.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2428: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2433 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_FLOATINGPOINT_H 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2471: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2476 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_UNISTD_H 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in getopt.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2514: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2519 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_GETOPT_H 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+for ac_func in getopt_long
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2557: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2562 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "
+Makefile
+src/Makefile
+src/gts-config
+tools/Makefile
+doc/Makefile
+examples/Makefile
+test/Makefile
+test/boolean/Makefile
+test/delaunay/Makefile
+test/coarsen/Makefile
+ config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@GTS_MAJOR_VERSION@%$GTS_MAJOR_VERSION%g
+s%@GTS_MINOR_VERSION@%$GTS_MINOR_VERSION%g
+s%@GTS_MICRO_VERSION@%$GTS_MICRO_VERSION%g
+s%@GTS_VERSION@%$GTS_VERSION%g
+s%@LT_RELEASE@%$LT_RELEASE%g
+s%@LT_CURRENT@%$LT_CURRENT%g
+s%@LT_REVISION@%$LT_REVISION%g
+s%@LT_AGE@%$LT_AGE%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@RANLIB@%$RANLIB%g
+s%@CC@%$CC%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@AWK@%$AWK%g
+s%@CPP@%$CPP%g
+s%@GLIB_CONFIG@%$GLIB_CONFIG%g
+s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
+s%@GLIB_LIBS@%$GLIB_LIBS%g
+s%@glib_cflags@%$glib_cflags%g
+s%@glib_libs@%$glib_libs%g
+s%@glib_thread_cflags@%$glib_thread_cflags%g
+s%@glib_thread_libs@%$glib_thread_libs%g
+s%@GLIB_DEPLIBS@%$GLIB_DEPLIBS%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile
+src/Makefile
+src/gts-config
+tools/Makefile
+doc/Makefile
+examples/Makefile
+test/Makefile
+test/boolean/Makefile
+test/delaunay/Makefile
+test/coarsen/Makefile
+"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='\([ 	]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+
+	gts_defines="
+#define GTS_MAJOR_VERSION $GTS_MAJOR_VERSION
+#define GTS_MINOR_VERSION $GTS_MINOR_VERSION
+#define GTS_MICRO_VERSION $GTS_MICRO_VERSION"
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
+	echo creating src/gtsconfig.h
+	cat >src/gtsconfig.h <<\__EOF
+/* gtsconfig.h
+ * 
+ * This is a generated file.  Please modify `configure.in'
+ */
+
+#ifndef GTSCONFIG_H
+#define GTSCONFIG_H
+__EOF
+	cat >>src/gtsconfig.h <<__EOF
+$gts_defines
+
+#endif /* GTSCONFIG_H */
+__EOF
+
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..9fcc50b
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,184 @@
+AC_INIT(src/gts.h)
+
+dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
+dnl are available for $ac_help expansion (don't we all *love* autoconf?)
+AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+# Making releases:
+#   GTS_MICRO_VERSION += 1;
+#   GTS_INTERFACE_AGE += 1;
+#   GTS_BINARY_AGE += 1;
+# if any functions have been added, set GTS_INTERFACE_AGE to 0.
+# if backwards compatibility has been broken,
+# set GTS_BINARY_AGE and GTS_INTERFACE_AGE to 0.
+#
+GTS_MAJOR_VERSION=0
+GTS_MINOR_VERSION=5
+GTS_MICRO_VERSION=1
+GTS_INTERFACE_AGE=1
+GTS_BINARY_AGE=1
+GTS_VERSION=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION.$GTS_MICRO_VERSION
+dnl
+AC_DIVERT_POP()dnl
+
+AC_SUBST(GTS_MAJOR_VERSION)
+AC_SUBST(GTS_MINOR_VERSION)
+AC_SUBST(GTS_MICRO_VERSION)
+AC_SUBST(GTS_VERSION)
+
+# libtool versioning
+LT_RELEASE=$GTS_MAJOR_VERSION.$GTS_MINOR_VERSION
+LT_CURRENT=`expr $GTS_MICRO_VERSION - $GTS_INTERFACE_AGE`
+LT_REVISION=$GTS_INTERFACE_AGE
+LT_AGE=`expr $GTS_BINARY_AGE - $GTS_INTERFACE_AGE`
+AC_SUBST(LT_RELEASE)
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+
+# For automake.
+VERSION=$GTS_VERSION
+PACKAGE=gts
+
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
+
+# Specify a configuration file
+AM_CONFIG_HEADER(config.h)
+
+AC_DEFINE_UNQUOTED(GTS_MAJOR_VERSION, $GTS_MAJOR_VERSION)
+AC_DEFINE_UNQUOTED(GTS_MINOR_VERSION, $GTS_MINOR_VERSION)
+AC_DEFINE_UNQUOTED(GTS_MICRO_VERSION, $GTS_MICRO_VERSION)
+AC_DEFINE_UNQUOTED(GTS_INTERFACE_AGE, $GTS_INTERFACE_AGE)
+AC_DEFINE_UNQUOTED(GTS_BINARY_AGE, $GTS_BINARY_AGE)
+
+dnl Initialize libtool
+AM_PROG_LIBTOOL
+
+dnl Initialize maintainer mode
+AM_MAINTAINER_MODE
+
+AC_PROG_CC
+
+if test x$GCC = xyes ; then
+  CFLAGS="$CFLAGS -Wall -Werror-implicit-function-declaration -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
+fi
+
+AC_PROG_AWK
+AC_ISC_POSIX
+AC_HEADER_STDC
+AC_ARG_PROGRAM
+
+if test x$with_glib = xyes ; then
+  AC_MSG_ERROR([
+*** Directory must be specified for --with-glib])
+fi
+
+if test x$with_glib = x ; then 
+  # Look for separately installed glib
+
+  AM_PATH_GLIB(1.2.0,,
+    AC_MSG_ERROR([
+*** GLIB 1.2.0 or better is required. The latest version of GLIB
+*** is always available from ftp://ftp.gtk.org/.]),
+    gmodule gthread)
+
+  # we do not want to make all gts progs to link to thread or module libraries.
+  glib_cflags=`$GLIB_CONFIG glib --cflags`
+  glib_thread_cflags="$GLIB_CFLAGS"
+  glib_libs=`$GLIB_CONFIG glib --libs`
+  glib_thread_libs="$GLIB_LIBS"
+  GLIB_LIBS="$glib_libs"
+  GLIB_DEPLIBS="$glib_libs"
+else
+  # Use uninstalled glib (assume they got the version right)
+
+  GLIB_CONFIG=$with_glib/glib-config
+  if test -x $GLIB_CONFIG ; then 
+    :
+  else
+    AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
+  fi
+
+  # For use in gts-config
+  glib_cflags=`$GLIB_CONFIG --cflags`
+  glib_thread_cflags=`$GLIB_CONFIG --cflags gthread`
+  glib_libs=`$GLIB_CONFIG --libs`
+  glib_thread_libs=`$GLIB_CONFIG --libs gthread`
+
+  glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'`
+
+  # canonicalize relative paths
+  case $with_glib in 
+    /*)
+      glib_dir=$with_glib
+      ;;
+    *)
+      glib_dir="\$(top_builddir)/$with_glib"
+      ;;
+  esac
+
+  GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
+  GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule.la"
+  GLIB_DEPLIBS=
+
+  AC_SUBST(GLIB_CFLAGS)
+  AC_SUBST(GLIB_LIBS)
+fi
+
+AC_SUBST(glib_cflags)
+AC_SUBST(glib_libs)
+AC_SUBST(glib_thread_cflags)
+AC_SUBST(glib_thread_libs)
+AC_SUBST(GLIB_DEPLIBS)
+
+CFLAGS="$CFLAGS $glib_cflags"
+LDFLAGS="$LDFLAGS $glib_libs"
+
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
+
+dnl generate `src/gtsconfig.h'
+AC_OUTPUT_COMMANDS([
+	echo creating src/gtsconfig.h
+	cat >src/gtsconfig.h <<\__EOF
+/* gtsconfig.h
+ * 
+ * This is a generated file.  Please modify `configure.in'
+ */
+
+#ifndef GTSCONFIG_H
+#define GTSCONFIG_H
+__EOF
+	cat >>src/gtsconfig.h <<__EOF
+$gts_defines
+
+#endif /* GTSCONFIG_H */
+__EOF
+],[
+	gts_defines="
+#define GTS_MAJOR_VERSION $GTS_MAJOR_VERSION
+#define GTS_MINOR_VERSION $GTS_MINOR_VERSION
+#define GTS_MICRO_VERSION $GTS_MICRO_VERSION"
+])
+
+dnl header file checks
+AC_CHECK_HEADERS(fpu_control.h, AC_DEFINE(HAVE_FPU_CONTROL_H))
+AC_CHECK_HEADERS(floatingpoint.h, AC_DEFINE(HAVE_FLOATINGPOINT_H))
+AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
+AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H))
+
+dnl functions checks
+AC_CHECK_FUNCS(getopt_long)
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+src/gts-config
+tools/Makefile
+doc/Makefile
+examples/Makefile
+test/Makefile
+test/boolean/Makefile
+test/delaunay/Makefile
+test/coarsen/Makefile
+])
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..ab93488
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,41 @@
+## Process this file with automake to produce Makefile.in
+
+# The name of the module.
+DOC_MODULE=gts
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE=gts-docs.sgml
+
+# The directory containing the source code (if it contains documentation).
+DOC_SOURCE_DIR=../src
+
+TARGET_DIR=html/$(DOC_MODULE)
+
+EXTRA_DIST=html
+
+scan:
+	gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="predicates.h gts-private.h rounding.h"
+
+templates: scan
+	gtkdoc-mktmpl --module=$(DOC_MODULE)
+
+sgml:
+	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
+
+html:
+	if ! test -d html ; then mkdir html ; fi
+	-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+
+clean-local:
+	rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt
+
+maintainer-clean-local: clean
+	rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt 
+
+## install-data-local:
+##	install -d -m 0755 $(TARGET_DIR)
+##	install -m 0644 html/*.html $(TARGET_DIR)
+##	install -m 0644 html/index.sgml $(TARGET_DIR)
+##	gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)
+
+.PHONY : html sgml templates scan
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..84c2e91
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,231 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# The name of the module.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+DOC_MODULE = gts
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE = gts-docs.sgml
+
+# The directory containing the source code (if it contains documentation).
+DOC_SOURCE_DIR = ../src
+
+TARGET_DIR = html/$(DOC_MODULE)
+
+EXTRA_DIST = html
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = doc
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am clean-local
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am \
+		maintainer-clean-local
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+scan:
+	gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="predicates.h gts-private.h rounding.h"
+
+templates: scan
+	gtkdoc-mktmpl --module=$(DOC_MODULE)
+
+sgml:
+	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
+
+html:
+	if ! test -d html ; then mkdir html ; fi
+	-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+
+clean-local:
+	rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt
+
+maintainer-clean-local: clean
+	rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt 
+
+.PHONY : html sgml templates scan
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/html/book1.html b/doc/html/book1.html
new file mode 100644
index 0000000..80569b3
--- /dev/null
+++ b/doc/html/book1.html
@@ -0,0 +1,337 @@
+<HTML
+><HEAD
+><TITLE
+>GTS Library Reference Manual</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="NEXT"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"></HEAD
+><BODY
+CLASS="BOOK"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="BOOK"
+><DIV
+CLASS="TITLEPAGE"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+ALIGN="center"
+VALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="7"
+><P
+CLASS="TITLE"
+><A
+NAME="AEN2"
+>GTS Library Reference Manual</A
+></P
+></FONT
+></TH
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="c4.html"
+>Basic Macros, functions and data structures</A
+></DT
+><DD
+><DL
+><DT
+><A
+HREF="gts-binary-heaps.html"
+>Binary heaps</A
+> — efficient data structure for priority heaps.</DT
+><DT
+><A
+HREF="gts-extended-binary-heaps.html"
+>Extended binary heaps</A
+> — efficient data structure for priority heaps allowing removal of elements.</DT
+><DT
+><A
+HREF="gts-first-in-first-out-heaps.html"
+>First In First Out heaps</A
+> — </DT
+><DT
+><A
+HREF="gts-vectors-and-matrices.html"
+>Vectors and matrices</A
+> — simple operations on vectors and matrices.</DT
+><DT
+><A
+HREF="gts-simple-statistics.html"
+>Simple statistics</A
+> — a basic structure for computing min, max, average and variance.</DT
+><DT
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+>Miscellaneous macros and functions</A
+> — Various utilities.</DT
+></DL
+></DD
+><DT
+><A
+HREF="c1908.html"
+>Geometrical Object Hierarchy</A
+></DT
+><DD
+><DL
+><DT
+><A
+HREF="gts-object-class.html"
+>Object class</A
+> — parent class for all GTS objects.</DT
+><DT
+><A
+HREF="gts-container-classes.html"
+>Container classes</A
+> — </DT
+><DT
+><A
+HREF="gts-containee-classes.html"
+>Containee classes</A
+> — </DT
+><DT
+><A
+HREF="gts-points.html"
+>Points</A
+> — point object and related functions.</DT
+><DT
+><A
+HREF="gts-vertices.html"
+>Vertices</A
+> — vertex object and related functions.</DT
+><DT
+><A
+HREF="gts-segments.html"
+>Segments</A
+> — segment object and related functions.</DT
+><DT
+><A
+HREF="gts-edges.html"
+>Edges</A
+> — edge object and related functions.</DT
+><DT
+><A
+HREF="gts-triangles.html"
+>Triangles</A
+> — triangle object and related functions.</DT
+><DT
+><A
+HREF="gts-faces.html"
+>Faces</A
+> — face object and related functions.</DT
+><DT
+><A
+HREF="gts-surfaces.html"
+>Surfaces</A
+> — surface object and related functions.</DT
+></DL
+></DD
+><DT
+><A
+HREF="c8393.html"
+>Geometrical data structures</A
+></DT
+><DD
+><DL
+><DT
+><A
+HREF="gts-kd-trees.html"
+>Kd-Trees</A
+> — an efficient way of doing point location queries.</DT
+><DT
+><A
+HREF="gts-bounding-boxes-trees.html"
+>Bounding boxes trees</A
+> — implementation of axis-aligned bounding-box trees.</DT
+></DL
+></DD
+><DT
+><A
+HREF="c9853.html"
+>Surface operations</A
+></DT
+><DD
+><DL
+><DT
+><A
+HREF="gts-boolean-operations.html"
+>Boolean operations</A
+> — set operations between surfaces: union, intersection, difference.</DT
+><DT
+><A
+HREF="gts-surface-simplification-and-refinement.html"
+>Surface simplification and refinement</A
+> — reducing or increasing the number of edges of a triangulated surface.</DT
+><DT
+><A
+HREF="gts-out-of-core-simplification.html"
+>Out-of-core simplification</A
+> — objects for simplification based on vertex clustering.</DT
+><DT
+><A
+HREF="gts-isosurfaces-from-3d-functions.html"
+>Isosurfaces from 3D functions</A
+> — computing triangulated isosurfaces of a given function f(x,y,z).</DT
+><DT
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+>Delaunay and constrained Delaunay triangulations</A
+> — implementation of a dynamic Delaunay triangulation algorithm.</DT
+></DL
+></DD
+><DT
+><A
+HREF="c12040.html"
+>Progressive and Hierarchical surfaces</A
+></DT
+><DD
+><DL
+><DT
+><A
+HREF="gts-vertex-split.html"
+>Vertex split</A
+> — object encoding a reversible edge-collapse operation.</DT
+><DT
+><A
+HREF="gts-progressive-surfaces.html"
+>Progressive surfaces</A
+> — continuous level-of-detail for surfaces.</DT
+><DT
+><A
+HREF="gts-hierarchical-vertex-split.html"
+>Hierarchical vertex split</A
+> — hierarchical extension of the vertex split.</DT
+><DT
+><A
+HREF="gts-hierarchical-surfaces.html"
+>Hierarchical surfaces</A
+> — extension of progressive surfaces allowing arbitrary sequences of vertex split or collapse.</DT
+></DL
+></DD
+><DT
+><A
+HREF="c13676.html"
+>Graph and operations on graphs</A
+></DT
+><DD
+><DL
+><DT
+><A
+HREF="gts-graph-class.html"
+>Graph class</A
+> — </DT
+><DT
+><A
+HREF="gts-weighted-graph.html"
+>Weighted graph</A
+> — </DT
+><DT
+><A
+HREF="gts-progressive-graph.html"
+>Progressive graph</A
+> — </DT
+><DT
+><A
+HREF="gts-graph-partitioning.html"
+>Graph partitioning</A
+> — </DT
+></DL
+></DD
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+> </TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+> </TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Basic Macros, functions and data structures</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c11561.html b/doc/html/c11561.html
new file mode 100644
index 0000000..e50c78a
--- /dev/null
+++ b/doc/html/c11561.html
@@ -0,0 +1,238 @@
+<HTML
+><HEAD
+><TITLE
+>Progressive and Hierarchical surfaces</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Delaunay and constrained Delaunay triangulations"
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"><LINK
+REL="NEXT"
+TITLE="Vertex split"
+HREF="gts-vertex-split.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN11561"
+>Progressive and Hierarchical surfaces</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-vertex-split.html"
+>Vertex split</A
+> — object encoding a reversible edge-collapse operation.</DT
+><DT
+><A
+HREF="gts-progressive-surfaces.html"
+>Progressive surfaces</A
+> — continuous level-of-detail for surfaces.</DT
+><DT
+><A
+HREF="gts-hierarchical-vertex-split.html"
+>Hierarchical vertex split</A
+> — hierarchical extension of the vertex split.</DT
+><DT
+><A
+HREF="gts-hierarchical-surfaces.html"
+>Hierarchical surfaces</A
+> — extension of progressive surfaces allowing arbitrary sequences of vertex split or collapse.</DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Delaunay and constrained Delaunay triangulations</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Vertex split</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c12040.html b/doc/html/c12040.html
new file mode 100644
index 0000000..3d948e1
--- /dev/null
+++ b/doc/html/c12040.html
@@ -0,0 +1,238 @@
+<HTML
+><HEAD
+><TITLE
+>Progressive and Hierarchical surfaces</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Delaunay and constrained Delaunay triangulations"
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"><LINK
+REL="NEXT"
+TITLE="Vertex split"
+HREF="gts-vertex-split.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN12040"
+>Progressive and Hierarchical surfaces</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-vertex-split.html"
+>Vertex split</A
+> — object encoding a reversible edge-collapse operation.</DT
+><DT
+><A
+HREF="gts-progressive-surfaces.html"
+>Progressive surfaces</A
+> — continuous level-of-detail for surfaces.</DT
+><DT
+><A
+HREF="gts-hierarchical-vertex-split.html"
+>Hierarchical vertex split</A
+> — hierarchical extension of the vertex split.</DT
+><DT
+><A
+HREF="gts-hierarchical-surfaces.html"
+>Hierarchical surfaces</A
+> — extension of progressive surfaces allowing arbitrary sequences of vertex split or collapse.</DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Delaunay and constrained Delaunay triangulations</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Vertex split</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c13060.html b/doc/html/c13060.html
new file mode 100644
index 0000000..ca8d204
--- /dev/null
+++ b/doc/html/c13060.html
@@ -0,0 +1,238 @@
+<HTML
+><HEAD
+><TITLE
+>Graph and operations on graphs</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Hierarchical surfaces"
+HREF="gts-hierarchical-surfaces.html"><LINK
+REL="NEXT"
+TITLE="Graph class"
+HREF="gts-graph-class.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-hierarchical-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-graph-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN13060"
+>Graph and operations on graphs</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-graph-class.html"
+>Graph class</A
+> — </DT
+><DT
+><A
+HREF="gts-weighted-graph.html"
+>Weighted graph</A
+> — </DT
+><DT
+><A
+HREF="gts-progressive-graph.html"
+>Progressive graph</A
+> — </DT
+><DT
+><A
+HREF="gts-graph-partitioning.html"
+>Graph partitioning</A
+> — </DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-hierarchical-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-graph-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Hierarchical surfaces</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Graph class</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c13676.html b/doc/html/c13676.html
new file mode 100644
index 0000000..656acaf
--- /dev/null
+++ b/doc/html/c13676.html
@@ -0,0 +1,238 @@
+<HTML
+><HEAD
+><TITLE
+>Graph and operations on graphs</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Hierarchical surfaces"
+HREF="gts-hierarchical-surfaces.html"><LINK
+REL="NEXT"
+TITLE="Graph class"
+HREF="gts-graph-class.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-hierarchical-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-graph-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN13676"
+>Graph and operations on graphs</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-graph-class.html"
+>Graph class</A
+> — </DT
+><DT
+><A
+HREF="gts-weighted-graph.html"
+>Weighted graph</A
+> — </DT
+><DT
+><A
+HREF="gts-progressive-graph.html"
+>Progressive graph</A
+> — </DT
+><DT
+><A
+HREF="gts-graph-partitioning.html"
+>Graph partitioning</A
+> — </DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-hierarchical-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-graph-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Hierarchical surfaces</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Graph class</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c1865.html b/doc/html/c1865.html
new file mode 100644
index 0000000..86a4115
--- /dev/null
+++ b/doc/html/c1865.html
@@ -0,0 +1,300 @@
+<HTML
+><HEAD
+><TITLE
+>Geometrical Object Hierarchy</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Miscellaneous macros and functions"
+HREF="gts-miscellaneous-macros-and-functions.html"><LINK
+REL="NEXT"
+TITLE="Object class"
+HREF="gts-object-class.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-object-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN1865"
+>Geometrical Object Hierarchy</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-object-class.html"
+>Object class</A
+> — parent class for all GTS objects.</DT
+><DT
+><A
+HREF="gts-container-classes.html"
+>Container classes</A
+> — </DT
+><DT
+><A
+HREF="gts-containee-classes.html"
+>Containee classes</A
+> — </DT
+><DT
+><A
+HREF="gts-points.html"
+>Points</A
+> — point object and related functions.</DT
+><DT
+><A
+HREF="gts-vertices.html"
+>Vertices</A
+> — vertex object and related functions.</DT
+><DT
+><A
+HREF="gts-segments.html"
+>Segments</A
+> — segment object and related functions.</DT
+><DT
+><A
+HREF="gts-edges.html"
+>Edges</A
+> — edge object and related functions.</DT
+><DT
+><A
+HREF="gts-triangles.html"
+>Triangles</A
+> — triangle object and related functions.</DT
+><DT
+><A
+HREF="gts-faces.html"
+>Faces</A
+> — face object and related functions.</DT
+><DT
+><A
+HREF="gts-surfaces.html"
+>Surfaces</A
+> — surface object and related functions.</DT
+></DL
+></DIV
+><P
+>    GTS uses a simple object system implemented in C which allows all
+    the basic paradigms of object-oriented programming: inheritance of
+    class members and virtual functions overloading in particular.
+    </P
+><P
+>    The class hierarchy is implemented via a hierarchy of nested C
+    structs and type casting. In order to avoid "wild" type casts
+    between objects belonging to incompatible classes, type casting is
+    done through macros which check if the conversion is valid. This
+    type checking is however relatively expensive and can be disabled
+    on production code by omitting the GTS_CHECK_CASTS define at
+    compile time.
+    </P
+><P
+>    The basic geometrical objects of GTS do not have any support for
+    attributes such as color, texture coordinates, material properties
+    etc... which may be of interest when using GTS for graphical
+    applications. This choice was made on purpose in order to keep GTS
+    as general as possible. Using object inheritance it should however
+    be easy to extend the base classes to fit your personal needs.
+    </P
+><P
+>    When destroying geometrical objects you must keep in mind their
+    geometrical relationships. Destroying a vertex also destroys all
+    the edges using this particular vertex, destroying an edge
+    destroys the triangles. Vertices, edges or faces not used by any
+    segment, triangle or surface respectively are considered to be
+    "floating" objects. When initially created all vertices, edges or
+    faces are floating. Destroying a segment, triangle or surface will
+    cause the destruction of any new floating vertex, edge or face.
+    </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-object-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Miscellaneous macros and functions</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Object class</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c1908.html b/doc/html/c1908.html
new file mode 100644
index 0000000..89f17aa
--- /dev/null
+++ b/doc/html/c1908.html
@@ -0,0 +1,300 @@
+<HTML
+><HEAD
+><TITLE
+>Geometrical Object Hierarchy</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Miscellaneous macros and functions"
+HREF="gts-miscellaneous-macros-and-functions.html"><LINK
+REL="NEXT"
+TITLE="Object class"
+HREF="gts-object-class.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-object-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN1908"
+>Geometrical Object Hierarchy</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-object-class.html"
+>Object class</A
+> — parent class for all GTS objects.</DT
+><DT
+><A
+HREF="gts-container-classes.html"
+>Container classes</A
+> — </DT
+><DT
+><A
+HREF="gts-containee-classes.html"
+>Containee classes</A
+> — </DT
+><DT
+><A
+HREF="gts-points.html"
+>Points</A
+> — point object and related functions.</DT
+><DT
+><A
+HREF="gts-vertices.html"
+>Vertices</A
+> — vertex object and related functions.</DT
+><DT
+><A
+HREF="gts-segments.html"
+>Segments</A
+> — segment object and related functions.</DT
+><DT
+><A
+HREF="gts-edges.html"
+>Edges</A
+> — edge object and related functions.</DT
+><DT
+><A
+HREF="gts-triangles.html"
+>Triangles</A
+> — triangle object and related functions.</DT
+><DT
+><A
+HREF="gts-faces.html"
+>Faces</A
+> — face object and related functions.</DT
+><DT
+><A
+HREF="gts-surfaces.html"
+>Surfaces</A
+> — surface object and related functions.</DT
+></DL
+></DIV
+><P
+>    GTS uses a simple object system implemented in C which allows all
+    the basic paradigms of object-oriented programming: inheritance of
+    class members and virtual functions overloading in particular.
+    </P
+><P
+>    The class hierarchy is implemented via a hierarchy of nested C
+    structs and type casting. In order to avoid "wild" type casts
+    between objects belonging to incompatible classes, type casting is
+    done through macros which check if the conversion is valid. This
+    type checking is however relatively expensive and can be disabled
+    on production code by omitting the GTS_CHECK_CASTS define at
+    compile time.
+    </P
+><P
+>    The basic geometrical objects of GTS do not have any support for
+    attributes such as color, texture coordinates, material properties
+    etc... which may be of interest when using GTS for graphical
+    applications. This choice was made on purpose in order to keep GTS
+    as general as possible. Using object inheritance it should however
+    be easy to extend the base classes to fit your personal needs.
+    </P
+><P
+>    When destroying geometrical objects you must keep in mind their
+    geometrical relationships. Destroying a vertex also destroys all
+    the edges using this particular vertex, destroying an edge
+    destroys the triangles. Vertices, edges or faces not used by any
+    segment, triangle or surface respectively are considered to be
+    "floating" objects. When initially created all vertices, edges or
+    faces are floating. Destroying a segment, triangle or surface will
+    cause the destruction of any new floating vertex, edge or face.
+    </P
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-object-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Miscellaneous macros and functions</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Object class</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c4.html b/doc/html/c4.html
new file mode 100644
index 0000000..118dcd9
--- /dev/null
+++ b/doc/html/c4.html
@@ -0,0 +1,248 @@
+<HTML
+><HEAD
+><TITLE
+>Basic Macros, functions and data structures</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="NEXT"
+TITLE="Binary heaps"
+HREF="gts-binary-heaps.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN4"
+>Basic Macros, functions and data structures</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-binary-heaps.html"
+>Binary heaps</A
+> — efficient data structure for priority heaps.</DT
+><DT
+><A
+HREF="gts-extended-binary-heaps.html"
+>Extended binary heaps</A
+> — efficient data structure for priority heaps allowing removal of elements.</DT
+><DT
+><A
+HREF="gts-first-in-first-out-heaps.html"
+>First In First Out heaps</A
+> — </DT
+><DT
+><A
+HREF="gts-vectors-and-matrices.html"
+>Vectors and matrices</A
+> — simple operations on vectors and matrices.</DT
+><DT
+><A
+HREF="gts-simple-statistics.html"
+>Simple statistics</A
+> — a basic structure for computing min, max, average and variance.</DT
+><DT
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+>Miscellaneous macros and functions</A
+> — Various utilities.</DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>GTS Library Reference Manual</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Binary heaps</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c8089.html b/doc/html/c8089.html
new file mode 100644
index 0000000..a08a6ae
--- /dev/null
+++ b/doc/html/c8089.html
@@ -0,0 +1,228 @@
+<HTML
+><HEAD
+><TITLE
+>Geometrical data structures</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Surfaces"
+HREF="gts-surfaces.html"><LINK
+REL="NEXT"
+TITLE="Kd-Trees"
+HREF="gts-kd-trees.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-kd-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN8089"
+>Geometrical data structures</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-kd-trees.html"
+>Kd-Trees</A
+> — an efficient way of doing point location queries.</DT
+><DT
+><A
+HREF="gts-bounding-boxes-trees.html"
+>Bounding boxes trees</A
+> — implementation of axis-aligned bounding-box trees.</DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-kd-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Surfaces</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Kd-Trees</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c8393.html b/doc/html/c8393.html
new file mode 100644
index 0000000..6bd01a9
--- /dev/null
+++ b/doc/html/c8393.html
@@ -0,0 +1,228 @@
+<HTML
+><HEAD
+><TITLE
+>Geometrical data structures</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Surfaces"
+HREF="gts-surfaces.html"><LINK
+REL="NEXT"
+TITLE="Kd-Trees"
+HREF="gts-kd-trees.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-kd-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN8393"
+>Geometrical data structures</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-kd-trees.html"
+>Kd-Trees</A
+> — an efficient way of doing point location queries.</DT
+><DT
+><A
+HREF="gts-bounding-boxes-trees.html"
+>Bounding boxes trees</A
+> — implementation of axis-aligned bounding-box trees.</DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-kd-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Surfaces</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Kd-Trees</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c9511.html b/doc/html/c9511.html
new file mode 100644
index 0000000..8622eb5
--- /dev/null
+++ b/doc/html/c9511.html
@@ -0,0 +1,243 @@
+<HTML
+><HEAD
+><TITLE
+>Surface operations</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Bounding boxes trees"
+HREF="gts-bounding-boxes-trees.html"><LINK
+REL="NEXT"
+TITLE="Boolean operations"
+HREF="gts-boolean-operations.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-bounding-boxes-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-boolean-operations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN9511"
+>Surface operations</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-boolean-operations.html"
+>Boolean operations</A
+> — set operations between surfaces: union, intersection, difference.</DT
+><DT
+><A
+HREF="gts-surface-simplification-and-refinement.html"
+>Surface simplification and refinement</A
+> — reducing or increasing the number of edges of a triangulated surface.</DT
+><DT
+><A
+HREF="gts-out-of-core-simplification.html"
+>Out-of-core simplification</A
+> — objects for simplification based on vertex clustering.</DT
+><DT
+><A
+HREF="gts-isosurfaces-from-3d-functions.html"
+>Isosurfaces from 3D functions</A
+> — computing triangulated isosurfaces of a given function f(x,y,z).</DT
+><DT
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+>Delaunay and constrained Delaunay triangulations</A
+> — implementation of a dynamic Delaunay triangulation algorithm.</DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-bounding-boxes-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-boolean-operations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Bounding boxes trees</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Boolean operations</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/c9853.html b/doc/html/c9853.html
new file mode 100644
index 0000000..21015e6
--- /dev/null
+++ b/doc/html/c9853.html
@@ -0,0 +1,243 @@
+<HTML
+><HEAD
+><TITLE
+>Surface operations</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="PREVIOUS"
+TITLE="Bounding boxes trees"
+HREF="gts-bounding-boxes-trees.html"><LINK
+REL="NEXT"
+TITLE="Boolean operations"
+HREF="gts-boolean-operations.html"></HEAD
+><BODY
+CLASS="CHAPTER"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-bounding-boxes-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-boolean-operations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="CHAPTER"
+><H1
+><A
+NAME="AEN9853"
+>Surface operations</A
+></H1
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="gts-boolean-operations.html"
+>Boolean operations</A
+> — set operations between surfaces: union, intersection, difference.</DT
+><DT
+><A
+HREF="gts-surface-simplification-and-refinement.html"
+>Surface simplification and refinement</A
+> — reducing or increasing the number of edges of a triangulated surface.</DT
+><DT
+><A
+HREF="gts-out-of-core-simplification.html"
+>Out-of-core simplification</A
+> — objects for simplification based on vertex clustering.</DT
+><DT
+><A
+HREF="gts-isosurfaces-from-3d-functions.html"
+>Isosurfaces from 3D functions</A
+> — computing triangulated isosurfaces of a given function f(x,y,z).</DT
+><DT
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+>Delaunay and constrained Delaunay triangulations</A
+> — implementation of a dynamic Delaunay triangulation algorithm.</DT
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-bounding-boxes-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+> </B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-boolean-operations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Bounding boxes trees</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Boolean operations</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/dummy.html b/doc/html/dummy.html
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/doc/html/dummy.html
@@ -0,0 +1 @@
+
diff --git a/doc/html/gts-binary-heaps.html b/doc/html/gts-binary-heaps.html
new file mode 100644
index 0000000..c0551a4
--- /dev/null
+++ b/doc/html/gts-binary-heaps.html
@@ -0,0 +1,1198 @@
+<HTML
+><HEAD
+><TITLE
+>Binary heaps</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"><LINK
+REL="PREVIOUS"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"><LINK
+REL="NEXT"
+TITLE="Extended binary heaps"
+HREF="gts-extended-binary-heaps.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-extended-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-BINARY-HEAPS"
+>Binary heaps</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN11"
+></A
+><H2
+>Name</H2
+>Binary heaps -- efficient data structure for priority heaps.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN14"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+struct      <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>;
+
+<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>*    <A
+HREF="gts-binary-heaps.html#GTS-HEAP-NEW"
+>gts_heap_new</A
+>                    (<GTKDOCLINK
+HREF="GCOMPAREFUNC"
+>GCompareFunc</GTKDOCLINK
+> compare_func);
+void        <A
+HREF="gts-binary-heaps.html#GTS-HEAP-INSERT"
+>gts_heap_insert</A
+>                 (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-binary-heaps.html#GTS-HEAP-REMOVE-TOP"
+>gts_heap_remove_top</A
+>             (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-binary-heaps.html#GTS-HEAP-TOP"
+>gts_heap_top</A
+>                    (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);
+void        <A
+HREF="gts-binary-heaps.html#GTS-HEAP-FREEZE"
+>gts_heap_freeze</A
+>                 (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);
+void        <A
+HREF="gts-binary-heaps.html#GTS-HEAP-THAW"
+>gts_heap_thaw</A
+>                   (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);
+void        <A
+HREF="gts-binary-heaps.html#GTS-HEAP-FOREACH"
+>gts_heap_foreach</A
+>                (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GFUNC"
+>GFunc</GTKDOCLINK
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> user_data);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-binary-heaps.html#GTS-HEAP-SIZE"
+>gts_heap_size</A
+>                   (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);
+void        <A
+HREF="gts-binary-heaps.html#GTS-HEAP-DESTROY"
+>gts_heap_destroy</A
+>                (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN43"
+></A
+><H2
+>Description</H2
+><P
+>The basic operations <A
+HREF="gts-binary-heaps.html#GTS-HEAP-INSERT"
+>gts_heap_insert</A
+>() and <A
+HREF="gts-binary-heaps.html#GTS-HEAP-REMOVE-TOP"
+>gts_heap_remove_top</A
+>() are performed in O(log n) time. Calling <A
+HREF="gts-binary-heaps.html#GTS-HEAP-FREEZE"
+>gts_heap_freeze</A
+>(), inserting elements using <A
+HREF="gts-binary-heaps.html#GTS-HEAP-INSERT"
+>gts_heap_insert</A
+>() and calling <A
+HREF="gts-binary-heaps.html#GTS-HEAP-THAW"
+>gts_heap_thaw</A
+>() allows to build the binary heap in O(n) time.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN51"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN53"
+></A
+><H3
+><A
+NAME="GTSHEAP"
+></A
+>struct GtsHeap</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsHeap;</PRE
+></TD
+></TR
+></TABLE
+><P
+>An opaque data structure describing a binary heap.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN58"
+></A
+><H3
+><A
+NAME="GTS-HEAP-NEW"
+></A
+>gts_heap_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>*    gts_heap_new                    (<GTKDOCLINK
+HREF="GCOMPAREFUNC"
+>GCompareFunc</GTKDOCLINK
+> compare_func);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>compare_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a GCompareFunc.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> using <TT
+CLASS="PARAMETER"
+><I
+>compare_func</I
+></TT
+> as a sorting function.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN81"
+></A
+><H3
+><A
+NAME="GTS-HEAP-INSERT"
+></A
+>gts_heap_insert ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_heap_insert                 (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Inserts a new element <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> in the heap.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to add to the heap.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN104"
+></A
+><H3
+><A
+NAME="GTS-HEAP-REMOVE-TOP"
+></A
+>gts_heap_remove_top ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_heap_remove_top             (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes the element at the top of the heap.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the element at the top of the heap.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN126"
+></A
+><H3
+><A
+NAME="GTS-HEAP-TOP"
+></A
+>gts_heap_top ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_heap_top                    (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the element at the top of the heap.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN148"
+></A
+><H3
+><A
+NAME="GTS-HEAP-FREEZE"
+></A
+>gts_heap_freeze ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_heap_freeze                 (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Freezes the heap. Any subsequent operation will not preserve the heap
+property. Used in conjunction with <A
+HREF="gts-binary-heaps.html#GTS-HEAP-INSERT"
+>gts_heap_insert</A
+>() and <A
+HREF="gts-binary-heaps.html#GTS-HEAP-THAW"
+>gts_heap_thaw</A
+>()
+to create a heap in O(n) time.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN167"
+></A
+><H3
+><A
+NAME="GTS-HEAP-THAW"
+></A
+>gts_heap_thaw ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_heap_thaw                   (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>If <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> has been frozen previously using <A
+HREF="gts-binary-heaps.html#GTS-HEAP-FREEZE"
+>gts_heap_freeze</A
+>(), reorder it
+in O(n) time and unfreeze it.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN186"
+></A
+><H3
+><A
+NAME="GTS-HEAP-FOREACH"
+></A
+>gts_heap_foreach ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_heap_foreach                (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GFUNC"
+>GFunc</GTKDOCLINK
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> user_data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the function to call for each element in the heap.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>user_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> to pass to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN214"
+></A
+><H3
+><A
+NAME="GTS-HEAP-SIZE"
+></A
+>gts_heap_size ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_heap_size                   (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of items in <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN237"
+></A
+><H3
+><A
+NAME="GTS-HEAP-DESTROY"
+></A
+>gts_heap_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_heap_destroy                (<A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Free all the memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-extended-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Basic Macros, functions and data structures</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Extended binary heaps</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-boolean-operations.html b/doc/html/gts-boolean-operations.html
new file mode 100644
index 0000000..ac57d37
--- /dev/null
+++ b/doc/html/gts-boolean-operations.html
@@ -0,0 +1,1300 @@
+<HTML
+><HEAD
+><TITLE
+>Boolean operations</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Surface operations"
+HREF="c9853.html"><LINK
+REL="PREVIOUS"
+TITLE="Surface operations"
+HREF="c9853.html"><LINK
+REL="NEXT"
+TITLE="Surface simplification and refinement"
+HREF="gts-surface-simplification-and-refinement.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-surface-simplification-and-refinement.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-BOOLEAN-OPERATIONS"
+>Boolean operations</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN9860"
+></A
+><H2
+>Name</H2
+>Boolean operations -- set operations between surfaces: union, intersection, difference.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN9863"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-boolean-operations.html#GTS-SURFACE-INTER-CLASS-CAPS"
+>GTS_SURFACE_INTER_CLASS</A
+>         (klass)
+#define     <A
+HREF="gts-boolean-operations.html#GTS-SURFACE-INTER-CAPS"
+>GTS_SURFACE_INTER</A
+>               (obj)
+#define     <A
+HREF="gts-boolean-operations.html#GTS-IS-SURFACE-INTER-CAPS"
+>GTS_IS_SURFACE_INTER</A
+>            (obj)
+struct      <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+>;
+struct      <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>;
+
+<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+>* <A
+HREF="gts-boolean-operations.html#GTS-SURFACE-INTER-CLASS"
+>gts_surface_inter_class</A
+>
+                                            (void);
+<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>* <A
+HREF="gts-boolean-operations.html#GTS-SURFACE-INTER-NEW"
+>gts_surface_inter_new</A
+>      (<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s1,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s2,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *faces_tree1,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *faces_tree2);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-boolean-operations.html#GTS-SURFACE-INTER-CHECK"
+>gts_surface_inter_check</A
+>         (<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+> *si);
+enum        <A
+HREF="gts-boolean-operations.html#GTSBOOLEANOPERATION"
+>GtsBooleanOperation</A
+>;
+void        <A
+HREF="gts-boolean-operations.html#GTS-SURFACE-INTER-BOOLEAN"
+>gts_surface_inter_boolean</A
+>       (<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+> *si,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-boolean-operations.html#GTSBOOLEANOPERATION"
+>GtsBooleanOperation</A
+> op);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN9888"
+></A
+><H2
+>Description</H2
+><P
+>The three-dimensional curve intersection of two surfaces is described by a <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+> object. This object contains additional information which allows to compute all the set operations between the two surfaces.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN9892"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9894"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-INTER-CLASS-CAPS"
+></A
+>GTS_SURFACE_INTER_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SURFACE_INTER_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9911"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-INTER-CAPS"
+></A
+>GTS_SURFACE_INTER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SURFACE_INTER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9928"
+></A
+><H3
+><A
+NAME="GTS-IS-SURFACE-INTER-CAPS"
+></A
+>GTS_IS_SURFACE_INTER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_SURFACE_INTER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9946"
+></A
+><H3
+><A
+NAME="GTSSURFACEINTERCLASS"
+></A
+>struct GtsSurfaceInterClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSurfaceInterClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The surface intersection class.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9951"
+></A
+><H3
+><A
+NAME="GTSSURFACEINTER"
+></A
+>struct GtsSurfaceInter</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSurfaceInter {
+  GtsObject object;
+
+  GtsSurface * s1;
+  GtsSurface * s2;
+  GSList * edges;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The surface intersection object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>s1</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Local triangulation of the intersecting faces of the first surface.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>s2</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Local triangulation of the intersecting faces of the second surface.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>edges</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>List of <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> defining the 3D curve intersection of the two surfaces.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9982"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-INTER-CLASS"
+></A
+>gts_surface_inter_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+>* gts_surface_inter_class
+                                            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9999"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-INTER-NEW"
+></A
+>gts_surface_inter_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>* gts_surface_inter_new      (<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s1,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s2,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *faces_tree1,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *faces_tree2);</PRE
+></TD
+></TR
+></TABLE
+><P
+>When triangulating the cut faces, the new faces inherit the
+attributes of these original faces through their <GTKDOCLINK
+HREF="ATTRIBUTES"
+>attributes</GTKDOCLINK
+>()
+method.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTERCLASS"
+>GtsSurfaceInterClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>faces_tree1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree (see <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-NEW"
+>gts_bb_tree_new</A
+>()) for
+the faces of <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>faces_tree2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree for the faces of <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+> describing the intersection of <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+>
+and <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10050"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-INTER-CHECK"
+></A
+>gts_surface_inter_check ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_surface_inter_check         (<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+> *si);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>si</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the curve described by <TT
+CLASS="PARAMETER"
+><I
+>si</I
+></TT
+> is an orientable
+manifold, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10075"
+></A
+><H3
+><A
+NAME="GTSBOOLEANOPERATION"
+></A
+>enum GtsBooleanOperation</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef enum { GTS_1_OUT_2, 
+	       GTS_1_IN_2, 
+	       GTS_2_OUT_1, 
+	       GTS_2_IN_1 }             GtsBooleanOperation;</PRE
+></TD
+></TR
+></TABLE
+><P
+><TT
+CLASS="PARAMETER"
+><I
+>GTS_1_OUT_2</I
+></TT
+> identifies the part of the first surface which lies outside the second surface.</P
+><P
+><TT
+CLASS="PARAMETER"
+><I
+>GTS_1_IN_2</I
+></TT
+> identifies the part of the first surface which lies inside the second surface.</P
+><P
+><TT
+CLASS="PARAMETER"
+><I
+>GTS_2_OUT_1</I
+></TT
+> identifies the part of the second surface which lies outside the first surface.</P
+><P
+><TT
+CLASS="PARAMETER"
+><I
+>GTS_2_IN_1</I
+></TT
+> identifies the part of the second surface which lies inside the first surface.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10087"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-INTER-BOOLEAN"
+></A
+>gts_surface_inter_boolean ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_inter_boolean       (<A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+> *si,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-boolean-operations.html#GTSBOOLEANOPERATION"
+>GtsBooleanOperation</A
+> op);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> the part of the surface described by <TT
+CLASS="PARAMETER"
+><I
+>si</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>op</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>si</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-boolean-operations.html#GTSSURFACEINTER"
+>GtsSurfaceInter</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>op</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-boolean-operations.html#GTSBOOLEANOPERATION"
+>GtsBooleanOperation</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-surface-simplification-and-refinement.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Surface operations</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Surface simplification and refinement</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-bounding-boxes-trees.html b/doc/html/gts-bounding-boxes-trees.html
new file mode 100644
index 0000000..abe9cfc
--- /dev/null
+++ b/doc/html/gts-bounding-boxes-trees.html
@@ -0,0 +1,5787 @@
+<HTML
+><HEAD
+><TITLE
+>Bounding boxes trees</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical data structures"
+HREF="c8393.html"><LINK
+REL="PREVIOUS"
+TITLE="Kd-Trees"
+HREF="gts-kd-trees.html"><LINK
+REL="NEXT"
+TITLE="Surface operations"
+HREF="c9853.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-kd-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-BOUNDING-BOXES-TREES"
+>Bounding boxes trees</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN8502"
+></A
+><H2
+>Name</H2
+>Bounding boxes trees -- implementation of axis-aligned bounding-box trees.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN8505"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-CLASS-CAPS"
+>GTS_BBOX_CLASS</A
+>                  (klass)
+#define     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-CAPS"
+>GTS_BBOX</A
+>                        (obj)
+#define     <A
+HREF="gts-bounding-boxes-trees.html#GTS-IS-BBOX-CAPS"
+>GTS_IS_BBOX</A
+>                     (obj)
+struct      <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>;
+struct      <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>;
+
+<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>* <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-CLASS"
+>gts_bbox_class</A
+>                (void);
+<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-NEW"
+>gts_bbox_new</A
+>                    (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z2);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-SET"
+>gts_bbox_set</A
+>                    (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z2);
+<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-SEGMENT"
+>gts_bbox_segment</A
+>                (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);
+<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-TRIANGLE"
+>gts_bbox_triangle</A
+>               (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-SURFACE"
+>gts_bbox_surface</A
+>                (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-POINTS"
+>gts_bbox_points</A
+>                 (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *points);
+<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-BBOXES"
+>gts_bbox_bboxes</A
+>                 (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *bboxes);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-DRAW"
+>gts_bbox_draw</A
+>                   (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+#define     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-POINT-IS-INSIDE"
+>gts_bbox_point_is_inside</A
+>        (bbox, p)
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOXES-ARE-OVERLAPPING"
+>gts_bboxes_are_overlapping</A
+>      (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb1,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb2);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-DIAGONAL2"
+>gts_bbox_diagonal2</A
+>              (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-POINT-DISTANCE2"
+>gts_bbox_point_distance2</A
+>        (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *min,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *max);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-IS-STABBED"
+>gts_bbox_is_stabbed</A
+>             (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p);
+
+void        (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBTREETRAVERSEFUNC"
+>*GtsBBTreeTraverseFunc</A
+>)        (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb1,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb2,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+>*      <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-NEW"
+>gts_bb_tree_new</A
+>                 (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *bboxes);
+<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+>*      <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE"
+>gts_bb_tree_surface</A
+>             (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-OVERLAP"
+>gts_bb_tree_overlap</A
+>             (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-IS-OVERLAPPING"
+>gts_bb_tree_is_overlapping</A
+>      (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-TRAVERSE-OVERLAPPING"
+>gts_bb_tree_traverse_overlapping</A
+>
+                                            (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree1,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree2,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBTREETRAVERSEFUNC"
+>GtsBBTreeTraverseFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-DRAW"
+>gts_bb_tree_draw</A
+>                (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> depth,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-DESTROY"
+>gts_bb_tree_destroy</A
+>             (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> free_leaves);
+
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>*GtsBBoxDistFunc</A
+>)              (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded);
+<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLOSESTFUNC"
+>*GtsBBoxClosestFunc</A
+>)           (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-DISTANCE"
+>gts_bb_tree_point_distance</A
+>      (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> **bbox);
+<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-CLOSEST"
+>gts_bb_tree_point_closest</A
+>       (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLOSESTFUNC"
+>GtsBBoxClosestFunc</A
+> closest,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *distance);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SEGMENT-DISTANCE"
+>gts_bb_tree_segment_distance</A
+>    (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-TRIANGLE-DISTANCE"
+>gts_bb_tree_triangle_distance</A
+>   (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-CLOSEST-BBOXES"
+>gts_bb_tree_point_closest_bboxes</A
+>
+                                            (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE-BOUNDARY-DISTANCE"
+>gts_bb_tree_surface_boundary_distance</A
+>
+                                            (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);
+void        <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE-DISTANCE"
+>gts_bb_tree_surface_distance</A
+>    (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);
+
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-STABBED"
+>gts_bb_tree_stabbed</A
+>             (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN8656"
+></A
+><H2
+>Description</H2
+><P
+>Axis-aligned bounding box trees can be used for intersection/collision detection using <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-TRAVERSE-OVERLAPPING"
+>gts_bb_tree_traverse_overlapping</A
+>(), or to compute the minimum distance between an object and a collection of others using <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-DISTANCE"
+>gts_bb_tree_point_distance</A
+>(), <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SEGMENT-DISTANCE"
+>gts_bb_tree_segment_distance</A
+>(), <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-TRIANGLE-DISTANCE"
+>gts_bb_tree_triangle_distance</A
+>() or <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE-DISTANCE"
+>gts_bb_tree_surface_distance</A
+>().</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN8664"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8666"
+></A
+><H3
+><A
+NAME="GTS-BBOX-CLASS-CAPS"
+></A
+>GTS_BBOX_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_BBOX_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8683"
+></A
+><H3
+><A
+NAME="GTS-BBOX-CAPS"
+></A
+>GTS_BBOX()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_BBOX(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8700"
+></A
+><H3
+><A
+NAME="GTS-IS-BBOX-CAPS"
+></A
+>GTS_IS_BBOX()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_BBOX(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8718"
+></A
+><H3
+><A
+NAME="GTSBBOXCLASS"
+></A
+>struct GtsBBoxClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsBBoxClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The bounding box class derived from <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8724"
+></A
+><H3
+><A
+NAME="GTSBBOX"
+></A
+>struct GtsBBox</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsBBox {
+  GtsObject object;
+  gpointer bounded;
+  gdouble x1, y1, z1;
+  gdouble x2, y2, z2;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The bounding box structure.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>bounded</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Bounded object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>x1</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>x coordinate of the lower-left front corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>y1</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>y coordinate of the lower-left front corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>z1</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>z coordinate of the lower-left front corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>x2</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>x coordinate of the upper-right back corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>y2</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>y coordinate of the upper-right back corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>z2</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>z coordinate of the upper-right back corner.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8774"
+></A
+><H3
+><A
+NAME="GTS-BBOX-CLASS"
+></A
+>gts_bbox_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>* gts_bbox_class                (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8791"
+></A
+><H3
+><A
+NAME="GTS-BBOX-NEW"
+></A
+>gts_bbox_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    gts_bbox_new                    (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bounded</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the object to be bounded.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> x-coordinate of the lower left corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> y-coordinate of the lower left corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> z-coordinate of the lower left corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> x-coordinate of the upper right corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> y-coordinate of the upper right corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> z-coordinate of the upper right corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8849"
+></A
+><H3
+><A
+NAME="GTS-BBOX-SET"
+></A
+>gts_bbox_set ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bbox_set                    (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z2);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Sets fields of <TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bounded</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the object to be bounded.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> x-coordinate of the lower left corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> y-coordinate of the lower left corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> z-coordinate of the lower left corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> x-coordinate of the upper right corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> y-coordinate of the upper right corner.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> z-coordinate of the upper right corner.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8902"
+></A
+><H3
+><A
+NAME="GTS-BBOX-SEGMENT"
+></A
+>gts_bbox_segment ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    gts_bbox_segment                (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> bounding box of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8932"
+></A
+><H3
+><A
+NAME="GTS-BBOX-TRIANGLE"
+></A
+>gts_bbox_triangle ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    gts_bbox_triangle               (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> bounding box of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8962"
+></A
+><H3
+><A
+NAME="GTS-BBOX-SURFACE"
+></A
+>gts_bbox_surface ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    gts_bbox_surface                (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> bounding box of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8992"
+></A
+><H3
+><A
+NAME="GTS-BBOX-POINTS"
+></A
+>gts_bbox_points ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    gts_bbox_points                 (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *points);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>points</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> bounding box of <TT
+CLASS="PARAMETER"
+><I
+>points</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9022"
+></A
+><H3
+><A
+NAME="GTS-BBOX-BBOXES"
+></A
+>gts_bbox_bboxes ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>*    gts_bbox_bboxes                 (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *bboxes);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLASS"
+>GtsBBoxClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bboxes</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> bounding box of all the bounding boxes in
+<TT
+CLASS="PARAMETER"
+><I
+>bboxes</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9052"
+></A
+><H3
+><A
+NAME="GTS-BBOX-DRAW"
+></A
+>gts_bbox_draw ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bbox_draw                   (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes in file <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> an OOGL (Geomview) description of <TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9076"
+></A
+><H3
+><A
+NAME="GTS-BBOX-POINT-IS-INSIDE"
+></A
+>gts_bbox_point_is_inside()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_bbox_point_is_inside(bbox, p)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is inside (or on the boundary) of <TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9100"
+></A
+><H3
+><A
+NAME="GTS-BBOXES-ARE-OVERLAPPING"
+></A
+>gts_bboxes_are_overlapping ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_bboxes_are_overlapping      (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb1,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the bounding boxes <TT
+CLASS="PARAMETER"
+><I
+>bb1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>bb2</I
+></TT
+> are overlapping
+(including just touching), <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9132"
+></A
+><H3
+><A
+NAME="GTS-BBOX-DIAGONAL2"
+></A
+>gts_bbox_diagonal2 ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_bbox_diagonal2              (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the squared length of the diagonal of <TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9155"
+></A
+><H3
+><A
+NAME="GTS-BBOX-POINT-DISTANCE2"
+></A
+>gts_bbox_point_distance2 ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bbox_point_distance2        (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *min,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *max);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Sets <TT
+CLASS="PARAMETER"
+><I
+>min</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>max</I
+></TT
+> to lower and upper bounds for the square of the
+Euclidean distance between the object contained in <TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>. For these
+bounds to make any sense the bounding box must be "tight" i.e. each of the
+6 faces of the box must at least be touched by one point of the bounded
+object.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>min</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer on a gdouble.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>max</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer on a gdouble.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9192"
+></A
+><H3
+><A
+NAME="GTS-BBOX-IS-STABBED"
+></A
+>gts_bbox_is_stabbed ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_bbox_is_stabbed             (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the ray starting at <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and ending at (<TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>->x,
+<TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>->y, +infty) intersects with <TT
+CLASS="PARAMETER"
+><I
+>bb</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9226"
+></A
+><H3
+><A
+NAME="GTSBBTREETRAVERSEFUNC"
+></A
+>GtsBBTreeTraverseFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        (*GtsBBTreeTraverseFunc)        (<A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb1,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bb2,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>User function called for each pair of overlapping bounding boxes. See 
+<A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-TRAVERSE-OVERLAPPING"
+>gts_bb_tree_traverse_overlapping</A
+>().</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bb2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>another <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>user data passed to the function.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9254"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-NEW"
+></A
+>gts_bb_tree_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+>*      gts_bb_tree_new                 (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *bboxes);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Builds a new hierarchy of bounding boxes for <TT
+CLASS="PARAMETER"
+><I
+>bboxes</I
+></TT
+>. At each
+level, the GNode->data field contains a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> bounding box of
+all the children. The tree is binary and is built by repeatedly
+cutting in two approximately equal halves the bounding boxes at
+each level until a leaf node (i.e. a bounding box given in <TT
+CLASS="PARAMETER"
+><I
+>bboxes</I
+></TT
+>)
+is reached. In order to minimize the depth of the tree, the cutting
+direction is always chosen as perpendicular to the longest
+dimension of the bounding box.</P
+><P
+>Returns: a new hierarchy of bounding boxes.  */
+GNode * gts_bb_tree_new (GSList * bboxes)
+{
+  GSList * i, * positive = NULL, * negative = NULL;
+  GNode * node;
+  GtsBBox * bbox;
+  guint dir, np = 0, nn = 0;
+  gdouble * p1, * p2;
+  gdouble cut;
+  
+  g_return_val_if_fail (bboxes != NULL, NULL);</P
+><P
+>  if (bboxes->next == NULL) /* leaf node */
+    return g_node_new (bboxes->data);</P
+><P
+>  bbox = gts_bbox_bboxes (<A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-CLASS"
+>gts_bbox_class</A
+>(), bboxes);
+  node = g_node_new (bbox);</P
+><P
+>  if (bbox->x2 - bbox->x1 > bbox->y2 - bbox->y1) {
+    if (bbox->z2 - bbox->z1 > bbox->x2 - bbox->x1)
+      dir = 2;
+    else
+      dir = 0;
+  }
+  else if (bbox->z2 - bbox->z1 > bbox->y2 - bbox->y1)
+    dir = 2;
+  else
+    dir = 1;</P
+><P
+>  p1 = (gdouble *) &bbox->x1;
+  p2 = (gdouble *) &bbox->x2;
+  cut = (p1[dir] + p2[dir])/2.;
+  i = bboxes;
+  while (i) {
+    bbox = i->data; 
+    p1 = (gdouble *) &bbox->x1;
+    p2 = (gdouble *) &bbox->x2;
+    if ((p1[dir] + p2[dir])/2. > cut) {
+      positive = g_slist_prepend (positive, bbox);
+      np++;
+    }
+    else {
+      negative = g_slist_prepend (negative, bbox);
+      nn++;
+    }
+    i = i->next;
+  }
+  if (!positive) {
+    GSList * last = g_slist_nth (negative, (nn - 1)/2);
+    positive = last->next;
+    last->next = NULL;
+  }
+  else if (!negative) {
+    GSList * last = g_slist_nth (positive, (np - 1)/2);
+    negative = last->next;
+    last->next = NULL;
+  }
+  g_node_prepend (node, gts_bb_tree_new (positive));
+  g_slist_free (positive);
+  g_node_prepend (node, gts_bb_tree_new (negative));
+  g_slist_free (negative);
+  
+  return node;
+}</P
+><P
+>static void prepend_triangle_bbox (GtsTriangle * t, GSList ** bboxes)
+{
+bboxes = g_slist_prepend (*bboxes, 
+			     gts_bbox_triangle (<A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-CLASS"
+>gts_bbox_class</A
+>(), t));
+}</P
+><P
+>/**
+gts_bb_tree_surface:
+<TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>: a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bboxes</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new hierarchy of bounding boxes bounding the faces of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9291"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-SURFACE"
+></A
+>gts_bb_tree_surface ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+>*      gts_bb_tree_surface             (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9311"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-OVERLAP"
+></A
+>gts_bb_tree_overlap ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_bb_tree_overlap             (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Returns: a list of bounding boxes, leaves of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> which overlap <TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+>.  */
+GSList * gts_bb_tree_overlap (GNode * tree, GtsBBox * bbox)
+{
+  GSList * list = NULL;
+  GtsBBox * bb;
+  GNode * i;</P
+><P
+>  g_return_val_if_fail (tree != NULL, NULL);
+  g_return_val_if_fail (bbox != NULL, NULL);</P
+><P
+>  bb = tree->data;
+  if (!gts_bboxes_are_overlapping (bbox, bb))
+    return NULL;
+  if (tree->children == NULL) /* leaf node */
+    return g_slist_prepend (NULL, bb);
+  i = tree->children;
+  while (i) {
+    list = g_slist_concat (list, gts_bb_tree_overlap (i, bbox));
+    i = i->next;
+  }
+  return list;
+}</P
+><P
+>/**
+gts_bb_tree_is_overlapping:
+<TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+>: a bounding box tree.
+<TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+>: a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if any leaf of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> overlaps <TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9350"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-IS-OVERLAPPING"
+></A
+>gts_bb_tree_is_overlapping ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_bb_tree_is_overlapping      (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9375"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-TRAVERSE-OVERLAPPING"
+></A
+>gts_bb_tree_traverse_overlapping ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bb_tree_traverse_overlapping
+                                            (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree1,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree2,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBTREETRAVERSEFUNC"
+>GtsBBTreeTraverseFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each overlapping pair of leaves of <TT
+CLASS="PARAMETER"
+><I
+>tree1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>tree2</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBTREETRAVERSEFUNC"
+>GtsBBTreeTraverseFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9411"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-DRAW"
+></A
+>gts_bb_tree_draw ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bb_tree_draw                (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> depth,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Write in <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> an OOGL (Geomview) description of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> for the
+depth specified by <TT
+CLASS="PARAMETER"
+><I
+>depth</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>depth</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a specified depth.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9440"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-DESTROY"
+></A
+>gts_bb_tree_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bb_tree_destroy             (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> free_leaves);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Destroys all the bounding boxes created by <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> and destroys the
+tree itself. If <TT
+CLASS="PARAMETER"
+><I
+>free_leaves</I
+></TT
+> is set to <TT
+CLASS="LITERAL"
+>TRUE</TT
+>, destroys boxes given
+by the user when creating the tree (i.e. leaves of the tree).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>free_leaves</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> if <TT
+CLASS="LITERAL"
+>TRUE</TT
+> the bounding boxes given by the user are freed.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9465"
+></A
+><H3
+><A
+NAME="GTSBBOXDISTFUNC"
+></A
+>GtsBBoxDistFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     (*GtsBBoxDistFunc)              (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded);</PRE
+></TD
+></TR
+></TABLE
+><P
+>User function returning the (minimum) distance between the object defined by <TT
+CLASS="PARAMETER"
+><I
+>bounded</I
+></TT
+> and point <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bounded</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>an object bounded by a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the distance between <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>bounded</I
+></TT
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9496"
+></A
+><H3
+><A
+NAME="GTSBBOXCLOSESTFUNC"
+></A
+>GtsBBoxClosestFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   (*GtsBBoxClosestFunc)           (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> bounded);</PRE
+></TD
+></TR
+></TABLE
+><P
+>User function returning a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> belonging to the object defined by <TT
+CLASS="PARAMETER"
+><I
+>bounded</I
+></TT
+> and closest to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bounded</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>an object bounded by a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9527"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-POINT-DISTANCE"
+></A
+>gts_bb_tree_point_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_bb_tree_point_distance      (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> **bbox);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> if not <TT
+CLASS="LITERAL"
+>NULL</TT
+> is set to the bounding box containing the closest 
+object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the distance as evaluated by <TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> between <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and the closest
+object in <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9569"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-POINT-CLOSEST"
+></A
+>gts_bb_tree_point_closest ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   gts_bb_tree_point_closest       (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLOSESTFUNC"
+>GtsBBoxClosestFunc</A
+> closest,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *distance);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>closest</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXCLOSESTFUNC"
+>GtsBBoxClosestFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> if not <TT
+CLASS="LITERAL"
+>NULL</TT
+> is set to the distance between <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and the 
+new <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>, closest point to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and belonging to an object of
+<TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9613"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-SEGMENT-DISTANCE"
+></A
+>gts_bb_tree_segment_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bb_tree_segment_distance    (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given a segment <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>, points are sampled regularly on its length
+using <TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> as increment. The distance from each of these points
+to the closest object of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> is computed using <TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> and the
+<A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-DISTANCE"
+>gts_bb_tree_point_distance</A
+>() function. The fields of <TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> are
+filled with the number of points sampled, the minimum, average and
+maximum value and the standard deviation.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> spatial scale of the sampling to be used.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> to be filled with the results.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9658"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-TRIANGLE-DISTANCE"
+></A
+>gts_bb_tree_triangle_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bb_tree_triangle_distance   (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given a triangle <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>, points are sampled regularly on its surface
+using <TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> as increment. The distance from each of these points
+to the closest object of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> is computed using <TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> and the
+<A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-DISTANCE"
+>gts_bb_tree_point_distance</A
+>() function. The fields of <TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> are
+filled with the number of points sampled, the minimum, average and
+maximum value and the standard deviation.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> spatial scale of the sampling to be used.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> to be filled with the results.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9703"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-POINT-CLOSEST-BBOXES"
+></A
+>gts_bb_tree_point_closest_bboxes ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_bb_tree_point_closest_bboxes
+                                            (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>. One of the bounding boxes is assured to contain
+the object of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> closest to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9733"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-SURFACE-BOUNDARY-DISTANCE"
+></A
+>gts_bb_tree_surface_boundary_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bb_tree_surface_boundary_distance
+                                            (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SEGMENT-DISTANCE"
+>gts_bb_tree_segment_distance</A
+>() for each edge boundary of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.
+The fields of <TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> are filled with the minimum, maximum and
+average distance. The average distance is defined as the sum of the
+average distances for each boundary edge weighthed by their length
+and divided by the total length of the boundaries. The standard
+deviation is defined accordingly. The <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> field of <TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> is filled
+with the number of sampled points used.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a sampling increment defined as the percentage of the diagonal
+of the root bounding box of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> to be filled with the results.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9778"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-SURFACE-DISTANCE"
+></A
+>gts_bb_tree_surface_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_bb_tree_surface_distance    (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+> distance,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *range);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-TRIANGLE-DISTANCE"
+>gts_bb_tree_triangle_distance</A
+>() for each face of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>. The
+fields of <TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> are filled with the minimum, maximum and average
+distance. The average distance is defined as the sum of the average
+distances for each triangle weighthed by their area and divided by
+the total area of the surface. The standard deviation is defined
+accordingly. The <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> field of <TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> is filled with the number of
+sampled points used.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>distance</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC"
+>GtsBBoxDistFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a sampling increment defined as the percentage of the diagonal
+of the root bounding box of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>range</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> to be filled with the results.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN9823"
+></A
+><H3
+><A
+NAME="GTS-BB-TREE-STABBED"
+></A
+>gts_bb_tree_stabbed ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_bb_tree_stabbed             (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of bounding boxes, leaves of <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> which are
+stabbed by the ray defined by <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> (see <A
+HREF="gts-bounding-boxes-trees.html#GTS-BBOX-IS-STABBED"
+>gts_bbox_is_stabbed</A
+>()).</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-kd-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Kd-Trees</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Surface operations</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-containee-classes.html b/doc/html/gts-containee-classes.html
new file mode 100644
index 0000000..eb21c63
--- /dev/null
+++ b/doc/html/gts-containee-classes.html
@@ -0,0 +1,1231 @@
+<HTML
+><HEAD
+><TITLE
+>Containee classes</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Container classes"
+HREF="gts-container-classes.html"><LINK
+REL="NEXT"
+TITLE="Points"
+HREF="gts-points.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-container-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-points.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-CONTAINEE-CLASSES"
+>Containee classes</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN3000"
+></A
+><H2
+>Name</H2
+>Containee classes -- </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN3003"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-containee-classes.html#GTS-CONTAINEE-CLASS-CAPS"
+>GTS_CONTAINEE_CLASS</A
+>             (klass)
+#define     <A
+HREF="gts-containee-classes.html#GTS-CONTAINEE-CAPS"
+>GTS_CONTAINEE</A
+>                   (obj)
+#define     <A
+HREF="gts-containee-classes.html#GTS-IS-CONTAINEE-CAPS"
+>GTS_IS_CONTAINEE</A
+>                (obj)
+struct      <A
+HREF="gts-containee-classes.html#GTSCONTAINEECLASS"
+>GtsContaineeClass</A
+>;
+struct      <A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+>;
+
+<A
+HREF="gts-containee-classes.html#GTSCONTAINEECLASS"
+>GtsContaineeClass</A
+>* <A
+HREF="gts-containee-classes.html#GTS-CONTAINEE-CLASS"
+>gts_containee_class</A
+>      (void);
+<A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+>* <A
+HREF="gts-containee-classes.html#GTS-CONTAINEE-NEW"
+>gts_containee_new</A
+>             (<A
+HREF="gts-containee-classes.html#GTSCONTAINEECLASS"
+>GtsContaineeClass</A
+> *klass);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-containee-classes.html#GTS-CONTAINEE-IS-CONTAINED"
+>gts_containee_is_contained</A
+>      (<A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+> *item,
+                                             <A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c);
+
+#define     <A
+HREF="gts-containee-classes.html#GTS-SLIST-CONTAINEE-CLASS-CAPS"
+>GTS_SLIST_CONTAINEE_CLASS</A
+>       (klass)
+#define     <A
+HREF="gts-containee-classes.html#GTS-SLIST-CONTAINEE-CAPS"
+>GTS_SLIST_CONTAINEE</A
+>             (obj)
+#define     <A
+HREF="gts-containee-classes.html#GTS-IS-SLIST-CONTAINEE-CAPS"
+>GTS_IS_SLIST_CONTAINEE</A
+>          (obj)
+struct      <A
+HREF="gts-containee-classes.html#GTSSLISTCONTAINEECLASS"
+>GtsSListContaineeClass</A
+>;
+struct      <A
+HREF="gts-containee-classes.html#GTSSLISTCONTAINEE"
+>GtsSListContainee</A
+>;
+
+<A
+HREF="gts-containee-classes.html#GTSSLISTCONTAINEECLASS"
+>GtsSListContaineeClass</A
+>* <A
+HREF="gts-containee-classes.html#GTS-SLIST-CONTAINEE-CLASS"
+>gts_slist_containee_class</A
+>
+                                            (void);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN3027"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN3030"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3032"
+></A
+><H3
+><A
+NAME="GTS-CONTAINEE-CLASS-CAPS"
+></A
+>GTS_CONTAINEE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CONTAINEE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3046"
+></A
+><H3
+><A
+NAME="GTS-CONTAINEE-CAPS"
+></A
+>GTS_CONTAINEE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CONTAINEE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3060"
+></A
+><H3
+><A
+NAME="GTS-IS-CONTAINEE-CAPS"
+></A
+>GTS_IS_CONTAINEE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_CONTAINEE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3074"
+></A
+><H3
+><A
+NAME="GTSCONTAINEECLASS"
+></A
+>struct GtsContaineeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsContaineeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3079"
+></A
+><H3
+><A
+NAME="GTSCONTAINEE"
+></A
+>struct GtsContainee</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsContainee {
+  GtsObject object;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The containee object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3094"
+></A
+><H3
+><A
+NAME="GTS-CONTAINEE-CLASS"
+></A
+>gts_containee_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-containee-classes.html#GTSCONTAINEECLASS"
+>GtsContaineeClass</A
+>* gts_containee_class      (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3109"
+></A
+><H3
+><A
+NAME="GTS-CONTAINEE-NEW"
+></A
+>gts_containee_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+>* gts_containee_new             (<A
+HREF="gts-containee-classes.html#GTSCONTAINEECLASS"
+>GtsContaineeClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3129"
+></A
+><H3
+><A
+NAME="GTS-CONTAINEE-IS-CONTAINED"
+></A
+>gts_containee_is_contained ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_containee_is_contained      (<A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+> *item,
+                                             <A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>item</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3154"
+></A
+><H3
+><A
+NAME="GTS-SLIST-CONTAINEE-CLASS-CAPS"
+></A
+>GTS_SLIST_CONTAINEE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SLIST_CONTAINEE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3168"
+></A
+><H3
+><A
+NAME="GTS-SLIST-CONTAINEE-CAPS"
+></A
+>GTS_SLIST_CONTAINEE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SLIST_CONTAINEE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3182"
+></A
+><H3
+><A
+NAME="GTS-IS-SLIST-CONTAINEE-CAPS"
+></A
+>GTS_IS_SLIST_CONTAINEE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_SLIST_CONTAINEE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3196"
+></A
+><H3
+><A
+NAME="GTSSLISTCONTAINEECLASS"
+></A
+>struct GtsSListContaineeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSListContaineeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3201"
+></A
+><H3
+><A
+NAME="GTSSLISTCONTAINEE"
+></A
+>struct GtsSListContainee</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSListContainee {
+  GtsContainee containee;
+
+  GSList * containers;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The singly-linked list containee object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>containee</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>containers</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>A list of <A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> containing this object.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3222"
+></A
+><H3
+><A
+NAME="GTS-SLIST-CONTAINEE-CLASS"
+></A
+>gts_slist_containee_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-containee-classes.html#GTSSLISTCONTAINEECLASS"
+>GtsSListContaineeClass</A
+>* gts_slist_containee_class
+                                            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-container-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-points.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Container classes</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Points</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-container-classes.html b/doc/html/gts-container-classes.html
new file mode 100644
index 0000000..10db829
--- /dev/null
+++ b/doc/html/gts-container-classes.html
@@ -0,0 +1,1786 @@
+<HTML
+><HEAD
+><TITLE
+>Container classes</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Object class"
+HREF="gts-object-class.html"><LINK
+REL="NEXT"
+TITLE="Containee classes"
+HREF="gts-containee-classes.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-object-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-containee-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-CONTAINER-CLASSES"
+>Container classes</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN2631"
+></A
+><H2
+>Name</H2
+>Container classes -- </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN2634"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-container-classes.html#GTS-CONTAINER-CLASS-CAPS"
+>GTS_CONTAINER_CLASS</A
+>             (klass)
+#define     <A
+HREF="gts-container-classes.html#GTS-CONTAINER-CAPS"
+>GTS_CONTAINER</A
+>                   (obj)
+#define     <A
+HREF="gts-container-classes.html#GTS-IS-CONTAINER-CAPS"
+>GTS_IS_CONTAINER</A
+>                (obj)
+struct      <A
+HREF="gts-container-classes.html#GTSCONTAINERCLASS"
+>GtsContainerClass</A
+>;
+struct      <A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+>;
+
+<A
+HREF="gts-container-classes.html#GTSCONTAINERCLASS"
+>GtsContainerClass</A
+>* <A
+HREF="gts-container-classes.html#GTS-CONTAINER-CLASS"
+>gts_container_class</A
+>      (void);
+<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+>* <A
+HREF="gts-container-classes.html#GTS-CONTAINER-NEW"
+>gts_container_new</A
+>             (<A
+HREF="gts-container-classes.html#GTSCONTAINERCLASS"
+>GtsContainerClass</A
+> *klass);
+void        <A
+HREF="gts-container-classes.html#GTS-CONTAINER-ADD"
+>gts_container_add</A
+>               (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c,
+                                             <A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+> *item);
+void        <A
+HREF="gts-container-classes.html#GTS-CONTAINER-REMOVE"
+>gts_container_remove</A
+>            (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c,
+                                             <A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+> *item);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-container-classes.html#GTS-CONTAINER-SIZE"
+>gts_container_size</A
+>              (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c);
+void        <A
+HREF="gts-container-classes.html#GTS-CONTAINER-FOREACH"
+>gts_container_foreach</A
+>           (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+
+#define     <A
+HREF="gts-container-classes.html#GTS-HASH-CONTAINER-CLASS-CAPS"
+>GTS_HASH_CONTAINER_CLASS</A
+>        (klass)
+#define     <A
+HREF="gts-container-classes.html#GTS-HASH-CONTAINER-CAPS"
+>GTS_HASH_CONTAINER</A
+>              (obj)
+#define     <A
+HREF="gts-container-classes.html#GTS-IS-HASH-CONTAINER-CAPS"
+>GTS_IS_HASH_CONTAINER</A
+>           (obj)
+struct      <A
+HREF="gts-container-classes.html#GTSHASHCONTAINERCLASS"
+>GtsHashContainerClass</A
+>;
+struct      <A
+HREF="gts-container-classes.html#GTSHASHCONTAINER"
+>GtsHashContainer</A
+>;
+
+<A
+HREF="gts-container-classes.html#GTSHASHCONTAINERCLASS"
+>GtsHashContainerClass</A
+>* <A
+HREF="gts-container-classes.html#GTS-HASH-CONTAINER-CLASS"
+>gts_hash_container_class</A
+>
+                                            (void);
+
+#define     <A
+HREF="gts-container-classes.html#GTS-SLIST-CONTAINER-CLASS-CAPS"
+>GTS_SLIST_CONTAINER_CLASS</A
+>       (klass)
+#define     <A
+HREF="gts-container-classes.html#GTS-SLIST-CONTAINER-CAPS"
+>GTS_SLIST_CONTAINER</A
+>             (obj)
+#define     <A
+HREF="gts-container-classes.html#GTS-IS-SLIST-CONTAINER-CAPS"
+>GTS_IS_SLIST_CONTAINER</A
+>          (obj)
+struct      <A
+HREF="gts-container-classes.html#GTSSLISTCONTAINERCLASS"
+>GtsSListContainerClass</A
+>;
+struct      <A
+HREF="gts-container-classes.html#GTSSLISTCONTAINER"
+>GtsSListContainer</A
+>;
+
+<A
+HREF="gts-container-classes.html#GTSSLISTCONTAINERCLASS"
+>GtsSListContainerClass</A
+>* <A
+HREF="gts-container-classes.html#GTS-SLIST-CONTAINER-CLASS"
+>gts_slist_container_class</A
+>
+                                            (void);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN2674"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN2677"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2679"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-CLASS-CAPS"
+></A
+>GTS_CONTAINER_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CONTAINER_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2693"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-CAPS"
+></A
+>GTS_CONTAINER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CONTAINER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2707"
+></A
+><H3
+><A
+NAME="GTS-IS-CONTAINER-CAPS"
+></A
+>GTS_IS_CONTAINER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_CONTAINER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2721"
+></A
+><H3
+><A
+NAME="GTSCONTAINERCLASS"
+></A
+>struct GtsContainerClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsContainerClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2726"
+></A
+><H3
+><A
+NAME="GTSCONTAINER"
+></A
+>struct GtsContainer</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsContainer {
+  GtsSListContainee object;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The container object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-containee-classes.html#GTSSLISTCONTAINEE"
+>GtsSListContainee</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2741"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-CLASS"
+></A
+>gts_container_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-container-classes.html#GTSCONTAINERCLASS"
+>GtsContainerClass</A
+>* gts_container_class      (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2756"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-NEW"
+></A
+>gts_container_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+>* gts_container_new             (<A
+HREF="gts-container-classes.html#GTSCONTAINERCLASS"
+>GtsContainerClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2776"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-ADD"
+></A
+>gts_container_add ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_container_add               (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c,
+                                             <A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+> *item);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>item</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2796"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-REMOVE"
+></A
+>gts_container_remove ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_container_remove            (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c,
+                                             <A
+HREF="gts-containee-classes.html#GTSCONTAINEE"
+>GtsContainee</A
+> *item);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>item</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2816"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-SIZE"
+></A
+>gts_container_size ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_container_size              (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2836"
+></A
+><H3
+><A
+NAME="GTS-CONTAINER-FOREACH"
+></A
+>gts_container_foreach ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_container_foreach           (<A
+HREF="gts-container-classes.html#GTSCONTAINER"
+>GtsContainer</A
+> *c,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2861"
+></A
+><H3
+><A
+NAME="GTS-HASH-CONTAINER-CLASS-CAPS"
+></A
+>GTS_HASH_CONTAINER_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_HASH_CONTAINER_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2875"
+></A
+><H3
+><A
+NAME="GTS-HASH-CONTAINER-CAPS"
+></A
+>GTS_HASH_CONTAINER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_HASH_CONTAINER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2889"
+></A
+><H3
+><A
+NAME="GTS-IS-HASH-CONTAINER-CAPS"
+></A
+>GTS_IS_HASH_CONTAINER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_HASH_CONTAINER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2903"
+></A
+><H3
+><A
+NAME="GTSHASHCONTAINERCLASS"
+></A
+>struct GtsHashContainerClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsHashContainerClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2908"
+></A
+><H3
+><A
+NAME="GTSHASHCONTAINER"
+></A
+>struct GtsHashContainer</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsHashContainer {
+  GtsContainer c;
+
+  GHashTable * items;
+  gboolean frozen;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2913"
+></A
+><H3
+><A
+NAME="GTS-HASH-CONTAINER-CLASS"
+></A
+>gts_hash_container_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-container-classes.html#GTSHASHCONTAINERCLASS"
+>GtsHashContainerClass</A
+>* gts_hash_container_class
+                                            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2928"
+></A
+><H3
+><A
+NAME="GTS-SLIST-CONTAINER-CLASS-CAPS"
+></A
+>GTS_SLIST_CONTAINER_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SLIST_CONTAINER_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2942"
+></A
+><H3
+><A
+NAME="GTS-SLIST-CONTAINER-CAPS"
+></A
+>GTS_SLIST_CONTAINER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SLIST_CONTAINER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2956"
+></A
+><H3
+><A
+NAME="GTS-IS-SLIST-CONTAINER-CAPS"
+></A
+>GTS_IS_SLIST_CONTAINER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_SLIST_CONTAINER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2970"
+></A
+><H3
+><A
+NAME="GTSSLISTCONTAINERCLASS"
+></A
+>struct GtsSListContainerClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSListContainerClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2975"
+></A
+><H3
+><A
+NAME="GTSSLISTCONTAINER"
+></A
+>struct GtsSListContainer</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSListContainer {
+  GtsContainer c;
+
+  GSList * items;
+  gboolean frozen;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2980"
+></A
+><H3
+><A
+NAME="GTS-SLIST-CONTAINER-CLASS"
+></A
+>gts_slist_container_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-container-classes.html#GTSSLISTCONTAINERCLASS"
+>GtsSListContainerClass</A
+>* gts_slist_container_class
+                                            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-object-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-containee-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Object class</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Containee classes</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-delaunay-and-constrained-delaunay-triangulations.html b/doc/html/gts-delaunay-and-constrained-delaunay-triangulations.html
new file mode 100644
index 0000000..ec47794
--- /dev/null
+++ b/doc/html/gts-delaunay-and-constrained-delaunay-triangulations.html
@@ -0,0 +1,2257 @@
+<HTML
+><HEAD
+><TITLE
+>Delaunay and constrained Delaunay triangulations</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Surface operations"
+HREF="c9853.html"><LINK
+REL="PREVIOUS"
+TITLE="Isosurfaces from 3D functions"
+HREF="gts-isosurfaces-from-3d-functions.html"><LINK
+REL="NEXT"
+TITLE="Progressive and Hierarchical surfaces"
+HREF="c12040.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-isosurfaces-from-3d-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-DELAUNAY-AND-CONSTRAINED-DELAUNAY-TRIANGULATIONS"
+>Delaunay and constrained Delaunay triangulations</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN11548"
+></A
+><H2
+>Name</H2
+>Delaunay and constrained Delaunay triangulations -- implementation of a dynamic Delaunay triangulation algorithm.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN11551"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-CONSTRAINT-CLASS-CAPS"
+>GTS_CONSTRAINT_CLASS</A
+>            (klass)
+#define     <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-CONSTRAINT-CAPS"
+>GTS_CONSTRAINT</A
+>                  (obj)
+#define     <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-IS-CONSTRAINT-CAPS"
+>GTS_IS_CONSTRAINT</A
+>               (obj)
+struct      <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINTCLASS"
+>GtsConstraintClass</A
+>;
+struct      <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+>;
+
+<A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINTCLASS"
+>GtsConstraintClass</A
+>* <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-CONSTRAINT-CLASS"
+>gts_constraint_class</A
+>    (void);
+<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-POINT-LOCATE"
+>gts_point_locate</A
+>                (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *guess);
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-ADD-VERTEX"
+>gts_delaunay_add_vertex</A
+>         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *guess);
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-ADD-VERTEX-TO-FACE"
+>gts_delaunay_add_vertex_to_face</A
+> (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);
+void        <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-REMOVE-VERTEX"
+>gts_delaunay_remove_vertex</A
+>      (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-ADD-CONSTRAINT"
+>gts_delaunay_add_constraint</A
+>     (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+> *c);
+<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-CHECK"
+>gts_delaunay_check</A
+>              (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+void        <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-REMOVE-HULL"
+>gts_delaunay_remove_hull</A
+>        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-CONFORM"
+>gts_delaunay_conform</A
+>            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> steiner_max,
+                                             <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+> encroaches,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-REFINE"
+>gts_delaunay_refine</A
+>             (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> steiner_max,
+                                             <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+> encroaches,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> encroach_data,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> cost,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> cost_data);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN11602"
+></A
+><H2
+>Description</H2
+><P
+>The functions described in this section are useful to build two-dimensional Delaunay and constrained Delaunay triangulations. Only the <TT
+CLASS="PARAMETER"
+><I
+>x</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>y</I
+></TT
+> coordinates of the points are taken into account.</P
+><P
+>The algorithm is fully dynamic (insertion and deletion) for Delaunay triangulation and semi-dynamic (insertion only of vertices and constraints) for constrained Delaunay triangulation. </P
+><P
+>The insertion part uses a very simple jump-and-walk location algorithm which can be used on any (even non-Delaunay) 2D triangulation as long as its boundary is convex.</P
+><P
+>The functions <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-CONFORM"
+>gts_delaunay_conform</A
+>() and <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-REFINE"
+>gts_delaunay_refine</A
+>() can be used to build Delaunay conforming constrained triangulations and to refine them.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN11612"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11614"
+></A
+><H3
+><A
+NAME="GTS-CONSTRAINT-CLASS-CAPS"
+></A
+>GTS_CONSTRAINT_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CONSTRAINT_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINTCLASS"
+>GtsConstraintClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINTCLASS"
+>GtsConstraintClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11631"
+></A
+><H3
+><A
+NAME="GTS-CONSTRAINT-CAPS"
+></A
+>GTS_CONSTRAINT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CONSTRAINT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11648"
+></A
+><H3
+><A
+NAME="GTS-IS-CONSTRAINT-CAPS"
+></A
+>GTS_IS_CONSTRAINT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_CONSTRAINT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11666"
+></A
+><H3
+><A
+NAME="GTSCONSTRAINTCLASS"
+></A
+>struct GtsConstraintClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsConstraintClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The constraint class derived from <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11672"
+></A
+><H3
+><A
+NAME="GTSCONSTRAINT"
+></A
+>struct GtsConstraint</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsConstraint;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The constraint object derived from <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11678"
+></A
+><H3
+><A
+NAME="GTS-CONSTRAINT-CLASS"
+></A
+>gts_constraint_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINTCLASS"
+>GtsConstraintClass</A
+>* gts_constraint_class    (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINTCLASS"
+>GtsConstraintClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11695"
+></A
+><H3
+><A
+NAME="GTS-POINT-LOCATE"
+></A
+>gts_point_locate ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    gts_point_locate                (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *guess);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Locates the face of the planar projection of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> containing
+<TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>. The planar projection of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> must define a connected set
+of triangles without holes and bounded by a convex boundary. The
+algorithm is randomized and performs in O(n^1/3) expected time
+where n is the number of triangles of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</P
+><P
+>If a good <TT
+CLASS="PARAMETER"
+><I
+>guess</I
+></TT
+> is given the point location can be significantly faster.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>guess</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>NULL</TT
+> or a face of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> close to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> containing <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is not
+contained within the boundary of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11743"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-ADD-VERTEX"
+></A
+>gts_delaunay_add_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  gts_delaunay_add_vertex         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *guess);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds vertex <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> to the Delaunay triangulation defined by
+<TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>. If <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is not contained in the convex hull bounding
+<TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is not added to the triangulation.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.  </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.  </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>guess</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>NULL</TT
+> or a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> to be used as an initial
+guess for point location.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>NULL</TT
+> is <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> has been successfully added to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> or was
+already contained in <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is not contained in the
+convex hull bounding surface or a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> having the same x and
+y coordinates as <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11792"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-ADD-VERTEX-TO-FACE"
+></A
+>gts_delaunay_add_vertex_to_face ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  gts_delaunay_add_vertex_to_face (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds vertex <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> to the face <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> of the Delaunay triangulation defined
+by <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>NULL</TT
+> is <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> has been successfully added to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> or was
+already contained in <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> or a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> having the same x and
+y coordinates as <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11836"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-REMOVE-VERTEX"
+></A
+>gts_delaunay_remove_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_delaunay_remove_vertex      (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> from the Delaunay triangulation defined by <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>,
+restores the Delaunay property and destroys <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+>. Vertex <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> must not
+be used by any constrained edge otherwise the triangulation is not
+guaranteed to be Delaunay.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11863"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-ADD-CONSTRAINT"
+></A
+>gts_delaunay_add_constraint ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_delaunay_add_constraint     (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+> *c);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Add constraint <TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> to the constrained Delaunay triangulation defined by
+<TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT"
+>GtsConstraint</A
+> conflicting (i.e. intersecting) with <TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> 
+which were removed from <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11896"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-CHECK"
+></A
+>gts_delaunay_check ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    gts_delaunay_check              (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>NULL</TT
+> if the planar projection of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> is a Delaunay 
+triangulation (unconstrained), a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> violating the Delaunay
+property otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11921"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-REMOVE-HULL"
+></A
+>gts_delaunay_remove_hull ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_delaunay_remove_hull        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes all the edges of the boundary of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> which are not
+constraints.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11939"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-CONFORM"
+></A
+>gts_delaunay_conform ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_delaunay_conform            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> steiner_max,
+                                             <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+> encroaches,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Recursively split constraints of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> which are encroached by
+vertices of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> (see Shewchuk 96 for details). The split
+constraints are destroyed and replaced by a set of new constraints
+of the same class. If <A
+HREF="gts-vertices.html#GTS-VERTEX-ENCROACHES-EDGE"
+>gts_vertex_encroaches_edge</A
+>() is used for
+<TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+>, the resulting surface will be Delaunay conforming.</P
+><P
+>If <TT
+CLASS="PARAMETER"
+><I
+>steiner_max</I
+></TT
+> is positive or nul, the recursive splitting
+procedure will stop when this maximum number of Steiner points is
+reached. In that case the resulting surface will not necessarily be
+Delaunay conforming.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> describing a constrained Delaunay triangulation.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>steiner_max</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> maximum number of Steiner points.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user-data to pass to <TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of remaining encroached edges. If <TT
+CLASS="PARAMETER"
+><I
+>steiner_max</I
+></TT
+>
+is set to a negative value and <A
+HREF="gts-vertices.html#GTS-VERTEX-ENCROACHES-EDGE"
+>gts_vertex_encroaches_edge</A
+>() is used
+for <TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+> this should always be zero. </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11987"
+></A
+><H3
+><A
+NAME="GTS-DELAUNAY-REFINE"
+></A
+>gts_delaunay_refine ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_delaunay_refine             (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> steiner_max,
+                                             <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+> encroaches,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> encroach_data,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> cost,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> cost_data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of the refinement algorithm described in Ruppert
+(1995) and Shewchuk (1996).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> describing a conforming Delaunay triangulation.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>steiner_max</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> maximum number of Steiner points.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encroach_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user-data to pass to <TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> used to sort the faces during refinement.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user-data to pass to <TT
+CLASS="PARAMETER"
+><I
+>cost</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of unrefined faces of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> left. Should be zero
+if <TT
+CLASS="PARAMETER"
+><I
+>steiner_max</I
+></TT
+> is set to a negative value.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-isosurfaces-from-3d-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Isosurfaces from 3D functions</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Progressive and Hierarchical surfaces</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-edges.html b/doc/html/gts-edges.html
new file mode 100644
index 0000000..b27fe4d
--- /dev/null
+++ b/doc/html/gts-edges.html
@@ -0,0 +1,2595 @@
+<HTML
+><HEAD
+><TITLE
+>Edges</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Segments"
+HREF="gts-segments.html"><LINK
+REL="NEXT"
+TITLE="Triangles"
+HREF="gts-triangles.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-segments.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-triangles.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-EDGES"
+>Edges</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN5150"
+></A
+><H2
+>Name</H2
+>Edges -- edge object and related functions.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN5153"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-edges.html#GTS-EDGE-CLASS-CAPS"
+>GTS_EDGE_CLASS</A
+>                  (klass)
+#define     <A
+HREF="gts-edges.html#GTS-EDGE-CAPS"
+>GTS_EDGE</A
+>                        (obj)
+#define     <A
+HREF="gts-edges.html#GTS-IS-EDGE-CAPS"
+>GTS_IS_EDGE</A
+>                     (obj)
+struct      <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>;
+struct      <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>;
+
+<A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>* <A
+HREF="gts-edges.html#GTS-EDGE-CLASS"
+>gts_edge_class</A
+>                (void);
+<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    <A
+HREF="gts-edges.html#GTS-EDGE-NEW"
+>gts_edge_new</A
+>                    (<A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v2);
+void        <A
+HREF="gts-edges.html#GTS-EDGE-REPLACE"
+>gts_edge_replace</A
+>                (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *with);
+#define     <A
+HREF="gts-edges.html#GTS-EDGE-IS-UNATTACHED"
+>gts_edge_is_unattached</A
+>          (s)
+<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    <A
+HREF="gts-edges.html#GTS-EDGE-IS-DUPLICATE"
+>gts_edge_is_duplicate</A
+>           (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    <A
+HREF="gts-edges.html#GTS-EDGE-HAS-PARENT-SURFACE"
+>gts_edge_has_parent_surface</A
+>     (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    <A
+HREF="gts-edges.html#GTS-EDGE-HAS-ANY-PARENT-SURFACE"
+>gts_edge_has_any_parent_surface</A
+> (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    <A
+HREF="gts-edges.html#GTS-EDGE-IS-BOUNDARY"
+>gts_edge_is_boundary</A
+>            (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-edges.html#GTS-EDGE-IS-CONTACT"
+>gts_edge_is_contact</A
+>             (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-edges.html#GTS-EDGE-BELONGS-TO-TETRAHEDRON"
+>gts_edge_belongs_to_tetrahedron</A
+> (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-edges.html#GTS-EDGE-FACE-NUMBER"
+>gts_edge_face_number</A
+>            (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    (<A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>*GtsEncroachFunc</A
+>)              (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  <A
+HREF="gts-edges.html#GTS-EDGE-IS-ENCROACHED"
+>gts_edge_is_encroached</A
+>          (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+> encroaches,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+>*      <A
+HREF="gts-edges.html#GTS-EDGES-MERGE"
+>gts_edges_merge</A
+>                 (<GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+> *edges);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-edges.html#GTS-EDGES-FROM-VERTICES"
+>gts_edges_from_vertices</A
+>         (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *vertices,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *parent);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN5215"
+></A
+><H2
+>Description</H2
+><P
+>Edges are derived from <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>. They are used to define <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN5220"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5222"
+></A
+><H3
+><A
+NAME="GTS-EDGE-CLASS-CAPS"
+></A
+>GTS_EDGE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_EDGE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5239"
+></A
+><H3
+><A
+NAME="GTS-EDGE-CAPS"
+></A
+>GTS_EDGE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_EDGE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5256"
+></A
+><H3
+><A
+NAME="GTS-IS-EDGE-CAPS"
+></A
+>GTS_IS_EDGE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_EDGE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5274"
+></A
+><H3
+><A
+NAME="GTSEDGECLASS"
+></A
+>struct GtsEdgeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsEdgeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The edge class. No virtual function associated.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5279"
+></A
+><H3
+><A
+NAME="GTSEDGE"
+></A
+>struct GtsEdge</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsEdge {
+  GtsSegment segment;
+
+  GSList * triangles;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The edge object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>segment</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>triangles</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>List of <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> using this edge.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5300"
+></A
+><H3
+><A
+NAME="GTS-EDGE-CLASS"
+></A
+>gts_edge_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>* gts_edge_class                (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5317"
+></A
+><H3
+><A
+NAME="GTS-EDGE-NEW"
+></A
+>gts_edge_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    gts_edge_new                    (<A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> linking <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5354"
+></A
+><H3
+><A
+NAME="GTS-EDGE-REPLACE"
+></A
+>gts_edge_replace ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_edge_replace                (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *with);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Replaces <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> with <TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+>. For each triangle which uses <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as an
+edge, <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> is replaced with <TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+>. The <TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+>->triangles list is
+updated appropriately and the <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+>->triangles list is freed and set
+to <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5385"
+></A
+><H3
+><A
+NAME="GTS-EDGE-IS-UNATTACHED"
+></A
+>gts_edge_is_unattached()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define       gts_edge_is_unattached(s) ((s)->triangles == NULL ? TRUE : FALSE)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if no triangles uses <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> as an edge, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5403"
+></A
+><H3
+><A
+NAME="GTS-EDGE-IS-DUPLICATE"
+></A
+>gts_edge_is_duplicate ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    gts_edge_is_duplicate           (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the first <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> different from <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> which shares the
+same endpoints or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if there is none.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5428"
+></A
+><H3
+><A
+NAME="GTS-EDGE-HAS-PARENT-SURFACE"
+></A
+>gts_edge_has_parent_surface ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    gts_edge_has_parent_surface     (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> having <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as an edge, <TT
+CLASS="LITERAL"
+>NULL</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5460"
+></A
+><H3
+><A
+NAME="GTS-EDGE-HAS-ANY-PARENT-SURFACE"
+></A
+>gts_edge_has_any_parent_surface ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    gts_edge_has_any_parent_surface (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> is not an edge of any triangle or if all the
+faces having <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> has an edge do not belong to any surface,
+a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> belonging to a surface and having <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as an edge.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5487"
+></A
+><H3
+><A
+NAME="GTS-EDGE-IS-BOUNDARY"
+></A
+>gts_edge_is_boundary ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    gts_edge_is_boundary            (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the unique <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> (which belongs to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>) and which
+has <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as an edge (i.e. <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> is a boundary edge (of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>)) or <TT
+CLASS="LITERAL"
+>NULL</TT
+> 
+if there is more than one or no faces (belonging to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>) and
+with <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as an edge.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5524"
+></A
+><H3
+><A
+NAME="GTS-EDGE-IS-CONTACT"
+></A
+>gts_edge_is_contact ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_edge_is_contact             (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.  </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of sets of connected triangles sharing <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as a
+contact edge.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5547"
+></A
+><H3
+><A
+NAME="GTS-EDGE-BELONGS-TO-TETRAHEDRON"
+></A
+>gts_edge_belongs_to_tetrahedron ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_edge_belongs_to_tetrahedron (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> is used by faces forming a tetrahedron, <TT
+CLASS="LITERAL"
+>FALSE</TT
+>
+otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5572"
+></A
+><H3
+><A
+NAME="GTS-EDGE-FACE-NUMBER"
+></A
+>gts_edge_face_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_edge_face_number            (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of faces using <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> and belonging to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5602"
+></A
+><H3
+><A
+NAME="GTSENCROACHFUNC"
+></A
+>GtsEncroachFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    (*GtsEncroachFunc)              (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5637"
+></A
+><H3
+><A
+NAME="GTS-EDGE-IS-ENCROACHED"
+></A
+>gts_edge_is_encroached ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  gts_edge_is_encroached          (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+> encroaches,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> describing a (constrained) Delaunay triangulation.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSENCROACHFUNC"
+>GtsEncroachFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> and encroaching upon <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+>
+(as defined by <TT
+CLASS="PARAMETER"
+><I
+>encroaches</I
+></TT
+>) or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if there is none.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5682"
+></A
+><H3
+><A
+NAME="GTS-EDGES-MERGE"
+></A
+>gts_edges_merge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+>*      gts_edges_merge                 (<GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+> *edges);</PRE
+></TD
+></TR
+></TABLE
+><P
+>For each edge in <TT
+CLASS="PARAMETER"
+><I
+>edges</I
+></TT
+> check if it is duplicated (as
+returned by <A
+HREF="gts-edges.html#GTS-EDGE-IS-DUPLICATE"
+>gts_edge_is_duplicate</A
+>()). If it is replace it by its
+duplicate, destroy it and remove it from the list.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>edges</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the updated <TT
+CLASS="PARAMETER"
+><I
+>edges</I
+></TT
+> list.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5707"
+></A
+><H3
+><A
+NAME="GTS-EDGES-FROM-VERTICES"
+></A
+>gts_edges_from_vertices ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_edges_from_vertices         (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *vertices,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *parent);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vertices</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>parent</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of unique <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> which have one of their vertices in 
+<TT
+CLASS="PARAMETER"
+><I
+>vertices</I
+></TT
+> and are used by a face of <TT
+CLASS="PARAMETER"
+><I
+>parent</I
+></TT
+>. </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-segments.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-triangles.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Segments</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Triangles</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-extended-binary-heaps.html b/doc/html/gts-extended-binary-heaps.html
new file mode 100644
index 0000000..ae3d97f
--- /dev/null
+++ b/doc/html/gts-extended-binary-heaps.html
@@ -0,0 +1,2319 @@
+<HTML
+><HEAD
+><TITLE
+>Extended binary heaps</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"><LINK
+REL="PREVIOUS"
+TITLE="Binary heaps"
+HREF="gts-binary-heaps.html"><LINK
+REL="NEXT"
+TITLE="First In First Out heaps"
+HREF="gts-first-in-first-out-heaps.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-first-in-first-out-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-EXTENDED-BINARY-HEAPS"
+>Extended binary heaps</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN260"
+></A
+><H2
+>Name</H2
+>Extended binary heaps -- efficient data structure for priority heaps allowing removal of elements.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN263"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+struct      <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+>;
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     (<A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>*GtsKeyFunc</A
+>)                   (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> item,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+struct      <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>;
+
+<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>*   <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-NEW"
+>gts_eheap_new</A
+>                   (<A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> key_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+>* <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-INSERT"
+>gts_eheap_insert</A
+>              (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p);
+<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+>* <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-INSERT-WITH-KEY"
+>gts_eheap_insert_with_key</A
+>     (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> key);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-TOP"
+>gts_eheap_top</A
+>                   (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *key);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-REMOVE-TOP"
+>gts_eheap_remove_top</A
+>            (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *key);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-REMOVE"
+>gts_eheap_remove</A
+>                (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> *p);
+void        <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-DECREASE-KEY"
+>gts_eheap_decrease_key</A
+>          (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> new_key);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-KEY"
+>gts_eheap_key</A
+>                   (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p);
+void        <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-RANDOMIZED"
+>gts_eheap_randomized</A
+>            (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> randomized);
+void        <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-UPDATE"
+>gts_eheap_update</A
+>                (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);
+void        <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-FREEZE"
+>gts_eheap_freeze</A
+>                (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);
+void        <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-THAW"
+>gts_eheap_thaw</A
+>                  (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);
+void        <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-FOREACH"
+>gts_eheap_foreach</A
+>               (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GFUNC"
+>GFunc</GTKDOCLINK
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-SIZE"
+>gts_eheap_size</A
+>                  (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);
+void        <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-DESTROY"
+>gts_eheap_destroy</A
+>               (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN323"
+></A
+><H2
+>Description</H2
+><P
+>This data structure is similar to the binary heap implementation but adds the two operations <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-DECREASE-KEY"
+>gts_eheap_decrease_key</A
+>() and <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-REMOVE"
+>gts_eheap_remove</A
+>(). Contrary to the binary heap implementation, keys are stored in a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> structure and comparisons between keys are performed directly (thus saving a call to a comparison function). This structure consequently provides generally faster operations at the expense of memory use. If your comparison function is simple and you don't need the extra functionalities, it is usually better to use a <A
+HREF="gts-binary-heaps.html#GTSHEAP"
+>GtsHeap</A
+>.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN330"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN332"
+></A
+><H3
+><A
+NAME="GTSEHEAPPAIR"
+></A
+>struct GtsEHeapPair</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsEHeapPair {
+  gpointer data;
+  gdouble key;
+  guint pos;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The extended heap structure.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>data</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Points to the item stored in the heap.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>key</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Value of the key for this item.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>pos</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Private field.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN357"
+></A
+><H3
+><A
+NAME="GTSKEYFUNC"
+></A
+>GtsKeyFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     (*GtsKeyFunc)                   (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> item,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>item</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>A pointer to an item to be stored in the heap.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>User data passed to <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-NEW"
+>gts_eheap_new</A
+>().</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the value of the key for the given item.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN383"
+></A
+><H3
+><A
+NAME="GTSEHEAP"
+></A
+>struct GtsEHeap</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsEHeap;</PRE
+></TD
+></TR
+></TABLE
+><P
+>An opaque data structure describing an extended binary heap.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN388"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-NEW"
+></A
+>gts_eheap_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>*   gts_eheap_new                   (<A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> key_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>key_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>key_func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> using <TT
+CLASS="PARAMETER"
+><I
+>key_func</I
+></TT
+> as key.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN419"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-INSERT"
+></A
+>gts_eheap_insert ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+>* gts_eheap_insert              (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Inserts a new element <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> in the heap.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to add to the heap.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> describing the position of the element in the heap.
+This pointer is necessary for <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-REMOVE"
+>gts_eheap_remove</A
+>() and 
+<A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-DECREASE-KEY"
+>gts_eheap_decrease_key</A
+>().</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN450"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-INSERT-WITH-KEY"
+></A
+>gts_eheap_insert_with_key ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+>* gts_eheap_insert_with_key     (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> key);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Inserts a new element <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> in the heap.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to add to the heap.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>key</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the value of the key associated to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> describing the position of the element in the heap.
+This pointer is necessary for <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-REMOVE"
+>gts_eheap_remove</A
+>() and 
+<A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-DECREASE-KEY"
+>gts_eheap_decrease_key</A
+>().</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN487"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-TOP"
+></A
+>gts_eheap_top ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_eheap_top                   (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *key);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>key</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer on a gdouble or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the element at the top of the heap and optionally (if <TT
+CLASS="PARAMETER"
+><I
+>key</I
+></TT
+> is not
+<TT
+CLASS="LITERAL"
+>NULL</TT
+>) its key.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN517"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-REMOVE-TOP"
+></A
+>gts_eheap_remove_top ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_eheap_remove_top            (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *key);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes the element at the top of the heap and optionally (if <TT
+CLASS="PARAMETER"
+><I
+>key</I
+></TT
+> is not
+<TT
+CLASS="LITERAL"
+>NULL</TT
+>) returns the value of its key.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>key</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer on a gdouble or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the element at the top of the heap.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN547"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-REMOVE"
+></A
+>gts_eheap_remove ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_eheap_remove                (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> *p);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes element corresponding to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> from <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> in O(log n).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the element just removed from <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN578"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-DECREASE-KEY"
+></A
+>gts_eheap_decrease_key ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_eheap_decrease_key          (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> new_key);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Decreases the value of the key of the element at position <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>new_key</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new value of the key for this element. Must be smaller than
+the current key.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN607"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-KEY"
+></A
+>gts_eheap_key ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_eheap_key                   (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> p);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to be tested;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the value of the key for pointer <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN635"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-RANDOMIZED"
+></A
+>gts_eheap_randomized ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_eheap_randomized            (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> randomized);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>randomized</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> whether <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> should be randomized.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN658"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-UPDATE"
+></A
+>gts_eheap_update ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_eheap_update                (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Updates the key of each element of <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> and reorders it.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN676"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-FREEZE"
+></A
+>gts_eheap_freeze ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_eheap_freeze                (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Freezes the heap. Any subsequent operation will not preserve the heap
+property. Used in conjunction with <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-INSERT"
+>gts_eheap_insert</A
+>() and <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-THAW"
+>gts_eheap_thaw</A
+>()
+to create a heap in O(n) time.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN695"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-THAW"
+></A
+>gts_eheap_thaw ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_eheap_thaw                  (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>If <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> has been frozen previously using <A
+HREF="gts-extended-binary-heaps.html#GTS-EHEAP-FREEZE"
+>gts_eheap_freeze</A
+>(), reorder it
+in O(n) time and unfreeze it.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN714"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-FOREACH"
+></A
+>gts_eheap_foreach ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_eheap_foreach               (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap,
+                                             <GTKDOCLINK
+HREF="GFUNC"
+>GFunc</GTKDOCLINK
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the function to call for each element in the heap.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> to pass to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN742"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-SIZE"
+></A
+>gts_eheap_size ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_eheap_size                  (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of items in <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN765"
+></A
+><H3
+><A
+NAME="GTS-EHEAP-DESTROY"
+></A
+>gts_eheap_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_eheap_destroy               (<A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Free all the memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-first-in-first-out-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Binary heaps</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>First In First Out heaps</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-faces.html b/doc/html/gts-faces.html
new file mode 100644
index 0000000..36baecb
--- /dev/null
+++ b/doc/html/gts-faces.html
@@ -0,0 +1,1649 @@
+<HTML
+><HEAD
+><TITLE
+>Faces</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Triangles"
+HREF="gts-triangles.html"><LINK
+REL="NEXT"
+TITLE="Surfaces"
+HREF="gts-surfaces.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-triangles.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-FACES"
+>Faces</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN6861"
+></A
+><H2
+>Name</H2
+>Faces -- face object and related functions.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN6864"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-faces.html#GTS-FACE-CLASS-CAPS"
+>GTS_FACE_CLASS</A
+>                  (klass)
+#define     <A
+HREF="gts-faces.html#GTS-FACE-CAPS"
+>GTS_FACE</A
+>                        (obj)
+#define     <A
+HREF="gts-faces.html#GTS-IS-FACE-CAPS"
+>GTS_IS_FACE</A
+>                     (obj)
+struct      <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>;
+struct      <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>;
+
+<A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>* <A
+HREF="gts-faces.html#GTS-FACE-CLASS"
+>gts_face_class</A
+>                (void);
+<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    <A
+HREF="gts-faces.html#GTS-FACE-NEW"
+>gts_face_new</A
+>                    (<A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+> *klass,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-faces.html#GTS-FACE-HAS-PARENT-SURFACE"
+>gts_face_has_parent_surface</A
+>     (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-faces.html#GTS-FACE-NEIGHBOR-NUMBER"
+>gts_face_neighbor_number</A
+>        (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-faces.html#GTS-FACE-NEIGHBORS"
+>gts_face_neighbors</A
+>              (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+void        <A
+HREF="gts-faces.html#GTS-FACE-FOREACH-NEIGHBOR"
+>gts_face_foreach_neighbor</A
+>       (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-faces.html#GTS-FACES-FROM-EDGES"
+>gts_faces_from_edges</A
+>            (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *edges,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6901"
+></A
+><H2
+>Description</H2
+><P
+>Faces are derived from <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>. A collection of faces defined a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6906"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6908"
+></A
+><H3
+><A
+NAME="GTS-FACE-CLASS-CAPS"
+></A
+>GTS_FACE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_FACE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6925"
+></A
+><H3
+><A
+NAME="GTS-FACE-CAPS"
+></A
+>GTS_FACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_FACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6942"
+></A
+><H3
+><A
+NAME="GTS-IS-FACE-CAPS"
+></A
+>GTS_IS_FACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_FACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6960"
+></A
+><H3
+><A
+NAME="GTSFACECLASS"
+></A
+>struct GtsFaceClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsFaceClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The face class derived from <A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6966"
+></A
+><H3
+><A
+NAME="GTSFACE"
+></A
+>struct GtsFace</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsFace {
+  GtsTriangle triangle;
+
+  GSList * surfaces;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The face object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>triangle</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>surfaces</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>A list of <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> using this face.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6987"
+></A
+><H3
+><A
+NAME="GTS-FACE-CLASS"
+></A
+>gts_face_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>* gts_face_class                (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7004"
+></A
+><H3
+><A
+NAME="GTS-FACE-NEW"
+></A
+>gts_face_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    gts_face_new                    (<A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+> *klass,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> using <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> as edges.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7048"
+></A
+><H3
+><A
+NAME="GTS-FACE-HAS-PARENT-SURFACE"
+></A
+>gts_face_has_parent_surface ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_face_has_parent_surface     (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> belongs to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7080"
+></A
+><H3
+><A
+NAME="GTS-FACE-NEIGHBOR-NUMBER"
+></A
+>gts_face_neighbor_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_face_neighbor_number        (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of faces neighbors of <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> and belonging to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7111"
+></A
+><H3
+><A
+NAME="GTS-FACE-NEIGHBORS"
+></A
+>gts_face_neighbors ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_face_neighbors              (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of unique <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> neighbors of <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> and belonging to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7143"
+></A
+><H3
+><A
+NAME="GTS-FACE-FOREACH-NEIGHBOR"
+></A
+>gts_face_foreach_neighbor ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_face_foreach_neighbor       (<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each neighbor of <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> (if not <TT
+CLASS="LITERAL"
+>NULL</TT
+>).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to pass to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7183"
+></A
+><H3
+><A
+NAME="GTS-FACES-FROM-EDGES"
+></A
+>gts_faces_from_edges ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_faces_from_edges            (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *edges,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Builds a list of unique faces which belong to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> and have
+one of their edges in <TT
+CLASS="PARAMETER"
+><I
+>edges</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>edges</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the list of faces.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-triangles.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Triangles</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Surfaces</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-first-in-first-out-heaps.html b/doc/html/gts-first-in-first-out-heaps.html
new file mode 100644
index 0000000..33a1fe0
--- /dev/null
+++ b/doc/html/gts-first-in-first-out-heaps.html
@@ -0,0 +1,1264 @@
+<HTML
+><HEAD
+><TITLE
+>First In First Out heaps</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"><LINK
+REL="PREVIOUS"
+TITLE="Extended binary heaps"
+HREF="gts-extended-binary-heaps.html"><LINK
+REL="NEXT"
+TITLE="Vectors and matrices"
+HREF="gts-vectors-and-matrices.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-extended-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vectors-and-matrices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-FIRST-IN-FIRST-OUT-HEAPS"
+>First In First Out heaps</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN788"
+></A
+><H2
+>Name</H2
+>First In First Out heaps -- </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN791"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+struct      <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>;
+
+<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>*    <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-NEW"
+>gts_fifo_new</A
+>                    (void);
+void        <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-PUSH"
+>gts_fifo_push</A
+>                   (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-POP"
+>gts_fifo_pop</A
+>                    (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-TOP"
+>gts_fifo_top</A
+>                    (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-SIZE"
+>gts_fifo_size</A
+>                   (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);
+void        <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-FOREACH"
+>gts_fifo_foreach</A
+>                (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-IS-EMPTY"
+>gts_fifo_is_empty</A
+>               (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);
+void        <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-WRITE"
+>gts_fifo_write</A
+>                  (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);
+void        <A
+HREF="gts-first-in-first-out-heaps.html#GTS-FIFO-DESTROY"
+>gts_fifo_destroy</A
+>                (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN821"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN824"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN826"
+></A
+><H3
+><A
+NAME="GTSFIFO"
+></A
+>struct GtsFifo</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsFifo;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN831"
+></A
+><H3
+><A
+NAME="GTS-FIFO-NEW"
+></A
+>gts_fifo_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>*    gts_fifo_new                    (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN848"
+></A
+><H3
+><A
+NAME="GTS-FIFO-PUSH"
+></A
+>gts_fifo_push ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_fifo_push                   (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Push <TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> into <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to add to <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN873"
+></A
+><H3
+><A
+NAME="GTS-FIFO-POP"
+></A
+>gts_fifo_pop ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_fifo_pop                    (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes the first element from <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the first element in <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> is empty.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN899"
+></A
+><H3
+><A
+NAME="GTS-FIFO-TOP"
+></A
+>gts_fifo_top ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_fifo_top                    (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the first element in <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> is empty.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN924"
+></A
+><H3
+><A
+NAME="GTS-FIFO-SIZE"
+></A
+>gts_fifo_size ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_fifo_size                   (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of elements in <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN947"
+></A
+><H3
+><A
+NAME="GTS-FIFO-FOREACH"
+></A
+>gts_fifo_foreach ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_fifo_foreach                (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> in order for each item in <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+>, passing <TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN979"
+></A
+><H3
+><A
+NAME="GTS-FIFO-IS-EMPTY"
+></A
+>gts_fifo_is_empty ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_fifo_is_empty               (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> is empty, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1004"
+></A
+><H3
+><A
+NAME="GTS-FIFO-WRITE"
+></A
+>gts_fifo_write ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_fifo_write                  (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes the content of <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> in <TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1028"
+></A
+><H3
+><A
+NAME="GTS-FIFO-DESTROY"
+></A
+>gts_fifo_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_fifo_destroy                (<A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+> *fifo);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Frees all the memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fifo</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-first-in-first-out-heaps.html#GTSFIFO"
+>GtsFifo</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-extended-binary-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vectors-and-matrices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Extended binary heaps</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Vectors and matrices</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-graph-class.html b/doc/html/gts-graph-class.html
new file mode 100644
index 0000000..39ef3a4
--- /dev/null
+++ b/doc/html/gts-graph-class.html
@@ -0,0 +1,5119 @@
+<HTML
+><HEAD
+><TITLE
+>Graph class</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Graph and operations on graphs"
+HREF="c13676.html"><LINK
+REL="PREVIOUS"
+TITLE="Graph and operations on graphs"
+HREF="c13676.html"><LINK
+REL="NEXT"
+TITLE="Weighted graph"
+HREF="gts-weighted-graph.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-weighted-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-GRAPH-CLASS"
+>Graph class</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN13683"
+></A
+><H2
+>Name</H2
+>Graph class -- </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN13686"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-graph-class.html#GTS-GNODE-CLASS-CAPS"
+>GTS_GNODE_CLASS</A
+>                 (klass)
+#define     <A
+HREF="gts-graph-class.html#GTS-GNODE-CAPS"
+>GTS_GNODE</A
+>                       (obj)
+#define     <A
+HREF="gts-graph-class.html#GTS-IS-GNODE-CAPS"
+>GTS_IS_GNODE</A
+>                    (obj)
+#define     <A
+HREF="gts-graph-class.html#GTS-GNODE-NEIGHBOR-CAPS"
+>GTS_GNODE_NEIGHBOR</A
+>              (n,e)
+struct      <A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+>;
+struct      <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>;
+
+<A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+>* <A
+HREF="gts-graph-class.html#GTS-GNODE-CLASS"
+>gts_gnode_class</A
+>              (void);
+<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   <A
+HREF="gts-graph-class.html#GTS-GNODE-NEW"
+>gts_gnode_new</A
+>                   (<A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+> *klass);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-graph-class.html#GTS-GNODE-DEGREE"
+>gts_gnode_degree</A
+>                (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);
+void        <A
+HREF="gts-graph-class.html#GTS-GNODE-FOREACH-EDGE"
+>gts_gnode_foreach_edge</A
+>          (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-graph-class.html#GTS-GNODE-FOREACH-NEIGHBOR"
+>gts_gnode_foreach_neighbor</A
+>      (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-class.html#GTS-GNODE-WEIGHT"
+>gts_gnode_weight</A
+>                (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-class.html#GTS-GNODE-MOVE-COST"
+>gts_gnode_move_cost</A
+>             (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *src,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *dst);
+
+#define     <A
+HREF="gts-graph-class.html#GTS-GEDGE-CLASS-CAPS"
+>GTS_GEDGE_CLASS</A
+>                 (klass)
+#define     <A
+HREF="gts-graph-class.html#GTS-GEDGE-CAPS"
+>GTS_GEDGE</A
+>                       (obj)
+#define     <A
+HREF="gts-graph-class.html#GTS-IS-GEDGE-CAPS"
+>GTS_IS_GEDGE</A
+>                    (obj)
+struct      <A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+>;
+struct      <A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+>;
+
+<A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+>* <A
+HREF="gts-graph-class.html#GTS-GEDGE-CLASS"
+>gts_gedge_class</A
+>              (void);
+<A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+>*   <A
+HREF="gts-graph-class.html#GTS-GEDGE-NEW"
+>gts_gedge_new</A
+>                   (<A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n1,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n2);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-class.html#GTS-GEDGE-WEIGHT"
+>gts_gedge_weight</A
+>                (<A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+> *e);
+#define     <A
+HREF="gts-graph-class.html#GTS-GEDGE-CONNECTS"
+>gts_gedge_connects</A
+>              (e, a1, a2)
+
+#define     <A
+HREF="gts-graph-class.html#GTS-GRAPH-CLASS-CAPS"
+>GTS_GRAPH_CLASS</A
+>                 (klass)
+#define     <A
+HREF="gts-graph-class.html#GTS-GRAPH-CAPS"
+>GTS_GRAPH</A
+>                       (obj)
+#define     <A
+HREF="gts-graph-class.html#GTS-IS-GRAPH-CAPS"
+>GTS_IS_GRAPH</A
+>                    (obj)
+struct      <A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+>;
+struct      <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>;
+
+<A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+>* <A
+HREF="gts-graph-class.html"
+>gts_graph_class</A
+>              (void);
+<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>*   <A
+HREF="gts-graph-class.html#GTS-GRAPH-NEW"
+>gts_graph_new</A
+>                   (<A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+> *node_class,
+                                             <A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+> *edge_class);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-graph-class.html#GTS-GRAPH-READ"
+>gts_graph_read</A
+>                  (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);
+void        <A
+HREF="gts-graph-class.html#GTS-GRAPH-PRINT-STATS"
+>gts_graph_print_stats</A
+>           (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);
+void        <A
+HREF="gts-graph-class.html#GTS-GRAPH-FOREACH-EDGE"
+>gts_graph_foreach_edge</A
+>          (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+struct      <A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+>;
+enum        <A
+HREF="gts-graph-class.html#GTSTRAVERSETYPE"
+>GtsTraverseType</A
+>;
+<A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+>* <A
+HREF="gts-graph-class.html#GTS-GRAPH-TRAVERSE-NEW"
+>gts_graph_traverse_new</A
+>    (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSTRAVERSETYPE"
+>GtsTraverseType</A
+> type,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> reinit);
+<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   <A
+HREF="gts-graph-class.html#GTS-GRAPH-TRAVERSE-NEXT"
+>gts_graph_traverse_next</A
+>         (<A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+> *t);
+<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   <A
+HREF="gts-graph-class.html#GTS-GRAPH-TRAVERSE-WHAT-NEXT"
+>gts_graph_traverse_what_next</A
+>    (<A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+> *t);
+void        <A
+HREF="gts-graph-class.html#GTS-GRAPH-TRAVERSE-DESTROY"
+>gts_graph_traverse_destroy</A
+>      (<A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+> *t);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-graph-class.html#GTS-GRAPH-EDGES-CUT"
+>gts_graph_edges_cut</A
+>             (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-class.html#GTS-GRAPH-EDGES-CUT-WEIGHT"
+>gts_graph_edges_cut_weight</A
+>      (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-graph-class.html#GTS-GRAPH-DISTANCE-SUM"
+>gts_graph_distance_sum</A
+>          (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *center);
+<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   <A
+HREF="gts-graph-class.html#GTS-GRAPH-FARTHEST"
+>gts_graph_farthest</A
+>              (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *gnodes);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-class.html#GTS-GRAPH-WEIGHT"
+>gts_graph_weight</A
+>                (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);
+
+#define     <A
+HREF="gts-graph-class.html#GTS-FNODE-CLASS-CAPS"
+>GTS_FNODE_CLASS</A
+>                 (klass)
+#define     <A
+HREF="gts-graph-class.html#GTS-FNODE-CAPS"
+>GTS_FNODE</A
+>                       (obj)
+#define     <A
+HREF="gts-graph-class.html#GTS-IS-FNODE-CAPS"
+>GTS_IS_FNODE</A
+>                    (obj)
+struct      <A
+HREF="gts-graph-class.html#GTSFNODE"
+>GtsFNode</A
+>;
+struct      <A
+HREF="gts-graph-class.html#GTSFNODECLASS"
+>GtsFNodeClass</A
+>;
+
+<A
+HREF="gts-graph-class.html#GTSFNODECLASS"
+>GtsFNodeClass</A
+>* <A
+HREF="gts-graph-class.html#GTS-FNODE-CLASS"
+>gts_fnode_class</A
+>              (void);
+<A
+HREF="gts-graph-class.html#GTSFNODE"
+>GtsFNode</A
+>*   <A
+HREF="gts-graph-class.html#GTS-FNODE-NEW"
+>gts_fnode_new</A
+>                   (<A
+HREF="gts-graph-class.html#GTSFNODECLASS"
+>GtsFNodeClass</A
+> *klass,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);
+
+<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>*   <A
+HREF="gts-graph-class.html#GTS-SURFACE-GRAPH-NEW"
+>gts_surface_graph_new</A
+>           (<A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>* <A
+HREF="gts-graph-class.html#GTS-SURFACE-GRAPH-SURFACE"
+>gts_surface_graph_surface</A
+>       (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *surface_graph,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN13813"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN13816"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13818"
+></A
+><H3
+><A
+NAME="GTS-GNODE-CLASS-CAPS"
+></A
+>GTS_GNODE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GNODE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13832"
+></A
+><H3
+><A
+NAME="GTS-GNODE-CAPS"
+></A
+>GTS_GNODE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GNODE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13846"
+></A
+><H3
+><A
+NAME="GTS-IS-GNODE-CAPS"
+></A
+>GTS_IS_GNODE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_GNODE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13860"
+></A
+><H3
+><A
+NAME="GTS-GNODE-NEIGHBOR-CAPS"
+></A
+>GTS_GNODE_NEIGHBOR()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_GNODE_NEIGHBOR(n,e)   (GTS_GEDGE (e)->n1 == n ? GTS_GEDGE (e)->n2 : GTS_GEDGE (e)->n2 == n ? GTS_GEDGE (e)->n1 : NULL)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13878"
+></A
+><H3
+><A
+NAME="GTSGNODECLASS"
+></A
+>struct GtsGNodeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGNodeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13883"
+></A
+><H3
+><A
+NAME="GTSGNODE"
+></A
+>struct GtsGNode</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGNode {
+  GtsSListContainer container;
+
+  guint level;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13888"
+></A
+><H3
+><A
+NAME="GTS-GNODE-CLASS"
+></A
+>gts_gnode_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+>* gts_gnode_class              (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13905"
+></A
+><H3
+><A
+NAME="GTS-GNODE-NEW"
+></A
+>gts_gnode_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   gts_gnode_new                   (<A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13928"
+></A
+><H3
+><A
+NAME="GTS-GNODE-DEGREE"
+></A
+>gts_gnode_degree ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_gnode_degree                (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of neighbors of <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> (belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> is not <TT
+CLASS="LITERAL"
+>NULL</TT
+>).</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13961"
+></A
+><H3
+><A
+NAME="GTS-GNODE-FOREACH-EDGE"
+></A
+>gts_gnode_foreach_edge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_gnode_foreach_edge          (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each <A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+> connecting <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> to another <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>
+(belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> is not <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14004"
+></A
+><H3
+><A
+NAME="GTS-GNODE-FOREACH-NEIGHBOR"
+></A
+>gts_gnode_foreach_neighbor ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_gnode_foreach_neighbor      (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each neighbor <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> (belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> if
+<TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> is not <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14046"
+></A
+><H3
+><A
+NAME="GTS-GNODE-WEIGHT"
+></A
+>gts_gnode_weight ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_gnode_weight                (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the weight of <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> as defined by the <GTKDOCLINK
+HREF="WEIGHT"
+>weight</GTKDOCLINK
+>() method of the
+<A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14071"
+></A
+><H3
+><A
+NAME="GTS-GNODE-MOVE-COST"
+></A
+>gts_gnode_move_cost ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_gnode_move_cost             (<A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *src,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *dst);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>src</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> containing <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>dst</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the cost (increase in the sum of the weights of the edges cut) of
+moving <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> from <TT
+CLASS="PARAMETER"
+><I
+>src</I
+></TT
+> to <TT
+CLASS="PARAMETER"
+><I
+>dst</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14109"
+></A
+><H3
+><A
+NAME="GTS-GEDGE-CLASS-CAPS"
+></A
+>GTS_GEDGE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GEDGE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14123"
+></A
+><H3
+><A
+NAME="GTS-GEDGE-CAPS"
+></A
+>GTS_GEDGE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GEDGE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14137"
+></A
+><H3
+><A
+NAME="GTS-IS-GEDGE-CAPS"
+></A
+>GTS_IS_GEDGE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_GEDGE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14151"
+></A
+><H3
+><A
+NAME="GTSGEDGECLASS"
+></A
+>struct GtsGEdgeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGEdgeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14156"
+></A
+><H3
+><A
+NAME="GTSGEDGE"
+></A
+>struct GtsGEdge</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGEdge {
+  GtsContainee containee;
+
+  GtsGNode * n1;
+  GtsGNode * n2;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14161"
+></A
+><H3
+><A
+NAME="GTS-GEDGE-CLASS"
+></A
+>gts_gedge_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+>* gts_gedge_class              (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14178"
+></A
+><H3
+><A
+NAME="GTS-GEDGE-NEW"
+></A
+>gts_gedge_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+>*   gts_gedge_new                   (<A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n1,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+> linking <TT
+CLASS="PARAMETER"
+><I
+>n1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>n2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14215"
+></A
+><H3
+><A
+NAME="GTS-GEDGE-WEIGHT"
+></A
+>gts_gedge_weight ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_gedge_weight                (<A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGEDGE"
+>GtsGEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the weight of edge <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as defined by the <GTKDOCLINK
+HREF="WEIGHT"
+>weight</GTKDOCLINK
+>() method of
+<A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14240"
+></A
+><H3
+><A
+NAME="GTS-GEDGE-CONNECTS"
+></A
+>gts_gedge_connects()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_gedge_connects(e, a1, a2)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14262"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-CLASS-CAPS"
+></A
+>GTS_GRAPH_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GRAPH_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14276"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-CAPS"
+></A
+>GTS_GRAPH()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GRAPH(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14290"
+></A
+><H3
+><A
+NAME="GTS-IS-GRAPH-CAPS"
+></A
+>GTS_IS_GRAPH()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_GRAPH(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14304"
+></A
+><H3
+><A
+NAME="GTSGRAPHCLASS"
+></A
+>struct GtsGraphClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGraphClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14309"
+></A
+><H3
+><A
+NAME="GTSGRAPH"
+></A
+>struct GtsGraph</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGraph {
+  GtsHashContainer object;
+
+  GtsGNodeClass * node_class;
+  GtsGEdgeClass * edge_class;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14314"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-CLASS"
+></A
+>gts_graph_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+>* gts_graph_class              (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14331"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-NEW"
+></A
+>gts_graph_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>*   gts_graph_new                   (<A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+> *node_class,
+                                             <A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+> *edge_class);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>node_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODECLASS"
+>GtsGNodeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>edge_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGEDGECLASS"
+>GtsGEdgeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> using <TT
+CLASS="PARAMETER"
+><I
+>node_class</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>edge_class</I
+></TT
+> as node types.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14368"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-READ"
+></A
+>gts_graph_read ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_graph_read                  (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> the nodes and edges defined in the file pointed to by
+<TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+>. This file must use the Jostle "graph" ASCII format.  
+The nodes created are of type <GTKDOCLINK
+HREF="GTSNGNODE"
+>GtsNGNode</GTKDOCLINK
+> and their identities are the
+line number at which they appear in <TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> 0 if the lecture was successful, the line number at which
+an error occured otherwise.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14399"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-PRINT-STATS"
+></A
+>gts_graph_print_stats ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_graph_print_stats           (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes to <TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+> a summary of the properties of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14423"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-FOREACH-EDGE"
+></A
+>gts_graph_foreach_edge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_graph_foreach_edge          (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14455"
+></A
+><H3
+><A
+NAME="GTSGRAPHTRAVERSE"
+></A
+>struct GtsGraphTraverse</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGraphTraverse;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14460"
+></A
+><H3
+><A
+NAME="GTSTRAVERSETYPE"
+></A
+>enum GtsTraverseType</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef enum   { GTS_BREADTH_FIRST
+               }   GtsTraverseType;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14465"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-TRAVERSE-NEW"
+></A
+>gts_graph_traverse_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+>* gts_graph_traverse_new    (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-graph-class.html#GTSTRAVERSETYPE"
+>GtsTraverseType</A
+> type,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> reinit);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>type</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the type of traversal.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>reinit</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> if <TT
+CLASS="LITERAL"
+>TRUE</TT
+>, the traversal is reinitialized.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+> initialized for the traversal of
+<TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> of type <TT
+CLASS="PARAMETER"
+><I
+>type</I
+></TT
+>, starting from <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14509"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-TRAVERSE-NEXT"
+></A
+>gts_graph_traverse_next ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   gts_graph_traverse_next         (<A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the next <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> of the traversal defined by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>
+if the traversal is complete.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14534"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-TRAVERSE-WHAT-NEXT"
+></A
+>gts_graph_traverse_what_next ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   gts_graph_traverse_what_next    (<A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the next <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> of the traversal defined by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>
+if the traversal is complete but without advancing the traversal.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14559"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-TRAVERSE-DESTROY"
+></A
+>gts_graph_traverse_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_graph_traverse_destroy      (<A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Frees all the memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPHTRAVERSE"
+>GtsGraphTraverse</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14577"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-EDGES-CUT"
+></A
+>gts_graph_edges_cut ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_graph_edges_cut             (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of edges of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> connecting nodes belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>
+to nodes not belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14602"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-EDGES-CUT-WEIGHT"
+></A
+>gts_graph_edges_cut_weight ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_graph_edges_cut_weight      (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the sum of the weights of the edges of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> connecting nodes
+belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> to nodes not belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14627"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-DISTANCE-SUM"
+></A
+>gts_graph_distance_sum ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_graph_distance_sum          (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *center);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>center</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the sum of the distances between all the other <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>
+of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>center</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14659"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-FARTHEST"
+></A
+>gts_graph_farthest ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>*   gts_graph_farthest              (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *gnodes);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>gnodes</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> and farthest from all the nodes in
+<TT
+CLASS="PARAMETER"
+><I
+>gnodes</I
+></TT
+> (hmmm, definition of "farthest"?).</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14691"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-WEIGHT"
+></A
+>gts_graph_weight ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_graph_weight                (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the weight of graph <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> as defined by the <GTKDOCLINK
+HREF="WEIGHT"
+>weight</GTKDOCLINK
+>() method
+of <A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+>. </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14716"
+></A
+><H3
+><A
+NAME="GTS-FNODE-CLASS-CAPS"
+></A
+>GTS_FNODE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_FNODE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14730"
+></A
+><H3
+><A
+NAME="GTS-FNODE-CAPS"
+></A
+>GTS_FNODE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_FNODE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14744"
+></A
+><H3
+><A
+NAME="GTS-IS-FNODE-CAPS"
+></A
+>GTS_IS_FNODE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_FNODE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14758"
+></A
+><H3
+><A
+NAME="GTSFNODE"
+></A
+>struct GtsFNode</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsFNode {
+  GtsGNode node;
+
+  GtsFace * f;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14763"
+></A
+><H3
+><A
+NAME="GTSFNODECLASS"
+></A
+>struct GtsFNodeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsFNodeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14768"
+></A
+><H3
+><A
+NAME="GTS-FNODE-CLASS"
+></A
+>gts_fnode_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSFNODECLASS"
+>GtsFNodeClass</A
+>* gts_fnode_class              (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-graph-class.html#GTSFNODECLASS"
+>GtsFNodeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14785"
+></A
+><H3
+><A
+NAME="GTS-FNODE-NEW"
+></A
+>gts_fnode_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSFNODE"
+>GtsFNode</A
+>*   gts_fnode_new                   (<A
+HREF="gts-graph-class.html#GTSFNODECLASS"
+>GtsFNodeClass</A
+> *klass,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSFNODECLASS"
+>GtsFNodeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-class.html#GTSFNODE"
+>GtsFNode</A
+> associated with face <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14815"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-GRAPH-NEW"
+></A
+>gts_surface_graph_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>*   gts_surface_graph_new           (<A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPHCLASS"
+>GtsGraphClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> representing the connectivity of the faces
+of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>. This graph uses <GTKDOCLINK
+HREF="GTSFGNODE"
+>GtsFGNode</GTKDOCLINK
+> as nodes which allows to store
+the dependencies between nodes and faces of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14847"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-GRAPH-SURFACE"
+></A
+>gts_surface_graph_surface ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>* gts_surface_graph_surface       (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *surface_graph,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface_graph</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> using <GTKDOCLINK
+HREF="GTSFGNODE"
+>GtsFGNode</GTKDOCLINK
+> as nodes.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> using the same classes as <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> and
+composed of the faces defined by <TT
+CLASS="PARAMETER"
+><I
+>surface_graph</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-weighted-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Graph and operations on graphs</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Weighted graph</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-graph-partitioning.html b/doc/html/gts-graph-partitioning.html
new file mode 100644
index 0000000..685fc01
--- /dev/null
+++ b/doc/html/gts-graph-partitioning.html
@@ -0,0 +1,2509 @@
+<HTML
+><HEAD
+><TITLE
+>Graph partitioning</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Graph and operations on graphs"
+HREF="c13676.html"><LINK
+REL="PREVIOUS"
+TITLE="Progressive graph"
+HREF="gts-progressive-graph.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-progressive-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+> </TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-GRAPH-PARTITIONING"
+>Graph partitioning</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN15857"
+></A
+><H2
+>Name</H2
+>Graph partitioning -- </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN15860"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+struct      <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>;
+<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>* <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BISECTION-NEW"
+>gts_graph_bisection_new</A
+>  (<A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+> *wg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nmin);
+<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>* <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-GGG-BISECTION"
+>gts_graph_ggg_bisection</A
+>  (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry);
+<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>* <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BFGG-BISECTION"
+>gts_graph_bfgg_bisection</A
+> (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BISECTION-CHECK"
+>gts_graph_bisection_check</A
+>       (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BISECTION-KL-REFINE"
+>gts_graph_bisection_kl_refine</A
+>   (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BISECTION-BKL-REFINE"
+>gts_graph_bisection_bkl_refine</A
+>  (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-RECURSIVE-BISECTION"
+>gts_graph_recursive_bisection</A
+>   (<A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+> *wg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nmin);
+void        <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BISECTION-DESTROY"
+>gts_graph_bisection_destroy</A
+>     (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> destroy_graphs);
+
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BUBBLE-PARTITION"
+>gts_graph_bubble_partition</A
+>      (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> np,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> niter,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> step_info,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-graph-class.html#GTS-GRAPH-EDGES-CUT"
+>gts_graph_edges_cut</A
+>             (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-class.html#GTS-GRAPH-EDGES-CUT-WEIGHT"
+>gts_graph_edges_cut_weight</A
+>      (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-PARTITION-EDGES-CUT"
+>gts_graph_partition_edges_cut</A
+>   (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-PARTITION-BALANCE"
+>gts_graph_partition_balance</A
+>     (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-PARTITION-CLONE"
+>gts_graph_partition_clone</A
+>       (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);
+void        <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-PARTITION-PRINT-STATS"
+>gts_graph_partition_print_stats</A
+> (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-PARTITION-EDGES-CUT-WEIGHT"
+>gts_graph_partition_edges_cut_weight</A
+>
+                                            (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);
+void        <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-PARTITION-DESTROY"
+>gts_graph_partition_destroy</A
+>     (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN15929"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN15932"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15934"
+></A
+><H3
+><A
+NAME="GTSGRAPHBISECTION"
+></A
+>struct GtsGraphBisection</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGraphBisection {
+  GtsGraph * g;
+  GtsGraph * g1;
+  GtsGraph * g2;
+  GHashTable * bg1;
+  GHashTable * bg2;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15939"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-BISECTION-NEW"
+></A
+>gts_graph_bisection_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>* gts_graph_bisection_new  (<A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+> *wg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nmin);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of a multilevel bisection algorithm as presented
+in Karypis and Kumar (1997). A multilevel hierarchy of graphs is
+created using the <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> object. The bisection of the coarsest
+graph is created using the <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-GGG-BISECTION"
+>gts_graph_ggg_bisection</A
+>() function. The
+graph is then uncoarsened using <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-DOWN"
+>gts_pgraph_down</A
+>() and at each level
+the bisection is refined using <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BISECTION-BKL-REFINE"
+>gts_graph_bisection_bkl_refine</A
+>().</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>wg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ntry</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of tries for the graph growing algorithm.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of unsucessful moves for the refinement algorithm.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nmin</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimum number of nodes of the coarsest graph.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>wg</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15982"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-GGG-BISECTION"
+></A
+>gts_graph_ggg_bisection ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>* gts_graph_ggg_bisection  (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of the "Greedy Graph Growing" algorithm of
+Karypis and Kumar (1997).  </P
+><P
+><TT
+CLASS="PARAMETER"
+><I
+>ntry</I
+></TT
+> randomly chosen seeds are used and the best partition is retained.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ntry</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of randomly selected initial seeds.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16013"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-BFGG-BISECTION"
+></A
+>gts_graph_bfgg_bisection ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>* gts_graph_bfgg_bisection (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of a "Breadth-First Graph Growing" algorithm.</P
+><P
+><TT
+CLASS="PARAMETER"
+><I
+>ntry</I
+></TT
+> randomly chosen seeds are used and the best partition is retained.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ntry</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of randomly selected initial seeds.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16044"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-BISECTION-CHECK"
+></A
+>gts_graph_bisection_check ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_graph_bisection_check       (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Checks that the boundary of <TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+> is correctly defined (used for
+debugging purposes).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+> is ok, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16070"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-BISECTION-KL-REFINE"
+></A
+>gts_graph_bisection_kl_refine ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_graph_bisection_kl_refine   (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of the simplified Kernighan-Lin algorithm for
+graph bisection refinement as described in Karypis and Kumar
+(1997).</P
+><P
+>The algorithm stops if <TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> consecutive modes do not lead to a
+decrease in the number of edges cut. This last <TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> moves are
+undone.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum number of unsuccessful successive moves.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the decrease in the weight of the edges cut by the bisection.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16100"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-BISECTION-BKL-REFINE"
+></A
+>gts_graph_bisection_bkl_refine ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_graph_bisection_bkl_refine  (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of the simplified boundary Kernighan-Lin
+algorithm for graph bisection refinement as described in Karypis
+and Kumar (1997).</P
+><P
+>The algorithm stops if <TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> consecutive modes do not lead to a
+decrease in the number of edges cut. This last <TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> moves are
+undone.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum number of unsuccessful successive moves.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the decrease in the weight of the edges cut by the bisection.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16130"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-RECURSIVE-BISECTION"
+></A
+>gts_graph_recursive_bisection ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_graph_recursive_bisection   (<A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+> *wg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ntry,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> mmax,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nmin);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <A
+HREF="gts-graph-partitioning.html#GTS-GRAPH-BISECTION-NEW"
+>gts_graph_bisection_new</A
+>() recursively in order to obtain a
+2^<TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> partition of <TT
+CLASS="PARAMETER"
+><I
+>wg</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>wg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of bisection levels.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ntry</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of tries for the graph growing algorithm.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>mmax</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of unsucessful moves for the refinement algorithm.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nmin</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimum number of nodes of the coarsest graph.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of 2^<TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> new <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> representing the partition.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16177"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-BISECTION-DESTROY"
+></A
+>gts_graph_bisection_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_graph_bisection_destroy     (<A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+> *bg,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> destroy_graphs);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Frees all the memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+>. If <TT
+CLASS="PARAMETER"
+><I
+>destroy_graphs</I
+></TT
+> is <TT
+CLASS="LITERAL"
+>TRUE</TT
+>
+the graphs created by <TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+> are destroyed.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-partitioning.html#GTSGRAPHBISECTION"
+>GtsGraphBisection</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>destroy_graphs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> controls graph destruction.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16203"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-BUBBLE-PARTITION"
+></A
+>gts_graph_bubble_partition ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_graph_bubble_partition      (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> np,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> niter,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> step_info,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of the "bubble partitioning algorithm" of
+Diekmann, Preis, Schlimbach and Walshaw (2000). The maximum number
+of iteration on the positions of the graph growing seeds is
+controlled by <TT
+CLASS="PARAMETER"
+><I
+>niter</I
+></TT
+>.</P
+><P
+>If not <TT
+CLASS="LITERAL"
+>NULL</TT
+> <TT
+CLASS="PARAMETER"
+><I
+>step_info</I
+></TT
+> is called after each iteration on the seeds
+positions passing the partition (a GSList) as argument.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>np</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> number of partitions.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>niter</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum number of iterations.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>step_info</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to pass to <TT
+CLASS="PARAMETER"
+><I
+>step_info</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <TT
+CLASS="PARAMETER"
+><I
+>np</I
+></TT
+> new <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> representing the partition.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16254"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-EDGES-CUT"
+></A
+>gts_graph_edges_cut ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_graph_edges_cut             (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16275"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-EDGES-CUT-WEIGHT"
+></A
+>gts_graph_edges_cut_weight ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_graph_edges_cut_weight      (<A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16296"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-PARTITION-EDGES-CUT"
+></A
+>gts_graph_partition_edges_cut ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_graph_partition_edges_cut   (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <TT
+CLASS="PARAMETER"
+><I
+>GtsGraph</I
+></TT
+> representing a partition.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of edges cut by the partition.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16318"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-PARTITION-BALANCE"
+></A
+>gts_graph_partition_balance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_graph_partition_balance     (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <TT
+CLASS="PARAMETER"
+><I
+>GtsGraph</I
+></TT
+> representing a partition.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the difference between the maximum and the minimum weight
+of the graphs in <TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16341"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-PARTITION-CLONE"
+></A
+>gts_graph_partition_clone ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_graph_partition_clone       (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <TT
+CLASS="PARAMETER"
+><I
+>GtsGraph</I
+></TT
+> representing a partition.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new partition clone of <TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> (i.e. a list of new
+graphs clones of the graphs in <TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+>).  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16365"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-PARTITION-PRINT-STATS"
+></A
+>gts_graph_partition_print_stats ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_graph_partition_print_stats (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fp);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes to <TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+> a summary of the properties of <TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <TT
+CLASS="PARAMETER"
+><I
+>GtsGraph</I
+></TT
+> representing a partition.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fp</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16389"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-PARTITION-EDGES-CUT-WEIGHT"
+></A
+>gts_graph_partition_edges_cut_weight ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_graph_partition_edges_cut_weight
+                                            (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <TT
+CLASS="PARAMETER"
+><I
+>GtsGraph</I
+></TT
+> representing a partition.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the total weight of the edges cut by the partition.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN16411"
+></A
+><H3
+><A
+NAME="GTS-GRAPH-PARTITION-DESTROY"
+></A
+>gts_graph_partition_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_graph_partition_destroy     (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *partition);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Destroys all the graphs in <TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> and frees <TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>partition</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <TT
+CLASS="PARAMETER"
+><I
+>GtsGraph</I
+></TT
+> representing a partition.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-progressive-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+> </TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Progressive graph</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+> </TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-hierarchical-surfaces.html b/doc/html/gts-hierarchical-surfaces.html
new file mode 100644
index 0000000..09f1a9a
--- /dev/null
+++ b/doc/html/gts-hierarchical-surfaces.html
@@ -0,0 +1,1606 @@
+<HTML
+><HEAD
+><TITLE
+>Hierarchical surfaces</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Progressive and Hierarchical surfaces"
+HREF="c12040.html"><LINK
+REL="PREVIOUS"
+TITLE="Hierarchical vertex split"
+HREF="gts-hierarchical-vertex-split.html"><LINK
+REL="NEXT"
+TITLE="Graph and operations on graphs"
+HREF="c13676.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-hierarchical-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-HIERARCHICAL-SURFACES"
+>Hierarchical surfaces</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN13340"
+></A
+><H2
+>Name</H2
+>Hierarchical surfaces -- extension of progressive surfaces allowing arbitrary sequences of vertex split or collapse.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN13343"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-hierarchical-surfaces.html#GTS-HSURFACE-CLASS-CAPS"
+>GTS_HSURFACE_CLASS</A
+>              (klass)
+#define     <A
+HREF="gts-hierarchical-surfaces.html#GTS-HSURFACE-CAPS"
+>GTS_HSURFACE</A
+>                    (obj)
+#define     <A
+HREF="gts-hierarchical-surfaces.html#GTS-IS-HSURFACE-CAPS"
+>GTS_IS_HSURFACE</A
+>                 (obj)
+struct      <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+>;
+struct      <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>;
+
+<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+>* <A
+HREF="gts-hierarchical-surfaces.html#GTS-HSURFACE-CLASS"
+>gts_hsurface_class</A
+>        (void);
+<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>* <A
+HREF="gts-hierarchical-surfaces.html#GTS-HSURFACE-NEW"
+>gts_hsurface_new</A
+>               (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+> *hsplit_class,
+                                             <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *psurface,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> expand_key,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> expand_data,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> collapse_key,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> collapse_data);
+void        <A
+HREF="gts-hierarchical-surfaces.html#GTS-HSURFACE-TRAVERSE"
+>gts_hsurface_traverse</A
+>           (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface,
+                                             <GTKDOCLINK
+HREF="GTRAVERSETYPE"
+>GTraverseType</GTKDOCLINK
+> order,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> depth,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITTRAVERSEFUNC"
+>GtsSplitTraverseFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-hierarchical-surfaces.html#GTS-HSURFACE-HEIGHT"
+>gts_hsurface_height</A
+>             (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);
+void        <A
+HREF="gts-hierarchical-surfaces.html#GTS-HSURFACE-FOREACH"
+>gts_hsurface_foreach</A
+>            (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface,
+                                             <GTKDOCLINK
+HREF="GTRAVERSETYPE"
+>GTraverseType</GTKDOCLINK
+> order,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN13376"
+></A
+><H2
+>Description</H2
+><P
+>Hierarchical surfaces are used to manage sequences of vertex splits or collapses which can be different from the initial sequence described by the progressive surface. In this way different branches of the vertex split tree can be collapsed or expanded resulting in a level of detail varying across different parts of the surface. This is the fundamental mechanism of view-dependent level of detail.</P
+><P
+>Hierarchical surfaces maintain two priority heaps one containing the next vertices (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>) ready to be expanded, the other the next vertices ready to be collapsed. By updating the priorities for these vertices as the view point changes and collapsing or expanding the top ones until a given criterium is verified, the level of detail can be dynamically adapted.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN13381"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13383"
+></A
+><H3
+><A
+NAME="GTS-HSURFACE-CLASS-CAPS"
+></A
+>GTS_HSURFACE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_HSURFACE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13400"
+></A
+><H3
+><A
+NAME="GTS-HSURFACE-CAPS"
+></A
+>GTS_HSURFACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_HSURFACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13417"
+></A
+><H3
+><A
+NAME="GTS-IS-HSURFACE-CAPS"
+></A
+>GTS_IS_HSURFACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_HSURFACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13434"
+></A
+><H3
+><A
+NAME="GTSHSURFACECLASS"
+></A
+>struct GtsHSurfaceClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsHSurfaceClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The hierarchical surface class derived from <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13440"
+></A
+><H3
+><A
+NAME="GTSHSURFACE"
+></A
+>struct GtsHSurface</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsHSurface {
+  GtsObject object;
+
+  GtsSurface * s;
+  GSList * roots;
+  GtsEHeap * expandable;
+  GtsEHeap * collapsable;
+  GPtrArray * split;
+  guint nvertex;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The hierarchical surface object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>s</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> being refined or coarsened.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>roots</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Private field.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>expandable</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> of the expandable <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> sorted by priority.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>collapsable</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> of the collapsable <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> sorted by priority.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GPTRARRAY"
+>GPtrArray</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>split</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Private field.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>nvertex</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Private field.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13490"
+></A
+><H3
+><A
+NAME="GTS-HSURFACE-CLASS"
+></A
+>gts_hsurface_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+>* gts_hsurface_class        (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13507"
+></A
+><H3
+><A
+NAME="GTS-HSURFACE-NEW"
+></A
+>gts_hsurface_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>* gts_hsurface_new               (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+> *hsplit_class,
+                                             <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *psurface,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> expand_key,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> expand_data,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> collapse_key,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> collapse_data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACECLASS"
+>GtsHSurfaceClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hsplit_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>psurface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>expand_key</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> used to order the priority heap of expandable 
+<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>expand_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>expand_key</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>collapse_key</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> used to order the priority heap of collapsable
+<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>collapse_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>collapsed_key</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>, hierarchical extension of <TT
+CLASS="PARAMETER"
+><I
+>psurface</I
+></TT
+>
+and using <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> of class <TT
+CLASS="PARAMETER"
+><I
+>hsplit_class</I
+></TT
+>. Note that <TT
+CLASS="PARAMETER"
+><I
+>psurface</I
+></TT
+> is
+destroyed in the process.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13572"
+></A
+><H3
+><A
+NAME="GTS-HSURFACE-TRAVERSE"
+></A
+>gts_hsurface_traverse ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_hsurface_traverse           (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface,
+                                             <GTKDOCLINK
+HREF="GTRAVERSETYPE"
+>GTraverseType</GTKDOCLINK
+> order,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> depth,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITTRAVERSEFUNC"
+>GtsSplitTraverseFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Traverses a hierarchical surface starting from its roots. It calls
+the given function for each <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> visited. 
+See also <A
+HREF="gts-vertex-split.html#GTS-SPLIT-TRAVERSE"
+>gts_split_traverse</A
+>().</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>order</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>depth</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum depth of the traversal. Nodes below this depth
+will not be visited. If max_depth is -1 all nodes in the tree are
+visited. If depth is 1, only the root is visited. If depth is 2,
+the root and its children are visited. And so on.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the function to call for each visited <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to pass to the function.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13612"
+></A
+><H3
+><A
+NAME="GTS-HSURFACE-HEIGHT"
+></A
+>gts_hsurface_height ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_hsurface_height             (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum height of the tree described by <TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13635"
+></A
+><H3
+><A
+NAME="GTS-HSURFACE-FOREACH"
+></A
+>gts_hsurface_foreach ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_hsurface_foreach            (<A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface,
+                                             <GTKDOCLINK
+HREF="GTRAVERSETYPE"
+>GTraverseType</GTKDOCLINK
+> order,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Starts by expanding all the <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+>. If <TT
+CLASS="PARAMETER"
+><I
+>order</I
+></TT
+> is
+G_PRE_ORDER, calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> and collapses it. If
+order is G_POST_ORDER, collapses each <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> first and then
+calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>. The traversal can be halted at any point by returning
+TRUE from func.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>order</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the order in which <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> are visited - G_PRE_ORDER or 
+G_POST_ORDER.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the function to call for each visited <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to pass to the function.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-hierarchical-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Hierarchical vertex split</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Graph and operations on graphs</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-hierarchical-vertex-split.html b/doc/html/gts-hierarchical-vertex-split.html
new file mode 100644
index 0000000..1ef4ac4
--- /dev/null
+++ b/doc/html/gts-hierarchical-vertex-split.html
@@ -0,0 +1,1230 @@
+<HTML
+><HEAD
+><TITLE
+>Hierarchical vertex split</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Progressive and Hierarchical surfaces"
+HREF="c12040.html"><LINK
+REL="PREVIOUS"
+TITLE="Progressive surfaces"
+HREF="gts-progressive-surfaces.html"><LINK
+REL="NEXT"
+TITLE="Hierarchical surfaces"
+HREF="gts-hierarchical-surfaces.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-progressive-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-hierarchical-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-HIERARCHICAL-VERTEX-SPLIT"
+>Hierarchical vertex split</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN13090"
+></A
+><H2
+>Name</H2
+>Hierarchical vertex split -- hierarchical extension of the vertex split.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN13093"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-hierarchical-vertex-split.html#GTS-HSPLIT-CLASS-CAPS"
+>GTS_HSPLIT_CLASS</A
+>                (klass)
+#define     <A
+HREF="gts-hierarchical-vertex-split.html#GTS-HSPLIT-CAPS"
+>GTS_HSPLIT</A
+>                      (obj)
+#define     <A
+HREF="gts-hierarchical-vertex-split.html#GTS-IS-HSPLIT-CAPS"
+>GTS_IS_HSPLIT</A
+>                   (obj)
+struct      <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>;
+struct      <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>;
+
+<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>* <A
+HREF="gts-hierarchical-vertex-split.html#GTS-HSPLIT-CLASS"
+>gts_hsplit_class</A
+>            (void);
+<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>*  <A
+HREF="gts-hierarchical-vertex-split.html#GTS-HSPLIT-NEW"
+>gts_hsplit_new</A
+>                  (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+> *klass,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs);
+void        <A
+HREF="gts-hierarchical-vertex-split.html#GTS-HSPLIT-COLLAPSE"
+>gts_hsplit_collapse</A
+>             (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> *hs,
+                                             <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);
+void        <A
+HREF="gts-hierarchical-vertex-split.html#GTS-HSPLIT-EXPAND"
+>gts_hsplit_expand</A
+>               (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> *hs,
+                                             <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);
+void        <A
+HREF="gts-hierarchical-vertex-split.html#GTS-HSPLIT-FORCE-EXPAND"
+>gts_hsplit_force_expand</A
+>         (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> *hs,
+                                             <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN13116"
+></A
+><H2
+>Description</H2
+><P
+>Hierarchical vertex splits are the building blocks of hierarchical surfaces. They are derived from <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> objects but add pointers to their parents in the vertex split tree and information on the state (collapsed or expanded) of their children.</P
+><P
+>Together with <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> fields these informations allow to manage any valid sequence of expansions or collapses.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN13122"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13124"
+></A
+><H3
+><A
+NAME="GTS-HSPLIT-CLASS-CAPS"
+></A
+>GTS_HSPLIT_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_HSPLIT_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13141"
+></A
+><H3
+><A
+NAME="GTS-HSPLIT-CAPS"
+></A
+>GTS_HSPLIT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_HSPLIT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13158"
+></A
+><H3
+><A
+NAME="GTS-IS-HSPLIT-CAPS"
+></A
+>GTS_IS_HSPLIT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_HSPLIT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13176"
+></A
+><H3
+><A
+NAME="GTSHSPLITCLASS"
+></A
+>struct GtsHSplitClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsHSplitClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The hierarchical split vertex class derived from <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13182"
+></A
+><H3
+><A
+NAME="GTSHSPLIT"
+></A
+>struct GtsHSplit</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsHSplit {
+  GtsSplit split;
+
+  GtsEHeapPair * index;
+  GtsHSplit * parent;
+  guint nchild;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The hierarchical split vertex object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>split</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-extended-binary-heaps.html#GTSEHEAPPAIR"
+>GtsEHeapPair</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>index</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Used when managing priority heaps for vertex split and collapse.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>parent</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Parent of this hierarchical split vertex in the split vertex tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>nchild</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of expanded children of this vertex split (0, 1, or 2).
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13212"
+></A
+><H3
+><A
+NAME="GTS-HSPLIT-CLASS"
+></A
+>gts_hsplit_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>* gts_hsplit_class            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13229"
+></A
+><H3
+><A
+NAME="GTS-HSPLIT-NEW"
+></A
+>gts_hsplit_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>*  gts_hsplit_new                  (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+> *klass,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLITCLASS"
+>GtsHSplitClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>, hierarchical extension of <TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13259"
+></A
+><H3
+><A
+NAME="GTS-HSPLIT-COLLAPSE"
+></A
+>gts_hsplit_collapse ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_hsplit_collapse             (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> *hs,
+                                             <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Collapses the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> defined by <TT
+CLASS="PARAMETER"
+><I
+>hs</I
+></TT
+>, updates the expandable and
+collapsable priority heaps of <TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13285"
+></A
+><H3
+><A
+NAME="GTS-HSPLIT-EXPAND"
+></A
+>gts_hsplit_expand ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_hsplit_expand               (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> *hs,
+                                             <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Expands the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> defined by <TT
+CLASS="PARAMETER"
+><I
+>hs</I
+></TT
+> (which must be expandable)
+and updates the priority heaps of <TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13311"
+></A
+><H3
+><A
+NAME="GTS-HSPLIT-FORCE-EXPAND"
+></A
+>gts_hsplit_force_expand ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_hsplit_force_expand         (<A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+> *hs,
+                                             <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+> *hsurface);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Forces the expansion of <TT
+CLASS="PARAMETER"
+><I
+>hs</I
+></TT
+> by first expanding all its dependencies not
+already expanded.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>hsurface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-hierarchical-surfaces.html#GTSHSURFACE"
+>GtsHSurface</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-progressive-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-hierarchical-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Progressive surfaces</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Hierarchical surfaces</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-isosurfaces-from-3d-functions.html b/doc/html/gts-isosurfaces-from-3d-functions.html
new file mode 100644
index 0000000..241e113
--- /dev/null
+++ b/doc/html/gts-isosurfaces-from-3d-functions.html
@@ -0,0 +1,2032 @@
+<HTML
+><HEAD
+><TITLE
+>Isosurfaces from 3D functions</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Surface operations"
+HREF="c9853.html"><LINK
+REL="PREVIOUS"
+TITLE="Out-of-core simplification"
+HREF="gts-out-of-core-simplification.html"><LINK
+REL="NEXT"
+TITLE="Delaunay and constrained Delaunay triangulations"
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-out-of-core-simplification.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-ISOSURFACES-FROM-3D-FUNCTIONS"
+>Isosurfaces from 3D functions</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN11108"
+></A
+><H2
+>Name</H2
+>Isosurfaces from 3D functions -- computing triangulated isosurfaces of a given function f(x,y,z).</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN11111"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+struct      <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+>;
+struct      <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+>;
+
+<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+>* <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-GRID-PLANE-NEW"
+>gts_grid_plane_new</A
+>            (<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nx,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ny);
+void        <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-GRID-PLANE-DESTROY"
+>gts_grid_plane_destroy</A
+>          (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+> *g);
+
+struct      <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>;
+
+<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>* <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-NEW"
+>gts_iso_slice_new</A
+>              (<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nx,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ny);
+void        <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-FILL"
+>gts_iso_slice_fill</A
+>              (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+> *plane1,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+> *plane2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> iso,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass);
+void        <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-FILL-CARTESIAN"
+>gts_iso_slice_fill_cartesian</A
+>    (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> g,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> iso,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass);
+void        <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-DESTROY"
+>gts_iso_slice_destroy</A
+>           (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice);
+void        <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISOSURFACE-SLICE"
+>gts_isosurface_slice</A
+>            (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice1,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice2,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+void        (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOCARTESIANFUNC"
+>*GtsIsoCartesianFunc</A
+>)          (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **a,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> i,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISOSURFACE-CARTESIAN"
+>gts_isosurface_cartesian</A
+>        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> g,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOCARTESIANFUNC"
+>GtsIsoCartesianFunc</A
+> f,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> iso);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN11159"
+></A
+><H2
+>Description</H2
+><P
+>Using the <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISOSURFACE-CARTESIAN"
+>gts_isosurface_cartesian</A
+>() function, it is possible to build a triangulated isosurface of a given user-defined function. As its name indicates this function assumes that the values of the user-defined function are defined for points located on a regular cartesian grid described by the <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> parameter. The triangles describing the isosurface are computed for each pair of successive planes z and z+dz in a pipelined manner. Consequently only two planes need to be stored in memory at any time. This allows to construct isosurfaces for datasets too large to fit in main memory.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN11164"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11166"
+></A
+><H3
+><A
+NAME="GTSCARTESIANGRID"
+></A
+>struct GtsCartesianGrid</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsCartesianGrid {
+  guint nx, ny, nz;
+  gdouble x, dx, y, dy, z, dz;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>A regular cartesian grid is defined by the number of points in each direction, the spatial increment in each direction and the coordinates of the first point.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>nx</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of points in direction x.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>ny</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of points in direction y.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>nz</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of points in direction z.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>x</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>x coordinate of the first point.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>dx</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Increment in direction x.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>y</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>y coordinate of the first point.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>dy</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Increment in direction y.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>z</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>z coordinate of the first point.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>dz</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Increment in direction z.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11221"
+></A
+><H3
+><A
+NAME="GTSGRIDPLANE"
+></A
+>struct GtsGridPlane</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGridPlane {
+  GtsPoint ** p;
+  guint nx, ny;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11226"
+></A
+><H3
+><A
+NAME="GTS-GRID-PLANE-NEW"
+></A
+>gts_grid_plane_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+>* gts_grid_plane_new            (<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nx,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ny);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nx</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ny</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11252"
+></A
+><H3
+><A
+NAME="GTS-GRID-PLANE-DESTROY"
+></A
+>gts_grid_plane_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_grid_plane_destroy          (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11268"
+></A
+><H3
+><A
+NAME="GTSISOSLICE"
+></A
+>struct GtsIsoSlice</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsIsoSlice;</PRE
+></TD
+></TR
+></TABLE
+><P
+>A GtsIsoSlice is an opaque data structure containing the coordinates of the points located on the isosurface for a given slice of the user-defined function.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11273"
+></A
+><H3
+><A
+NAME="GTS-ISO-SLICE-NEW"
+></A
+>gts_iso_slice_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>* gts_iso_slice_new              (<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nx,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> ny);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nx</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> number of vertices in the x direction.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ny</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> number of vertices in the y direction.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11300"
+></A
+><H3
+><A
+NAME="GTS-ISO-SLICE-FILL"
+></A
+>gts_iso_slice_fill ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_iso_slice_fill              (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+> *plane1,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+> *plane2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> iso,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Fill <TT
+CLASS="PARAMETER"
+><I
+>slice</I
+></TT
+> with the coordinates of the vertices defined by 
+f1 (x,y,z) = <TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+> and f2 (x, y, z) = <TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>slice</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>plane1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>plane2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE"
+>GtsGridPlane</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> values of the function corresponding to <TT
+CLASS="PARAMETER"
+><I
+>plane1</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> values of the function corresponding to <TT
+CLASS="PARAMETER"
+><I
+>plane2</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> isosurface value.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> or one of its descendant to be used for the 
+new vertices.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11355"
+></A
+><H3
+><A
+NAME="GTS-ISO-SLICE-FILL-CARTESIAN"
+></A
+>gts_iso_slice_fill_cartesian ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_iso_slice_fill_cartesian    (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> g,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **f2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> iso,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Fill <TT
+CLASS="PARAMETER"
+><I
+>slice</I
+></TT
+> with the coordinates of the vertices defined by 
+f1 (x,y,z) = <TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+> and f2 (x, y, z) = <TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>slice</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> values of the function for plane z = <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.z.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> values of the function for plane z = <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.z + <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.dz.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> isosurface value.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11405"
+></A
+><H3
+><A
+NAME="GTS-ISO-SLICE-DESTROY"
+></A
+>gts_iso_slice_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_iso_slice_destroy           (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Free all memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>slice</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>slice</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11423"
+></A
+><H3
+><A
+NAME="GTS-ISOSURFACE-SLICE"
+></A
+>gts_isosurface_slice ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_isosurface_slice            (<A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice1,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+> *slice2,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given two successive slices <TT
+CLASS="PARAMETER"
+><I
+>slice1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>slice2</I
+></TT
+> link their vertices with
+segments and triangles which are added to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>slice1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>slice2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOSLICE"
+>GtsIsoSlice</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11455"
+></A
+><H3
+><A
+NAME="GTSISOCARTESIANFUNC"
+></A
+>GtsIsoCartesianFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        (*GtsIsoCartesianFunc)          (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> **a,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> g,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> i,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>This user-defined function is passed to the <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISOSURFACE-CARTESIAN"
+>gts_isosurface_cartesian</A
+>() 
+function. Given a particular <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> it must fill the array <TT
+CLASS="PARAMETER"
+><I
+>a</I
+></TT
+>
+with the values of the function for the plane z=<TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.z (or for the corresponding 
+index <TT
+CLASS="PARAMETER"
+><I
+>i</I
+></TT
+>). This function is always called in order by <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTS-ISOSURFACE-CARTESIAN"
+>gts_isosurface_cartesian</A
+>(), i.e. <TT
+CLASS="PARAMETER"
+><I
+>i</I
+></TT
+> varies from 0 to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.nz - 1 with an increment of one (and similarly <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.z is incremented every time by <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.dz).</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the 2D array to be filled.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>i</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the z direction index of the plane to be filled.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>user data.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11497"
+></A
+><H3
+><A
+NAME="GTS-ISOSURFACE-CARTESIAN"
+></A
+>gts_isosurface_cartesian ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_isosurface_cartesian        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+> g,
+                                             <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOCARTESIANFUNC"
+>GtsIsoCartesianFunc</A
+> f,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> iso);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> new faces defining the isosurface f(x,y,z) = <TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+>. By
+convention, the normals to the surface are pointing toward the positive
+values of f(x,y,z) - <TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+>.</P
+><P
+>The user function <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> is called successively for each value of the z 
+coordinate defined by <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>. It must fill the corresponding (x,y) plane with
+the values of the function for which the isosurface is to be computed.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID"
+>GtsCartesianGrid</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-isosurfaces-from-3d-functions.html#GTSISOCARTESIANFUNC"
+>GtsIsoCartesianFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>iso</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> isosurface value.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-out-of-core-simplification.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-delaunay-and-constrained-delaunay-triangulations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Out-of-core simplification</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Delaunay and constrained Delaunay triangulations</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-kd-trees.html b/doc/html/gts-kd-trees.html
new file mode 100644
index 0000000..8a08da7
--- /dev/null
+++ b/doc/html/gts-kd-trees.html
@@ -0,0 +1,625 @@
+<HTML
+><HEAD
+><TITLE
+>Kd-Trees</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical data structures"
+HREF="c8393.html"><LINK
+REL="PREVIOUS"
+TITLE="Geometrical data structures"
+HREF="c8393.html"><LINK
+REL="NEXT"
+TITLE="Bounding boxes trees"
+HREF="gts-bounding-boxes-trees.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-bounding-boxes-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-KD-TREES"
+>Kd-Trees</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN8400"
+></A
+><H2
+>Name</H2
+>Kd-Trees -- an efficient way of doing point location queries.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN8403"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+>*      <A
+HREF="gts-kd-trees.html#GTS-KDTREE-NEW"
+>gts_kdtree_new</A
+>                  (<GTKDOCLINK
+HREF="GPTRARRAY"
+>GPtrArray</GTKDOCLINK
+> *points,
+                                             int (*compare) (const void *,const void *));
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-kd-trees.html#GTS-KDTREE-RANGE"
+>gts_kdtree_range</A
+>                (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox,
+                                             int (*compare) (const void *,const void *));
+#define     <A
+HREF="gts-kd-trees.html#GTS-KDTREE-DESTROY"
+>gts_kdtree_destroy</A
+>              (tree)</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN8414"
+></A
+><H2
+>Description</H2
+><P
+>Kd-Trees (in this case 3D-Trees) are a relatively efficient way of doing point location queries.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN8417"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8419"
+></A
+><H3
+><A
+NAME="GTS-KDTREE-NEW"
+></A
+>gts_kdtree_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+>*      gts_kdtree_new                  (<GTKDOCLINK
+HREF="GPTRARRAY"
+>GPtrArray</GTKDOCLINK
+> *points,
+                                             int (*compare) (const void *,const void *));</PRE
+></TD
+></TR
+></TABLE
+><P
+>Note that the order of the points in array <TT
+CLASS="PARAMETER"
+><I
+>points</I
+></TT
+> is modified by this
+function.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>points</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> an array of <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>compare</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> always <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new 3D tree for <TT
+CLASS="PARAMETER"
+><I
+>points</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8448"
+></A
+><H3
+><A
+NAME="GTS-KDTREE-RANGE"
+></A
+>gts_kdtree_range ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_kdtree_range                (<GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox,
+                                             int (*compare) (const void *,const void *));</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a 3D tree.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>compare</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> always <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> which are inside <TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8483"
+></A
+><H3
+><A
+NAME="GTS-KDTREE-DESTROY"
+></A
+>gts_kdtree_destroy()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define       gts_kdtree_destroy(tree)               g_node_destroy(tree)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-bounding-boxes-trees.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Geometrical data structures</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Bounding boxes trees</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-miscellaneous-macros-and-functions.html b/doc/html/gts-miscellaneous-macros-and-functions.html
new file mode 100644
index 0000000..295c3e3
--- /dev/null
+++ b/doc/html/gts-miscellaneous-macros-and-functions.html
@@ -0,0 +1,573 @@
+<HTML
+><HEAD
+><TITLE
+>Miscellaneous macros and functions</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"><LINK
+REL="PREVIOUS"
+TITLE="Simple statistics"
+HREF="gts-simple-statistics.html"><LINK
+REL="NEXT"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-simple-statistics.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-MISCELLANEOUS-MACROS-AND-FUNCTIONS"
+>Miscellaneous macros and functions</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN1827"
+></A
+><H2
+>Name</H2
+>Miscellaneous macros and functions -- Various utilities.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN1830"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-miscellaneous-macros-and-functions.html#GTS-COMMENTS-CAPS"
+>GTS_COMMENTS</A
+>
+
+<GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+>        <A
+HREF="gts-miscellaneous-macros-and-functions.html#GTS-GET-TOKEN"
+>gts_get_token</A
+>                   (<GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr,
+                                             <GTKDOCLINK
+HREF="GSTRING"
+>GString</GTKDOCLINK
+> *buf,
+                                             const char *delimiters,
+                                             const char *comments);
+void        <A
+HREF="gts-miscellaneous-macros-and-functions.html#GTS-GET-NEWLINE"
+>gts_get_newline</A
+>                 (<GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1840"
+></A
+><H2
+>Description</H2
+><P
+>The <A
+HREF="gts-miscellaneous-macros-and-functions.html#GTS-GET-TOKEN"
+>gts_get_token</A
+>() and <A
+HREF="gts-miscellaneous-macros-and-functions.html#GTS-GET-NEWLINE"
+>gts_get_newline</A
+>() functions are used for parsing GTS geometric files.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1845"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1847"
+></A
+><H3
+><A
+NAME="GTS-COMMENTS-CAPS"
+></A
+>GTS_COMMENTS</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_COMMENTS  "#%!"</PRE
+></TD
+></TR
+></TABLE
+><P
+>Set of characters used as comments identifiers in GTS geometric files.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1852"
+></A
+><H3
+><A
+NAME="GTS-GET-TOKEN"
+></A
+>gts_get_token ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+>        gts_get_token                   (<GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr,
+                                             <GTKDOCLINK
+HREF="GSTRING"
+>GString</GTKDOCLINK
+> *buf,
+                                             const char *delimiters,
+                                             const char *comments);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Reads characters from <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> and fills <TT
+CLASS="PARAMETER"
+><I
+>buf</I
+></TT
+> with a string delimited
+by characters in <TT
+CLASS="PARAMETER"
+><I
+>delimiters</I
+></TT
+>. Comments starts with a character in
+<TT
+CLASS="PARAMETER"
+><I
+>comments</I
+></TT
+> and ends with a newline character ('\n').</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>buf</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a buffer in which to return the result.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>delimiters</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a string of characters used to delimit the fields.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>comments</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a string of characters defining the start of a comment.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the last character read from <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1891"
+></A
+><H3
+><A
+NAME="GTS-GET-NEWLINE"
+></A
+>gts_get_newline ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_get_newline                 (<GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Reads characters from <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> until a '\n' character is met.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-simple-statistics.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Simple statistics</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Geometrical Object Hierarchy</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-object-class.html b/doc/html/gts-object-class.html
new file mode 100644
index 0000000..1b1caf6
--- /dev/null
+++ b/doc/html/gts-object-class.html
@@ -0,0 +1,3149 @@
+<HTML
+><HEAD
+><TITLE
+>Object class</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="NEXT"
+TITLE="Container classes"
+HREF="gts-container-classes.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-container-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-OBJECT-CLASS"
+>Object class</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN1919"
+></A
+><H2
+>Name</H2
+>Object class -- parent class for all GTS objects.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN1922"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-object-class.html#GTS-CLASS-NAME-LENGTH-CAPS"
+>GTS_CLASS_NAME_LENGTH</A
+>
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-CLASS-CAPS"
+>GTS_OBJECT_CLASS</A
+>                (klass)
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-CAPS"
+>GTS_OBJECT</A
+>                      (obj)
+#define     <A
+HREF="gts-object-class.html#GTS-IS-OBJECT-CAPS"
+>GTS_IS_OBJECT</A
+>                   (obj)
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-CLASS-CAST-CAPS"
+>GTS_OBJECT_CLASS_CAST</A
+>           (objklass, type, klass)
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-CAST-CAPS"
+>GTS_OBJECT_CAST</A
+>                 (obj, type, klass)
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-FLAGS-CAPS"
+>GTS_OBJECT_FLAGS</A
+>                (obj)
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-SET-FLAGS-CAPS"
+>GTS_OBJECT_SET_FLAGS</A
+>            (obj,flag)
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-UNSET-FLAGS-CAPS"
+>GTS_OBJECT_UNSET_FLAGS</A
+>          (obj,flag)
+#define     <A
+HREF="gts-object-class.html#GTS-OBJECT-DESTROYED-CAPS"
+>GTS_OBJECT_DESTROYED</A
+>            (obj)
+
+struct      <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>;
+struct      <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>;
+struct      <A
+HREF="gts-object-class.html#GTSOBJECTCLASSINFO"
+>GtsObjectClassInfo</A
+>;
+void        (<A
+HREF="gts-object-class.html#GTSOBJECTCLASSINITFUNC"
+>*GtsObjectClassInitFunc</A
+>)       (<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *objclass);
+void        (<A
+HREF="gts-object-class.html#GTSOBJECTINITFUNC"
+>*GtsObjectInitFunc</A
+>)            (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *obj);
+void        (<A
+HREF="gts-object-class.html#GTSARGSETFUNC"
+>*GtsArgSetFunc</A
+>)                (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *obj);
+void        (<A
+HREF="gts-object-class.html#GTSARGGETFUNC"
+>*GtsArgGetFunc</A
+>)                (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *obj);
+enum        <A
+HREF="gts-object-class.html#GTSOBJECTFLAGS"
+>GtsObjectFlags</A
+>;
+struct      <A
+HREF="gts-object-class.html#GTSCOLOR"
+>GtsColor</A
+>;
+
+<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>* <A
+HREF="gts-object-class.html"
+>gts_object_class</A
+>            (void);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-object-class.html#GTS-OBJECT-CLASS-NEW"
+>gts_object_class_new</A
+>            (<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *parent_class,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECTCLASSINFO"
+>GtsObjectClassInfo</A
+> *info);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-object-class.html#GTS-OBJECT-CLASS-CHECK-CAST"
+>gts_object_class_check_cast</A
+>     (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> from);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-object-class.html#GTS-OBJECT-CLASS-IS-FROM-CLASS"
+>gts_object_class_is_from_class</A
+>  (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> from);
+<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>* <A
+HREF="gts-object-class.html#GTS-OBJECT-CLASS-FROM-NAME"
+>gts_object_class_from_name</A
+>  (<GTKDOCLINK
+HREF="GCHAR"
+>gchar</GTKDOCLINK
+> *name);
+<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>*  <A
+HREF="gts-object-class.html#GTS-OBJECT-NEW"
+>gts_object_new</A
+>                  (<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *klass);
+void        <A
+HREF="gts-object-class.html#GTS-OBJECT-INIT"
+>gts_object_init</A
+>                 (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *klass);
+<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>*  <A
+HREF="gts-object-class.html#GTS-OBJECT-CLONE"
+>gts_object_clone</A
+>                (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object);
+void        <A
+HREF="gts-object-class.html#GTS-OBJECT-ATTRIBUTES"
+>gts_object_attributes</A
+>           (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *from);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-object-class.html#GTS-OBJECT-CHECK-CAST"
+>gts_object_check_cast</A
+>           (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> object,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass);
+<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    <A
+HREF="gts-object-class.html#GTS-OBJECT-IS-FROM-CLASS"
+>gts_object_is_from_class</A
+>        (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> object,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass);
+void        <A
+HREF="gts-object-class.html#GTS-OBJECT-RESET-RESERVED"
+>gts_object_reset_reserved</A
+>       (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object);
+void        <A
+HREF="gts-object-class.html#GTS-OBJECT-DESTROY"
+>gts_object_destroy</A
+>              (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1989"
+></A
+><H2
+>Description</H2
+><P
+>All GTS objects are derived from this base class. Objects of any class can be constructed using the <A
+HREF="gts-object-class.html#GTS-OBJECT-NEW"
+>gts_object_new</A
+>() function and destroyed using the <A
+HREF="gts-object-class.html#GTS-OBJECT-DESTROY"
+>gts_object_destroy</A
+>() function. Default virtual methods include <GTKDOCLINK
+HREF="READ"
+>read</GTKDOCLINK
+>() and <GTKDOCLINK
+HREF="WRITE"
+>write</GTKDOCLINK
+>() functions which can be used to read or write associated objects attributes from or to GTS geometrical files.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1996"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1998"
+></A
+><H3
+><A
+NAME="GTS-CLASS-NAME-LENGTH-CAPS"
+></A
+>GTS_CLASS_NAME_LENGTH</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_CLASS_NAME_LENGTH 40</PRE
+></TD
+></TR
+></TABLE
+><P
+>Maximum class name length for <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2004"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLASS-CAPS"
+></A
+>GTS_OBJECT_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_OBJECT_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2021"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CAPS"
+></A
+>GTS_OBJECT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_OBJECT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2038"
+></A
+><H3
+><A
+NAME="GTS-IS-OBJECT-CAPS"
+></A
+>GTS_IS_OBJECT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_OBJECT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2056"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLASS-CAST-CAPS"
+></A
+>GTS_OBJECT_CLASS_CAST()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_OBJECT_CLASS_CAST(objklass, type, klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>This macro is used to define casting macros for object classes. You should need it only when writing new object class functions.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>objklass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>type</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The class type to cast <TT
+CLASS="PARAMETER"
+><I
+>objklass</I
+></TT
+> to (example: GtsObjectClass).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the class to cast <TT
+CLASS="PARAMETER"
+><I
+>objklass</I
+></TT
+> to (example: <A
+HREF="gts-object-class.html"
+>gts_object_class</A
+>()).
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2082"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CAST-CAPS"
+></A
+>GTS_OBJECT_CAST()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_OBJECT_CAST(obj, type, klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>This macro is used to define casting macros for object. You should need it only when writing new object functions.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>type</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the object type to cast <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to (example: GtsObject).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the object class to cast <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to (example: <GTKDOCLINK
+HREF="GTS-OBJECT"
+>gts_object</GTKDOCLINK
+>()).
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2108"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-FLAGS-CAPS"
+></A
+>GTS_OBJECT_FLAGS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_OBJECT_FLAGS(obj)             (GTS_OBJECT (obj)->flags)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2122"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-SET-FLAGS-CAPS"
+></A
+>GTS_OBJECT_SET_FLAGS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_OBJECT_SET_FLAGS(obj,flag)	  G_STMT_START{ (GTS_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>flag</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2140"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-UNSET-FLAGS-CAPS"
+></A
+>GTS_OBJECT_UNSET_FLAGS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_OBJECT_UNSET_FLAGS(obj,flag)  G_STMT_START{ (GTS_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>flag</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2158"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-DESTROYED-CAPS"
+></A
+>GTS_OBJECT_DESTROYED()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_OBJECT_DESTROYED(obj)         ((GTS_OBJECT_FLAGS (obj) & GTS_DESTROYED) != 0)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2172"
+></A
+><H3
+><A
+NAME="GTSOBJECTCLASS"
+></A
+>struct GtsObjectClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsObjectClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The base object class structure. All the virtual functions <TT
+CLASS="PARAMETER"
+><I
+>clone</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>destroy</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>read</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>write</I
+></TT
+> can be overloaded. The default <TT
+CLASS="PARAMETER"
+><I
+>read</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>write</I
+></TT
+> methods are undefined. The default <TT
+CLASS="PARAMETER"
+><I
+>clone</I
+></TT
+> method just copies the object structure. The default <TT
+CLASS="PARAMETER"
+><I
+>destroy</I
+></TT
+> method frees the memory allocated for a given object structure.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2185"
+></A
+><H3
+><A
+NAME="GTSOBJECT"
+></A
+>struct GtsObject</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsObject {
+  GtsObjectClass * klass;
+
+  gpointer reserved;
+  guint32 flags;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The base object structure.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>klass</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The object class.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>reserved</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Used internally by the library.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT32"
+>guint32</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>flags</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Used internally.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2210"
+></A
+><H3
+><A
+NAME="GTSOBJECTCLASSINFO"
+></A
+>struct GtsObjectClassInfo</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsObjectClassInfo;</PRE
+></TD
+></TR
+></TABLE
+><P
+>Informations about a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>, including name, size of the object structure to be allocated when constructing the object, size of the object class structure to be allocated when instanciating the object class, class initialization function, object initialization function.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2216"
+></A
+><H3
+><A
+NAME="GTSOBJECTCLASSINITFUNC"
+></A
+>GtsObjectClassInitFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        (*GtsObjectClassInitFunc)       (<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *objclass);</PRE
+></TD
+></TR
+></TABLE
+><P
+>A function to call to initialize an object class.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>objclass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> to be initialized.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2232"
+></A
+><H3
+><A
+NAME="GTSOBJECTINITFUNC"
+></A
+>GtsObjectInitFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        (*GtsObjectInitFunc)            (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *obj);</PRE
+></TD
+></TR
+></TABLE
+><P
+>A function to call to initialize an object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2248"
+></A
+><H3
+><A
+NAME="GTSARGSETFUNC"
+></A
+>GtsArgSetFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        (*GtsArgSetFunc)                (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *obj);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Defined for future use.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2264"
+></A
+><H3
+><A
+NAME="GTSARGGETFUNC"
+></A
+>GtsArgGetFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        (*GtsArgGetFunc)                (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *obj);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Defined for future use.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2280"
+></A
+><H3
+><A
+NAME="GTSOBJECTFLAGS"
+></A
+>enum GtsObjectFlags</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef enum
+{
+  GTS_DESTROYED         = 1 << 0
+} GtsObjectFlags;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2285"
+></A
+><H3
+><A
+NAME="GTSCOLOR"
+></A
+>struct GtsColor</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsColor {
+  gfloat r, g, b;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2290"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLASS"
+></A
+>gts_object_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>* gts_object_class            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2307"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLASS-NEW"
+></A
+>gts_object_class_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_object_class_new            (<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *parent_class,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECTCLASSINFO"
+>GtsObjectClassInfo</A
+> *info);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>parent_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>info</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASSINFO"
+>GtsObjectClassInfo</A
+>, description of the new class to create.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> derived from <TT
+CLASS="PARAMETER"
+><I
+>parent_class</I
+></TT
+> and described by
+<TT
+CLASS="PARAMETER"
+><I
+>info</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2338"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLASS-CHECK-CAST"
+></A
+>gts_object_class_check_cast ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_object_class_check_cast     (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> from);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>from</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> while emitting warnings if <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> is not derived from
+<TT
+CLASS="PARAMETER"
+><I
+>from</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2369"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLASS-IS-FROM-CLASS"
+></A
+>gts_object_class_is_from_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_object_class_is_from_class  (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> from);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>from</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> is equal to <TT
+CLASS="PARAMETER"
+><I
+>from</I
+></TT
+> or if <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> is derived
+from <TT
+CLASS="PARAMETER"
+><I
+>from</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>NULL</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2403"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLASS-FROM-NAME"
+></A
+>gts_object_class_from_name ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>* gts_object_class_from_name  (<GTKDOCLINK
+HREF="GCHAR"
+>gchar</GTKDOCLINK
+> *name);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>name</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the name of a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> with name <TT
+CLASS="PARAMETER"
+><I
+>name</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if it hasn't been 
+instantiated yet.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2428"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-NEW"
+></A
+>gts_object_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>*  gts_object_new                  (<A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new initialized object of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2451"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-INIT"
+></A
+>gts_object_init ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_object_init                 (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls the init method of <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> with <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> as argument. This is done 
+recursively in the correct order (from the base class to the top). You
+should rarely need this function as it is called automatically by the
+constructor for each class.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2476"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CLONE"
+></A
+>gts_object_clone ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>*  gts_object_clone                (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls the clone method of <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+>. The call to this function will fail
+if no clone method exists for the given object.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new object clone of <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2500"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-ATTRIBUTES"
+></A
+>gts_object_attributes ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_object_attributes           (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *from);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls the <GTKDOCLINK
+HREF="ATTRIBUTES"
+>attributes</GTKDOCLINK
+>() method of <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> using <TT
+CLASS="PARAMETER"
+><I
+>from</I
+></TT
+> as source.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>from</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2526"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-CHECK-CAST"
+></A
+>gts_object_check_cast ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_object_check_cast           (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> object,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> while emitting warnings if <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> is not of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2557"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-IS-FROM-CLASS"
+></A
+>gts_object_is_from_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+>    gts_object_is_from_class        (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> object,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> is of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> or of a class derived from
+<TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>NULL</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2590"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-RESET-RESERVED"
+></A
+>gts_object_reset_reserved ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_object_reset_reserved       (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Reset the reserved field of <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN2608"
+></A
+><H3
+><A
+NAME="GTS-OBJECT-DESTROY"
+></A
+>gts_object_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_object_destroy              (<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *object);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls the destroy method of <TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+>, freeing all memory allocated for it.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>object</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-container-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Geometrical Object Hierarchy</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Container classes</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-out-of-core-simplification.html b/doc/html/gts-out-of-core-simplification.html
new file mode 100644
index 0000000..d707d49
--- /dev/null
+++ b/doc/html/gts-out-of-core-simplification.html
@@ -0,0 +1,2251 @@
+<HTML
+><HEAD
+><TITLE
+>Out-of-core simplification</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Surface operations"
+HREF="c9853.html"><LINK
+REL="PREVIOUS"
+TITLE="Surface simplification and refinement"
+HREF="gts-surface-simplification-and-refinement.html"><LINK
+REL="NEXT"
+TITLE="Isosurfaces from 3D functions"
+HREF="gts-isosurfaces-from-3d-functions.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-surface-simplification-and-refinement.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-isosurfaces-from-3d-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-OUT-OF-CORE-SIMPLIFICATION"
+>Out-of-core simplification</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN10609"
+></A
+><H2
+>Name</H2
+>Out-of-core simplification -- objects for simplification based on vertex clustering.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN10612"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-CLASS-CAPS"
+>GTS_CLUSTER_CLASS</A
+>               (klass)
+#define     <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-CAPS"
+>GTS_CLUSTER</A
+>                     (obj)
+#define     <A
+HREF="gts-out-of-core-simplification.html#GTS-IS-CLUSTER-CAPS"
+>GTS_IS_CLUSTER</A
+>                  (obj)
+struct      <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>;
+struct      <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>;
+struct      <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERID"
+>GtsClusterId</A
+>;
+
+<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>* <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-CLASS"
+>gts_cluster_class</A
+>          (void);
+<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>* <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-NEW"
+>gts_cluster_new</A
+>                 (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+> *klass,
+                                             <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERID"
+>GtsClusterId</A
+> id,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *vklass);
+void        <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-ADD"
+>gts_cluster_add</A
+>                 (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+> *c,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-UPDATE"
+>gts_cluster_update</A
+>              (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+> *c);
+
+#define     <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CLASS-CAPS"
+>GTS_CLUSTER_GRID_CLASS</A
+>          (klass)
+#define     <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CAPS"
+>GTS_CLUSTER_GRID</A
+>                (obj)
+#define     <A
+HREF="gts-out-of-core-simplification.html#GTS-IS-CLUSTER-GRID-CAPS"
+>GTS_IS_CLUSTER_GRID</A
+>             (obj)
+struct      <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+>;
+struct      <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+>;
+
+<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+>* <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CLASS"
+>gts_cluster_grid_class</A
+> (void);
+<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+>* <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-NEW"
+>gts_cluster_grid_new</A
+>        (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+> *klass,
+                                             <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+> *cluster_class,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta);
+void        <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-ADD-TRIANGLE"
+>gts_cluster_grid_add_triangle</A
+>   (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+> *cluster_grid,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>    <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-UPDATE"
+>gts_cluster_grid_update</A
+>         (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+> *cluster_grid);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN10657"
+></A
+><H2
+>Description</H2
+><P
+>Using vertex clusters and vertex cluster grids it is easy to design out-of-core algorithms for surface simplification. This approach has been detailed in a recent paper by Lindstrom and Turk ("Out-of-core simplification of large polygonal models", 2000).</P
+><P
+>Vertex clusters are just groups of vertices collapsed into a single vertex. The position of this single representative vertex can be derived with different techniques. The default GTS implementation <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+> just takes the average of the positions of the vertices in a given cluster as the representative position. Clusters are created using <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-NEW"
+>gts_cluster_new</A
+>(). The cluster is initially empty and the position of the representative vertex is set to the origin. Vertices are added using <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-ADD"
+>gts_cluster_add</A
+>() which calls the <GTKDOCLINK
+HREF="ADD"
+>add</GTKDOCLINK
+>() virtual method of <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>. Once all the vertices have been added <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-UPDATE"
+>gts_cluster_update</A
+>() computes the position of the representative vertex.</P
+><P
+>Clusters are grouped using the <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+> object which is just an implementation of the hash-table based regular grid of Lindstrom and Turk. This regular grid is created using <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-NEW"
+>gts_cluster_grid_new</A
+>(). Once created triangles of the surface to be simplified can be added using <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-ADD-TRIANGLE"
+>gts_cluster_grid_add_triangle</A
+>() which adds the vertices of the triangle to the <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+> they belong to and adds the corresponding faces to the simplified surface. After all the triangles of the original surface have been added the position of the representative vertex of all the vertex clusters is computed using <A
+HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-UPDATE"
+>gts_cluster_grid_update</A
+>(). The simplified surface is then complete and the cluster grid can be destroyed using <A
+HREF="gts-object-class.html#GTS-OBJECT-DESTROY"
+>gts_object_destroy</A
+>().</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN10674"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10676"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-CLASS-CAPS"
+></A
+>GTS_CLUSTER_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CLUSTER_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10693"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-CAPS"
+></A
+>GTS_CLUSTER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CLUSTER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10710"
+></A
+><H3
+><A
+NAME="GTS-IS-CLUSTER-CAPS"
+></A
+>GTS_IS_CLUSTER()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_CLUSTER(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10728"
+></A
+><H3
+><A
+NAME="GTSCLUSTERCLASS"
+></A
+>struct GtsClusterClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsClusterClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The cluster class derived from <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>. Virtual function <TT
+CLASS="PARAMETER"
+><I
+>add</I
+></TT
+> adds point <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> to the cluster while passing user-data <TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+>. Virtual function <TT
+CLASS="PARAMETER"
+><I
+>update</I
+></TT
+> computes the position of the representative vertex.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10738"
+></A
+><H3
+><A
+NAME="GTSCLUSTER"
+></A
+>struct GtsCluster</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsCluster {
+  GtsObject parent;
+
+  GtsClusterId id;
+  GtsVertex * v;
+  guint n;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The cluster object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>parent</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERID"
+>GtsClusterId</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>id</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Unique identifier.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>v</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> representative of all the vertices in the cluster.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of vertices added to the cluster.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10769"
+></A
+><H3
+><A
+NAME="GTSCLUSTERID"
+></A
+>struct GtsClusterId</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsClusterId {
+  guint x, y, z;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10774"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-CLASS"
+></A
+>gts_cluster_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>* gts_cluster_class          (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10791"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-NEW"
+></A
+>gts_cluster_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>* gts_cluster_new                 (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+> *klass,
+                                             <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERID"
+>GtsClusterId</A
+> id,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *vklass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>id</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the id of the new cluster.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vklass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> for the representative vertex of the cluster.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10825"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-ADD"
+></A
+>gts_cluster_add ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_cluster_add                 (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+> *c,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds point <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> to cluster <TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to pass to the <GTKDOCLINK
+HREF="ADD"
+>add</GTKDOCLINK
+>() virtual method of <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10857"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-UPDATE"
+></A
+>gts_cluster_update ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_cluster_update              (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+> *c);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Updates the position of the vertex representative of all the
+vertices added to <TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10875"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-GRID-CLASS-CAPS"
+></A
+>GTS_CLUSTER_GRID_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CLUSTER_GRID_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10892"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-GRID-CAPS"
+></A
+>GTS_CLUSTER_GRID()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_CLUSTER_GRID(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10909"
+></A
+><H3
+><A
+NAME="GTS-IS-CLUSTER-GRID-CAPS"
+></A
+>GTS_IS_CLUSTER_GRID()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_CLUSTER_GRID(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTER"
+>GtsCluster</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10927"
+></A
+><H3
+><A
+NAME="GTSCLUSTERGRIDCLASS"
+></A
+>struct GtsClusterGridClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsClusterGridClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The cluster grid class derived from <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10933"
+></A
+><H3
+><A
+NAME="GTSCLUSTERGRID"
+></A
+>struct GtsClusterGrid</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsClusterGrid {
+  GtsObject parent;
+
+  GtsSurface * surface;
+  GtsBBox * bbox;
+  GtsVector size;
+
+  GtsClusterClass * cluster_class;
+  GHashTable * clusters;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The cluster grid object. </P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>parent</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>surface</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Surface being simplified.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>bbox</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Bounding box of the original surface.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>size</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Size of the simplification grid.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>cluster_class</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Private.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GHASHTABLE"
+>GHashTable</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>clusters</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Private.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10973"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-GRID-CLASS"
+></A
+>gts_cluster_grid_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+>* gts_cluster_grid_class (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10990"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-GRID-NEW"
+></A
+>gts_cluster_grid_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+>* gts_cluster_grid_new        (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+> *klass,
+                                             <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS"
+>GtsClusterClass</A
+> *cluster_class,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-bounding-boxes-trees.html#GTSBBOX"
+>GtsBBox</A
+> *bbox,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS"
+>GtsClusterGridClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cluster_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the klass to be used for the vertex clusters.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the simplified surface.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>bbox</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> bounding box of the surface to be simplified.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the size of one grid cell of the simplification grid.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11033"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-GRID-ADD-TRIANGLE"
+></A
+>gts_cluster_grid_add_triangle ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_cluster_grid_add_triangle   (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+> *cluster_grid,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds the triangle defined by <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+> to the respective clusters
+of <TT
+CLASS="PARAMETER"
+><I
+>cluster_grid</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cluster_grid</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to pass to the cluster <GTKDOCLINK
+HREF="ADD"
+>add</GTKDOCLINK
+>() method.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN11078"
+></A
+><H3
+><A
+NAME="GTS-CLUSTER-GRID-UPDATE"
+></A
+>gts_cluster_grid_update ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>    gts_cluster_grid_update         (<A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+> *cluster_grid);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Updates the representative vertices of all the clusters of <TT
+CLASS="PARAMETER"
+><I
+>cluster_grid</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cluster_grid</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID"
+>GtsClusterGrid</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> describing the statistics for the number of vertices
+added to each cluster of <TT
+CLASS="PARAMETER"
+><I
+>cluster_grid</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-surface-simplification-and-refinement.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-isosurfaces-from-3d-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Surface simplification and refinement</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Isosurfaces from 3D functions</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-points.html b/doc/html/gts-points.html
new file mode 100644
index 0000000..7ea1d67
--- /dev/null
+++ b/doc/html/gts-points.html
@@ -0,0 +1,3867 @@
+<HTML
+><HEAD
+><TITLE
+>Points</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Containee classes"
+HREF="gts-containee-classes.html"><LINK
+REL="NEXT"
+TITLE="Vertices"
+HREF="gts-vertices.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-containee-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vertices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-POINTS"
+>Points</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN3242"
+></A
+><H2
+>Name</H2
+>Points -- point object and related functions.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN3245"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-points.html#GTS-POINT-CLASS-CAPS"
+>GTS_POINT_CLASS</A
+>                 (klass)
+#define     <A
+HREF="gts-points.html#GTS-POINT-CAPS"
+>GTS_POINT</A
+>                       (obj)
+#define     <A
+HREF="gts-points.html#GTS-IS-POINT-CAPS"
+>GTS_IS_POINT</A
+>                    (obj)
+struct      <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>;
+struct      <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>;
+
+<A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>* <A
+HREF="gts-points.html#GTS-POINT-CLASS"
+>gts_point_class</A
+>              (void);
+<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   <A
+HREF="gts-points.html#GTS-POINT-NEW"
+>gts_point_new</A
+>                   (<A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z);
+void        <A
+HREF="gts-points.html#GTS-POINT-SET"
+>gts_point_set</A
+>                   (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z);
+#define     <A
+HREF="gts-points.html#GTS-POINT-IS-IN-RECTANGLE"
+>gts_point_is_in_rectangle</A
+>       (p, p1, p2)
+<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   <A
+HREF="gts-points.html#GTS-SEGMENT-TRIANGLE-INTERSECTION"
+>gts_segment_triangle_intersection</A
+>
+                                            (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> boundary,
+                                             <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+> *klass);
+void        <A
+HREF="gts-points.html#GTS-POINT-TRANSFORM"
+>gts_point_transform</A
+>             (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-DISTANCE"
+>gts_point_distance</A
+>              (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-DISTANCE2"
+>gts_point_distance2</A
+>             (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-ORIENTATION-3D"
+>gts_point_orientation_3d</A
+>        (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p4);
+enum        <A
+HREF="gts-points.html#GTSINTERSECT"
+>GtsIntersect</A
+>;
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-IN-CIRCLE"
+>gts_point_in_circle</A
+>             (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-IN-TRIANGLE-CIRCLE"
+>gts_point_in_triangle_circle</A
+>    (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<A
+HREF="gts-points.html#GTSINTERSECT"
+>GtsIntersect</A
+> <A
+HREF="gts-points.html#GTS-POINT-IS-IN-TRIANGLE"
+>gts_point_is_in_triangle</A
+>       (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-ORIENTATION"
+>gts_point_orientation</A
+>           (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-SEGMENT-DISTANCE2"
+>gts_point_segment_distance2</A
+>     (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-SEGMENT-DISTANCE"
+>gts_point_segment_distance</A
+>      (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);
+void        <A
+HREF="gts-points.html#GTS-POINT-SEGMENT-CLOSEST"
+>gts_point_segment_closest</A
+>       (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *closest);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-TRIANGLE-DISTANCE"
+>gts_point_triangle_distance</A
+>     (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+void        <A
+HREF="gts-points.html#GTS-POINT-TRIANGLE-CLOSEST"
+>gts_point_triangle_closest</A
+>      (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *closest);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-points.html#GTS-POINT-TRIANGLE-DISTANCE2"
+>gts_point_triangle_distance2</A
+>    (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-points.html#GTS-POINT-IS-INSIDE-SURFACE"
+>gts_point_is_inside_surface</A
+>     (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> is_open);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN3339"
+></A
+><H2
+>Description</H2
+><P
+>Three-dimensional points and a few geometrical functions.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN3342"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3344"
+></A
+><H3
+><A
+NAME="GTS-POINT-CLASS-CAPS"
+></A
+>GTS_POINT_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_POINT_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of the <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3361"
+></A
+><H3
+><A
+NAME="GTS-POINT-CAPS"
+></A
+>GTS_POINT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_POINT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of the <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3378"
+></A
+><H3
+><A
+NAME="GTS-IS-POINT-CAPS"
+></A
+>GTS_IS_POINT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_POINT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a descendant of a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3396"
+></A
+><H3
+><A
+NAME="GTSPOINTCLASS"
+></A
+>struct GtsPointClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsPointClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The class for <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>. No virtual functions are associated.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3402"
+></A
+><H3
+><A
+NAME="GTSPOINT"
+></A
+>struct GtsPoint</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsPoint {
+  GtsObject object;
+
+  gdouble x, y, z; /* must be contiguous (cast to robust functions) */
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The point object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>x</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>x coordinate.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>y</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>y coordinate.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>z</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>z coordinate.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3432"
+></A
+><H3
+><A
+NAME="GTS-POINT-CLASS"
+></A
+>gts_point_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>* gts_point_class              (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3449"
+></A
+><H3
+><A
+NAME="GTS-POINT-NEW"
+></A
+>gts_point_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   gts_point_new                   (<A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the x-coordinate.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the y-coordinate.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the z-coordinate.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3487"
+></A
+><H3
+><A
+NAME="GTS-POINT-SET"
+></A
+>gts_point_set ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_point_set                   (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Sets the coordinates of <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the x-coordinate.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the y-coordinate.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the z-coordinate.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3520"
+></A
+><H3
+><A
+NAME="GTS-POINT-IS-IN-RECTANGLE"
+></A
+>gts_point_is_in_rectangle()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_point_is_in_rectangle(p, p1, p2)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is contained in the box (boundary included) defined by its two corners <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the lower-left front corner of the box.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the upper-right back corner of the box.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3548"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-TRIANGLE-INTERSECTION"
+></A
+>gts_segment_triangle_intersection ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   gts_segment_triangle_intersection
+                                            (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> boundary,
+                                             <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Checks if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> intersects <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>. If this is the case, creates a new
+point pi intersection of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> with <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</P
+><P
+>This function is geometrically robust in the sense that it will not
+return a point if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> do not intersect and will return a
+point if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> do intersect. However, the point coordinates are
+subject to round-off errors.</P
+><P
+>Note that this function will not return any point if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> is contained in
+the plane defined by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>boundary</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> if <TT
+CLASS="LITERAL"
+>TRUE</TT
+>, the boundary of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> is taken into account.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+> to be used for the new point.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a summit of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> (if <TT
+CLASS="PARAMETER"
+><I
+>boundary</I
+></TT
+> is set to <TT
+CLASS="LITERAL"
+>TRUE</TT
+>), one of the endpoints
+of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> or a new <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>, intersection of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> with <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> 
+and <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> don't intersect.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3611"
+></A
+><H3
+><A
+NAME="GTS-POINT-TRANSFORM"
+></A
+>gts_point_transform ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_point_transform             (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Transform the coordinates of <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> according to <TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+>. (p[] becomes m[][].p[]).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> representing the transformation to 
+apply to the coordinates of <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3637"
+></A
+><H3
+><A
+NAME="GTS-POINT-DISTANCE"
+></A
+>gts_point_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_distance              (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the Euclidean distance between <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3667"
+></A
+><H3
+><A
+NAME="GTS-POINT-DISTANCE2"
+></A
+>gts_point_distance2 ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_distance2             (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the square of the Euclidean distance between <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3697"
+></A
+><H3
+><A
+NAME="GTS-POINT-ORIENTATION-3D"
+></A
+>gts_point_orientation_3d ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_orientation_3d        (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p4);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Checks if <TT
+CLASS="PARAMETER"
+><I
+>p4</I
+></TT
+> lies above, below or on the plane passing through the
+points <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+>. Below is defined so that <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+>
+appear in counterclockwise order when viewed from above the
+plane. The returned value is an approximation of six times the
+signed volume of the tetrahedron defined by the four points. This
+function uses adaptive floating point arithmetic and is
+consequently geometrically robust.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p4</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a positive value if <TT
+CLASS="PARAMETER"
+><I
+>p4</I
+></TT
+> lies below, a negative value if
+<TT
+CLASS="PARAMETER"
+><I
+>p4</I
+></TT
+> lies above the plane, zero if the four points are coplanar.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3746"
+></A
+><H3
+><A
+NAME="GTSINTERSECT"
+></A
+>enum GtsIntersect</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef enum 
+{ 
+  GTS_OUT = -1,
+  GTS_ON = 0,
+  GTS_IN = 1
+} GtsIntersect;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3751"
+></A
+><H3
+><A
+NAME="GTS-POINT-IN-CIRCLE"
+></A
+>gts_point_in_circle ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_in_circle             (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Tests if the planar projection (x, y) of <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is inside or outside the
+circle defined by the planar projection of <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a positive number if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> lies inside,
+a negative number if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> lies outside and zero if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> lies on 
+the circle.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3798"
+></A
+><H3
+><A
+NAME="GTS-POINT-IN-TRIANGLE-CIRCLE"
+></A
+>gts_point_in_triangle_circle ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_in_triangle_circle    (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Tests if the planar projection (x, y) of <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is inside or outside
+the circumcircle of the planar projection of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>. This function is
+geometrically robust.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a positive number if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> lies inside,
+a negative number if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> lies outside and zero if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> lies on 
+the circumcircle of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3832"
+></A
+><H3
+><A
+NAME="GTS-POINT-IS-IN-TRIANGLE"
+></A
+>gts_point_is_in_triangle ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSINTERSECT"
+>GtsIntersect</A
+> gts_point_is_in_triangle       (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Tests if the planar projection (x, y) of <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is inside, outside or
+on the boundary of the planar projection of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.  This function is
+geometrically robust.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>GTS_IN</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is inside <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>GTS_ON</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is on the boundary of
+<TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>GTS_OUT</TT
+> otherwise.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3869"
+></A
+><H3
+><A
+NAME="GTS-POINT-ORIENTATION"
+></A
+>gts_point_orientation ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_orientation           (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p1,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p2,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p3);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Checks for orientation of the projection of three points on the
+(x,y) plane. The result is also an approximation of twice the
+signed area of the triangle defined by the three points. This
+function uses adaptive floating point arithmetic and is
+consequently geometrically robust.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a positive value if <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p3</I
+></TT
+> appear in
+counterclockwise order, a negative value if they appear in
+clockwise order and zero if they are colinear.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3906"
+></A
+><H3
+><A
+NAME="GTS-POINT-SEGMENT-DISTANCE2"
+></A
+>gts_point_segment_distance2 ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_segment_distance2     (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the square of the minimun Euclidean distance between <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3936"
+></A
+><H3
+><A
+NAME="GTS-POINT-SEGMENT-DISTANCE"
+></A
+>gts_point_segment_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_segment_distance      (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimun Euclidean distance between <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3966"
+></A
+><H3
+><A
+NAME="GTS-POINT-SEGMENT-CLOSEST"
+></A
+>gts_point_segment_closest ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_point_segment_closest       (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *closest);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Set the coordinates of <TT
+CLASS="PARAMETER"
+><I
+>closest</I
+></TT
+> to the coordinates of the point belonging
+to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> closest to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>closest</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3998"
+></A
+><H3
+><A
+NAME="GTS-POINT-TRIANGLE-DISTANCE"
+></A
+>gts_point_triangle_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_triangle_distance     (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimun Euclidean distance between <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4028"
+></A
+><H3
+><A
+NAME="GTS-POINT-TRIANGLE-CLOSEST"
+></A
+>gts_point_triangle_closest ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_point_triangle_closest      (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *closest);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Set the coordinates of <TT
+CLASS="PARAMETER"
+><I
+>closest</I
+></TT
+> to those of the point belonging to <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> and 
+closest to <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>closest</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4060"
+></A
+><H3
+><A
+NAME="GTS-POINT-TRIANGLE-DISTANCE2"
+></A
+>gts_point_triangle_distance2 ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_point_triangle_distance2    (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the square of the minimun Euclidean distance between <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4090"
+></A
+><H3
+><A
+NAME="GTS-POINT-IS-INSIDE-SURFACE"
+></A
+>gts_point_is_inside_surface ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_point_is_inside_surface     (<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GNODE"
+>GNode</GTKDOCLINK
+> *tree,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> is_open);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.  </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a bounding box tree of the faces of a closed, orientable
+surface (see <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE"
+>gts_bb_tree_surface</A
+>()).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>is_open</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the surface defined by <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+> is "open" i.e. its volume 
+is negative, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> is inside or on the boundary of the surface
+defined by <TT
+CLASS="PARAMETER"
+><I
+>tree</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-containee-classes.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-vertices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Containee classes</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Vertices</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-progressive-graph.html b/doc/html/gts-progressive-graph.html
new file mode 100644
index 0000000..bd4166d
--- /dev/null
+++ b/doc/html/gts-progressive-graph.html
@@ -0,0 +1,2750 @@
+<HTML
+><HEAD
+><TITLE
+>Progressive graph</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Graph and operations on graphs"
+HREF="c13676.html"><LINK
+REL="PREVIOUS"
+TITLE="Weighted graph"
+HREF="gts-weighted-graph.html"><LINK
+REL="NEXT"
+TITLE="Graph partitioning"
+HREF="gts-graph-partitioning.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-weighted-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-graph-partitioning.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-PROGRESSIVE-GRAPH"
+>Progressive graph</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN15237"
+></A
+><H2
+>Name</H2
+>Progressive graph -- </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN15240"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-CLASS-CAPS"
+>GTS_GNODE_SPLIT_CLASS</A
+>           (klass)
+#define     <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-CAPS"
+>GTS_GNODE_SPLIT</A
+>                 (obj)
+#define     <A
+HREF="gts-progressive-graph.html#GTS-IS-GNODE-SPLIT-CAPS"
+>GTS_IS_GNODE_SPLIT</A
+>              (obj)
+#define     <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-N1-CAPS"
+>GTS_GNODE_SPLIT_N1</A
+>              (ns)
+#define     <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-N2-CAPS"
+>GTS_GNODE_SPLIT_N2</A
+>              (ns)
+struct      <A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+>;
+struct      <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>;
+
+<A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+>* <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-CLASS"
+>gts_gnode_split_class</A
+>   (void);
+<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>* <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-NEW"
+>gts_gnode_split_new</A
+>          (<A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *n1,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *n2);
+void        <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-COLLAPSE"
+>gts_gnode_split_collapse</A
+>        (<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> *ns,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+> *klass);
+void        <A
+HREF="gts-progressive-graph.html#GTS-GNODE-SPLIT-EXPAND"
+>gts_gnode_split_expand</A
+>          (<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> *ns,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);
+
+#define     <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-CLASS-CAPS"
+>GTS_PGRAPH_CLASS</A
+>                (klass)
+#define     <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-CAPS"
+>GTS_PGRAPH</A
+>                      (obj)
+#define     <A
+HREF="gts-progressive-graph.html#GTS-IS-PGRAPH-CAPS"
+>GTS_IS_PGRAPH</A
+>                   (obj)
+struct      <A
+HREF="gts-progressive-graph.html#GTSPGRAPHCLASS"
+>GtsPGraphClass</A
+>;
+struct      <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>;
+
+<A
+HREF="gts-progressive-graph.html#GTSPGRAPHCLASS"
+>GtsPGraphClass</A
+>* <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-CLASS"
+>gts_pgraph_class</A
+>            (void);
+<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>*  <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-NEW"
+>gts_pgraph_new</A
+>                  (<A
+HREF="gts-progressive-graph.html#GTSPGRAPHCLASS"
+>GtsPGraphClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+> *split_class,
+                                             <A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+> *node_class,
+                                             <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+> *edge_class,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> min);
+<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>* <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-ADD-NODE"
+>gts_pgraph_add_node</A
+>          (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);
+<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>* <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-REMOVE-NODE"
+>gts_pgraph_remove_node</A
+>       (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-DOWN"
+>gts_pgraph_down</A
+>                 (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-SET-NODE-NUMBER"
+>gts_pgraph_set_node_number</A
+>      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-GET-NODE-NUMBER"
+>gts_pgraph_get_node_number</A
+>      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-MAX-NODE-NUMBER"
+>gts_pgraph_max_node_number</A
+>      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-MIN-NODE-NUMBER"
+>gts_pgraph_min_node_number</A
+>      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);
+void        <A
+HREF="gts-progressive-graph.html#GTS-PGRAPH-FOREACH-NODE"
+>gts_pgraph_foreach_node</A
+>         (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN15307"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN15310"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15312"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-CLASS-CAPS"
+></A
+>GTS_GNODE_SPLIT_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GNODE_SPLIT_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15326"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-CAPS"
+></A
+>GTS_GNODE_SPLIT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_GNODE_SPLIT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15340"
+></A
+><H3
+><A
+NAME="GTS-IS-GNODE-SPLIT-CAPS"
+></A
+>GTS_IS_GNODE_SPLIT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_GNODE_SPLIT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15354"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-N1-CAPS"
+></A
+>GTS_GNODE_SPLIT_N1()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_GNODE_SPLIT_N1(ns) (GTS_IS_GNODE_SPLIT ((ns)->n1) ? GTS_GNODE_SPLIT ((ns)->n1)->n : GTS_GNODE ((ns)->n1))</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ns</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15368"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-N2-CAPS"
+></A
+>GTS_GNODE_SPLIT_N2()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_GNODE_SPLIT_N2(ns) (GTS_IS_GNODE_SPLIT ((ns)->n2) ? GTS_GNODE_SPLIT ((ns)->n2)->n : GTS_GNODE ((ns)->n2))</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ns</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15382"
+></A
+><H3
+><A
+NAME="GTSGNODESPLITCLASS"
+></A
+>struct GtsGNodeSplitClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGNodeSplitClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15387"
+></A
+><H3
+><A
+NAME="GTSGNODESPLIT"
+></A
+>struct GtsGNodeSplit</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsGNodeSplit {
+  GtsObject object;
+
+  GtsGNode * n;
+  GtsObject * n1;
+  GtsObject * n2;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15392"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-CLASS"
+></A
+>gts_gnode_split_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+>* gts_gnode_split_class   (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15409"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-NEW"
+></A
+>gts_gnode_split_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>* gts_gnode_split_new          (<A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *n1,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *n2);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Creates a new <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> which would collapse <TT
+CLASS="PARAMETER"
+><I
+>n1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>n2</I
+></TT
+> into
+<TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+>. The collapse itself is not performed.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> or <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> or <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15456"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-COLLAPSE"
+></A
+>gts_gnode_split_collapse ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_gnode_split_collapse        (<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> *ns,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Collapses the node split <TT
+CLASS="PARAMETER"
+><I
+>ns</I
+></TT
+>. Any new edge created during the
+process will be of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ns</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15487"
+></A
+><H3
+><A
+NAME="GTS-GNODE-SPLIT-EXPAND"
+></A
+>gts_gnode_split_expand ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_gnode_split_expand          (<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> *ns,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Expands the node split ns adding the new nodes to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ns</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15511"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-CLASS-CAPS"
+></A
+>GTS_PGRAPH_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_PGRAPH_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15525"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-CAPS"
+></A
+>GTS_PGRAPH()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_PGRAPH(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15539"
+></A
+><H3
+><A
+NAME="GTS-IS-PGRAPH-CAPS"
+></A
+>GTS_IS_PGRAPH()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_PGRAPH(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15553"
+></A
+><H3
+><A
+NAME="GTSPGRAPHCLASS"
+></A
+>struct GtsPGraphClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsPGraphClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15558"
+></A
+><H3
+><A
+NAME="GTSPGRAPH"
+></A
+>struct GtsPGraph</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsPGraph {
+  GtsObject object;
+
+  GtsGraph * g;
+  GPtrArray * split;
+  GArray * levels;
+  GtsGNodeSplitClass * split_class;
+  GtsWGEdgeClass * edge_class;
+  guint pos, min, level;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15563"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-CLASS"
+></A
+>gts_pgraph_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-graph.html#GTSPGRAPHCLASS"
+>GtsPGraphClass</A
+>* gts_pgraph_class            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-progressive-graph.html#GTSPGRAPHCLASS"
+>GtsPGraphClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15580"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-NEW"
+></A
+>gts_pgraph_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>*  gts_pgraph_new                  (<A
+HREF="gts-progressive-graph.html#GTSPGRAPHCLASS"
+>GtsPGraphClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+> *g,
+                                             <A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+> *split_class,
+                                             <A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+> *node_class,
+                                             <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+> *edge_class,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> min);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Creates a new multilevel approximation of graph <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>. At each level a
+maximal matching is created using the Heavy Edge Matching (HEM)
+technique of Karypis and Kumar (1997). The newly created nodes are
+of type <TT
+CLASS="PARAMETER"
+><I
+>node_class</I
+></TT
+> and their weight is set to the sum of the
+weights of their children. The newly created edges are of type
+<TT
+CLASS="PARAMETER"
+><I
+>edge_class</I
+></TT
+> and their weight is set to the sum of the weight of the
+collapsed edges. The last level is reached when the maximal
+matching obtained would lead to a graph with less than <TT
+CLASS="PARAMETER"
+><I
+>min</I
+></TT
+> nodes.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPHCLASS"
+>GtsPGraphClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGRAPH"
+>GtsGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>split_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSGNODESPLITCLASS"
+>GtsGNodeSplitClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>node_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>edge_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>min</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimum number of nodes.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> containing the multilevel
+representation of <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15637"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-ADD-NODE"
+></A
+>gts_pgraph_add_node ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>* gts_pgraph_add_node          (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds one node to the multilevel graph <TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> by expanding the next
+available <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the expanded <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> or <GTKDOCLINK
+HREF="NULL-CAPS"
+>NULL</GTKDOCLINK
+> if all the
+<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> have already been expanded.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15664"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-REMOVE-NODE"
+></A
+>gts_pgraph_remove_node ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>* gts_pgraph_remove_node       (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes one node from the multilevel graph <TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> by collapsing the
+first available <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the collapsed <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if all the
+<A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> have already been collapsed.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15691"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-DOWN"
+></A
+>gts_pgraph_down ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_pgraph_down                 (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Performs the required number of expansions to go from the current
+level to the level immediately below.</P
+><P
+>If <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> is not <TT
+CLASS="LITERAL"
+>NULL</TT
+>, it is called after each <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> has
+been expanded.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to pass to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>FALSE</TT
+> if it is not possible to go down one level, <TT
+CLASS="LITERAL"
+>TRUE</TT
+>
+otherwise.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15732"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-SET-NODE-NUMBER"
+></A
+>gts_pgraph_set_node_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_pgraph_set_node_number      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Performs the required number of collapses or expansions to set the
+number of nodes of <TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> to <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a number of nodes.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15756"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-GET-NODE-NUMBER"
+></A
+>gts_pgraph_get_node_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_pgraph_get_node_number      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the current number of nodes of <TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15779"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-MAX-NODE-NUMBER"
+></A
+>gts_pgraph_max_node_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_pgraph_max_node_number      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum number of nodes of <TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> i.e. the number of
+nodes if all the <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> were expanded.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15803"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-MIN-NODE-NUMBER"
+></A
+>gts_pgraph_min_node_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_pgraph_min_node_number      (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimum number of nodes of <TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> i.e. the number of
+nodes if all the <A
+HREF="gts-progressive-graph.html#GTSGNODESPLIT"
+>GtsGNodeSplit</A
+> were collapsed.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15827"
+></A
+><H3
+><A
+NAME="GTS-PGRAPH-FOREACH-NODE"
+></A
+>gts_pgraph_foreach_node ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_pgraph_foreach_node         (<A
+HREF="gts-progressive-graph.html#GTSPGRAPH"
+>GtsPGraph</A
+> *pg,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>pg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-weighted-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-graph-partitioning.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Weighted graph</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Graph partitioning</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-progressive-surfaces.html b/doc/html/gts-progressive-surfaces.html
new file mode 100644
index 0000000..8180d94
--- /dev/null
+++ b/doc/html/gts-progressive-surfaces.html
@@ -0,0 +1,2686 @@
+<HTML
+><HEAD
+><TITLE
+>Progressive surfaces</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Progressive and Hierarchical surfaces"
+HREF="c12040.html"><LINK
+REL="PREVIOUS"
+TITLE="Vertex split"
+HREF="gts-vertex-split.html"><LINK
+REL="NEXT"
+TITLE="Hierarchical vertex split"
+HREF="gts-hierarchical-vertex-split.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-hierarchical-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-PROGRESSIVE-SURFACES"
+>Progressive surfaces</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN12476"
+></A
+><H2
+>Name</H2
+>Progressive surfaces -- continuous level-of-detail for surfaces.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN12479"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-CLASS-CAPS"
+>GTS_PSURFACE_CLASS</A
+>              (klass)
+#define     <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-CAPS"
+>GTS_PSURFACE</A
+>                    (obj)
+#define     <A
+HREF="gts-progressive-surfaces.html#GTS-IS-PSURFACE-CAPS"
+>GTS_IS_PSURFACE</A
+>                 (obj)
+#define     <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-IS-CLOSED-CAPS"
+>GTS_PSURFACE_IS_CLOSED</A
+>          (ps)
+struct      <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>;
+struct      <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>;
+
+<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>* <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-CLASS"
+>gts_psurface_class</A
+>        (void);
+<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>* <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-NEW"
+>gts_psurface_new</A
+>               (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> *split_class,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> cost_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> cost_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSCOARSENFUNC"
+>GtsCoarsenFunc</A
+> coarsen_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> coarsen_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+> stop_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> stop_data,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> minangle);
+<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-ADD-VERTEX"
+>gts_psurface_add_vertex</A
+>         (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);
+<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-REMOVE-VERTEX"
+>gts_psurface_remove_vertex</A
+>      (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);
+void        <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-SET-VERTEX-NUMBER"
+>gts_psurface_set_vertex_number</A
+>  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-GET-VERTEX-NUMBER"
+>gts_psurface_get_vertex_number</A
+>  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-MIN-VERTEX-NUMBER"
+>gts_psurface_min_vertex_number</A
+>  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-MAX-VERTEX-NUMBER"
+>gts_psurface_max_vertex_number</A
+>  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);
+void        <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-FOREACH-VERTEX"
+>gts_psurface_foreach_vertex</A
+>     (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>* <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-OPEN"
+>gts_psurface_open</A
+>              (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> *split_class,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> *line);
+<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-READ-VERTEX"
+>gts_psurface_read_vertex</A
+>        (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+void        <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-CLOSE"
+>gts_psurface_close</A
+>              (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);
+void        <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-WRITE"
+>gts_psurface_write</A
+>              (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN12540"
+></A
+><H2
+>Description</H2
+><P
+>Progressive surfaces allow you to control precisely and continuously the level of detail of a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>. They are built off-line by storing the sequence of edge collapses performed during surface simplification (see <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-NEW"
+>gts_psurface_new</A
+>()). Fast traversal of the pre-built sequence allow on-line selection of the required level of detail.</P
+><P
+>Using the <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-WRITE"
+>gts_psurface_write</A
+>() function a text representation of a progressive surface can be written to a file, pipe or socket. This text representation allows the progressive transmission of a surface, starting with the coarsest representation and progressively refining it as data is read or received (see <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-OPEN"
+>gts_psurface_open</A
+>(), <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-READ-VERTEX"
+>gts_psurface_read_vertex</A
+>() and <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-CLOSE"
+>gts_psurface_close</A
+>() for details).</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN12550"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12552"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-CLASS-CAPS"
+></A
+>GTS_PSURFACE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_PSURFACE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12569"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-CAPS"
+></A
+>GTS_PSURFACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_PSURFACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12586"
+></A
+><H3
+><A
+NAME="GTS-IS-PSURFACE-CAPS"
+></A
+>GTS_IS_PSURFACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_PSURFACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12604"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-IS-CLOSED-CAPS"
+></A
+>GTS_PSURFACE_IS_CLOSED()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define GTS_PSURFACE_IS_CLOSED(ps)  (!(ps)->vertices)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> has not been created with <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-OPEN"
+>gts_psurface_open</A
+>() or if
+it has been closed using <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-CLOSE"
+>gts_psurface_close</A
+>().</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12623"
+></A
+><H3
+><A
+NAME="GTSPSURFACECLASS"
+></A
+>struct GtsPSurfaceClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsPSurfaceClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The progressive surface class derived from <A
+HREF="gts-object-class.html#GTSOBJECTCLASS"
+>GtsObjectClass</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12629"
+></A
+><H3
+><A
+NAME="GTSPSURFACE"
+></A
+>struct GtsPSurface</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsPSurface {
+  GtsObject object;
+
+  GtsSurface * s;
+  GPtrArray * split;
+  GtsSplitClass * split_class;
+  guint pos, min;
+
+  GPtrArray * vertices;
+  GPtrArray * faces;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The progressive surface object.
+
+ derived from <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>. The field <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> is the <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> being refined or coarsened by operations on the progressive surface. All the other fields must be considered private and accessed only through the following functions.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>s</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> being refined or coarsened by operations on the progressive surface.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GPTRARRAY"
+>GPtrArray</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>split</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>split_class</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>pos</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>min</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GPTRARRAY"
+>GPtrArray</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>vertices</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GPTRARRAY"
+>GPtrArray</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>faces</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12683"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-CLASS"
+></A
+>gts_psurface_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>* gts_psurface_class        (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12700"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-NEW"
+></A
+>gts_psurface_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>* gts_psurface_new               (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> *split_class,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> cost_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> cost_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSCOARSENFUNC"
+>GtsCoarsenFunc</A
+> coarsen_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> coarsen_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+> stop_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> stop_data,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> minangle);</PRE
+></TD
+></TR
+></TABLE
+><P
+>This function works in exactly the same way as the
+<A
+HREF="gts-surface-simplification-and-refinement.html#GTS-SURFACE-COARSEN"
+>gts_surface_coarsen</A
+>() function, except that the history of edge
+collapse is saved in an array of <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> objects. This allows for
+dynamic continuous multiresolution control of the input <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>split_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> to use for the new progressive surface.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> cost function for the edge collapse algorithm.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to pass to <TT
+CLASS="PARAMETER"
+><I
+>cost_func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>coarsen_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the function returning the vertex replacement for the edge 
+collapse.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>coarsen_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to pass to <TT
+CLASS="PARAMETER"
+><I
+>coarsen_func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the function to call to decide whether to stop the coarsening
+process.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>stop_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to pass to <TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>minangle</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimum angle allowable between two neighboring triangles. 
+This is used to avoid introducing folds in the mesh during simplification.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new progressive surface.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12775"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-ADD-VERTEX"
+></A
+>gts_psurface_add_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   gts_psurface_add_vertex         (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds a vertex to the progressive surface <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> by expanding the next
+available <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the expanded <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if all the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> have already
+been expanded.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12802"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-REMOVE-VERTEX"
+></A
+>gts_psurface_remove_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   gts_psurface_remove_vertex      (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes one vertex from the progressive surface <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> by collapsing the first
+available <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the collapsed <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if all the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> have already
+been collapsed.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12829"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-SET-VERTEX-NUMBER"
+></A
+>gts_psurface_set_vertex_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_psurface_set_vertex_number  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Performs the required number of collapses or expansions to set the number
+of vertices of <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> to <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a number of vertices.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12853"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-GET-VERTEX-NUMBER"
+></A
+>gts_psurface_get_vertex_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_psurface_get_vertex_number  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the current number of vertices of <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12876"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-MIN-VERTEX-NUMBER"
+></A
+>gts_psurface_min_vertex_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_psurface_min_vertex_number  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the minimum number of vertices of <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> i.e. the number of vertices
+if all the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> were collapsed.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12900"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-MAX-VERTEX-NUMBER"
+></A
+>gts_psurface_max_vertex_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_psurface_max_vertex_number  (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum number of vertices of <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> i.e. the number of vertices
+if all the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> were expanded.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12924"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-FOREACH-VERTEX"
+></A
+>gts_psurface_foreach_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_psurface_foreach_vertex     (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each (potential) vertex of <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+>, whether actually used
+or not. The vertices are called in the order they were created during the
+edge collapse operation.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a function to call for each vertex of <TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12955"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-OPEN"
+></A
+>gts_psurface_open ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>* gts_psurface_open              (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> *split_class,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> *line);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Creates a new <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> prepared for input from the file <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> 
+containing a valid GTS representation of a progressive surface. The initial
+shape of the progressive surface is loaded into <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+>Before being usable as such this progressive surface must be closed using
+<A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-CLOSE"
+>gts_psurface_close</A
+>(). While open however, the functions
+<A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-GET-VERTEX-NUMBER"
+>gts_psurface_get_vertex_number</A
+>(), <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-MIN-VERTEX-NUMBER"
+>gts_psurface_min_vertex_number</A
+>() and
+<A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-MAX-VERTEX-NUMBER"
+>gts_psurface_max_vertex_number</A
+>() can still be used.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACECLASS"
+>GtsPSurfaceClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>split_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> to use for the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>line</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>NULL</TT
+> or a pointer to a variable to fill with the line number in case
+of an error in the file format. </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if there was a format error while
+reading the file, in which case <TT
+CLASS="PARAMETER"
+><I
+>line</I
+></TT
+> is set to the line where
+the error occured.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13012"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-READ-VERTEX"
+></A
+>gts_psurface_read_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   gts_psurface_read_vertex        (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Reads in one vertex split operation from <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> and performs the expansion.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> prealably created with <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-OPEN"
+>gts_psurface_open</A
+>().</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the newly created <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if no vertex split could be
+read from <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13044"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-CLOSE"
+></A
+>gts_psurface_close ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_psurface_close              (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Closes a progressive surface.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> prealably created with <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-OPEN"
+>gts_psurface_open</A
+>().</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13062"
+></A
+><H3
+><A
+NAME="GTS-PSURFACE-WRITE"
+></A
+>gts_psurface_write ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_psurface_write              (<A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+> *ps,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes to <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> a GTS progressive surface description.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ps</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-progressive-surfaces.html#GTSPSURFACE"
+>GtsPSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-hierarchical-vertex-split.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Vertex split</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Hierarchical vertex split</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-segments.html b/doc/html/gts-segments.html
new file mode 100644
index 0000000..1516650
--- /dev/null
+++ b/doc/html/gts-segments.html
@@ -0,0 +1,1848 @@
+<HTML
+><HEAD
+><TITLE
+>Segments</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Vertices"
+HREF="gts-vertices.html"><LINK
+REL="NEXT"
+TITLE="Edges"
+HREF="gts-edges.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-vertices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-edges.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-SEGMENTS"
+>Segments</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN4745"
+></A
+><H2
+>Name</H2
+>Segments -- segment object and related functions.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN4748"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-segments.html#GTS-SEGMENT-CLASS-CAPS"
+>GTS_SEGMENT_CLASS</A
+>               (klass)
+#define     <A
+HREF="gts-segments.html#GTS-SEGMENT-CAPS"
+>GTS_SEGMENT</A
+>                     (obj)
+#define     <A
+HREF="gts-segments.html#GTS-IS-SEGMENT-CAPS"
+>GTS_IS_SEGMENT</A
+>                  (obj)
+struct      <A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+>;
+struct      <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>;
+
+<A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+>* <A
+HREF="gts-segments.html#GTS-SEGMENT-CLASS"
+>gts_segment_class</A
+>          (void);
+<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>* <A
+HREF="gts-segments.html#GTS-SEGMENT-NEW"
+>gts_segment_new</A
+>                 (<A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+> *klass,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v2);
+#define     <A
+HREF="gts-segments.html#GTS-SEGMENTS-ARE-IDENTICAL"
+>gts_segments_are_identical</A
+>      (s1, s2)
+<A
+HREF="gts-points.html#GTSINTERSECT"
+>GtsIntersect</A
+> <A
+HREF="gts-segments.html#GTS-SEGMENTS-ARE-INTERSECTING"
+>gts_segments_are_intersecting</A
+>  (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s1,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s2);
+<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>* <A
+HREF="gts-segments.html#GTS-SEGMENT-IS-DUPLICATE"
+>gts_segment_is_duplicate</A
+>        (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-segments.html#GTS-SEGMENT-IS-OK"
+>gts_segment_is_ok</A
+>               (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);
+#define     <A
+HREF="gts-segments.html#GTS-SEGMENT-CONNECT"
+>gts_segment_connect</A
+>             (s, e1, e2)
+#define     <A
+HREF="gts-segments.html#GTS-SEGMENTS-TOUCH"
+>gts_segments_touch</A
+>              (s1, s2)
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-segments.html#GTS-SEGMENTS-FROM-VERTICES"
+>gts_segments_from_vertices</A
+>      (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *vertices);
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  <A
+HREF="gts-segments.html#GTS-SEGMENT-MIDVERTEX"
+>gts_segment_midvertex</A
+>           (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4783"
+></A
+><H2
+>Description</H2
+><P
+>Segments are defined by their two <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>. They are not oriented.</P
+><P
+>When destroying a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>, all the vertices not used by another edge are also destroyed. This default behaviour can be changed punctually by setting the global variable gts_allow_floating_vertices to <TT
+CLASS="LITERAL"
+>TRUE</TT
+>. You must not forget to set this variable back to <TT
+CLASS="LITERAL"
+>FALSE</TT
+> as all the algorithms of GTS assume the default behaviour.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4791"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4793"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-CLASS-CAPS"
+></A
+>GTS_SEGMENT_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SEGMENT_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4810"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-CAPS"
+></A
+>GTS_SEGMENT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SEGMENT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4827"
+></A
+><H3
+><A
+NAME="GTS-IS-SEGMENT-CAPS"
+></A
+>GTS_IS_SEGMENT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_SEGMENT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a descendant of <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4845"
+></A
+><H3
+><A
+NAME="GTSSEGMENTCLASS"
+></A
+>struct GtsSegmentClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSegmentClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The segment class. No virtual functions are assiocated.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4850"
+></A
+><H3
+><A
+NAME="GTSSEGMENT"
+></A
+>struct GtsSegment</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSegment {
+  GtsObject object;
+
+  GtsVertex * v1;
+  GtsVertex * v2;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The segment object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>v1</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>First endpoint of the segment.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>v2</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Second endpoint of the segment.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4875"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-CLASS"
+></A
+>gts_segment_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+>* gts_segment_class          (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4892"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-NEW"
+></A
+>gts_segment_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>* gts_segment_new                 (<A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+> *klass,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENTCLASS"
+>GtsSegmentClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> different from <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> linking <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4930"
+></A
+><H3
+><A
+NAME="GTS-SEGMENTS-ARE-IDENTICAL"
+></A
+>gts_segments_are_identical()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_segments_are_identical(s1, s2)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> link the same vertices, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>another <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4954"
+></A
+><H3
+><A
+NAME="GTS-SEGMENTS-ARE-INTERSECTING"
+></A
+>gts_segments_are_intersecting ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSINTERSECT"
+>GtsIntersect</A
+> gts_segments_are_intersecting  (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s1,
+                                             <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>GTS_IN</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> are intersecting, <TT
+CLASS="LITERAL"
+>GTS_ON</TT
+> if one of the
+endpoints of <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> (resp. <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+>) lies on <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> (resp. <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+>), <TT
+CLASS="LITERAL"
+>GTS_OUT</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4991"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-IS-DUPLICATE"
+></A
+>gts_segment_is_duplicate ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>* gts_segment_is_duplicate        (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the first <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> different from <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> which shares the
+same endpoints or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if there is none.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5016"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-IS-OK"
+></A
+>gts_segment_is_ok ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_segment_is_ok               (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> is not degenerate (i.e. <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>->v1 != <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>->v2) and not 
+duplicate, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5043"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-CONNECT"
+></A
+>gts_segment_connect()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_segment_connect(s, e1, e2)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> connects <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> with <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>another <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5073"
+></A
+><H3
+><A
+NAME="GTS-SEGMENTS-TOUCH"
+></A
+>gts_segments_touch()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_segments_touch(s1, s2)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5091"
+></A
+><H3
+><A
+NAME="GTS-SEGMENTS-FROM-VERTICES"
+></A
+>gts_segments_from_vertices ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_segments_from_vertices      (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *vertices);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vertices</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of unique <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> which have one of their vertices in 
+<TT
+CLASS="PARAMETER"
+><I
+>vertices</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5115"
+></A
+><H3
+><A
+NAME="GTS-SEGMENT-MIDVERTEX"
+></A
+>gts_segment_midvertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  gts_segment_midvertex           (<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> *s,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> to be used for the new vertex.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>, midvertex of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-vertices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-edges.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Vertices</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Edges</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-simple-statistics.html b/doc/html/gts-simple-statistics.html
new file mode 100644
index 0000000..0477f9d
--- /dev/null
+++ b/doc/html/gts-simple-statistics.html
@@ -0,0 +1,899 @@
+<HTML
+><HEAD
+><TITLE
+>Simple statistics</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"><LINK
+REL="PREVIOUS"
+TITLE="Vectors and matrices"
+HREF="gts-vectors-and-matrices.html"><LINK
+REL="NEXT"
+TITLE="Miscellaneous macros and functions"
+HREF="gts-miscellaneous-macros-and-functions.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-vectors-and-matrices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-SIMPLE-STATISTICS"
+>Simple statistics</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN1657"
+></A
+><H2
+>Name</H2
+>Simple statistics -- a basic structure for computing min, max, average and variance.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN1660"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+struct      <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>;
+
+void        <A
+HREF="gts-simple-statistics.html#GTS-RANGE-INIT"
+>gts_range_init</A
+>                  (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r);
+void        <A
+HREF="gts-simple-statistics.html#GTS-RANGE-ADD-VALUE"
+>gts_range_add_value</A
+>             (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> val);
+void        <A
+HREF="gts-simple-statistics.html#GTS-RANGE-UPDATE"
+>gts_range_update</A
+>                (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r);
+void        <A
+HREF="gts-simple-statistics.html#GTS-RANGE-RESET"
+>gts_range_reset</A
+>                 (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r);
+void        <A
+HREF="gts-simple-statistics.html#GTS-RANGE-PRINT"
+>gts_range_print</A
+>                 (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1676"
+></A
+><H2
+>Description</H2
+><P
+>Using <A
+HREF="gts-simple-statistics.html#GTS-RANGE-INIT"
+>gts_range_init</A
+>(), <A
+HREF="gts-simple-statistics.html#GTS-RANGE-ADD-VALUE"
+>gts_range_add_value</A
+>() and <A
+HREF="gts-simple-statistics.html#GTS-RANGE-UPDATE"
+>gts_range_update</A
+>(), you can easily maintain basic statistics about an ensemble of values.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1682"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1684"
+></A
+><H3
+><A
+NAME="GTSRANGE"
+></A
+>struct GtsRange</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsRange {
+  gdouble min, max, mean, stddev;
+  guint n;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>A simple statistics structure.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>min</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Minimum value of the population.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>max</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Maximum value of the population.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>mean</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Average value of the population.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>stddev</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Standard deviation of the population.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of samples in the population.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1719"
+></A
+><H3
+><A
+NAME="GTS-RANGE-INIT"
+></A
+>gts_range_init ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_range_init                  (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Initializes a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1737"
+></A
+><H3
+><A
+NAME="GTS-RANGE-ADD-VALUE"
+></A
+>gts_range_add_value ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_range_add_value             (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> val);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds <TT
+CLASS="PARAMETER"
+><I
+>val</I
+></TT
+> to <TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>val</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a value to add to <TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1762"
+></A
+><H3
+><A
+NAME="GTS-RANGE-UPDATE"
+></A
+>gts_range_update ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_range_update                (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Updates the fields of <TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1780"
+></A
+><H3
+><A
+NAME="GTS-RANGE-RESET"
+></A
+>gts_range_reset ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_range_reset                 (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Sets all the fields of <TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+> to 0.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1798"
+></A
+><H3
+><A
+NAME="GTS-RANGE-PRINT"
+></A
+>gts_range_print ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_range_print                 (<A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *r,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes a text representation of <TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+> in <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>r</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-vectors-and-matrices.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-miscellaneous-macros-and-functions.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Vectors and matrices</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Miscellaneous macros and functions</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-surface-simplification-and-refinement.html b/doc/html/gts-surface-simplification-and-refinement.html
new file mode 100644
index 0000000..29b147d
--- /dev/null
+++ b/doc/html/gts-surface-simplification-and-refinement.html
@@ -0,0 +1,2164 @@
+<HTML
+><HEAD
+><TITLE
+>Surface simplification and refinement</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Surface operations"
+HREF="c9853.html"><LINK
+REL="PREVIOUS"
+TITLE="Boolean operations"
+HREF="gts-boolean-operations.html"><LINK
+REL="NEXT"
+TITLE="Out-of-core simplification"
+HREF="gts-out-of-core-simplification.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-boolean-operations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-out-of-core-simplification.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-SURFACE-SIMPLIFICATION-AND-REFINEMENT"
+>Surface simplification and refinement</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN10124"
+></A
+><H2
+>Name</H2
+>Surface simplification and refinement -- reducing or increasing the number of edges of a triangulated surface.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN10127"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+void        <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-SURFACE-REFINE"
+>gts_surface_refine</A
+>              (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GCOMPAREFUNC"
+>GCompareFunc</GTKDOCLINK
+> compare_func,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+> stop_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  (<A
+HREF="gts-surface-simplification-and-refinement.html#GTSCOARSENFUNC"
+>*GtsCoarsenFunc</A
+>)               (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    (<A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>*GtsStopFunc</A
+>)                  (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> cost,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nedge,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-SURFACE-COARSEN"
+>gts_surface_coarsen</A
+>             (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> cost_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> cost_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSCOARSENFUNC"
+>GtsCoarsenFunc</A
+> coarsen_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> coarsen_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+> stop_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> stop_data,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> minangle);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-COARSEN-STOP-NUMBER"
+>gts_coarsen_stop_number</A
+>         (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> cost,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nedge,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> *min_number);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-COARSEN-STOP-COST"
+>gts_coarsen_stop_cost</A
+>           (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> cost,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nedge,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *max_cost);
+
+struct      <A
+HREF="gts-surface-simplification-and-refinement.html#GTSVOLUMEOPTIMIZEDPARAMS"
+>GtsVolumeOptimizedParams</A
+>;
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-VOLUME-OPTIMIZED-VERTEX"
+>gts_volume_optimized_vertex</A
+>     (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *edge,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSVOLUMEOPTIMIZEDPARAMS"
+>GtsVolumeOptimizedParams</A
+> *params);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-VOLUME-OPTIMIZED-COST"
+>gts_volume_optimized_cost</A
+>       (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSVOLUMEOPTIMIZEDPARAMS"
+>GtsVolumeOptimizedParams</A
+> *params);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-EDGE-COLLAPSE-IS-VALID"
+>gts_edge_collapse_is_valid</A
+>      (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-EDGE-COLLAPSE-CREATES-FOLD"
+>gts_edge_collapse_creates_fold</A
+>  (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> max);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN10182"
+></A
+><H2
+>Description</H2
+><P
+>The <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-SURFACE-COARSEN"
+>gts_surface_coarsen</A
+>() function allows to reduce the number of edges (and of course faces and vertices) of a given surface. Each edge is collapsed according to an order described by a user-defined cost function. It is then replaced by a single vertex given by another user-defined function. Two sets of cost and replacement functions are provided with the library. The default uses the squared length of the segment as cost and replaces the segment with its midpoint.</P
+><P
+>The functions <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-VOLUME-OPTIMIZED-COST"
+>gts_volume_optimized_cost</A
+>() and <A
+HREF="gts-surface-simplification-and-refinement.html#GTS-VOLUME-OPTIMIZED-VERTEX"
+>gts_volume_optimized_vertex</A
+>() are an implementation of an algorithm proposed by Lindstrom and Turk called "memoryless simplification". This algorithm has been shown to be both computationally efficient and very accurate in terms of error between the simplified surface and the original one. It also preserves the volume enclosed by the surface both globally and locally.</P
+><P
+>Surface refinement is obtained by splitting the edges in two equal parts according to an order described by a user-defined cost function. The default is to use the squared length of the segments as cost.</P
+><P
+>The coarsening or refinement processes are stopped using a user-defined stop function. Two functions are provided stopping either when the cost of collapsing an edge is too large (<A
+HREF="gts-surface-simplification-and-refinement.html#GTS-COARSEN-STOP-COST"
+>gts_coarsen_stop_cost</A
+>()) or when the number of edges is too small (<A
+HREF="gts-surface-simplification-and-refinement.html#GTS-COARSEN-STOP-NUMBER"
+>gts_coarsen_stop_number</A
+>()).</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN10193"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10195"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-REFINE"
+></A
+>gts_surface_refine ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_refine              (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GCOMPAREFUNC"
+>GCompareFunc</GTKDOCLINK
+> compare_func,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+> stop_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Refine <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> using a midvertex insertion technique. All the
+edges of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> are ordered according to <TT
+CLASS="PARAMETER"
+><I
+>compare_func</I
+></TT
+>. The edges
+are then processed in order until <TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+> returns <TT
+CLASS="LITERAL"
+>TRUE</TT
+>. Each
+edge is split in two and new edges and faces are created.</P
+><P
+>If <TT
+CLASS="PARAMETER"
+><I
+>compare_func</I
+></TT
+> is set to <TT
+CLASS="LITERAL"
+>NULL</TT
+> an internal function comparing the
+squared length of the edges is used.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>compare_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a GCompareFunc.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10237"
+></A
+><H3
+><A
+NAME="GTSCOARSENFUNC"
+></A
+>GtsCoarsenFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  (*GtsCoarsenFunc)               (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>User-defined function taking an edge <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> and returning a replacement vertex of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> of the replacement vertex.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>user data passed to the function.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a replacement vertex of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10272"
+></A
+><H3
+><A
+NAME="GTSSTOPFUNC"
+></A
+>GtsStopFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    (*GtsStopFunc)                  (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> cost,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nedge,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>User-defined function used to stop the coarsening process.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the cost of collapse of the current edge.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nedge</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the number of edges of the surface after collapse of the current edge.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>user data passed to the function.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the collapse of the current edge is not to take place, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10304"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-COARSEN"
+></A
+>gts_surface_coarsen ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_coarsen             (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSKEYFUNC"
+>GtsKeyFunc</A
+> cost_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> cost_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSCOARSENFUNC"
+>GtsCoarsenFunc</A
+> coarsen_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> coarsen_data,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+> stop_func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> stop_data,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> minangle);</PRE
+></TD
+></TR
+></TABLE
+><P
+>The edges of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> are sorted according to <TT
+CLASS="PARAMETER"
+><I
+>cost_func</I
+></TT
+> to 
+create a priority heap (a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+>). The edges are extracted in
+turn from the top of the heap and collapsed (i.e. the vertices are
+replaced by the vertex returned by the <TT
+CLASS="PARAMETER"
+><I
+>coarsen_func</I
+></TT
+> function)
+until the <TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+> functions returns <TT
+CLASS="LITERAL"
+>TRUE</TT
+>.</P
+><P
+>If <TT
+CLASS="PARAMETER"
+><I
+>cost_func</I
+></TT
+> is set to <TT
+CLASS="LITERAL"
+>NULL</TT
+>, the edges are sorted according 
+to their length squared (the shortest is on top).</P
+><P
+>If <TT
+CLASS="PARAMETER"
+><I
+>coarsen_func</I
+></TT
+> is set to <TT
+CLASS="LITERAL"
+>NULL</TT
+> <A
+HREF="gts-segments.html#GTS-SEGMENT-MIDVERTEX"
+>gts_segment_midvertex</A
+>() is used.</P
+><P
+>The minimum angle is used to avoid introducing faces which would be folded.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a function returning the cost for a given edge.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>cost_func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>coarsen_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <GTKDOCLINK
+HREF="GTSCOARSENVERTEXFUNC"
+>GtsCoarsenVertexFunc</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>coarsen_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>coarsen_func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surface-simplification-and-refinement.html#GTSSTOPFUNC"
+>GtsStopFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>stop_data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>minangle</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> minimum angle between two neighboring triangles.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10375"
+></A
+><H3
+><A
+NAME="GTS-COARSEN-STOP-NUMBER"
+></A
+>gts_coarsen_stop_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_coarsen_stop_number         (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> cost,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nedge,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> *min_number);</PRE
+></TD
+></TR
+></TABLE
+><P
+>This function is to be used as the <TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+> argument of 
+<A
+HREF="gts-surface-simplification-and-refinement.html#GTS-SURFACE-COARSEN"
+>gts_surface_coarsen</A
+>() or <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-NEW"
+>gts_psurface_new</A
+>().</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the cost of the edge collapse considered.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nedge</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the current number of edges of the surface being simplified.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>min_number</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to the minimum number of edges desired for the 
+surface being simplified.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the edge collapse would create a surface with a smaller 
+number of edges than given by <TT
+CLASS="PARAMETER"
+><I
+>min_number</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10412"
+></A
+><H3
+><A
+NAME="GTS-COARSEN-STOP-COST"
+></A
+>gts_coarsen_stop_cost ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_coarsen_stop_cost           (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> cost,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> nedge,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *max_cost);</PRE
+></TD
+></TR
+></TABLE
+><P
+>This function is to be used as the <TT
+CLASS="PARAMETER"
+><I
+>stop_func</I
+></TT
+> argument of 
+<A
+HREF="gts-surface-simplification-and-refinement.html#GTS-SURFACE-COARSEN"
+>gts_surface_coarsen</A
+>() or <A
+HREF="gts-progressive-surfaces.html#GTS-PSURFACE-NEW"
+>gts_psurface_new</A
+>().</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cost</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the cost of the edge collapse considered.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nedge</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the current number of edges of the surface being simplified.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>max_cost</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to the maximum cost allowed for an edge collapse.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the cost of the edge collapse considered is larger than
+given by <TT
+CLASS="PARAMETER"
+><I
+>max_cost</I
+></TT
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10449"
+></A
+><H3
+><A
+NAME="GTSVOLUMEOPTIMIZEDPARAMS"
+></A
+>struct GtsVolumeOptimizedParams</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsVolumeOptimizedParams {
+  gdouble volume_weight;
+  gdouble boundary_weight;
+  gdouble shape_weight;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The parameters for the volume optimization algorithm of Lindstrom and Turk. THey define the relative weight of the volume, boundary and shape optimization part of the algorithm. Lindstrom and Turk advice is to set them to 0.5, 0.5 and 0. You may want to experiment depending on your problem. Setting <TT
+CLASS="PARAMETER"
+><I
+>shape_weight</I
+></TT
+> to a very small value (1e-10) for example might help improve the quality of the resulting triangulation.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>volume_weight</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Weight of the volume optimization.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>boundary_weight</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Weight of the boundary optimization.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>shape_weight</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Weight of the shape optimization.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10475"
+></A
+><H3
+><A
+NAME="GTS-VOLUME-OPTIMIZED-VERTEX"
+></A
+>gts_volume_optimized_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  gts_volume_optimized_vertex     (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *edge,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSVOLUMEOPTIMIZEDPARAMS"
+>GtsVolumeOptimizedParams</A
+> *params);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>edge</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> to be used for the new vertex.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>params</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <GTKDOCLINK
+HREF="GTSVOLUMEOPTIMIZEDPARMS"
+>GtsVolumeOptimizedParms</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> which can be used to replace <TT
+CLASS="PARAMETER"
+><I
+>edge</I
+></TT
+> for an
+edge collapse operation. The position of the vertex is optimized in
+order to minimize the changes in area and volume for the surface
+using <TT
+CLASS="PARAMETER"
+><I
+>edge</I
+></TT
+>. The volume enclosed by the surface is locally
+preserved. For more details see "Fast and memory efficient
+polygonal simplification" (1998) and "Evaluation of memoryless
+simplification" (1999) by Lindstrom and Turk.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10512"
+></A
+><H3
+><A
+NAME="GTS-VOLUME-OPTIMIZED-COST"
+></A
+>gts_volume_optimized_cost ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_volume_optimized_cost       (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-surface-simplification-and-refinement.html#GTSVOLUMEOPTIMIZEDPARAMS"
+>GtsVolumeOptimizedParams</A
+> *params);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>params</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surface-simplification-and-refinement.html#GTSVOLUMEOPTIMIZEDPARAMS"
+>GtsVolumeOptimizedParams</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the cost for the collapse of <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> as minimized by the function
+<A
+HREF="gts-surface-simplification-and-refinement.html#GTS-VOLUME-OPTIMIZED-VERTEX"
+>gts_volume_optimized_vertex</A
+>().</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10542"
+></A
+><H3
+><A
+NAME="GTS-EDGE-COLLAPSE-IS-VALID"
+></A
+>gts_edge_collapse_is_valid ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_edge_collapse_is_valid      (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+>An implementation of the topological constraints described in the 
+"Mesh Optimization" article of Hoppe et al (1993).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> can be collapsed without violation of the topological
+constraints, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN10567"
+></A
+><H3
+><A
+NAME="GTS-EDGE-COLLAPSE-CREATES-FOLD"
+></A
+>gts_edge_collapse_creates_fold ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_edge_collapse_creates_fold  (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> max);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>max</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the maximum value of the square of the cosine of the angle between
+two triangles.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if collapsing edge <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> to vertex <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> would create
+faces making an angle the cosine squared of which would be larger than max,
+<TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-boolean-operations.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c9853.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-out-of-core-simplification.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Boolean operations</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Out-of-core simplification</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-surfaces.html b/doc/html/gts-surfaces.html
new file mode 100644
index 0000000..7b41acd
--- /dev/null
+++ b/doc/html/gts-surfaces.html
@@ -0,0 +1,4981 @@
+<HTML
+><HEAD
+><TITLE
+>Surfaces</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Faces"
+HREF="gts-faces.html"><LINK
+REL="NEXT"
+TITLE="Geometrical data structures"
+HREF="c8393.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-faces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-SURFACES"
+>Surfaces</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN7219"
+></A
+><H2
+>Name</H2
+>Surfaces -- surface object and related functions.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN7222"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-surfaces.html#GTS-SURFACE-CLASS-CAPS"
+>GTS_SURFACE_CLASS</A
+>               (klass)
+#define     <A
+HREF="gts-surfaces.html#GTS-SURFACE-CAPS"
+>GTS_SURFACE</A
+>                     (obj)
+#define     <A
+HREF="gts-surfaces.html#GTS-IS-SURFACE-CAPS"
+>GTS_IS_SURFACE</A
+>                  (obj)
+struct      <A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+>;
+struct      <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>;
+
+<A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+>* <A
+HREF="gts-surfaces.html#GTS-SURFACE-CLASS"
+>gts_surface_class</A
+>          (void);
+<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>* <A
+HREF="gts-surfaces.html#GTS-SURFACE-NEW"
+>gts_surface_new</A
+>                 (<A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+> *face_class,
+                                             <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *edge_class,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *vertex_class);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-ADD-FACE"
+>gts_surface_add_face</A
+>            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-REMOVE-FACE"
+>gts_surface_remove_face</A
+>         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);
+<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>* <A
+HREF="gts-surfaces.html#GTS-SURFACE-COPY"
+>gts_surface_copy</A
+>                (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s1,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s2);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-MERGE"
+>gts_surface_merge</A
+>               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *with);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-surfaces.html#GTS-SURFACE-READ"
+>gts_surface_read</A
+>                (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-surfaces.html#GTS-SURFACE-IS-MANIFOLD"
+>gts_surface_is_manifold</A
+>         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-surfaces.html#GTS-SURFACE-IS-ORIENTABLE"
+>gts_surface_is_orientable</A
+>       (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-surfaces.html#GTS-SURFACE-IS-CLOSED"
+>gts_surface_is_closed</A
+>           (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-surfaces.html#GTS-SURFACE-VERTEX-NUMBER"
+>gts_surface_vertex_number</A
+>       (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-surfaces.html#GTS-SURFACE-EDGE-NUMBER"
+>gts_surface_edge_number</A
+>         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-surfaces.html#GTS-SURFACE-FACE-NUMBER"
+>gts_surface_face_number</A
+>         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-surfaces.html#GTS-SURFACE-BOUNDARY"
+>gts_surface_boundary</A
+>            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-surfaces.html#GTS-SURFACE-AREA"
+>gts_surface_area</A
+>                (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-surfaces.html#GTS-SURFACE-VOLUME"
+>gts_surface_volume</A
+>              (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);
+struct      <A
+HREF="gts-surfaces.html#GTSSURFACESTATS"
+>GtsSurfaceStats</A
+>;
+struct      <A
+HREF="gts-surfaces.html#GTSSURFACEQUALITYSTATS"
+>GtsSurfaceQualityStats</A
+>;
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-STATS"
+>gts_surface_stats</A
+>               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACESTATS"
+>GtsSurfaceStats</A
+> *stats);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-QUALITY-STATS"
+>gts_surface_quality_stats</A
+>       (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACEQUALITYSTATS"
+>GtsSurfaceQualityStats</A
+> *stats);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-PRINT-STATS"
+>gts_surface_print_stats</A
+>         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-WRITE"
+>gts_surface_write</A
+>               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-WRITE-OOGL"
+>gts_surface_write_oogl</A
+>          (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-WRITE-OOGL-BOUNDARY"
+>gts_surface_write_oogl_boundary</A
+> (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+<GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+>        (<A
+HREF="gts-surfaces.html#GTSFUNC"
+>*GtsFunc</A
+>)                      (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> item,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-FOREACH-VERTEX"
+>gts_surface_foreach_vertex</A
+>      (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-FOREACH-EDGE"
+>gts_surface_foreach_edge</A
+>        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-FOREACH-FACE"
+>gts_surface_foreach_face</A
+>        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-surfaces.html#GTS-SURFACE-FOREACH-FACE-REMOVE"
+>gts_surface_foreach_face_remove</A
+> (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+struct      <A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+>;
+<A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+>* <A
+HREF="gts-surfaces.html#GTS-SURFACE-TRAVERSE-NEW"
+>gts_surface_traverse_new</A
+>
+                                            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);
+<A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    <A
+HREF="gts-surfaces.html#GTS-SURFACE-TRAVERSE-NEXT"
+>gts_surface_traverse_next</A
+>       (<A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+> *t,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> *level);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-TRAVERSE-DESTROY"
+>gts_surface_traverse_destroy</A
+>    (<A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+> *t);
+void        <A
+HREF="gts-surfaces.html#GTS-SURFACE-DISTANCE"
+>gts_surface_distance</A
+>            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s1,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *face_range,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *boundary_range);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-surfaces.html#GTS-SURFACE-STRIP"
+>gts_surface_strip</A
+>               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN7343"
+></A
+><H2
+>Description</H2
+><P
+>A <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> is defined as a collection of <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>. No topological constraint is imposed: the surface may or may not be manifold, closed or orientable.</P
+><P
+>When destroying a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>, all the faces not used by another surface are also destroyed. This default behaviour can be changed punctually by setting the global variable gts_allow_floating_faces to <TT
+CLASS="LITERAL"
+>TRUE</TT
+>. You must not forget to set this variable back to <TT
+CLASS="LITERAL"
+>FALSE</TT
+> as all the algorithms of GTS assume the default behaviour.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN7352"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7354"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-CLASS-CAPS"
+></A
+>GTS_SURFACE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SURFACE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7371"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-CAPS"
+></A
+>GTS_SURFACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SURFACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7388"
+></A
+><H3
+><A
+NAME="GTS-IS-SURFACE-CAPS"
+></A
+>GTS_IS_SURFACE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_SURFACE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7406"
+></A
+><H3
+><A
+NAME="GTSSURFACECLASS"
+></A
+>struct GtsSurfaceClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSurfaceClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The surface class. No virtual function is defined.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7411"
+></A
+><H3
+><A
+NAME="GTSSURFACE"
+></A
+>struct GtsSurface</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSurface {
+  GtsObject object;
+
+  GHashTable * faces;
+  GtsFaceClass * face_class;
+  GtsEdgeClass * edge_class;
+  GtsVertexClass * vertex_class;
+  gboolean keep_faces;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The surface structure derived from <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.
+This structure should only be accessed through the following functions.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7417"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-CLASS"
+></A
+>gts_surface_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+>* gts_surface_class          (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7434"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-NEW"
+></A
+>gts_surface_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>* gts_surface_new                 (<A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+> *klass,
+                                             <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+> *face_class,
+                                             <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *edge_class,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *vertex_class);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACECLASS"
+>GtsSurfaceClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>face_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACECLASS"
+>GtsFaceClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>edge_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vertex_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new empty <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7475"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-ADD-FACE"
+></A
+>gts_surface_add_face ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_add_face            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds face <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> to surface <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7500"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-REMOVE-FACE"
+></A
+>gts_surface_remove_face ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_remove_face         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Removes face <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> from surface <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7525"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-COPY"
+></A
+>gts_surface_copy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>* gts_surface_copy                (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s1,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s2);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Add a copy of all the faces, edges and vertices of <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> to <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7556"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-MERGE"
+></A
+>gts_surface_merge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_merge               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *with);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds all the faces of <TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+> which do not already belong to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>
+to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7582"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-READ"
+></A
+>gts_surface_read ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_surface_read                (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Add to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> the data read from <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+>. The format of the file pointed to
+by <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> is as described in <A
+HREF="gts-surfaces.html#GTS-SURFACE-WRITE"
+>gts_surface_write</A
+>().</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> 0 if successful or the line number at which the parsing stopped in
+case of error.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7613"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-IS-MANIFOLD"
+></A
+>gts_surface_is_manifold ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_surface_is_manifold         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if the surface is a manifold, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7637"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-IS-ORIENTABLE"
+></A
+>gts_surface_is_orientable ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_surface_is_orientable       (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if all the faces of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> have compatible orientation
+as checked by <GTKDOCLINK
+HREF="GTS-FACES-ARE-COMPATIBLE"
+>gts_faces_are_compatible</GTKDOCLINK
+>(), <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise. Note that
+an orientable surface is also a manifold.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7663"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-IS-CLOSED"
+></A
+>gts_surface_is_closed ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_surface_is_closed           (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> is a closed surface, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise. Note that a
+closed surface is also a manifold.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7688"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-VERTEX-NUMBER"
+></A
+>gts_surface_vertex_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_surface_vertex_number       (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of vertices of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7711"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-EDGE-NUMBER"
+></A
+>gts_surface_edge_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_surface_edge_number         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of edges of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7734"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-FACE-NUMBER"
+></A
+>gts_surface_face_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_surface_face_number         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of faces of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+></TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7757"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-BOUNDARY"
+></A
+>gts_surface_boundary ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_surface_boundary            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> boundary of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7781"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-AREA"
+></A
+>gts_surface_area ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_surface_area                (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the area of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> obtained as the sum of the signed areas of its
+faces.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7804"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-VOLUME"
+></A
+>gts_surface_volume ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_surface_volume              (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the signed volume of the domain bounded by the surface <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>. It
+makes sense only if <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> is a closed and orientable manifold.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7828"
+></A
+><H3
+><A
+NAME="GTSSURFACESTATS"
+></A
+>struct GtsSurfaceStats</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSurfaceStats {
+  guint n_faces;
+  guint n_incompatible_faces;
+  guint n_duplicate_faces;
+  guint n_duplicate_edges;
+  guint n_boundary_edges;
+  guint n_non_manifold_edges;
+  GtsRange edges_per_vertex, faces_per_edge;
+  GtsSurface * parent;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>Connectivity statistics.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n_faces</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of faces.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n_incompatible_faces</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of incompatible faces (see <A
+HREF="gts-triangles.html#GTS-TRIANGLES-ARE-COMPATIBLE"
+>gts_triangles_are_compatible</A
+>() for details).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n_duplicate_faces</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of duplicate faces (see <A
+HREF="gts-triangles.html#GTS-TRIANGLE-IS-DUPLICATE"
+>gts_triangle_is_duplicate</A
+>() for details).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n_duplicate_edges</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of duplicate edges (see <A
+HREF="gts-segments.html#GTS-SEGMENT-IS-DUPLICATE"
+>gts_segment_is_duplicate</A
+>() for details).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n_boundary_edges</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of boundary edges.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>n_non_manifold_edges</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of non-manifold edges.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>edges_per_vertex</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Statistics on the number of edges per vertex.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>faces_per_edge</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Statistics on the number of faces per vertex.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>parent</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Surface from which these statistics have been obtained.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7886"
+></A
+><H3
+><A
+NAME="GTSSURFACEQUALITYSTATS"
+></A
+>struct GtsSurfaceQualityStats</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSurfaceQualityStats {
+  GtsRange face_quality;
+  GtsRange face_area;
+  GtsRange edge_length;
+  GtsRange edge_angle;
+  GtsSurface * parent;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>Quality and geometry statistics.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>face_quality</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Statistics for face quality (see <A
+HREF="gts-triangles.html#GTS-TRIANGLE-QUALITY"
+>gts_triangle_quality</A
+>() for details).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>face_area</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Statistics for the face area.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>edge_length</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Statistics for the edge length.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>edge_angle</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Statistics for the edge angles.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>parent</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Surface from which these statistics have been obtained.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7922"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-STATS"
+></A
+>gts_surface_stats ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_stats               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACESTATS"
+>GtsSurfaceStats</A
+> *stats);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Fills <TT
+CLASS="PARAMETER"
+><I
+>stats</I
+></TT
+> with the statistics relevant to surface <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>stats</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACESTATS"
+>GtsSurfaceStats</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7947"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-QUALITY-STATS"
+></A
+>gts_surface_quality_stats ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_quality_stats       (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACEQUALITYSTATS"
+>GtsSurfaceQualityStats</A
+> *stats);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Fills <TT
+CLASS="PARAMETER"
+><I
+>stats</I
+></TT
+> with quality statistics relevant to surface <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>stats</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACEQUALITYSTATS"
+>GtsSurfaceQualityStats</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7972"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-PRINT-STATS"
+></A
+>gts_surface_print_stats ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_print_stats         (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes in the file pointed to by <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> the statistics for surface <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN7996"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-WRITE"
+></A
+>gts_surface_write ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_write               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes in the file <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> an ASCII representation of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>. The file
+format is as follows. </P
+><P
+>All the lines beginning with <A
+HREF="gts-miscellaneous-macros-and-functions.html#GTS-COMMENTS-CAPS"
+>GTS_COMMENTS</A
+> are ignored. The first line
+contains three unsigned integers separated by spaces. The first
+integer is the number of vertices, nv, the second is the number of
+edges, ne and the third is the number of faces, nf.</P
+><P
+>Follows nv lines containing the x, y and z coordinates of the
+vertices.  Follows ne lines containing the two indices (starting
+from one) of the vertices of each edge. Follows nf lines containing
+the three ordered indices (also starting from one) of the edges of
+each face.  </P
+><P
+>The format described above is the least common denominator to all
+GTS files.  Consistent with an object-oriented approach, the GTS
+file format is extensible. Each of the lines of the file can be
+extended with user-specific attributes accessible through the
+<GTKDOCLINK
+HREF="READ"
+>read</GTKDOCLINK
+>() and <GTKDOCLINK
+HREF="WRITE"
+>write</GTKDOCLINK
+>() virtual methods of each of the objects written
+(surface, vertices, edges or faces). When read with different
+object classes, these extra attributes are just ignored.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8026"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-WRITE-OOGL"
+></A
+>gts_surface_write_oogl ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_write_oogl          (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes in the file <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> an OOGL (Geomview) representation of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8050"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-WRITE-OOGL-BOUNDARY"
+></A
+>gts_surface_write_oogl_boundary ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_write_oogl_boundary (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Writes in the file <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> an OOGL (Geomview) representation of the
+boundary of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file pointer.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8074"
+></A
+><H3
+><A
+NAME="GTSFUNC"
+></A
+>GtsFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+>        (*GtsFunc)                      (<GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> item,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>A user function called for each item of a collection.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>item</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer this function is called for.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>user data passed to the function.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>if 0 the calling sequence continues, otherwise it stops.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8099"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-FOREACH-VERTEX"
+></A
+>gts_surface_foreach_vertex ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_foreach_vertex      (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> once for each vertex of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8130"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-FOREACH-EDGE"
+></A
+>gts_surface_foreach_edge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_foreach_edge        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> once for each edge of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8161"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-FOREACH-FACE"
+></A
+>gts_surface_foreach_face ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_foreach_face        (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> once for each face of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8192"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-FOREACH-FACE-REMOVE"
+></A
+>gts_surface_foreach_face_remove ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_surface_foreach_face_remove (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> once for each face of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>. If <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> returns <TT
+CLASS="LITERAL"
+>TRUE</TT
+> the
+corresponding face is removed from <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> (and destroyed if it does not
+belong to any other surface and <GTKDOCLINK
+HREF="GTS-ALLOW-FLOATING-FACES"
+>gts_allow_floating_faces</GTKDOCLINK
+> is set to
+<TT
+CLASS="LITERAL"
+>FALSE</TT
+>).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSFUNC"
+>GtsFunc</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to be passed to <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of faces removed from <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8234"
+></A
+><H3
+><A
+NAME="GTSSURFACETRAVERSE"
+></A
+>struct GtsSurfaceTraverse</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSurfaceTraverse;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8239"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-TRAVERSE-NEW"
+></A
+>gts_surface_traverse_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+>* gts_surface_traverse_new
+                                            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> *f);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+>, initialized to start traversing
+from face <TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+> of surface <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8271"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-TRAVERSE-NEXT"
+></A
+>gts_surface_traverse_next ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>*    gts_surface_traverse_next       (<A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+> *t,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> *level);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>level</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to a guint or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the next face of the traversal in breadth-first order or
+<TT
+CLASS="LITERAL"
+>NULL</TT
+> if no faces are left. If <TT
+CLASS="PARAMETER"
+><I
+>level</I
+></TT
+> if not <TT
+CLASS="LITERAL"
+>NULL</TT
+>, it is filled
+with the level of the returned face (0 for the initial face, 1 for
+its neighbors and so on).  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8302"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-TRAVERSE-DESTROY"
+></A
+>gts_surface_traverse_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_traverse_destroy    (<A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Frees all the memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACETRAVERSE"
+>GtsSurfaceTraverse</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8320"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-DISTANCE"
+></A
+>gts_surface_distance ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_surface_distance            (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s1,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s2,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> delta,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *face_range,
+                                             <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+> *boundary_range);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Using the <A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE-DISTANCE"
+>gts_bb_tree_surface_distance</A
+>() and
+<A
+HREF="gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE-BOUNDARY-DISTANCE"
+>gts_bb_tree_surface_boundary_distance</A
+>() functions fills <TT
+CLASS="PARAMETER"
+><I
+>face_range</I
+></TT
+>
+and <TT
+CLASS="PARAMETER"
+><I
+>boundary_range</I
+></TT
+> with the min, max and average Euclidean
+(minimum) distances between the faces of <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> and the faces of <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+>
+and between the boundary edges of <TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>delta</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a spatial increment defined as the percentage of the diagonal
+of the bounding box of <TT
+CLASS="PARAMETER"
+><I
+>s2</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>face_range</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>boundary_range</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-simple-statistics.html#GTSRANGE"
+>GtsRange</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN8369"
+></A
+><H3
+><A
+NAME="GTS-SURFACE-STRIP"
+></A
+>gts_surface_strip ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_surface_strip               (<A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Decompose <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> into triangle strips for fast-rendering.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of triangle strips containing all the triangles of <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>. 
+A triangle strip is itself a list of successive triangles having one edge
+in common.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-faces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="c8393.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Faces</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Geometrical data structures</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-triangles.html b/doc/html/gts-triangles.html
new file mode 100644
index 0000000..9b507d2
--- /dev/null
+++ b/doc/html/gts-triangles.html
@@ -0,0 +1,4744 @@
+<HTML
+><HEAD
+><TITLE
+>Triangles</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Edges"
+HREF="gts-edges.html"><LINK
+REL="NEXT"
+TITLE="Faces"
+HREF="gts-faces.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-edges.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-faces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-TRIANGLES"
+>Triangles</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN5743"
+></A
+><H2
+>Name</H2
+>Triangles -- triangle object and related functions.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN5746"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-CLASS-CAPS"
+>GTS_TRIANGLE_CLASS</A
+>              (klass)
+#define     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-CAPS"
+>GTS_TRIANGLE</A
+>                    (obj)
+#define     <A
+HREF="gts-triangles.html#GTS-IS-TRIANGLE-CAPS"
+>GTS_IS_TRIANGLE</A
+>                 (obj)
+struct      <A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>;
+struct      <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>;
+
+<A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>* <A
+HREF="gts-triangles.html#GTS-TRIANGLE-CLASS"
+>gts_triangle_class</A
+>        (void);
+<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* <A
+HREF="gts-triangles.html#GTS-TRIANGLE-NEW"
+>gts_triangle_new</A
+>               (<A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+> *klass,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);
+void        <A
+HREF="gts-triangles.html#GTS-TRIANGLE-SET"
+>gts_triangle_set</A
+>                (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *triangle,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-AREA"
+>gts_triangle_area</A
+>               (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-PERIMETER"
+>gts_triangle_perimeter</A
+>          (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-QUALITY"
+>gts_triangle_quality</A
+>            (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+void        <A
+HREF="gts-triangles.html#GTS-TRIANGLE-NORMAL"
+>gts_triangle_normal</A
+>             (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *z);
+void        <A
+HREF="gts-triangles.html#GTS-TRIANGLE-REVERT"
+>gts_triangle_revert</A
+>             (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-ORIENTATION"
+>gts_triangle_orientation</A
+>        (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* <A
+HREF="gts-triangles.html#GTS-TRIANGLE-IS-DUPLICATE"
+>gts_triangle_is_duplicate</A
+>      (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-triangles.html#GTS-TRIANGLES-ANGLE"
+>gts_triangles_angle</A
+>             (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t1,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t2);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-triangles.html#GTS-TRIANGLES-ARE-COMPATIBLE"
+>gts_triangles_are_compatible</A
+>    (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t1,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* <A
+HREF="gts-triangles.html#GTS-TRIANGLE-ENCLOSING"
+>gts_triangle_enclosing</A
+>         (<A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *points,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> scale);
+<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    <A
+HREF="gts-triangles.html#GTS-TRIANGLES-COMMON-EDGE"
+>gts_triangles_common_edge</A
+>       (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t1,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t2);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-triangles.html#GTS-TRIANGLE-NEIGHBOR-NUMBER"
+>gts_triangle_neighbor_number</A
+>    (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-NEIGHBORS"
+>gts_triangle_neighbors</A
+>          (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+void        <A
+HREF="gts-triangles.html#GTS-TRIANGLE-VERTICES-EDGES"
+>gts_triangle_vertices_edges</A
+>     (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v2,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v3,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> **e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> **e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> **e3);
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  <A
+HREF="gts-triangles.html#GTS-TRIANGLE-VERTEX-OPPOSITE"
+>gts_triangle_vertex_opposite</A
+>    (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    <A
+HREF="gts-triangles.html#GTS-TRIANGLE-EDGE-OPPOSITE"
+>gts_triangle_edge_opposite</A
+>      (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v);
+void        <A
+HREF="gts-triangles.html#GTS-TRIANGLE-VERTICES"
+>gts_triangle_vertices</A
+>           (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v2,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v3);
+#define     <A
+HREF="gts-triangles.html#GTS-TRIANGLE-VERTEX"
+>gts_triangle_vertex</A
+>             (t)
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-triangles.html#GTS-TRIANGLE-IS-OK"
+>gts_triangle_is_ok</A
+>              (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* <A
+HREF="gts-triangles.html#GTS-TRIANGLE-USE-EDGES"
+>gts_triangle_use_edges</A
+>         (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);
+<A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   <A
+HREF="gts-triangles.html#GTS-TRIANGLE-CIRCUMCIRCLE-CENTER"
+>gts_triangle_circumcircle_center</A
+>
+                                            (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+> *point_class);
+<A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>*  <A
+HREF="gts-triangles.html#GTS-TRIANGLE-IS-STABBED"
+>gts_triangle_is_stabbed</A
+>         (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *orientation);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-triangles.html#GTS-TRIANGLES-ARE-FOLDED"
+>gts_triangles_are_folded</A
+>        (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *triangles,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *A,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *B,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> max);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-triangles.html#GTS-TRIANGLES-FROM-EDGES"
+>gts_triangles_from_edges</A
+>        (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *edges);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN5862"
+></A
+><H2
+>Description</H2
+><P
+>A <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> is defined by three <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>. They are oriented, the normal to the triangle points toward an observer seing the three edges in counter-clockwise order.</P
+><P
+>When destroying a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>, all the edges not used by another triangle are also destroyed. This default behaviour can be changed punctually by setting the global variable gts_allow_floating_edges to <TT
+CLASS="LITERAL"
+>TRUE</TT
+>. You must not forget to set this variable back to <TT
+CLASS="LITERAL"
+>FALSE</TT
+> as all the algorithms of GTS assume the default behaviour.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN5871"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5873"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-CLASS-CAPS"
+></A
+>GTS_TRIANGLE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_TRIANGLE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5890"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-CAPS"
+></A
+>GTS_TRIANGLE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_TRIANGLE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5907"
+></A
+><H3
+><A
+NAME="GTS-IS-TRIANGLE-CAPS"
+></A
+>GTS_IS_TRIANGLE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_TRIANGLE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a descendant of <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5925"
+></A
+><H3
+><A
+NAME="GTSTRIANGLECLASS"
+></A
+>struct GtsTriangleClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsTriangleClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The triangle class, just derived from <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5931"
+></A
+><H3
+><A
+NAME="GTSTRIANGLE"
+></A
+>struct GtsTriangle</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsTriangle {
+  GtsObject object;
+
+  GtsEdge * e1;
+  GtsEdge * e2;
+  GtsEdge * e3;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The triangle object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>e1</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>First edge.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>e2</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Second edge.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>e3</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Third edge.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5961"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-CLASS"
+></A
+>gts_triangle_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>* gts_triangle_class        (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN5978"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-NEW"
+></A
+>gts_triangle_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* gts_triangle_new               (<A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+> *klass,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> touching <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> touching both <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> having <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> as edges.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6025"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-SET"
+></A
+>gts_triangle_set ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_triangle_set                (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *triangle,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Sets the edge of <TT
+CLASS="PARAMETER"
+><I
+>triangle</I
+></TT
+> to <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> while checking that they
+define a valid triangle.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>triangle</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> touching <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> touching both <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6067"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-AREA"
+></A
+>gts_triangle_area ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_triangle_area               (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the area of the triangle <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6090"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-PERIMETER"
+></A
+>gts_triangle_perimeter ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_triangle_perimeter          (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the perimeter of the triangle <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6113"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-QUALITY"
+></A
+>gts_triangle_quality ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_triangle_quality            (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>The quality of a triangle is defined as the ratio of its surface to 
+its perimeter relative to this same ratio for an equilateral
+triangle with the same area. The quality is then one for an
+equilateral triangle and tends to zero for a very stretched triangle.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the quality of the triangle <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6136"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-NORMAL"
+></A
+>gts_triangle_normal ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_triangle_normal             (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *z);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Computes the coordinates of the oriented normal of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> as the
+cross-product of two edges, using the left-hand rule. The normal is
+not normalized.  If this triangle is part of a closed and oriented
+surface, the normal points to the outside of the surface.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the x coordinate of the normal.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the y coordinate of the normal.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the z coordinate of the normal.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6169"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-REVERT"
+></A
+>gts_triangle_revert ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_triangle_revert             (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Changes the orientation of triangle <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>, turning it inside out.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6187"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-ORIENTATION"
+></A
+>gts_triangle_orientation ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_triangle_orientation        (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Checks for the orientation of the plane (x,y) projection of a
+triangle. See <A
+HREF="gts-points.html#GTS-POINT-ORIENTATION"
+>gts_point_orientation</A
+>() for details. This function
+is geometrically robust.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a number depending on the orientation of the vertices of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6211"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-IS-DUPLICATE"
+></A
+>gts_triangle_is_duplicate ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* gts_triangle_is_duplicate      (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> different from <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> but sharing all its edges 
+with <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if there is none.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6237"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLES-ANGLE"
+></A
+>gts_triangles_angle ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_triangles_angle             (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t1,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the value (in radians) of the angle between <TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6267"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLES-ARE-COMPATIBLE"
+></A
+>gts_triangles_are_compatible ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_triangles_are_compatible    (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t1,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Checks if <TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+> have compatible orientations i.e. if <TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> and
+<TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+> can be part of the same surface without conflict in the surface
+normal orientation.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> used by both <TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+> are compatible, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6311"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-ENCLOSING"
+></A
+>gts_triangle_enclosing ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* gts_triangle_enclosing         (<A
+HREF="gts-triangles.html#GTSTRIANGLECLASS"
+>GtsTriangleClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *points,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> scale);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Builds a new triangle (including new vertices and edges) enclosing
+the plane projection of all the points in <TT
+CLASS="PARAMETER"
+><I
+>points</I
+></TT
+>. This triangle is
+equilateral and encloses a rectangle defined by the maximum and
+minimum x and y coordinates of the points. <TT
+CLASS="PARAMETER"
+><I
+>scale</I
+></TT
+> is an homothetic
+scaling factor. If equal to one, the triangle encloses exactly the
+enclosing rectangle.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the class of the new triangle.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>points</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>scale</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a scaling factor (must be larger than one).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6346"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLES-COMMON-EDGE"
+></A
+>gts_triangles_common_edge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    gts_triangles_common_edge       (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t1,
+                                             <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> common to both <TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>t1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>t2</I
+></TT
+>
+do not share any edge.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6380"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-NEIGHBOR-NUMBER"
+></A
+>gts_triangle_neighbor_number ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_triangle_neighbor_number    (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of triangles neighbors of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6403"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-NEIGHBORS"
+></A
+>gts_triangle_neighbors ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_triangle_neighbors          (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> neighbors of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6427"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-VERTICES-EDGES"
+></A
+>gts_triangle_vertices_edges ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_triangle_vertices_edges     (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v2,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v3,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> **e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> **e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> **e3);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+>, returns <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>v3</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+>. <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>
+has <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> as vertices, <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> has <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v3</I
+></TT
+> as vertices
+and <TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> has <TT
+CLASS="PARAMETER"
+><I
+>v3</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> as vertices. <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v3</I
+></TT
+> respects
+the orientation of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>. If <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> is not NULL, <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> are
+identical.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> belonging to the edges of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6518"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-VERTEX-OPPOSITE"
+></A
+>gts_triangle_vertex_opposite ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  gts_triangle_vertex_opposite    (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+>This function fails if <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> is not an edge of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>, vertex of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> which does not belong to <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6552"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-EDGE-OPPOSITE"
+></A
+>gts_triangle_edge_opposite ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>*    gts_triangle_edge_opposite      (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the edge of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> opposite <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is not a vertice of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6586"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-VERTICES"
+></A
+>gts_triangle_vertices ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_triangle_vertices           (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v2,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> **v3);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Fills <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v3</I
+></TT
+> with the oriented set of vertices, summits of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer on a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer on a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer on a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6625"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-VERTEX"
+></A
+>gts_triangle_vertex()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_triangle_vertex(t)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to the <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> not used by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>->e1.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6643"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-IS-OK"
+></A
+>gts_triangle_is_ok ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_triangle_is_ok              (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> is a non-degenerate, non-duplicate triangle,
+<TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6668"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-USE-EDGES"
+></A
+>gts_triangle_use_edges ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>* gts_triangle_use_edges         (<A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e1,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e2,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e3);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> having <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> as edges or <TT
+CLASS="LITERAL"
+>NULL</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>e1</I
+></TT
+>,
+<TT
+CLASS="PARAMETER"
+><I
+>e2</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>e3</I
+></TT
+> are not part of any triangle.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6710"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-CIRCUMCIRCLE-CENTER"
+></A
+>gts_triangle_circumcircle_center ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>*   gts_triangle_circumcircle_center
+                                            (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+> *point_class);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>point_class</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINTCLASS"
+>GtsPointClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>, center of the circumscribing circle of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> or
+<TT
+CLASS="LITERAL"
+>NULL</TT
+> if the circumscribing circle is not defined.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6741"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLE-IS-STABBED"
+></A
+>gts_triangle_is_stabbed ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+>*  gts_triangle_is_stabbed         (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t,
+                                             <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> *p,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> *orientation);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>orientation</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> one of the vertices of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>, one of the edges of <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> or <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> if
+any of these are stabbed by the ray starting at <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> (included) and
+ending at (<TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>->x, <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+>->y, +infty), <TT
+CLASS="LITERAL"
+>NULL</TT
+> otherwise. If the ray is
+contained in the plane of the triangle <TT
+CLASS="LITERAL"
+>NULL</TT
+> is also returned. If
+<TT
+CLASS="PARAMETER"
+><I
+>orientation</I
+></TT
+> is not <TT
+CLASS="LITERAL"
+>NULL</TT
+>, it is set to the value of the
+orientation of <TT
+CLASS="PARAMETER"
+><I
+>p</I
+></TT
+> relative to <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> (as given by
+<A
+HREF="gts-points.html#GTS-POINT-ORIENTATION-3D"
+>gts_point_orientation_3d</A
+>()).  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6788"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLES-ARE-FOLDED"
+></A
+>gts_triangles_are_folded ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_triangles_are_folded        (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *triangles,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *A,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *B,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> max);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given a list of triangles sharing <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>B</I
+></TT
+> as vertices, checks if any
+two triangles in the list make an angle larger than a given value defined
+by <TT
+CLASS="PARAMETER"
+><I
+>max</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>triangles</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>B</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>max</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum value of the square of the cosine of the angle between
+two triangles.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if any pair of triangles in <TT
+CLASS="PARAMETER"
+><I
+>triangles</I
+></TT
+> makes an angle larger 
+than the maximum value, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6833"
+></A
+><H3
+><A
+NAME="GTS-TRIANGLES-FROM-EDGES"
+></A
+>gts_triangles_from_edges ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_triangles_from_edges        (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *edges);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Builds a list of unique triangles which have one of their edges in <TT
+CLASS="PARAMETER"
+><I
+>edges</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>edges</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the list of triangles.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-edges.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-faces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Edges</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Faces</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-vectors-and-matrices.html b/doc/html/gts-vectors-and-matrices.html
new file mode 100644
index 0000000..d83658c
--- /dev/null
+++ b/doc/html/gts-vectors-and-matrices.html
@@ -0,0 +1,2699 @@
+<HTML
+><HEAD
+><TITLE
+>Vectors and matrices</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Basic Macros, functions and data structures"
+HREF="c4.html"><LINK
+REL="PREVIOUS"
+TITLE="First In First Out heaps"
+HREF="gts-first-in-first-out-heaps.html"><LINK
+REL="NEXT"
+TITLE="Simple statistics"
+HREF="gts-simple-statistics.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-first-in-first-out-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-simple-statistics.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-VECTORS-AND-MATRICES"
+>Vectors and matrices</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN1051"
+></A
+><H2
+>Name</H2
+>Vectors and matrices -- simple operations on vectors and matrices.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN1054"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+typedef     <A
+HREF="gts-vectors-and-matrices.html#GTSVECTOR[3]"
+>GtsVector[3]</A
+>;
+
+#define     <A
+HREF="gts-vectors-and-matrices.html#GTS-VECTOR-INIT"
+>gts_vector_init</A
+>                 (v, p1, p2)
+#define     <A
+HREF="gts-vectors-and-matrices.html#GTS-VECTOR-SCALAR"
+>gts_vector_scalar</A
+>               (v1, v2)
+#define     <A
+HREF="gts-vectors-and-matrices.html#GTS-VECTOR-CROSS"
+>gts_vector_cross</A
+>                (C,A,B)
+void        <A
+HREF="gts-vectors-and-matrices.html#GTS-VECTOR-PRINT"
+>gts_vector_print</A
+>                (<GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> v,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+
+typedef     <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>;
+
+<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-NEW"
+>gts_matrix_new</A
+>                  (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a00,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a01,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a02,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a10,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a11,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a12,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a20,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a21,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a22);
+void        <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-ASSIGN"
+>gts_matrix_assign</A
+>               (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a00,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a01,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a02,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a10,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a11,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a12,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a20,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a21,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a22);
+<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-TRANSPOSE"
+>gts_matrix_transpose</A
+>            (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);
+<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-DETERMINANT"
+>gts_matrix_determinant</A
+>          (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);
+<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-INVERSE"
+>gts_matrix_inverse</A
+>              (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);
+<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-PROJECTION"
+>gts_matrix_projection</A
+>           (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);
+<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-PRODUCT"
+>gts_matrix_product</A
+>              (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m1,
+                                             <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m2);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-COMPATIBLE-ROW"
+>gts_matrix_compatible_row</A
+>       (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *A,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> b,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> A1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> b1);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-QUADRATIC-OPTIMIZATION"
+>gts_matrix_quadratic_optimization</A
+>
+                                            (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *A,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> b,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n,
+                                             <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *H,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> c);
+void        <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-PRINT"
+>gts_matrix_print</A
+>                (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);
+void        <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-DESTROY"
+>gts_matrix_destroy</A
+>              (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1122"
+></A
+><H2
+>Description</H2
+><P
+>The functions described in this section allow to perform simple transformations on point coordinates. In particular projection onto a plane passing through the vertices of a given triangle or quadratic optimization problems.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN1125"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1127"
+></A
+><H3
+><A
+NAME="GTSVECTOR[3]"
+></A
+>GtsVector[3]</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef gdouble                  GtsVector[3];</PRE
+></TD
+></TR
+></TABLE
+><P
+>A <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> is just an array of three coordinates.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1133"
+></A
+><H3
+><A
+NAME="GTS-VECTOR-INIT"
+></A
+>gts_vector_init()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_vector_init(v, p1, p2)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given two points <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+>, fills <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> with the coordinates of vector <TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+>-><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>p2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>another <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1163"
+></A
+><H3
+><A
+NAME="GTS-VECTOR-SCALAR"
+></A
+>gts_vector_scalar()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_vector_scalar(v1, v2)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given two vectors <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> evaluates to the scalar product <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+>.<TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>another <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1187"
+></A
+><H3
+><A
+NAME="GTS-VECTOR-CROSS"
+></A
+>gts_vector_cross()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     gts_vector_cross(C,A,B)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given two vectors <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>B</I
+></TT
+> fills <TT
+CLASS="PARAMETER"
+><I
+>C</I
+></TT
+> with the coordinates of the cross-product <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+>^<TT
+CLASS="PARAMETER"
+><I
+>B</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>C</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>another <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>B</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>and another.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1216"
+></A
+><H3
+><A
+NAME="GTS-VECTOR-PRINT"
+></A
+>gts_vector_print ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_vector_print                (<GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> v,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Print <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> to file <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file descriptor.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1240"
+></A
+><H3
+><A
+NAME="GTSMATRIX"
+></A
+>GtsMatrix</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef GtsVector                GtsMatrix;</PRE
+></TD
+></TR
+></TABLE
+><P
+>A <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> is a 3x3 matrix.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1246"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-NEW"
+></A
+>gts_matrix_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  gts_matrix_new                  (<GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a00,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a01,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a02,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a10,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a11,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a12,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a20,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a21,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a22);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Allocates memory and initializes a new <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a00</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [0][0].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a01</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [0][1].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a02</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [0][2].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a10</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [1][0].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a11</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [1][1].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a12</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [1][2].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a20</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [2][0].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a21</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [2][1].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a22</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [2][2].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to the newly created <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1309"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-ASSIGN"
+></A
+>gts_matrix_assign ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_matrix_assign               (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a00,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a01,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a02,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a10,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a11,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a12,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a20,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a21,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> a22);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Set values of matrix elements.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a00</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [0][0].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a01</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [0][1].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a02</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [0][2].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a10</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [1][0].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a11</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [1][1].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a12</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [1][2].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a20</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [2][0].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a21</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [2][1].</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>a22</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> element [2][2].</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1371"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-TRANSPOSE"
+></A
+>gts_matrix_transpose ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  gts_matrix_transpose            (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to a newly created <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> transposed of <TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1395"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-DETERMINANT"
+></A
+>gts_matrix_determinant ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+>     gts_matrix_determinant          (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the value of the det(<TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+>).</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1418"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-INVERSE"
+></A
+>gts_matrix_inverse ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  gts_matrix_inverse              (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to a newly created <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> inverse of <TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>
+if <TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> is not invertible.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1444"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-PROJECTION"
+></A
+>gts_matrix_projection ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  gts_matrix_projection           (<A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> *t);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Creates a new <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> representing the projection onto a plane of normal
+given by <TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>t</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a pointer to the newly created <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1469"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-PRODUCT"
+></A
+>gts_matrix_product ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>*  gts_matrix_product              (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m1,
+                                             <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>, product of <TT
+CLASS="PARAMETER"
+><I
+>m1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>m2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1500"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-COMPATIBLE-ROW"
+></A
+>gts_matrix_compatible_row ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_matrix_compatible_row       (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *A,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> b,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> A1,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> b1);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Given a system of <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> constraints <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+>.x=<TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+> adds to it the compatible
+constraints defined by <TT
+CLASS="PARAMETER"
+><I
+>A1</I
+></TT
+>.x=<TT
+CLASS="PARAMETER"
+><I
+>b1</I
+></TT
+>. The compatibility is determined
+by insuring that the resulting system is well-conditioned (see
+Lindstrom and Turk (1998, 1999)).</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of previous constraints of <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+>.x=<TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>A1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>b1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of constraints of the resulting system.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1552"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-QUADRATIC-OPTIMIZATION"
+></A
+>gts_matrix_quadratic_optimization ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_matrix_quadratic_optimization
+                                            (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *A,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> b,
+                                             <GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> n,
+                                             <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *H,
+                                             <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+> c);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Solve a quadratic optimization problem: Given a quadratic objective function
+f which can be written as: f(x) = x^t.<TT
+CLASS="PARAMETER"
+><I
+>H</I
+></TT
+>.x + <TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+>^t.x + k, where <TT
+CLASS="PARAMETER"
+><I
+>H</I
+></TT
+> is the 
+symmetric positive definite Hessian of f and k is a constant, find the
+minimum of f subject to the set of <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> prior linear constraints, defined by
+the first <TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> rows of <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+> (<TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+>.x = <TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+>). The new constraints given by
+the minimization are added to <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+> only if they are linearly
+independent as determined by <A
+HREF="gts-vectors-and-matrices.html#GTS-MATRIX-COMPATIBLE-ROW"
+>gts_matrix_compatible_row</A
+>().</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of constraints (must be smaller than 3).</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>H</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a symmetric positive definite Hessian.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>c</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <GTKDOCLINK
+HREF="GTSVECTOR"
+>GtsVector</GTKDOCLINK
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new number of constraints defined by <TT
+CLASS="PARAMETER"
+><I
+>A</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>b</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1610"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-PRINT"
+></A
+>gts_matrix_print ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_matrix_print                (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m,
+                                             <GTKDOCLINK
+HREF="FILE-CAPS"
+>FILE</GTKDOCLINK
+> *fptr);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Print <TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> to file <TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>fptr</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a file descriptor.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1634"
+></A
+><H3
+><A
+NAME="GTS-MATRIX-DESTROY"
+></A
+>gts_matrix_destroy ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_matrix_destroy              (<A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+> *m);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Free all the memory allocated for <TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>m</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vectors-and-matrices.html#GTSMATRIX"
+>GtsMatrix</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-first-in-first-out-heaps.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c4.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-simple-statistics.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>First In First Out heaps</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Simple statistics</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-vertex-split.html b/doc/html/gts-vertex-split.html
new file mode 100644
index 0000000..94f4c38
--- /dev/null
+++ b/doc/html/gts-vertex-split.html
@@ -0,0 +1,1972 @@
+<HTML
+><HEAD
+><TITLE
+>Vertex split</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Progressive and Hierarchical surfaces"
+HREF="c12040.html"><LINK
+REL="PREVIOUS"
+TITLE="Progressive and Hierarchical surfaces"
+HREF="c12040.html"><LINK
+REL="NEXT"
+TITLE="Progressive surfaces"
+HREF="gts-progressive-surfaces.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-progressive-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-VERTEX-SPLIT"
+>Vertex split</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN12047"
+></A
+><H2
+>Name</H2
+>Vertex split -- object encoding a reversible edge-collapse operation.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN12050"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-vertex-split.html#GTS-SPLIT-CLASS-CAPS"
+>GTS_SPLIT_CLASS</A
+>                 (klass)
+#define     <A
+HREF="gts-vertex-split.html#GTS-SPLIT-CAPS"
+>GTS_SPLIT</A
+>                       (obj)
+#define     <A
+HREF="gts-vertex-split.html#GTS-IS-SPLIT-CAPS"
+>GTS_IS_SPLIT</A
+>                    (obj)
+#define     <A
+HREF="gts-vertex-split.html#GTS-SPLIT-V1-CAPS"
+>GTS_SPLIT_V1</A
+>                    (vs)
+#define     <A
+HREF="gts-vertex-split.html#GTS-SPLIT-V2-CAPS"
+>GTS_SPLIT_V2</A
+>                    (vs)
+struct      <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>;
+struct      <A
+HREF="gts-vertex-split.html#GTSSPLITCFACE"
+>GtsSplitCFace</A
+>;
+struct      <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>;
+
+<A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>* <A
+HREF="gts-vertex-split.html#GTS-SPLIT-CLASS"
+>gts_split_class</A
+>              (void);
+<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   <A
+HREF="gts-vertex-split.html#GTS-SPLIT-NEW"
+>gts_split_new</A
+>                   (<A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> *klass,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *o1,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *o2);
+void        <A
+HREF="gts-vertex-split.html#GTS-SPLIT-COLLAPSE"
+>gts_split_collapse</A
+>              (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs,
+                                             <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);
+void        <A
+HREF="gts-vertex-split.html#GTS-SPLIT-EXPAND"
+>gts_split_expand</A
+>                (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *klass);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-vertex-split.html#GTS-SPLIT-HEIGHT"
+>gts_split_height</A
+>                (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *root);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    (<A
+HREF="gts-vertex-split.html#GTSSPLITTRAVERSEFUNC"
+>*GtsSplitTraverseFunc</A
+>)         (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);
+void        <A
+HREF="gts-vertex-split.html#GTS-SPLIT-TRAVERSE"
+>gts_split_traverse</A
+>              (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *root,
+                                             <GTKDOCLINK
+HREF="GTRAVERSETYPE"
+>GTraverseType</GTKDOCLINK
+> order,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> depth,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITTRAVERSEFUNC"
+>GtsSplitTraverseFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN12090"
+></A
+><H2
+>Description</H2
+><P
+>The vertex split object is the building block of the progressive mesh representation proposed by Hoppe ("Progressive meshes", SIGGRAPH, 1996). It encodes an edge collapse operation and its inverse the "vertex split". The implementation of vertex split in GTS is somewhat more general than the original version of Hoppe. Non-manifold edges can be collapsed and non-manifold vertices can be split.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN12093"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12095"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-CLASS-CAPS"
+></A
+>GTS_SPLIT_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SPLIT_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12112"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-CAPS"
+></A
+>GTS_SPLIT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SPLIT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12129"
+></A
+><H3
+><A
+NAME="GTS-IS-SPLIT-CAPS"
+></A
+>GTS_IS_SPLIT()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_SPLIT(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12146"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-V1-CAPS"
+></A
+>GTS_SPLIT_V1()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SPLIT_V1(vs)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to the first vertex of the edge collapsed by <TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12162"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-V2-CAPS"
+></A
+>GTS_SPLIT_V2()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_SPLIT_V2(vs)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to the second vertex of the edge collapsed by <TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12178"
+></A
+><H3
+><A
+NAME="GTSSPLITCLASS"
+></A
+>struct GtsSplitClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSplitClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The vertex split class.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12183"
+></A
+><H3
+><A
+NAME="GTSSPLITCFACE"
+></A
+>struct GtsSplitCFace</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSplitCFace;</PRE
+></TD
+></TR
+></TABLE
+><P
+>An opaque structure describing the faces collapsed by a vertex split.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12188"
+></A
+><H3
+><A
+NAME="GTSSPLIT"
+></A
+>struct GtsSplit</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsSplit {
+  GtsObject object;
+
+  GtsVertex * v;
+  GtsObject * v1;
+  GtsObject * v2;
+  GtsSplitCFace * cfaces;
+  guint ncf;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The vertex split object. If <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> is a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> the corresponding vertex can be found in GTS_SPLIT(v1)->v. This conversion is performed directly by the two macros <A
+HREF="gts-vertex-split.html#GTS-SPLIT-V1-CAPS"
+>GTS_SPLIT_V1</A
+> and <A
+HREF="gts-vertex-split.html#GTS-SPLIT-V2-CAPS"
+>GTS_SPLIT_V2</A
+>. Together with the current <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>, <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> define one level of a vertex split tree. If <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> or <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> are both <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>, the current vertex split is a leaf of the tree.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>object</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>v</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Vertex to be split.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>v1</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Either a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> or <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>, first vertex of the edge to be expanded.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>v2</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Either a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> or <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>, second vertex of the edge to be expanded.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-vertex-split.html#GTSSPLITCFACE"
+>GtsSplitCFace</A
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>cfaces</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>An array of <A
+HREF="gts-vertex-split.html#GTSSPLITCFACE"
+>GtsSplitCFace</A
+> describing the faces collapsed by the vertex split.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>ncf</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Number of faces collapsed in <TT
+CLASS="PARAMETER"
+><I
+>cfaces</I
+></TT
+>.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12244"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-CLASS"
+></A
+>gts_split_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>* gts_split_class              (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12261"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-NEW"
+></A
+>gts_split_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>*   gts_split_new                   (<A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+> *klass,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *o1,
+                                             <A
+HREF="gts-object-class.html#GTSOBJECT"
+>GtsObject</A
+> *o2);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Creates a new <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> which would collapse <TT
+CLASS="PARAMETER"
+><I
+>o1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>o2</I
+></TT
+> into <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+>. The 
+collapse itself is not performed.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertex-split.html#GTSSPLITCLASS"
+>GtsSplitClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>o1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> either a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> or a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>o2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> either a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> or a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12308"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-COLLAPSE"
+></A
+>gts_split_collapse ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_split_collapse              (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs,
+                                             <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> *heap);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Collapses the vertex split <TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+>. Any new edge created during the process will
+be of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>. If heap is not <TT
+CLASS="LITERAL"
+>NULL</TT
+>, the new edges will be inserted
+into it and the destroyed edges will be removed from it.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>heap</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-extended-binary-heaps.html#GTSEHEAP"
+>GtsEHeap</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12341"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-EXPAND"
+></A
+>gts_split_expand ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_split_expand                (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *s,
+                                             <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+> *klass);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Expands the vertex split <TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+> adding the newly created faces to <TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+>. Any 
+new edge will be of class <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>s</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGECLASS"
+>GtsEdgeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12373"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-HEIGHT"
+></A
+>gts_split_height ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_split_height                (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *root);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>root</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum height of the vertex split tree having <TT
+CLASS="PARAMETER"
+><I
+>root</I
+></TT
+> as root.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12396"
+></A
+><H3
+><A
+NAME="GTSSPLITTRAVERSEFUNC"
+></A
+>GtsSplitTraverseFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    (*GtsSplitTraverseFunc)         (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *vs,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>A user-defined function to be called when traversing a vertex split tree.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vs</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> for which this function is called.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>user data passed to the function.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><TT
+CLASS="LITERAL"
+>TRUE</TT
+> to stop the traversal, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> to continue.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN12424"
+></A
+><H3
+><A
+NAME="GTS-SPLIT-TRAVERSE"
+></A
+>gts_split_traverse ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_split_traverse              (<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> *root,
+                                             <GTKDOCLINK
+HREF="GTRAVERSETYPE"
+>GTraverseType</GTKDOCLINK
+> order,
+                                             <GTKDOCLINK
+HREF="GINT"
+>gint</GTKDOCLINK
+> depth,
+                                             <A
+HREF="gts-vertex-split.html#GTSSPLITTRAVERSEFUNC"
+>GtsSplitTraverseFunc</A
+> func,
+                                             <GTKDOCLINK
+HREF="GPOINTER"
+>gpointer</GTKDOCLINK
+> data);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Traverses the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> tree having <TT
+CLASS="PARAMETER"
+><I
+>root</I
+></TT
+> as root. Calls <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> for each
+<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> of the tree in the order specified by <TT
+CLASS="PARAMETER"
+><I
+>order</I
+></TT
+>. If order is set
+to G_PRE_ORDER <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> is called for the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> then its children, if order
+is set to G_POST_ORDER <TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> is called for the children and then for the
+<A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>root</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-vertex-split.html#GTSSPLIT"
+>GtsSplit</A
+> to start the traversal from.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>order</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>depth</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum depth of the traversal. Nodes below this depth
+will not be visited. If depth is -1 all nodes in the tree are
+visited. If depth is 1, only the root is visited. If depth is 2,
+the root and its children are visited. And so on.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>func</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the function to call for each visited <A
+HREF="gts-hierarchical-vertex-split.html#GTSHSPLIT"
+>GtsHSplit</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>data</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> user data to pass to the function.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c12040.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-progressive-surfaces.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Progressive and Hierarchical surfaces</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Progressive surfaces</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-vertices.html b/doc/html/gts-vertices.html
new file mode 100644
index 0000000..b03dad3
--- /dev/null
+++ b/doc/html/gts-vertices.html
@@ -0,0 +1,2659 @@
+<HTML
+><HEAD
+><TITLE
+>Vertices</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Geometrical Object Hierarchy"
+HREF="c1908.html"><LINK
+REL="PREVIOUS"
+TITLE="Points"
+HREF="gts-points.html"><LINK
+REL="NEXT"
+TITLE="Segments"
+HREF="gts-segments.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-points.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-segments.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-VERTICES"
+>Vertices</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN4135"
+></A
+><H2
+>Name</H2
+>Vertices -- vertex object and related functions.</DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN4138"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-vertices.html#GTS-VERTEX-CLASS-CAPS"
+>GTS_VERTEX_CLASS</A
+>                (klass)
+#define     <A
+HREF="gts-vertices.html#GTS-VERTEX-CAPS"
+>GTS_VERTEX</A
+>                      (obj)
+#define     <A
+HREF="gts-vertices.html#GTS-IS-VERTEX-CAPS"
+>GTS_IS_VERTEX</A
+>                   (obj)
+struct      <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>;
+struct      <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>;
+
+<A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>* <A
+HREF="gts-vertices.html#GTS-VERTEX-CLASS"
+>gts_vertex_class</A
+>            (void);
+<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  <A
+HREF="gts-vertices.html#GTS-VERTEX-NEW"
+>gts_vertex_new</A
+>                  (<A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-vertices.html#GTS-VERTEX-IS-UNATTACHED"
+>gts_vertex_is_unattached</A
+>        (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-vertices.html#GTS-VERTEX-IS-BOUNDARY"
+>gts_vertex_is_boundary</A
+>          (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       <A
+HREF="gts-vertices.html#GTS-VERTEX-IS-CONTACT"
+>gts_vertex_is_contact</A
+>           (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> sever);
+<A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>* <A
+HREF="gts-vertices.html#GTS-VERTICES-ARE-CONNECTED"
+>gts_vertices_are_connected</A
+>      (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v2);
+void        <A
+HREF="gts-vertices.html#GTS-VERTEX-REPLACE"
+>gts_vertex_replace</A
+>              (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *with);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-vertices.html#GTS-VERTEX-NEIGHBORS"
+>gts_vertex_neighbors</A
+>            (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *list,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-vertices.html#GTS-VERTEX-TRIANGLES"
+>gts_vertex_triangles</A
+>            (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *list);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-vertices.html#GTS-VERTEX-FACES"
+>gts_vertex_faces</A
+>                (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *list);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-vertices.html#GTS-VERTEX-FAN-ORIENTED"
+>gts_vertex_fan_oriented</A
+>         (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);
+<GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    <A
+HREF="gts-vertices.html#GTS-VERTEX-ENCROACHES-EDGE"
+>gts_vertex_encroaches_edge</A
+>      (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);
+<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     <A
+HREF="gts-vertices.html#GTS-VERTICES-FROM-SEGMENTS"
+>gts_vertices_from_segments</A
+>      (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *segments);
+<GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+>*      <A
+HREF="gts-vertices.html#GTS-VERTICES-MERGE"
+>gts_vertices_merge</A
+>              (<GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+> *vertices,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> epsilon);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4201"
+></A
+><H2
+>Description</H2
+><P
+>Vertices are points used as endpoints of <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>. They are derived from <A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+>.</P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4206"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4208"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-CLASS-CAPS"
+></A
+>GTS_VERTEX_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_VERTEX_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> to <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4225"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-CAPS"
+></A
+>GTS_VERTEX()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_VERTEX(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Casts <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> to <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a descendant of <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4242"
+></A
+><H3
+><A
+NAME="GTS-IS-VERTEX-CAPS"
+></A
+>GTS_IS_VERTEX()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_VERTEX(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluates to <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> is a descendant of <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>, <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>a pointer to test.
+
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4260"
+></A
+><H3
+><A
+NAME="GTSVERTEXCLASS"
+></A
+>struct GtsVertexClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsVertexClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+>The vertex class. No virtual functions are associated.</P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4265"
+></A
+><H3
+><A
+NAME="GTSVERTEX"
+></A
+>struct GtsVertex</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsVertex {
+  GtsPoint p;
+  
+  GSList * segments;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+>The vertex object.</P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFF0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><A
+HREF="gts-points.html#GTSPOINT"
+>GtsPoint</A
+> <TT
+CLASS="STRUCTFIELD"
+><I
+>p</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>The parent object.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="LEFT"
+VALIGN="TOP"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *<TT
+CLASS="STRUCTFIELD"
+><I
+>segments</I
+></TT
+></TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>Contains all the <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> using this vertex as one of their endpoints.
</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4286"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-CLASS"
+></A
+>gts_vertex_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>* gts_vertex_class            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4303"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-NEW"
+></A
+>gts_vertex_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>*  gts_vertex_new                  (<A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> x,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> y,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> z);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEXCLASS"
+>GtsVertexClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>x</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the x-coordinate of the vertex to create.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>y</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the y-coordinate of the vertex to create.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>z</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the y-coordinate of the vertex to create.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> with <TT
+CLASS="PARAMETER"
+><I
+>x</I
+></TT
+>, <TT
+CLASS="PARAMETER"
+><I
+>y</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>z</I
+></TT
+> as coordinates.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4344"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-IS-UNATTACHED"
+></A
+>gts_vertex_is_unattached ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_vertex_is_unattached        (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is not the endpoint of any <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>, 
+<TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4370"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-IS-BOUNDARY"
+></A
+>gts_vertex_is_boundary ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_vertex_is_boundary          (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is used by a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> boundary of <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> as
+determined by <A
+HREF="gts-edges.html#GTS-EDGE-IS-BOUNDARY"
+>gts_edge_is_boundary</A
+>(), <TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4405"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-IS-CONTACT"
+></A
+>gts_vertex_is_contact ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GUINT"
+>guint</GTKDOCLINK
+>       gts_vertex_is_contact           (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+> sever);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.  </TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>sever</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> if <TT
+CLASS="LITERAL"
+>TRUE</TT
+> and if <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is a contact vertex between two or more
+sets of connected triangles replaces it with as many vertices,
+clones of <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of sets of connected triangles sharing <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> as a
+contact vertex.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4436"
+></A
+><H3
+><A
+NAME="GTS-VERTICES-ARE-CONNECTED"
+></A
+>gts_vertices_are_connected ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>* gts_vertices_are_connected      (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v1,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v2);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> if <TT
+CLASS="PARAMETER"
+><I
+>v1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>v2</I
+></TT
+> are the vertices of the same <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>
+this segment else <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4468"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-REPLACE"
+></A
+>gts_vertex_replace ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        gts_vertex_replace              (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *with);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Replaces vertex <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> with vertex <TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+>. <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+> must be
+different.  All the <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> which have <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> has one of their
+vertices are updated.  The segments list of vertex <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is freed and
+<TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+>->segments is set to <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>with</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4500"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-NEIGHBORS"
+></A
+>gts_vertex_neighbors ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_vertex_neighbors            (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *list,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds to <TT
+CLASS="PARAMETER"
+><I
+>list</I
+></TT
+> all the <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> connected to <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> by a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> and not
+already in <TT
+CLASS="PARAMETER"
+><I
+>list</I
+></TT
+>. If <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> is not <TT
+CLASS="LITERAL"
+>NULL</TT
+> only the vertices connected to
+<TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> by an edge belonging to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> are considered.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>list</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new list of unique <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4545"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-TRIANGLES"
+></A
+>gts_vertex_triangles ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_vertex_triangles            (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *list);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds all the <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> which share <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> as a vertex and do not
+already belong to <TT
+CLASS="PARAMETER"
+><I
+>list</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>list</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new list of unique <A
+HREF="gts-triangles.html#GTSTRIANGLE"
+>GtsTriangle</A
+> which share <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> as a
+vertex.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4578"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-FACES"
+></A
+>gts_vertex_faces ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_vertex_faces                (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface,
+                                             <GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *list);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Adds all the <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> (if not <TT
+CLASS="LITERAL"
+>NULL</TT
+>) which share 
+<TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> as a vertex and do not already belong to <TT
+CLASS="PARAMETER"
+><I
+>list</I
+></TT
+>.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> or <TT
+CLASS="LITERAL"
+>NULL</TT
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>list</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the new list of unique <A
+HREF="gts-faces.html#GTSFACE"
+>GtsFace</A
+> belonging to <TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> 
+which share <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> as a vertex.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4621"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-FAN-ORIENTED"
+></A
+>gts_vertex_fan_oriented ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_vertex_fan_oriented         (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+> *surface);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-surfaces.html#GTSSURFACE"
+>GtsSurface</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> describing in counterclockwise order the 
+boundary of the fan of summit <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+>, the faces of the fan belonging to 
+<TT
+CLASS="PARAMETER"
+><I
+>surface</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4652"
+></A
+><H3
+><A
+NAME="GTS-VERTEX-ENCROACHES-EDGE"
+></A
+>gts_vertex_encroaches_edge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GBOOLEAN"
+>gboolean</GTKDOCLINK
+>    gts_vertex_encroaches_edge      (<A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+> *v,
+                                             <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+> *e);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-edges.html#GTSEDGE"
+>GtsEdge</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> <TT
+CLASS="LITERAL"
+>TRUE</TT
+> if <TT
+CLASS="PARAMETER"
+><I
+>v</I
+></TT
+> is strictly contained in the diametral circle of <TT
+CLASS="PARAMETER"
+><I
+>e</I
+></TT
+>,
+<TT
+CLASS="LITERAL"
+>FALSE</TT
+> otherwise.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4684"
+></A
+><H3
+><A
+NAME="GTS-VERTICES-FROM-SEGMENTS"
+></A
+>gts_vertices_from_segments ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+>*     gts_vertices_from_segments      (<GTKDOCLINK
+HREF="GSLIST"
+>GSList</GTKDOCLINK
+> *segments);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>segments</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>, vertices of a <A
+HREF="gts-segments.html#GTSSEGMENT"
+>GtsSegment</A
+> in <TT
+CLASS="PARAMETER"
+><I
+>segments</I
+></TT
+>.
+Each element in the list is unique (no duplicates).</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4709"
+></A
+><H3
+><A
+NAME="GTS-VERTICES-MERGE"
+></A
+>gts_vertices_merge ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+>*      gts_vertices_merge              (<GTKDOCLINK
+HREF="GLIST"
+>GList</GTKDOCLINK
+> *vertices,
+                                             <GTKDOCLINK
+HREF="GDOUBLE"
+>gdouble</GTKDOCLINK
+> epsilon);</PRE
+></TD
+></TR
+></TABLE
+><P
+>For each vertex v in <TT
+CLASS="PARAMETER"
+><I
+>vertices</I
+></TT
+> look if there are any vertex of
+<TT
+CLASS="PARAMETER"
+><I
+>vertices</I
+></TT
+> contained in a box centered on v of size 2*<TT
+CLASS="PARAMETER"
+><I
+>epsilon</I
+></TT
+>. If
+there are, replace them with v (using <A
+HREF="gts-vertices.html#GTS-VERTEX-REPLACE"
+>gts_vertex_replace</A
+>()),
+destroy them and remove them from list.  This is done efficiently
+using Kd-Trees.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>vertices</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a list of <A
+HREF="gts-vertices.html#GTSVERTEX"
+>GtsVertex</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>epsilon</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> half the size of the bounding box to consider for each vertex.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the updated list of vertices.  </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-points.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c1908.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-segments.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Points</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Segments</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gts-weighted-graph.html b/doc/html/gts-weighted-graph.html
new file mode 100644
index 0000000..a4b7c23
--- /dev/null
+++ b/doc/html/gts-weighted-graph.html
@@ -0,0 +1,1696 @@
+<HTML
+><HEAD
+><TITLE
+>Weighted graph</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
+REL="HOME"
+TITLE="GTS Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Graph and operations on graphs"
+HREF="c13676.html"><LINK
+REL="PREVIOUS"
+TITLE="Graph class"
+HREF="gts-graph-class.html"><LINK
+REL="NEXT"
+TITLE="Progressive graph"
+HREF="gts-progressive-graph.html"></HEAD
+><BODY
+CLASS="REFENTRY"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>GTS Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-graph-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-progressive-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+><A
+NAME="GTS-WEIGHTED-GRAPH"
+>Weighted graph</A
+></H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN14884"
+></A
+><H2
+>Name</H2
+>Weighted graph -- </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN14887"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>
#include <gts.h>
+
+
+#define     <A
+HREF="gts-weighted-graph.html#GTS-WGEDGE-CLASS-CAPS"
+>GTS_WGEDGE_CLASS</A
+>                (klass)
+#define     <A
+HREF="gts-weighted-graph.html#GTS-WGEDGE-CAPS"
+>GTS_WGEDGE</A
+>                      (obj)
+#define     <A
+HREF="gts-weighted-graph.html#GTS-IS-WGEDGE-CAPS"
+>GTS_IS_WGEDGE</A
+>                   (obj)
+struct      <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+>;
+struct      <A
+HREF="gts-weighted-graph.html#GTSWGEDGE"
+>GtsWGEdge</A
+>;
+
+<A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+>* <A
+HREF="gts-weighted-graph.html#GTS-WGEDGE-CLASS"
+>gts_wgedge_class</A
+>            (void);
+<A
+HREF="gts-weighted-graph.html#GTSWGEDGE"
+>GtsWGEdge</A
+>*  <A
+HREF="gts-weighted-graph.html#GTS-WGEDGE-NEW"
+>gts_wgedge_new</A
+>                  (<A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n1,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n2,
+                                             <GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+> weight);
+
+#define     <A
+HREF="gts-weighted-graph.html#GTS-WGNODE-CLASS-CAPS"
+>GTS_WGNODE_CLASS</A
+>                (klass)
+#define     <A
+HREF="gts-weighted-graph.html#GTS-WGNODE-CAPS"
+>GTS_WGNODE</A
+>                      (obj)
+#define     <A
+HREF="gts-weighted-graph.html#GTS-IS-WGNODE-CAPS"
+>GTS_IS_WGNODE</A
+>                   (obj)
+struct      <A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+>;
+struct      <A
+HREF="gts-weighted-graph.html#GTSWGNODE"
+>GtsWGNode</A
+>;
+
+<A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+>* <A
+HREF="gts-weighted-graph.html#GTS-WGNODE-CLASS"
+>gts_wgnode_class</A
+>            (void);
+<A
+HREF="gts-weighted-graph.html#GTSWGNODE"
+>GtsWGNode</A
+>*  <A
+HREF="gts-weighted-graph.html#GTS-WGNODE-NEW"
+>gts_wgnode_new</A
+>                  (<A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+> weight);
+
+#define     <A
+HREF="gts-weighted-graph.html#GTS-WGRAPH-CLASS-CAPS"
+>GTS_WGRAPH_CLASS</A
+>                (klass)
+#define     <A
+HREF="gts-weighted-graph.html#GTS-WGRAPH-CAPS"
+>GTS_WGRAPH</A
+>                      (obj)
+#define     <A
+HREF="gts-weighted-graph.html#GTS-IS-WGRAPH-CAPS"
+>GTS_IS_WGRAPH</A
+>                   (obj)
+struct      <A
+HREF="gts-weighted-graph.html#GTSWGRAPHCLASS"
+>GtsWGraphClass</A
+>;
+struct      <A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+>;
+
+<A
+HREF="gts-weighted-graph.html#GTSWGRAPHCLASS"
+>GtsWGraphClass</A
+>* <A
+HREF="gts-weighted-graph.html#GTS-WGRAPH-CLASS"
+>gts_wgraph_class</A
+>            (void);
+<GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      <A
+HREF="gts-weighted-graph.html#GTS-WGRAPH-WEIGHT-MAX"
+>gts_wgraph_weight_max</A
+>           (<A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+> *wg);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN14924"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN14927"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14929"
+></A
+><H3
+><A
+NAME="GTS-WGEDGE-CLASS-CAPS"
+></A
+>GTS_WGEDGE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_WGEDGE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14943"
+></A
+><H3
+><A
+NAME="GTS-WGEDGE-CAPS"
+></A
+>GTS_WGEDGE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_WGEDGE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14957"
+></A
+><H3
+><A
+NAME="GTS-IS-WGEDGE-CAPS"
+></A
+>GTS_IS_WGEDGE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_WGEDGE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14971"
+></A
+><H3
+><A
+NAME="GTSWGEDGECLASS"
+></A
+>struct GtsWGEdgeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsWGEdgeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14976"
+></A
+><H3
+><A
+NAME="GTSWGEDGE"
+></A
+>struct GtsWGEdge</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsWGEdge {
+  GtsGEdge gedge;
+
+  gfloat weight;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14981"
+></A
+><H3
+><A
+NAME="GTS-WGEDGE-CLASS"
+></A
+>gts_wgedge_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+>* gts_wgedge_class            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14998"
+></A
+><H3
+><A
+NAME="GTS-WGEDGE-NEW"
+></A
+>gts_wgedge_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-weighted-graph.html#GTSWGEDGE"
+>GtsWGEdge</A
+>*  gts_wgedge_new                  (<A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+> *klass,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n1,
+                                             <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+> *n2,
+                                             <GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+> weight);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGEDGECLASS"
+>GtsWGEdgeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n1</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>n2</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> another <A
+HREF="gts-graph-class.html#GTSGNODE"
+>GtsGNode</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>weight</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the weight of the new edge.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-weighted-graph.html#GTSWGEDGE"
+>GtsWGEdge</A
+> of weight <TT
+CLASS="PARAMETER"
+><I
+>weight</I
+></TT
+> linking <TT
+CLASS="PARAMETER"
+><I
+>n1</I
+></TT
+> and <TT
+CLASS="PARAMETER"
+><I
+>n2</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15041"
+></A
+><H3
+><A
+NAME="GTS-WGNODE-CLASS-CAPS"
+></A
+>GTS_WGNODE_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_WGNODE_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15055"
+></A
+><H3
+><A
+NAME="GTS-WGNODE-CAPS"
+></A
+>GTS_WGNODE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_WGNODE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15069"
+></A
+><H3
+><A
+NAME="GTS-IS-WGNODE-CAPS"
+></A
+>GTS_IS_WGNODE()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_WGNODE(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15083"
+></A
+><H3
+><A
+NAME="GTSWGNODECLASS"
+></A
+>struct GtsWGNodeClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsWGNodeClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15088"
+></A
+><H3
+><A
+NAME="GTSWGNODE"
+></A
+>struct GtsWGNode</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsWGNode {
+  GtsGNode node;
+  
+  gfloat weight;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15093"
+></A
+><H3
+><A
+NAME="GTS-WGNODE-CLASS"
+></A
+>gts_wgnode_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+>* gts_wgnode_class            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15110"
+></A
+><H3
+><A
+NAME="GTS-WGNODE-NEW"
+></A
+>gts_wgnode_new ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-weighted-graph.html#GTSWGNODE"
+>GtsWGNode</A
+>*  gts_wgnode_new                  (<A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+> *klass,
+                                             <GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+> weight);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGNODECLASS"
+>GtsWGNodeClass</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>weight</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the weight of the <A
+HREF="gts-weighted-graph.html#GTSWGNODE"
+>GtsWGNode</A
+> to create.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a new <A
+HREF="gts-weighted-graph.html#GTSWGNODE"
+>GtsWGNode</A
+> of weight <TT
+CLASS="PARAMETER"
+><I
+>weight</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15140"
+></A
+><H3
+><A
+NAME="GTS-WGRAPH-CLASS-CAPS"
+></A
+>GTS_WGRAPH_CLASS()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_WGRAPH_CLASS(klass)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>klass</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15154"
+></A
+><H3
+><A
+NAME="GTS-WGRAPH-CAPS"
+></A
+>GTS_WGRAPH()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_WGRAPH(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15168"
+></A
+><H3
+><A
+NAME="GTS-IS-WGRAPH-CAPS"
+></A
+>GTS_IS_WGRAPH()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     GTS_IS_WGRAPH(obj)</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> </TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15182"
+></A
+><H3
+><A
+NAME="GTSWGRAPHCLASS"
+></A
+>struct GtsWGraphClass</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsWGraphClass;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15187"
+></A
+><H3
+><A
+NAME="GTSWGRAPH"
+></A
+>struct GtsWGraph</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct GtsWGraph {
+  GtsGraph graph;
+
+  gfloat weight;
+};</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15192"
+></A
+><H3
+><A
+NAME="GTS-WGRAPH-CLASS"
+></A
+>gts_wgraph_class ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gts-weighted-graph.html#GTSWGRAPHCLASS"
+>GtsWGraphClass</A
+>* gts_wgraph_class            (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the <A
+HREF="gts-weighted-graph.html#GTSWGRAPHCLASS"
+>GtsWGraphClass</A
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN15209"
+></A
+><H3
+><A
+NAME="GTS-WGRAPH-WEIGHT-MAX"
+></A
+>gts_wgraph_weight_max ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="GFLOAT"
+>gfloat</GTKDOCLINK
+>      gts_wgraph_weight_max           (<A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+> *wg);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>wg</I
+></TT
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> a <A
+HREF="gts-weighted-graph.html#GTSWGRAPH"
+>GtsWGraph</A
+>.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the maximum weight of any vertices belonging to <TT
+CLASS="PARAMETER"
+><I
+>g</I
+></TT
+>.</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR
+CLEAR="all"><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gts-graph-class.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><<< Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="c13676.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gts-progressive-graph.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page >>></B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Graph class</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Progressive graph</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/index.sgml b/doc/html/index.sgml
new file mode 100644
index 0000000..3293d45
--- /dev/null
+++ b/doc/html/index.sgml
@@ -0,0 +1,606 @@
+<ANCHOR id ="GTS-BINARY-HEAPS" href="gts/gts-binary-heaps.html">
+<ANCHOR id ="GTSHEAP" href="gts/gts-binary-heaps.html#GTSHEAP">
+<ANCHOR id ="GTS-HEAP-NEW" href="gts/gts-binary-heaps.html#GTS-HEAP-NEW">
+<ANCHOR id ="GTS-HEAP-INSERT" href="gts/gts-binary-heaps.html#GTS-HEAP-INSERT">
+<ANCHOR id ="GTS-HEAP-REMOVE-TOP" href="gts/gts-binary-heaps.html#GTS-HEAP-REMOVE-TOP">
+<ANCHOR id ="GTS-HEAP-TOP" href="gts/gts-binary-heaps.html#GTS-HEAP-TOP">
+<ANCHOR id ="GTS-HEAP-FREEZE" href="gts/gts-binary-heaps.html#GTS-HEAP-FREEZE">
+<ANCHOR id ="GTS-HEAP-THAW" href="gts/gts-binary-heaps.html#GTS-HEAP-THAW">
+<ANCHOR id ="GTS-HEAP-FOREACH" href="gts/gts-binary-heaps.html#GTS-HEAP-FOREACH">
+<ANCHOR id ="GTS-HEAP-SIZE" href="gts/gts-binary-heaps.html#GTS-HEAP-SIZE">
+<ANCHOR id ="GTS-HEAP-DESTROY" href="gts/gts-binary-heaps.html#GTS-HEAP-DESTROY">
+<ANCHOR id ="GTS-EXTENDED-BINARY-HEAPS" href="gts/gts-extended-binary-heaps.html">
+<ANCHOR id ="GTSEHEAPPAIR" href="gts/gts-extended-binary-heaps.html#GTSEHEAPPAIR">
+<ANCHOR id ="GTSKEYFUNC" href="gts/gts-extended-binary-heaps.html#GTSKEYFUNC">
+<ANCHOR id ="GTSEHEAP" href="gts/gts-extended-binary-heaps.html#GTSEHEAP">
+<ANCHOR id ="GTS-EHEAP-NEW" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-NEW">
+<ANCHOR id ="GTS-EHEAP-INSERT" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-INSERT">
+<ANCHOR id ="GTS-EHEAP-INSERT-WITH-KEY" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-INSERT-WITH-KEY">
+<ANCHOR id ="GTS-EHEAP-TOP" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-TOP">
+<ANCHOR id ="GTS-EHEAP-REMOVE-TOP" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-REMOVE-TOP">
+<ANCHOR id ="GTS-EHEAP-REMOVE" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-REMOVE">
+<ANCHOR id ="GTS-EHEAP-DECREASE-KEY" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-DECREASE-KEY">
+<ANCHOR id ="GTS-EHEAP-KEY" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-KEY">
+<ANCHOR id ="GTS-EHEAP-RANDOMIZED" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-RANDOMIZED">
+<ANCHOR id ="GTS-EHEAP-UPDATE" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-UPDATE">
+<ANCHOR id ="GTS-EHEAP-FREEZE" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-FREEZE">
+<ANCHOR id ="GTS-EHEAP-THAW" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-THAW">
+<ANCHOR id ="GTS-EHEAP-FOREACH" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-FOREACH">
+<ANCHOR id ="GTS-EHEAP-SIZE" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-SIZE">
+<ANCHOR id ="GTS-EHEAP-DESTROY" href="gts/gts-extended-binary-heaps.html#GTS-EHEAP-DESTROY">
+<ANCHOR id ="GTS-FIRST-IN-FIRST-OUT-HEAPS" href="gts/gts-first-in-first-out-heaps.html">
+<ANCHOR id ="GTSFIFO" href="gts/gts-first-in-first-out-heaps.html#GTSFIFO">
+<ANCHOR id ="GTS-FIFO-NEW" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-NEW">
+<ANCHOR id ="GTS-FIFO-PUSH" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-PUSH">
+<ANCHOR id ="GTS-FIFO-POP" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-POP">
+<ANCHOR id ="GTS-FIFO-TOP" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-TOP">
+<ANCHOR id ="GTS-FIFO-SIZE" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-SIZE">
+<ANCHOR id ="GTS-FIFO-FOREACH" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-FOREACH">
+<ANCHOR id ="GTS-FIFO-IS-EMPTY" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-IS-EMPTY">
+<ANCHOR id ="GTS-FIFO-WRITE" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-WRITE">
+<ANCHOR id ="GTS-FIFO-DESTROY" href="gts/gts-first-in-first-out-heaps.html#GTS-FIFO-DESTROY">
+<ANCHOR id ="GTS-VECTORS-AND-MATRICES" href="gts/gts-vectors-and-matrices.html">
+<ANCHOR id ="GTSVECTOR[3]" href="gts/gts-vectors-and-matrices.html#GTSVECTOR[3]">
+<ANCHOR id ="GTS-VECTOR-INIT" href="gts/gts-vectors-and-matrices.html#GTS-VECTOR-INIT">
+<ANCHOR id ="GTS-VECTOR-SCALAR" href="gts/gts-vectors-and-matrices.html#GTS-VECTOR-SCALAR">
+<ANCHOR id ="GTS-VECTOR-CROSS" href="gts/gts-vectors-and-matrices.html#GTS-VECTOR-CROSS">
+<ANCHOR id ="GTS-VECTOR-PRINT" href="gts/gts-vectors-and-matrices.html#GTS-VECTOR-PRINT">
+<ANCHOR id ="GTSMATRIX" href="gts/gts-vectors-and-matrices.html#GTSMATRIX">
+<ANCHOR id ="GTS-MATRIX-NEW" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-NEW">
+<ANCHOR id ="GTS-MATRIX-ASSIGN" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-ASSIGN">
+<ANCHOR id ="GTS-MATRIX-TRANSPOSE" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-TRANSPOSE">
+<ANCHOR id ="GTS-MATRIX-DETERMINANT" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-DETERMINANT">
+<ANCHOR id ="GTS-MATRIX-INVERSE" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-INVERSE">
+<ANCHOR id ="GTS-MATRIX-PROJECTION" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-PROJECTION">
+<ANCHOR id ="GTS-MATRIX-PRODUCT" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-PRODUCT">
+<ANCHOR id ="GTS-MATRIX-COMPATIBLE-ROW" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-COMPATIBLE-ROW">
+<ANCHOR id ="GTS-MATRIX-QUADRATIC-OPTIMIZATION" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-QUADRATIC-OPTIMIZATION">
+<ANCHOR id ="GTS-MATRIX-PRINT" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-PRINT">
+<ANCHOR id ="GTS-MATRIX-DESTROY" href="gts/gts-vectors-and-matrices.html#GTS-MATRIX-DESTROY">
+<ANCHOR id ="GTS-SIMPLE-STATISTICS" href="gts/gts-simple-statistics.html">
+<ANCHOR id ="GTSRANGE" href="gts/gts-simple-statistics.html#GTSRANGE">
+<ANCHOR id ="GTS-RANGE-INIT" href="gts/gts-simple-statistics.html#GTS-RANGE-INIT">
+<ANCHOR id ="GTS-RANGE-ADD-VALUE" href="gts/gts-simple-statistics.html#GTS-RANGE-ADD-VALUE">
+<ANCHOR id ="GTS-RANGE-UPDATE" href="gts/gts-simple-statistics.html#GTS-RANGE-UPDATE">
+<ANCHOR id ="GTS-RANGE-RESET" href="gts/gts-simple-statistics.html#GTS-RANGE-RESET">
+<ANCHOR id ="GTS-RANGE-PRINT" href="gts/gts-simple-statistics.html#GTS-RANGE-PRINT">
+<ANCHOR id ="GTS-MISCELLANEOUS-MACROS-AND-FUNCTIONS" href="gts/gts-miscellaneous-macros-and-functions.html">
+<ANCHOR id ="GTS-COMMENTS-CAPS" href="gts/gts-miscellaneous-macros-and-functions.html#GTS-COMMENTS-CAPS">
+<ANCHOR id ="GTS-GET-TOKEN" href="gts/gts-miscellaneous-macros-and-functions.html#GTS-GET-TOKEN">
+<ANCHOR id ="GTS-GET-NEWLINE" href="gts/gts-miscellaneous-macros-and-functions.html#GTS-GET-NEWLINE">
+<ANCHOR id ="GTS-OBJECT-CLASS" href="gts/gts-object-class.html">
+<ANCHOR id ="GTS-CLASS-NAME-LENGTH-CAPS" href="gts/gts-object-class.html#GTS-CLASS-NAME-LENGTH-CAPS">
+<ANCHOR id ="GTS-OBJECT-CLASS-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-CLASS-CAPS">
+<ANCHOR id ="GTS-OBJECT-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-CAPS">
+<ANCHOR id ="GTS-IS-OBJECT-CAPS" href="gts/gts-object-class.html#GTS-IS-OBJECT-CAPS">
+<ANCHOR id ="GTS-OBJECT-CLASS-CAST-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-CLASS-CAST-CAPS">
+<ANCHOR id ="GTS-OBJECT-CAST-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-CAST-CAPS">
+<ANCHOR id ="GTS-OBJECT-FLAGS-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-FLAGS-CAPS">
+<ANCHOR id ="GTS-OBJECT-SET-FLAGS-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-SET-FLAGS-CAPS">
+<ANCHOR id ="GTS-OBJECT-UNSET-FLAGS-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-UNSET-FLAGS-CAPS">
+<ANCHOR id ="GTS-OBJECT-DESTROYED-CAPS" href="gts/gts-object-class.html#GTS-OBJECT-DESTROYED-CAPS">
+<ANCHOR id ="GTSOBJECTCLASS" href="gts/gts-object-class.html#GTSOBJECTCLASS">
+<ANCHOR id ="GTSOBJECT" href="gts/gts-object-class.html#GTSOBJECT">
+<ANCHOR id ="GTSOBJECTCLASSINFO" href="gts/gts-object-class.html#GTSOBJECTCLASSINFO">
+<ANCHOR id ="GTSOBJECTCLASSINITFUNC" href="gts/gts-object-class.html#GTSOBJECTCLASSINITFUNC">
+<ANCHOR id ="GTSOBJECTINITFUNC" href="gts/gts-object-class.html#GTSOBJECTINITFUNC">
+<ANCHOR id ="GTSARGSETFUNC" href="gts/gts-object-class.html#GTSARGSETFUNC">
+<ANCHOR id ="GTSARGGETFUNC" href="gts/gts-object-class.html#GTSARGGETFUNC">
+<ANCHOR id ="GTSOBJECTFLAGS" href="gts/gts-object-class.html#GTSOBJECTFLAGS">
+<ANCHOR id ="GTSCOLOR" href="gts/gts-object-class.html#GTSCOLOR">
+<ANCHOR id ="GTS-OBJECT-CLASS" href="gts/gts-object-class.html#GTS-OBJECT-CLASS">
+<ANCHOR id ="GTS-OBJECT-CLASS-NEW" href="gts/gts-object-class.html#GTS-OBJECT-CLASS-NEW">
+<ANCHOR id ="GTS-OBJECT-CLASS-CHECK-CAST" href="gts/gts-object-class.html#GTS-OBJECT-CLASS-CHECK-CAST">
+<ANCHOR id ="GTS-OBJECT-CLASS-IS-FROM-CLASS" href="gts/gts-object-class.html#GTS-OBJECT-CLASS-IS-FROM-CLASS">
+<ANCHOR id ="GTS-OBJECT-CLASS-FROM-NAME" href="gts/gts-object-class.html#GTS-OBJECT-CLASS-FROM-NAME">
+<ANCHOR id ="GTS-OBJECT-NEW" href="gts/gts-object-class.html#GTS-OBJECT-NEW">
+<ANCHOR id ="GTS-OBJECT-INIT" href="gts/gts-object-class.html#GTS-OBJECT-INIT">
+<ANCHOR id ="GTS-OBJECT-CLONE" href="gts/gts-object-class.html#GTS-OBJECT-CLONE">
+<ANCHOR id ="GTS-OBJECT-ATTRIBUTES" href="gts/gts-object-class.html#GTS-OBJECT-ATTRIBUTES">
+<ANCHOR id ="GTS-OBJECT-CHECK-CAST" href="gts/gts-object-class.html#GTS-OBJECT-CHECK-CAST">
+<ANCHOR id ="GTS-OBJECT-IS-FROM-CLASS" href="gts/gts-object-class.html#GTS-OBJECT-IS-FROM-CLASS">
+<ANCHOR id ="GTS-OBJECT-RESET-RESERVED" href="gts/gts-object-class.html#GTS-OBJECT-RESET-RESERVED">
+<ANCHOR id ="GTS-OBJECT-DESTROY" href="gts/gts-object-class.html#GTS-OBJECT-DESTROY">
+<ANCHOR id ="GTS-CONTAINER-CLASSES" href="gts/gts-container-classes.html">
+<ANCHOR id ="GTS-CONTAINER-CLASS-CAPS" href="gts/gts-container-classes.html#GTS-CONTAINER-CLASS-CAPS">
+<ANCHOR id ="GTS-CONTAINER-CAPS" href="gts/gts-container-classes.html#GTS-CONTAINER-CAPS">
+<ANCHOR id ="GTS-IS-CONTAINER-CAPS" href="gts/gts-container-classes.html#GTS-IS-CONTAINER-CAPS">
+<ANCHOR id ="GTSCONTAINERCLASS" href="gts/gts-container-classes.html#GTSCONTAINERCLASS">
+<ANCHOR id ="GTSCONTAINER" href="gts/gts-container-classes.html#GTSCONTAINER">
+<ANCHOR id ="GTS-CONTAINER-CLASS" href="gts/gts-container-classes.html#GTS-CONTAINER-CLASS">
+<ANCHOR id ="GTS-CONTAINER-NEW" href="gts/gts-container-classes.html#GTS-CONTAINER-NEW">
+<ANCHOR id ="GTS-CONTAINER-ADD" href="gts/gts-container-classes.html#GTS-CONTAINER-ADD">
+<ANCHOR id ="GTS-CONTAINER-REMOVE" href="gts/gts-container-classes.html#GTS-CONTAINER-REMOVE">
+<ANCHOR id ="GTS-CONTAINER-SIZE" href="gts/gts-container-classes.html#GTS-CONTAINER-SIZE">
+<ANCHOR id ="GTS-CONTAINER-FOREACH" href="gts/gts-container-classes.html#GTS-CONTAINER-FOREACH">
+<ANCHOR id ="GTS-HASH-CONTAINER-CLASS-CAPS" href="gts/gts-container-classes.html#GTS-HASH-CONTAINER-CLASS-CAPS">
+<ANCHOR id ="GTS-HASH-CONTAINER-CAPS" href="gts/gts-container-classes.html#GTS-HASH-CONTAINER-CAPS">
+<ANCHOR id ="GTS-IS-HASH-CONTAINER-CAPS" href="gts/gts-container-classes.html#GTS-IS-HASH-CONTAINER-CAPS">
+<ANCHOR id ="GTSHASHCONTAINERCLASS" href="gts/gts-container-classes.html#GTSHASHCONTAINERCLASS">
+<ANCHOR id ="GTSHASHCONTAINER" href="gts/gts-container-classes.html#GTSHASHCONTAINER">
+<ANCHOR id ="GTS-HASH-CONTAINER-CLASS" href="gts/gts-container-classes.html#GTS-HASH-CONTAINER-CLASS">
+<ANCHOR id ="GTS-SLIST-CONTAINER-CLASS-CAPS" href="gts/gts-container-classes.html#GTS-SLIST-CONTAINER-CLASS-CAPS">
+<ANCHOR id ="GTS-SLIST-CONTAINER-CAPS" href="gts/gts-container-classes.html#GTS-SLIST-CONTAINER-CAPS">
+<ANCHOR id ="GTS-IS-SLIST-CONTAINER-CAPS" href="gts/gts-container-classes.html#GTS-IS-SLIST-CONTAINER-CAPS">
+<ANCHOR id ="GTSSLISTCONTAINERCLASS" href="gts/gts-container-classes.html#GTSSLISTCONTAINERCLASS">
+<ANCHOR id ="GTSSLISTCONTAINER" href="gts/gts-container-classes.html#GTSSLISTCONTAINER">
+<ANCHOR id ="GTS-SLIST-CONTAINER-CLASS" href="gts/gts-container-classes.html#GTS-SLIST-CONTAINER-CLASS">
+<ANCHOR id ="GTS-CONTAINEE-CLASSES" href="gts/gts-containee-classes.html">
+<ANCHOR id ="GTS-CONTAINEE-CLASS-CAPS" href="gts/gts-containee-classes.html#GTS-CONTAINEE-CLASS-CAPS">
+<ANCHOR id ="GTS-CONTAINEE-CAPS" href="gts/gts-containee-classes.html#GTS-CONTAINEE-CAPS">
+<ANCHOR id ="GTS-IS-CONTAINEE-CAPS" href="gts/gts-containee-classes.html#GTS-IS-CONTAINEE-CAPS">
+<ANCHOR id ="GTSCONTAINEECLASS" href="gts/gts-containee-classes.html#GTSCONTAINEECLASS">
+<ANCHOR id ="GTSCONTAINEE" href="gts/gts-containee-classes.html#GTSCONTAINEE">
+<ANCHOR id ="GTS-CONTAINEE-CLASS" href="gts/gts-containee-classes.html#GTS-CONTAINEE-CLASS">
+<ANCHOR id ="GTS-CONTAINEE-NEW" href="gts/gts-containee-classes.html#GTS-CONTAINEE-NEW">
+<ANCHOR id ="GTS-CONTAINEE-IS-CONTAINED" href="gts/gts-containee-classes.html#GTS-CONTAINEE-IS-CONTAINED">
+<ANCHOR id ="GTS-SLIST-CONTAINEE-CLASS-CAPS" href="gts/gts-containee-classes.html#GTS-SLIST-CONTAINEE-CLASS-CAPS">
+<ANCHOR id ="GTS-SLIST-CONTAINEE-CAPS" href="gts/gts-containee-classes.html#GTS-SLIST-CONTAINEE-CAPS">
+<ANCHOR id ="GTS-IS-SLIST-CONTAINEE-CAPS" href="gts/gts-containee-classes.html#GTS-IS-SLIST-CONTAINEE-CAPS">
+<ANCHOR id ="GTSSLISTCONTAINEECLASS" href="gts/gts-containee-classes.html#GTSSLISTCONTAINEECLASS">
+<ANCHOR id ="GTSSLISTCONTAINEE" href="gts/gts-containee-classes.html#GTSSLISTCONTAINEE">
+<ANCHOR id ="GTS-SLIST-CONTAINEE-CLASS" href="gts/gts-containee-classes.html#GTS-SLIST-CONTAINEE-CLASS">
+<ANCHOR id ="GTS-POINTS" href="gts/gts-points.html">
+<ANCHOR id ="GTS-POINT-CLASS-CAPS" href="gts/gts-points.html#GTS-POINT-CLASS-CAPS">
+<ANCHOR id ="GTS-POINT-CAPS" href="gts/gts-points.html#GTS-POINT-CAPS">
+<ANCHOR id ="GTS-IS-POINT-CAPS" href="gts/gts-points.html#GTS-IS-POINT-CAPS">
+<ANCHOR id ="GTSPOINTCLASS" href="gts/gts-points.html#GTSPOINTCLASS">
+<ANCHOR id ="GTSPOINT" href="gts/gts-points.html#GTSPOINT">
+<ANCHOR id ="GTS-POINT-CLASS" href="gts/gts-points.html#GTS-POINT-CLASS">
+<ANCHOR id ="GTS-POINT-NEW" href="gts/gts-points.html#GTS-POINT-NEW">
+<ANCHOR id ="GTS-POINT-SET" href="gts/gts-points.html#GTS-POINT-SET">
+<ANCHOR id ="GTS-POINT-IS-IN-RECTANGLE" href="gts/gts-points.html#GTS-POINT-IS-IN-RECTANGLE">
+<ANCHOR id ="GTS-SEGMENT-TRIANGLE-INTERSECTION" href="gts/gts-points.html#GTS-SEGMENT-TRIANGLE-INTERSECTION">
+<ANCHOR id ="GTS-POINT-TRANSFORM" href="gts/gts-points.html#GTS-POINT-TRANSFORM">
+<ANCHOR id ="GTS-POINT-DISTANCE" href="gts/gts-points.html#GTS-POINT-DISTANCE">
+<ANCHOR id ="GTS-POINT-DISTANCE2" href="gts/gts-points.html#GTS-POINT-DISTANCE2">
+<ANCHOR id ="GTS-POINT-ORIENTATION-3D" href="gts/gts-points.html#GTS-POINT-ORIENTATION-3D">
+<ANCHOR id ="GTSINTERSECT" href="gts/gts-points.html#GTSINTERSECT">
+<ANCHOR id ="GTS-POINT-IN-CIRCLE" href="gts/gts-points.html#GTS-POINT-IN-CIRCLE">
+<ANCHOR id ="GTS-POINT-IN-TRIANGLE-CIRCLE" href="gts/gts-points.html#GTS-POINT-IN-TRIANGLE-CIRCLE">
+<ANCHOR id ="GTS-POINT-IS-IN-TRIANGLE" href="gts/gts-points.html#GTS-POINT-IS-IN-TRIANGLE">
+<ANCHOR id ="GTS-POINT-ORIENTATION" href="gts/gts-points.html#GTS-POINT-ORIENTATION">
+<ANCHOR id ="GTS-POINT-SEGMENT-DISTANCE2" href="gts/gts-points.html#GTS-POINT-SEGMENT-DISTANCE2">
+<ANCHOR id ="GTS-POINT-SEGMENT-DISTANCE" href="gts/gts-points.html#GTS-POINT-SEGMENT-DISTANCE">
+<ANCHOR id ="GTS-POINT-SEGMENT-CLOSEST" href="gts/gts-points.html#GTS-POINT-SEGMENT-CLOSEST">
+<ANCHOR id ="GTS-POINT-TRIANGLE-DISTANCE" href="gts/gts-points.html#GTS-POINT-TRIANGLE-DISTANCE">
+<ANCHOR id ="GTS-POINT-TRIANGLE-CLOSEST" href="gts/gts-points.html#GTS-POINT-TRIANGLE-CLOSEST">
+<ANCHOR id ="GTS-POINT-TRIANGLE-DISTANCE2" href="gts/gts-points.html#GTS-POINT-TRIANGLE-DISTANCE2">
+<ANCHOR id ="GTS-POINT-IS-INSIDE-SURFACE" href="gts/gts-points.html#GTS-POINT-IS-INSIDE-SURFACE">
+<ANCHOR id ="GTS-VERTICES" href="gts/gts-vertices.html">
+<ANCHOR id ="GTS-VERTEX-CLASS-CAPS" href="gts/gts-vertices.html#GTS-VERTEX-CLASS-CAPS">
+<ANCHOR id ="GTS-VERTEX-CAPS" href="gts/gts-vertices.html#GTS-VERTEX-CAPS">
+<ANCHOR id ="GTS-IS-VERTEX-CAPS" href="gts/gts-vertices.html#GTS-IS-VERTEX-CAPS">
+<ANCHOR id ="GTSVERTEXCLASS" href="gts/gts-vertices.html#GTSVERTEXCLASS">
+<ANCHOR id ="GTSVERTEX" href="gts/gts-vertices.html#GTSVERTEX">
+<ANCHOR id ="GTS-VERTEX-CLASS" href="gts/gts-vertices.html#GTS-VERTEX-CLASS">
+<ANCHOR id ="GTS-VERTEX-NEW" href="gts/gts-vertices.html#GTS-VERTEX-NEW">
+<ANCHOR id ="GTS-VERTEX-IS-UNATTACHED" href="gts/gts-vertices.html#GTS-VERTEX-IS-UNATTACHED">
+<ANCHOR id ="GTS-VERTEX-IS-BOUNDARY" href="gts/gts-vertices.html#GTS-VERTEX-IS-BOUNDARY">
+<ANCHOR id ="GTS-VERTEX-IS-CONTACT" href="gts/gts-vertices.html#GTS-VERTEX-IS-CONTACT">
+<ANCHOR id ="GTS-VERTICES-ARE-CONNECTED" href="gts/gts-vertices.html#GTS-VERTICES-ARE-CONNECTED">
+<ANCHOR id ="GTS-VERTEX-REPLACE" href="gts/gts-vertices.html#GTS-VERTEX-REPLACE">
+<ANCHOR id ="GTS-VERTEX-NEIGHBORS" href="gts/gts-vertices.html#GTS-VERTEX-NEIGHBORS">
+<ANCHOR id ="GTS-VERTEX-TRIANGLES" href="gts/gts-vertices.html#GTS-VERTEX-TRIANGLES">
+<ANCHOR id ="GTS-VERTEX-FACES" href="gts/gts-vertices.html#GTS-VERTEX-FACES">
+<ANCHOR id ="GTS-VERTEX-FAN-ORIENTED" href="gts/gts-vertices.html#GTS-VERTEX-FAN-ORIENTED">
+<ANCHOR id ="GTS-VERTEX-ENCROACHES-EDGE" href="gts/gts-vertices.html#GTS-VERTEX-ENCROACHES-EDGE">
+<ANCHOR id ="GTS-VERTICES-FROM-SEGMENTS" href="gts/gts-vertices.html#GTS-VERTICES-FROM-SEGMENTS">
+<ANCHOR id ="GTS-VERTICES-MERGE" href="gts/gts-vertices.html#GTS-VERTICES-MERGE">
+<ANCHOR id ="GTS-SEGMENTS" href="gts/gts-segments.html">
+<ANCHOR id ="GTS-SEGMENT-CLASS-CAPS" href="gts/gts-segments.html#GTS-SEGMENT-CLASS-CAPS">
+<ANCHOR id ="GTS-SEGMENT-CAPS" href="gts/gts-segments.html#GTS-SEGMENT-CAPS">
+<ANCHOR id ="GTS-IS-SEGMENT-CAPS" href="gts/gts-segments.html#GTS-IS-SEGMENT-CAPS">
+<ANCHOR id ="GTSSEGMENTCLASS" href="gts/gts-segments.html#GTSSEGMENTCLASS">
+<ANCHOR id ="GTSSEGMENT" href="gts/gts-segments.html#GTSSEGMENT">
+<ANCHOR id ="GTS-SEGMENT-CLASS" href="gts/gts-segments.html#GTS-SEGMENT-CLASS">
+<ANCHOR id ="GTS-SEGMENT-NEW" href="gts/gts-segments.html#GTS-SEGMENT-NEW">
+<ANCHOR id ="GTS-SEGMENTS-ARE-IDENTICAL" href="gts/gts-segments.html#GTS-SEGMENTS-ARE-IDENTICAL">
+<ANCHOR id ="GTS-SEGMENTS-ARE-INTERSECTING" href="gts/gts-segments.html#GTS-SEGMENTS-ARE-INTERSECTING">
+<ANCHOR id ="GTS-SEGMENT-IS-DUPLICATE" href="gts/gts-segments.html#GTS-SEGMENT-IS-DUPLICATE">
+<ANCHOR id ="GTS-SEGMENT-IS-OK" href="gts/gts-segments.html#GTS-SEGMENT-IS-OK">
+<ANCHOR id ="GTS-SEGMENT-CONNECT" href="gts/gts-segments.html#GTS-SEGMENT-CONNECT">
+<ANCHOR id ="GTS-SEGMENTS-TOUCH" href="gts/gts-segments.html#GTS-SEGMENTS-TOUCH">
+<ANCHOR id ="GTS-SEGMENTS-FROM-VERTICES" href="gts/gts-segments.html#GTS-SEGMENTS-FROM-VERTICES">
+<ANCHOR id ="GTS-SEGMENT-MIDVERTEX" href="gts/gts-segments.html#GTS-SEGMENT-MIDVERTEX">
+<ANCHOR id ="GTS-EDGES" href="gts/gts-edges.html">
+<ANCHOR id ="GTS-EDGE-CLASS-CAPS" href="gts/gts-edges.html#GTS-EDGE-CLASS-CAPS">
+<ANCHOR id ="GTS-EDGE-CAPS" href="gts/gts-edges.html#GTS-EDGE-CAPS">
+<ANCHOR id ="GTS-IS-EDGE-CAPS" href="gts/gts-edges.html#GTS-IS-EDGE-CAPS">
+<ANCHOR id ="GTSEDGECLASS" href="gts/gts-edges.html#GTSEDGECLASS">
+<ANCHOR id ="GTSEDGE" href="gts/gts-edges.html#GTSEDGE">
+<ANCHOR id ="GTS-EDGE-CLASS" href="gts/gts-edges.html#GTS-EDGE-CLASS">
+<ANCHOR id ="GTS-EDGE-NEW" href="gts/gts-edges.html#GTS-EDGE-NEW">
+<ANCHOR id ="GTS-EDGE-REPLACE" href="gts/gts-edges.html#GTS-EDGE-REPLACE">
+<ANCHOR id ="GTS-EDGE-IS-UNATTACHED" href="gts/gts-edges.html#GTS-EDGE-IS-UNATTACHED">
+<ANCHOR id ="GTS-EDGE-IS-DUPLICATE" href="gts/gts-edges.html#GTS-EDGE-IS-DUPLICATE">
+<ANCHOR id ="GTS-EDGE-HAS-PARENT-SURFACE" href="gts/gts-edges.html#GTS-EDGE-HAS-PARENT-SURFACE">
+<ANCHOR id ="GTS-EDGE-HAS-ANY-PARENT-SURFACE" href="gts/gts-edges.html#GTS-EDGE-HAS-ANY-PARENT-SURFACE">
+<ANCHOR id ="GTS-EDGE-IS-BOUNDARY" href="gts/gts-edges.html#GTS-EDGE-IS-BOUNDARY">
+<ANCHOR id ="GTS-EDGE-IS-CONTACT" href="gts/gts-edges.html#GTS-EDGE-IS-CONTACT">
+<ANCHOR id ="GTS-EDGE-BELONGS-TO-TETRAHEDRON" href="gts/gts-edges.html#GTS-EDGE-BELONGS-TO-TETRAHEDRON">
+<ANCHOR id ="GTS-EDGE-FACE-NUMBER" href="gts/gts-edges.html#GTS-EDGE-FACE-NUMBER">
+<ANCHOR id ="GTSENCROACHFUNC" href="gts/gts-edges.html#GTSENCROACHFUNC">
+<ANCHOR id ="GTS-EDGE-IS-ENCROACHED" href="gts/gts-edges.html#GTS-EDGE-IS-ENCROACHED">
+<ANCHOR id ="GTS-EDGES-MERGE" href="gts/gts-edges.html#GTS-EDGES-MERGE">
+<ANCHOR id ="GTS-EDGES-FROM-VERTICES" href="gts/gts-edges.html#GTS-EDGES-FROM-VERTICES">
+<ANCHOR id ="GTS-TRIANGLES" href="gts/gts-triangles.html">
+<ANCHOR id ="GTS-TRIANGLE-CLASS-CAPS" href="gts/gts-triangles.html#GTS-TRIANGLE-CLASS-CAPS">
+<ANCHOR id ="GTS-TRIANGLE-CAPS" href="gts/gts-triangles.html#GTS-TRIANGLE-CAPS">
+<ANCHOR id ="GTS-IS-TRIANGLE-CAPS" href="gts/gts-triangles.html#GTS-IS-TRIANGLE-CAPS">
+<ANCHOR id ="GTSTRIANGLECLASS" href="gts/gts-triangles.html#GTSTRIANGLECLASS">
+<ANCHOR id ="GTSTRIANGLE" href="gts/gts-triangles.html#GTSTRIANGLE">
+<ANCHOR id ="GTS-TRIANGLE-CLASS" href="gts/gts-triangles.html#GTS-TRIANGLE-CLASS">
+<ANCHOR id ="GTS-TRIANGLE-NEW" href="gts/gts-triangles.html#GTS-TRIANGLE-NEW">
+<ANCHOR id ="GTS-TRIANGLE-SET" href="gts/gts-triangles.html#GTS-TRIANGLE-SET">
+<ANCHOR id ="GTS-TRIANGLE-AREA" href="gts/gts-triangles.html#GTS-TRIANGLE-AREA">
+<ANCHOR id ="GTS-TRIANGLE-PERIMETER" href="gts/gts-triangles.html#GTS-TRIANGLE-PERIMETER">
+<ANCHOR id ="GTS-TRIANGLE-QUALITY" href="gts/gts-triangles.html#GTS-TRIANGLE-QUALITY">
+<ANCHOR id ="GTS-TRIANGLE-NORMAL" href="gts/gts-triangles.html#GTS-TRIANGLE-NORMAL">
+<ANCHOR id ="GTS-TRIANGLE-REVERT" href="gts/gts-triangles.html#GTS-TRIANGLE-REVERT">
+<ANCHOR id ="GTS-TRIANGLE-ORIENTATION" href="gts/gts-triangles.html#GTS-TRIANGLE-ORIENTATION">
+<ANCHOR id ="GTS-TRIANGLE-IS-DUPLICATE" href="gts/gts-triangles.html#GTS-TRIANGLE-IS-DUPLICATE">
+<ANCHOR id ="GTS-TRIANGLES-ANGLE" href="gts/gts-triangles.html#GTS-TRIANGLES-ANGLE">
+<ANCHOR id ="GTS-TRIANGLES-ARE-COMPATIBLE" href="gts/gts-triangles.html#GTS-TRIANGLES-ARE-COMPATIBLE">
+<ANCHOR id ="GTS-TRIANGLE-ENCLOSING" href="gts/gts-triangles.html#GTS-TRIANGLE-ENCLOSING">
+<ANCHOR id ="GTS-TRIANGLES-COMMON-EDGE" href="gts/gts-triangles.html#GTS-TRIANGLES-COMMON-EDGE">
+<ANCHOR id ="GTS-TRIANGLE-NEIGHBOR-NUMBER" href="gts/gts-triangles.html#GTS-TRIANGLE-NEIGHBOR-NUMBER">
+<ANCHOR id ="GTS-TRIANGLE-NEIGHBORS" href="gts/gts-triangles.html#GTS-TRIANGLE-NEIGHBORS">
+<ANCHOR id ="GTS-TRIANGLE-VERTICES-EDGES" href="gts/gts-triangles.html#GTS-TRIANGLE-VERTICES-EDGES">
+<ANCHOR id ="GTS-TRIANGLE-VERTEX-OPPOSITE" href="gts/gts-triangles.html#GTS-TRIANGLE-VERTEX-OPPOSITE">
+<ANCHOR id ="GTS-TRIANGLE-EDGE-OPPOSITE" href="gts/gts-triangles.html#GTS-TRIANGLE-EDGE-OPPOSITE">
+<ANCHOR id ="GTS-TRIANGLE-VERTICES" href="gts/gts-triangles.html#GTS-TRIANGLE-VERTICES">
+<ANCHOR id ="GTS-TRIANGLE-VERTEX" href="gts/gts-triangles.html#GTS-TRIANGLE-VERTEX">
+<ANCHOR id ="GTS-TRIANGLE-IS-OK" href="gts/gts-triangles.html#GTS-TRIANGLE-IS-OK">
+<ANCHOR id ="GTS-TRIANGLE-USE-EDGES" href="gts/gts-triangles.html#GTS-TRIANGLE-USE-EDGES">
+<ANCHOR id ="GTS-TRIANGLE-CIRCUMCIRCLE-CENTER" href="gts/gts-triangles.html#GTS-TRIANGLE-CIRCUMCIRCLE-CENTER">
+<ANCHOR id ="GTS-TRIANGLE-IS-STABBED" href="gts/gts-triangles.html#GTS-TRIANGLE-IS-STABBED">
+<ANCHOR id ="GTS-TRIANGLES-ARE-FOLDED" href="gts/gts-triangles.html#GTS-TRIANGLES-ARE-FOLDED">
+<ANCHOR id ="GTS-TRIANGLES-FROM-EDGES" href="gts/gts-triangles.html#GTS-TRIANGLES-FROM-EDGES">
+<ANCHOR id ="GTS-FACES" href="gts/gts-faces.html">
+<ANCHOR id ="GTS-FACE-CLASS-CAPS" href="gts/gts-faces.html#GTS-FACE-CLASS-CAPS">
+<ANCHOR id ="GTS-FACE-CAPS" href="gts/gts-faces.html#GTS-FACE-CAPS">
+<ANCHOR id ="GTS-IS-FACE-CAPS" href="gts/gts-faces.html#GTS-IS-FACE-CAPS">
+<ANCHOR id ="GTSFACECLASS" href="gts/gts-faces.html#GTSFACECLASS">
+<ANCHOR id ="GTSFACE" href="gts/gts-faces.html#GTSFACE">
+<ANCHOR id ="GTS-FACE-CLASS" href="gts/gts-faces.html#GTS-FACE-CLASS">
+<ANCHOR id ="GTS-FACE-NEW" href="gts/gts-faces.html#GTS-FACE-NEW">
+<ANCHOR id ="GTS-FACE-HAS-PARENT-SURFACE" href="gts/gts-faces.html#GTS-FACE-HAS-PARENT-SURFACE">
+<ANCHOR id ="GTS-FACE-NEIGHBOR-NUMBER" href="gts/gts-faces.html#GTS-FACE-NEIGHBOR-NUMBER">
+<ANCHOR id ="GTS-FACE-NEIGHBORS" href="gts/gts-faces.html#GTS-FACE-NEIGHBORS">
+<ANCHOR id ="GTS-FACE-FOREACH-NEIGHBOR" href="gts/gts-faces.html#GTS-FACE-FOREACH-NEIGHBOR">
+<ANCHOR id ="GTS-FACES-FROM-EDGES" href="gts/gts-faces.html#GTS-FACES-FROM-EDGES">
+<ANCHOR id ="GTS-SURFACES" href="gts/gts-surfaces.html">
+<ANCHOR id ="GTS-SURFACE-CLASS-CAPS" href="gts/gts-surfaces.html#GTS-SURFACE-CLASS-CAPS">
+<ANCHOR id ="GTS-SURFACE-CAPS" href="gts/gts-surfaces.html#GTS-SURFACE-CAPS">
+<ANCHOR id ="GTS-IS-SURFACE-CAPS" href="gts/gts-surfaces.html#GTS-IS-SURFACE-CAPS">
+<ANCHOR id ="GTSSURFACECLASS" href="gts/gts-surfaces.html#GTSSURFACECLASS">
+<ANCHOR id ="GTSSURFACE" href="gts/gts-surfaces.html#GTSSURFACE">
+<ANCHOR id ="GTS-SURFACE-CLASS" href="gts/gts-surfaces.html#GTS-SURFACE-CLASS">
+<ANCHOR id ="GTS-SURFACE-NEW" href="gts/gts-surfaces.html#GTS-SURFACE-NEW">
+<ANCHOR id ="GTS-SURFACE-ADD-FACE" href="gts/gts-surfaces.html#GTS-SURFACE-ADD-FACE">
+<ANCHOR id ="GTS-SURFACE-REMOVE-FACE" href="gts/gts-surfaces.html#GTS-SURFACE-REMOVE-FACE">
+<ANCHOR id ="GTS-SURFACE-COPY" href="gts/gts-surfaces.html#GTS-SURFACE-COPY">
+<ANCHOR id ="GTS-SURFACE-MERGE" href="gts/gts-surfaces.html#GTS-SURFACE-MERGE">
+<ANCHOR id ="GTS-SURFACE-READ" href="gts/gts-surfaces.html#GTS-SURFACE-READ">
+<ANCHOR id ="GTS-SURFACE-IS-MANIFOLD" href="gts/gts-surfaces.html#GTS-SURFACE-IS-MANIFOLD">
+<ANCHOR id ="GTS-SURFACE-IS-ORIENTABLE" href="gts/gts-surfaces.html#GTS-SURFACE-IS-ORIENTABLE">
+<ANCHOR id ="GTS-SURFACE-IS-CLOSED" href="gts/gts-surfaces.html#GTS-SURFACE-IS-CLOSED">
+<ANCHOR id ="GTS-SURFACE-VERTEX-NUMBER" href="gts/gts-surfaces.html#GTS-SURFACE-VERTEX-NUMBER">
+<ANCHOR id ="GTS-SURFACE-EDGE-NUMBER" href="gts/gts-surfaces.html#GTS-SURFACE-EDGE-NUMBER">
+<ANCHOR id ="GTS-SURFACE-FACE-NUMBER" href="gts/gts-surfaces.html#GTS-SURFACE-FACE-NUMBER">
+<ANCHOR id ="GTS-SURFACE-BOUNDARY" href="gts/gts-surfaces.html#GTS-SURFACE-BOUNDARY">
+<ANCHOR id ="GTS-SURFACE-AREA" href="gts/gts-surfaces.html#GTS-SURFACE-AREA">
+<ANCHOR id ="GTS-SURFACE-VOLUME" href="gts/gts-surfaces.html#GTS-SURFACE-VOLUME">
+<ANCHOR id ="GTSSURFACESTATS" href="gts/gts-surfaces.html#GTSSURFACESTATS">
+<ANCHOR id ="GTSSURFACEQUALITYSTATS" href="gts/gts-surfaces.html#GTSSURFACEQUALITYSTATS">
+<ANCHOR id ="GTS-SURFACE-STATS" href="gts/gts-surfaces.html#GTS-SURFACE-STATS">
+<ANCHOR id ="GTS-SURFACE-QUALITY-STATS" href="gts/gts-surfaces.html#GTS-SURFACE-QUALITY-STATS">
+<ANCHOR id ="GTS-SURFACE-PRINT-STATS" href="gts/gts-surfaces.html#GTS-SURFACE-PRINT-STATS">
+<ANCHOR id ="GTS-SURFACE-WRITE" href="gts/gts-surfaces.html#GTS-SURFACE-WRITE">
+<ANCHOR id ="GTS-SURFACE-WRITE-OOGL" href="gts/gts-surfaces.html#GTS-SURFACE-WRITE-OOGL">
+<ANCHOR id ="GTS-SURFACE-WRITE-OOGL-BOUNDARY" href="gts/gts-surfaces.html#GTS-SURFACE-WRITE-OOGL-BOUNDARY">
+<ANCHOR id ="GTSFUNC" href="gts/gts-surfaces.html#GTSFUNC">
+<ANCHOR id ="GTS-SURFACE-FOREACH-VERTEX" href="gts/gts-surfaces.html#GTS-SURFACE-FOREACH-VERTEX">
+<ANCHOR id ="GTS-SURFACE-FOREACH-EDGE" href="gts/gts-surfaces.html#GTS-SURFACE-FOREACH-EDGE">
+<ANCHOR id ="GTS-SURFACE-FOREACH-FACE" href="gts/gts-surfaces.html#GTS-SURFACE-FOREACH-FACE">
+<ANCHOR id ="GTS-SURFACE-FOREACH-FACE-REMOVE" href="gts/gts-surfaces.html#GTS-SURFACE-FOREACH-FACE-REMOVE">
+<ANCHOR id ="GTSSURFACETRAVERSE" href="gts/gts-surfaces.html#GTSSURFACETRAVERSE">
+<ANCHOR id ="GTS-SURFACE-TRAVERSE-NEW" href="gts/gts-surfaces.html#GTS-SURFACE-TRAVERSE-NEW">
+<ANCHOR id ="GTS-SURFACE-TRAVERSE-NEXT" href="gts/gts-surfaces.html#GTS-SURFACE-TRAVERSE-NEXT">
+<ANCHOR id ="GTS-SURFACE-TRAVERSE-DESTROY" href="gts/gts-surfaces.html#GTS-SURFACE-TRAVERSE-DESTROY">
+<ANCHOR id ="GTS-SURFACE-DISTANCE" href="gts/gts-surfaces.html#GTS-SURFACE-DISTANCE">
+<ANCHOR id ="GTS-SURFACE-STRIP" href="gts/gts-surfaces.html#GTS-SURFACE-STRIP">
+<ANCHOR id ="GTS-KD-TREES" href="gts/gts-kd-trees.html">
+<ANCHOR id ="GTS-KDTREE-NEW" href="gts/gts-kd-trees.html#GTS-KDTREE-NEW">
+<ANCHOR id ="GTS-KDTREE-RANGE" href="gts/gts-kd-trees.html#GTS-KDTREE-RANGE">
+<ANCHOR id ="GTS-KDTREE-DESTROY" href="gts/gts-kd-trees.html#GTS-KDTREE-DESTROY">
+<ANCHOR id ="GTS-BOUNDING-BOXES-TREES" href="gts/gts-bounding-boxes-trees.html">
+<ANCHOR id ="GTS-BBOX-CLASS-CAPS" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-CLASS-CAPS">
+<ANCHOR id ="GTS-BBOX-CAPS" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-CAPS">
+<ANCHOR id ="GTS-IS-BBOX-CAPS" href="gts/gts-bounding-boxes-trees.html#GTS-IS-BBOX-CAPS">
+<ANCHOR id ="GTSBBOXCLASS" href="gts/gts-bounding-boxes-trees.html#GTSBBOXCLASS">
+<ANCHOR id ="GTSBBOX" href="gts/gts-bounding-boxes-trees.html#GTSBBOX">
+<ANCHOR id ="GTS-BBOX-CLASS" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-CLASS">
+<ANCHOR id ="GTS-BBOX-NEW" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-NEW">
+<ANCHOR id ="GTS-BBOX-SET" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-SET">
+<ANCHOR id ="GTS-BBOX-SEGMENT" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-SEGMENT">
+<ANCHOR id ="GTS-BBOX-TRIANGLE" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-TRIANGLE">
+<ANCHOR id ="GTS-BBOX-SURFACE" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-SURFACE">
+<ANCHOR id ="GTS-BBOX-POINTS" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-POINTS">
+<ANCHOR id ="GTS-BBOX-BBOXES" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-BBOXES">
+<ANCHOR id ="GTS-BBOX-DRAW" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-DRAW">
+<ANCHOR id ="GTS-BBOX-POINT-IS-INSIDE" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-POINT-IS-INSIDE">
+<ANCHOR id ="GTS-BBOXES-ARE-OVERLAPPING" href="gts/gts-bounding-boxes-trees.html#GTS-BBOXES-ARE-OVERLAPPING">
+<ANCHOR id ="GTS-BBOX-DIAGONAL2" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-DIAGONAL2">
+<ANCHOR id ="GTS-BBOX-POINT-DISTANCE2" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-POINT-DISTANCE2">
+<ANCHOR id ="GTS-BBOX-IS-STABBED" href="gts/gts-bounding-boxes-trees.html#GTS-BBOX-IS-STABBED">
+<ANCHOR id ="GTSBBTREETRAVERSEFUNC" href="gts/gts-bounding-boxes-trees.html#GTSBBTREETRAVERSEFUNC">
+<ANCHOR id ="GTS-BB-TREE-NEW" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-NEW">
+<ANCHOR id ="GTS-BB-TREE-SURFACE" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE">
+<ANCHOR id ="GTS-BB-TREE-OVERLAP" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-OVERLAP">
+<ANCHOR id ="GTS-BB-TREE-IS-OVERLAPPING" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-IS-OVERLAPPING">
+<ANCHOR id ="GTS-BB-TREE-TRAVERSE-OVERLAPPING" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-TRAVERSE-OVERLAPPING">
+<ANCHOR id ="GTS-BB-TREE-DRAW" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-DRAW">
+<ANCHOR id ="GTS-BB-TREE-DESTROY" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-DESTROY">
+<ANCHOR id ="GTSBBOXDISTFUNC" href="gts/gts-bounding-boxes-trees.html#GTSBBOXDISTFUNC">
+<ANCHOR id ="GTSBBOXCLOSESTFUNC" href="gts/gts-bounding-boxes-trees.html#GTSBBOXCLOSESTFUNC">
+<ANCHOR id ="GTS-BB-TREE-POINT-DISTANCE" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-DISTANCE">
+<ANCHOR id ="GTS-BB-TREE-POINT-CLOSEST" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-CLOSEST">
+<ANCHOR id ="GTS-BB-TREE-SEGMENT-DISTANCE" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-SEGMENT-DISTANCE">
+<ANCHOR id ="GTS-BB-TREE-TRIANGLE-DISTANCE" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-TRIANGLE-DISTANCE">
+<ANCHOR id ="GTS-BB-TREE-POINT-CLOSEST-BBOXES" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-POINT-CLOSEST-BBOXES">
+<ANCHOR id ="GTS-BB-TREE-SURFACE-BOUNDARY-DISTANCE" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE-BOUNDARY-DISTANCE">
+<ANCHOR id ="GTS-BB-TREE-SURFACE-DISTANCE" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-SURFACE-DISTANCE">
+<ANCHOR id ="GTS-BB-TREE-STABBED" href="gts/gts-bounding-boxes-trees.html#GTS-BB-TREE-STABBED">
+<ANCHOR id ="GTS-BOOLEAN-OPERATIONS" href="gts/gts-boolean-operations.html">
+<ANCHOR id ="GTS-SURFACE-INTER-CLASS-CAPS" href="gts/gts-boolean-operations.html#GTS-SURFACE-INTER-CLASS-CAPS">
+<ANCHOR id ="GTS-SURFACE-INTER-CAPS" href="gts/gts-boolean-operations.html#GTS-SURFACE-INTER-CAPS">
+<ANCHOR id ="GTS-IS-SURFACE-INTER-CAPS" href="gts/gts-boolean-operations.html#GTS-IS-SURFACE-INTER-CAPS">
+<ANCHOR id ="GTSSURFACEINTERCLASS" href="gts/gts-boolean-operations.html#GTSSURFACEINTERCLASS">
+<ANCHOR id ="GTSSURFACEINTER" href="gts/gts-boolean-operations.html#GTSSURFACEINTER">
+<ANCHOR id ="GTS-SURFACE-INTER-CLASS" href="gts/gts-boolean-operations.html#GTS-SURFACE-INTER-CLASS">
+<ANCHOR id ="GTS-SURFACE-INTER-NEW" href="gts/gts-boolean-operations.html#GTS-SURFACE-INTER-NEW">
+<ANCHOR id ="GTS-SURFACE-INTER-CHECK" href="gts/gts-boolean-operations.html#GTS-SURFACE-INTER-CHECK">
+<ANCHOR id ="GTSBOOLEANOPERATION" href="gts/gts-boolean-operations.html#GTSBOOLEANOPERATION">
+<ANCHOR id ="GTS-SURFACE-INTER-BOOLEAN" href="gts/gts-boolean-operations.html#GTS-SURFACE-INTER-BOOLEAN">
+<ANCHOR id ="GTS-SURFACE-SIMPLIFICATION-AND-REFINEMENT" href="gts/gts-surface-simplification-and-refinement.html">
+<ANCHOR id ="GTS-SURFACE-REFINE" href="gts/gts-surface-simplification-and-refinement.html#GTS-SURFACE-REFINE">
+<ANCHOR id ="GTSCOARSENFUNC" href="gts/gts-surface-simplification-and-refinement.html#GTSCOARSENFUNC">
+<ANCHOR id ="GTSSTOPFUNC" href="gts/gts-surface-simplification-and-refinement.html#GTSSTOPFUNC">
+<ANCHOR id ="GTS-SURFACE-COARSEN" href="gts/gts-surface-simplification-and-refinement.html#GTS-SURFACE-COARSEN">
+<ANCHOR id ="GTS-COARSEN-STOP-NUMBER" href="gts/gts-surface-simplification-and-refinement.html#GTS-COARSEN-STOP-NUMBER">
+<ANCHOR id ="GTS-COARSEN-STOP-COST" href="gts/gts-surface-simplification-and-refinement.html#GTS-COARSEN-STOP-COST">
+<ANCHOR id ="GTSVOLUMEOPTIMIZEDPARAMS" href="gts/gts-surface-simplification-and-refinement.html#GTSVOLUMEOPTIMIZEDPARAMS">
+<ANCHOR id ="GTS-VOLUME-OPTIMIZED-VERTEX" href="gts/gts-surface-simplification-and-refinement.html#GTS-VOLUME-OPTIMIZED-VERTEX">
+<ANCHOR id ="GTS-VOLUME-OPTIMIZED-COST" href="gts/gts-surface-simplification-and-refinement.html#GTS-VOLUME-OPTIMIZED-COST">
+<ANCHOR id ="GTS-EDGE-COLLAPSE-IS-VALID" href="gts/gts-surface-simplification-and-refinement.html#GTS-EDGE-COLLAPSE-IS-VALID">
+<ANCHOR id ="GTS-EDGE-COLLAPSE-CREATES-FOLD" href="gts/gts-surface-simplification-and-refinement.html#GTS-EDGE-COLLAPSE-CREATES-FOLD">
+<ANCHOR id ="GTS-OUT-OF-CORE-SIMPLIFICATION" href="gts/gts-out-of-core-simplification.html">
+<ANCHOR id ="GTS-CLUSTER-CLASS-CAPS" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-CLASS-CAPS">
+<ANCHOR id ="GTS-CLUSTER-CAPS" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-CAPS">
+<ANCHOR id ="GTS-IS-CLUSTER-CAPS" href="gts/gts-out-of-core-simplification.html#GTS-IS-CLUSTER-CAPS">
+<ANCHOR id ="GTSCLUSTERCLASS" href="gts/gts-out-of-core-simplification.html#GTSCLUSTERCLASS">
+<ANCHOR id ="GTSCLUSTER" href="gts/gts-out-of-core-simplification.html#GTSCLUSTER">
+<ANCHOR id ="GTSCLUSTERID" href="gts/gts-out-of-core-simplification.html#GTSCLUSTERID">
+<ANCHOR id ="GTS-CLUSTER-CLASS" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-CLASS">
+<ANCHOR id ="GTS-CLUSTER-NEW" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-NEW">
+<ANCHOR id ="GTS-CLUSTER-ADD" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-ADD">
+<ANCHOR id ="GTS-CLUSTER-UPDATE" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-UPDATE">
+<ANCHOR id ="GTS-CLUSTER-GRID-CLASS-CAPS" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CLASS-CAPS">
+<ANCHOR id ="GTS-CLUSTER-GRID-CAPS" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CAPS">
+<ANCHOR id ="GTS-IS-CLUSTER-GRID-CAPS" href="gts/gts-out-of-core-simplification.html#GTS-IS-CLUSTER-GRID-CAPS">
+<ANCHOR id ="GTSCLUSTERGRIDCLASS" href="gts/gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS">
+<ANCHOR id ="GTSCLUSTERGRID" href="gts/gts-out-of-core-simplification.html#GTSCLUSTERGRID">
+<ANCHOR id ="GTS-CLUSTER-GRID-CLASS" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CLASS">
+<ANCHOR id ="GTS-CLUSTER-GRID-NEW" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-NEW">
+<ANCHOR id ="GTS-CLUSTER-GRID-ADD-TRIANGLE" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-ADD-TRIANGLE">
+<ANCHOR id ="GTS-CLUSTER-GRID-UPDATE" href="gts/gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-UPDATE">
+<ANCHOR id ="GTS-ISOSURFACES-FROM-3D-FUNCTIONS" href="gts/gts-isosurfaces-from-3d-functions.html">
+<ANCHOR id ="GTSCARTESIANGRID" href="gts/gts-isosurfaces-from-3d-functions.html#GTSCARTESIANGRID">
+<ANCHOR id ="GTSGRIDPLANE" href="gts/gts-isosurfaces-from-3d-functions.html#GTSGRIDPLANE">
+<ANCHOR id ="GTS-GRID-PLANE-NEW" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-GRID-PLANE-NEW">
+<ANCHOR id ="GTS-GRID-PLANE-DESTROY" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-GRID-PLANE-DESTROY">
+<ANCHOR id ="GTSISOSLICE" href="gts/gts-isosurfaces-from-3d-functions.html#GTSISOSLICE">
+<ANCHOR id ="GTS-ISO-SLICE-NEW" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-NEW">
+<ANCHOR id ="GTS-ISO-SLICE-FILL" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-FILL">
+<ANCHOR id ="GTS-ISO-SLICE-FILL-CARTESIAN" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-FILL-CARTESIAN">
+<ANCHOR id ="GTS-ISO-SLICE-DESTROY" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-ISO-SLICE-DESTROY">
+<ANCHOR id ="GTS-ISOSURFACE-SLICE" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-ISOSURFACE-SLICE">
+<ANCHOR id ="GTSISOCARTESIANFUNC" href="gts/gts-isosurfaces-from-3d-functions.html#GTSISOCARTESIANFUNC">
+<ANCHOR id ="GTS-ISOSURFACE-CARTESIAN" href="gts/gts-isosurfaces-from-3d-functions.html#GTS-ISOSURFACE-CARTESIAN">
+<ANCHOR id ="GTS-DELAUNAY-AND-CONSTRAINED-DELAUNAY-TRIANGULATIONS" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html">
+<ANCHOR id ="GTS-CONSTRAINT-CLASS-CAPS" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-CONSTRAINT-CLASS-CAPS">
+<ANCHOR id ="GTS-CONSTRAINT-CAPS" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-CONSTRAINT-CAPS">
+<ANCHOR id ="GTS-IS-CONSTRAINT-CAPS" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-IS-CONSTRAINT-CAPS">
+<ANCHOR id ="GTSCONSTRAINTCLASS" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINTCLASS">
+<ANCHOR id ="GTSCONSTRAINT" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTSCONSTRAINT">
+<ANCHOR id ="GTS-CONSTRAINT-CLASS" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-CONSTRAINT-CLASS">
+<ANCHOR id ="GTS-POINT-LOCATE" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-POINT-LOCATE">
+<ANCHOR id ="GTS-DELAUNAY-ADD-VERTEX" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-ADD-VERTEX">
+<ANCHOR id ="GTS-DELAUNAY-ADD-VERTEX-TO-FACE" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-ADD-VERTEX-TO-FACE">
+<ANCHOR id ="GTS-DELAUNAY-REMOVE-VERTEX" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-REMOVE-VERTEX">
+<ANCHOR id ="GTS-DELAUNAY-ADD-CONSTRAINT" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-ADD-CONSTRAINT">
+<ANCHOR id ="GTS-DELAUNAY-CHECK" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-CHECK">
+<ANCHOR id ="GTS-DELAUNAY-REMOVE-HULL" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-REMOVE-HULL">
+<ANCHOR id ="GTS-DELAUNAY-CONFORM" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-CONFORM">
+<ANCHOR id ="GTS-DELAUNAY-REFINE" href="gts/gts-delaunay-and-constrained-delaunay-triangulations.html#GTS-DELAUNAY-REFINE">
+<ANCHOR id ="GTS-VERTEX-SPLIT" href="gts/gts-vertex-split.html">
+<ANCHOR id ="GTS-SPLIT-CLASS-CAPS" href="gts/gts-vertex-split.html#GTS-SPLIT-CLASS-CAPS">
+<ANCHOR id ="GTS-SPLIT-CAPS" href="gts/gts-vertex-split.html#GTS-SPLIT-CAPS">
+<ANCHOR id ="GTS-IS-SPLIT-CAPS" href="gts/gts-vertex-split.html#GTS-IS-SPLIT-CAPS">
+<ANCHOR id ="GTS-SPLIT-V1-CAPS" href="gts/gts-vertex-split.html#GTS-SPLIT-V1-CAPS">
+<ANCHOR id ="GTS-SPLIT-V2-CAPS" href="gts/gts-vertex-split.html#GTS-SPLIT-V2-CAPS">
+<ANCHOR id ="GTSSPLITCLASS" href="gts/gts-vertex-split.html#GTSSPLITCLASS">
+<ANCHOR id ="GTSSPLITCFACE" href="gts/gts-vertex-split.html#GTSSPLITCFACE">
+<ANCHOR id ="GTSSPLIT" href="gts/gts-vertex-split.html#GTSSPLIT">
+<ANCHOR id ="GTS-SPLIT-CLASS" href="gts/gts-vertex-split.html#GTS-SPLIT-CLASS">
+<ANCHOR id ="GTS-SPLIT-NEW" href="gts/gts-vertex-split.html#GTS-SPLIT-NEW">
+<ANCHOR id ="GTS-SPLIT-COLLAPSE" href="gts/gts-vertex-split.html#GTS-SPLIT-COLLAPSE">
+<ANCHOR id ="GTS-SPLIT-EXPAND" href="gts/gts-vertex-split.html#GTS-SPLIT-EXPAND">
+<ANCHOR id ="GTS-SPLIT-HEIGHT" href="gts/gts-vertex-split.html#GTS-SPLIT-HEIGHT">
+<ANCHOR id ="GTSSPLITTRAVERSEFUNC" href="gts/gts-vertex-split.html#GTSSPLITTRAVERSEFUNC">
+<ANCHOR id ="GTS-SPLIT-TRAVERSE" href="gts/gts-vertex-split.html#GTS-SPLIT-TRAVERSE">
+<ANCHOR id ="GTS-PROGRESSIVE-SURFACES" href="gts/gts-progressive-surfaces.html">
+<ANCHOR id ="GTS-PSURFACE-CLASS-CAPS" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-CLASS-CAPS">
+<ANCHOR id ="GTS-PSURFACE-CAPS" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-CAPS">
+<ANCHOR id ="GTS-IS-PSURFACE-CAPS" href="gts/gts-progressive-surfaces.html#GTS-IS-PSURFACE-CAPS">
+<ANCHOR id ="GTS-PSURFACE-IS-CLOSED-CAPS" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-IS-CLOSED-CAPS">
+<ANCHOR id ="GTSPSURFACECLASS" href="gts/gts-progressive-surfaces.html#GTSPSURFACECLASS">
+<ANCHOR id ="GTSPSURFACE" href="gts/gts-progressive-surfaces.html#GTSPSURFACE">
+<ANCHOR id ="GTS-PSURFACE-CLASS" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-CLASS">
+<ANCHOR id ="GTS-PSURFACE-NEW" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-NEW">
+<ANCHOR id ="GTS-PSURFACE-ADD-VERTEX" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-ADD-VERTEX">
+<ANCHOR id ="GTS-PSURFACE-REMOVE-VERTEX" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-REMOVE-VERTEX">
+<ANCHOR id ="GTS-PSURFACE-SET-VERTEX-NUMBER" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-SET-VERTEX-NUMBER">
+<ANCHOR id ="GTS-PSURFACE-GET-VERTEX-NUMBER" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-GET-VERTEX-NUMBER">
+<ANCHOR id ="GTS-PSURFACE-MIN-VERTEX-NUMBER" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-MIN-VERTEX-NUMBER">
+<ANCHOR id ="GTS-PSURFACE-MAX-VERTEX-NUMBER" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-MAX-VERTEX-NUMBER">
+<ANCHOR id ="GTS-PSURFACE-FOREACH-VERTEX" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-FOREACH-VERTEX">
+<ANCHOR id ="GTS-PSURFACE-OPEN" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-OPEN">
+<ANCHOR id ="GTS-PSURFACE-READ-VERTEX" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-READ-VERTEX">
+<ANCHOR id ="GTS-PSURFACE-CLOSE" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-CLOSE">
+<ANCHOR id ="GTS-PSURFACE-WRITE" href="gts/gts-progressive-surfaces.html#GTS-PSURFACE-WRITE">
+<ANCHOR id ="GTS-HIERARCHICAL-VERTEX-SPLIT" href="gts/gts-hierarchical-vertex-split.html">
+<ANCHOR id ="GTS-HSPLIT-CLASS-CAPS" href="gts/gts-hierarchical-vertex-split.html#GTS-HSPLIT-CLASS-CAPS">
+<ANCHOR id ="GTS-HSPLIT-CAPS" href="gts/gts-hierarchical-vertex-split.html#GTS-HSPLIT-CAPS">
+<ANCHOR id ="GTS-IS-HSPLIT-CAPS" href="gts/gts-hierarchical-vertex-split.html#GTS-IS-HSPLIT-CAPS">
+<ANCHOR id ="GTSHSPLITCLASS" href="gts/gts-hierarchical-vertex-split.html#GTSHSPLITCLASS">
+<ANCHOR id ="GTSHSPLIT" href="gts/gts-hierarchical-vertex-split.html#GTSHSPLIT">
+<ANCHOR id ="GTS-HSPLIT-CLASS" href="gts/gts-hierarchical-vertex-split.html#GTS-HSPLIT-CLASS">
+<ANCHOR id ="GTS-HSPLIT-NEW" href="gts/gts-hierarchical-vertex-split.html#GTS-HSPLIT-NEW">
+<ANCHOR id ="GTS-HSPLIT-COLLAPSE" href="gts/gts-hierarchical-vertex-split.html#GTS-HSPLIT-COLLAPSE">
+<ANCHOR id ="GTS-HSPLIT-EXPAND" href="gts/gts-hierarchical-vertex-split.html#GTS-HSPLIT-EXPAND">
+<ANCHOR id ="GTS-HSPLIT-FORCE-EXPAND" href="gts/gts-hierarchical-vertex-split.html#GTS-HSPLIT-FORCE-EXPAND">
+<ANCHOR id ="GTS-HIERARCHICAL-SURFACES" href="gts/gts-hierarchical-surfaces.html">
+<ANCHOR id ="GTS-HSURFACE-CLASS-CAPS" href="gts/gts-hierarchical-surfaces.html#GTS-HSURFACE-CLASS-CAPS">
+<ANCHOR id ="GTS-HSURFACE-CAPS" href="gts/gts-hierarchical-surfaces.html#GTS-HSURFACE-CAPS">
+<ANCHOR id ="GTS-IS-HSURFACE-CAPS" href="gts/gts-hierarchical-surfaces.html#GTS-IS-HSURFACE-CAPS">
+<ANCHOR id ="GTSHSURFACECLASS" href="gts/gts-hierarchical-surfaces.html#GTSHSURFACECLASS">
+<ANCHOR id ="GTSHSURFACE" href="gts/gts-hierarchical-surfaces.html#GTSHSURFACE">
+<ANCHOR id ="GTS-HSURFACE-CLASS" href="gts/gts-hierarchical-surfaces.html#GTS-HSURFACE-CLASS">
+<ANCHOR id ="GTS-HSURFACE-NEW" href="gts/gts-hierarchical-surfaces.html#GTS-HSURFACE-NEW">
+<ANCHOR id ="GTS-HSURFACE-TRAVERSE" href="gts/gts-hierarchical-surfaces.html#GTS-HSURFACE-TRAVERSE">
+<ANCHOR id ="GTS-HSURFACE-HEIGHT" href="gts/gts-hierarchical-surfaces.html#GTS-HSURFACE-HEIGHT">
+<ANCHOR id ="GTS-HSURFACE-FOREACH" href="gts/gts-hierarchical-surfaces.html#GTS-HSURFACE-FOREACH">
+<ANCHOR id ="GTS-GRAPH-CLASS" href="gts/gts-graph-class.html">
+<ANCHOR id ="GTS-GNODE-CLASS-CAPS" href="gts/gts-graph-class.html#GTS-GNODE-CLASS-CAPS">
+<ANCHOR id ="GTS-GNODE-CAPS" href="gts/gts-graph-class.html#GTS-GNODE-CAPS">
+<ANCHOR id ="GTS-IS-GNODE-CAPS" href="gts/gts-graph-class.html#GTS-IS-GNODE-CAPS">
+<ANCHOR id ="GTS-GNODE-NEIGHBOR-CAPS" href="gts/gts-graph-class.html#GTS-GNODE-NEIGHBOR-CAPS">
+<ANCHOR id ="GTSGNODECLASS" href="gts/gts-graph-class.html#GTSGNODECLASS">
+<ANCHOR id ="GTSGNODE" href="gts/gts-graph-class.html#GTSGNODE">
+<ANCHOR id ="GTS-GNODE-CLASS" href="gts/gts-graph-class.html#GTS-GNODE-CLASS">
+<ANCHOR id ="GTS-GNODE-NEW" href="gts/gts-graph-class.html#GTS-GNODE-NEW">
+<ANCHOR id ="GTS-GNODE-DEGREE" href="gts/gts-graph-class.html#GTS-GNODE-DEGREE">
+<ANCHOR id ="GTS-GNODE-FOREACH-EDGE" href="gts/gts-graph-class.html#GTS-GNODE-FOREACH-EDGE">
+<ANCHOR id ="GTS-GNODE-FOREACH-NEIGHBOR" href="gts/gts-graph-class.html#GTS-GNODE-FOREACH-NEIGHBOR">
+<ANCHOR id ="GTS-GNODE-WEIGHT" href="gts/gts-graph-class.html#GTS-GNODE-WEIGHT">
+<ANCHOR id ="GTS-GNODE-MOVE-COST" href="gts/gts-graph-class.html#GTS-GNODE-MOVE-COST">
+<ANCHOR id ="GTS-GEDGE-CLASS-CAPS" href="gts/gts-graph-class.html#GTS-GEDGE-CLASS-CAPS">
+<ANCHOR id ="GTS-GEDGE-CAPS" href="gts/gts-graph-class.html#GTS-GEDGE-CAPS">
+<ANCHOR id ="GTS-IS-GEDGE-CAPS" href="gts/gts-graph-class.html#GTS-IS-GEDGE-CAPS">
+<ANCHOR id ="GTSGEDGECLASS" href="gts/gts-graph-class.html#GTSGEDGECLASS">
+<ANCHOR id ="GTSGEDGE" href="gts/gts-graph-class.html#GTSGEDGE">
+<ANCHOR id ="GTS-GEDGE-CLASS" href="gts/gts-graph-class.html#GTS-GEDGE-CLASS">
+<ANCHOR id ="GTS-GEDGE-NEW" href="gts/gts-graph-class.html#GTS-GEDGE-NEW">
+<ANCHOR id ="GTS-GEDGE-WEIGHT" href="gts/gts-graph-class.html#GTS-GEDGE-WEIGHT">
+<ANCHOR id ="GTS-GEDGE-CONNECTS" href="gts/gts-graph-class.html#GTS-GEDGE-CONNECTS">
+<ANCHOR id ="GTS-GRAPH-CLASS-CAPS" href="gts/gts-graph-class.html#GTS-GRAPH-CLASS-CAPS">
+<ANCHOR id ="GTS-GRAPH-CAPS" href="gts/gts-graph-class.html#GTS-GRAPH-CAPS">
+<ANCHOR id ="GTS-IS-GRAPH-CAPS" href="gts/gts-graph-class.html#GTS-IS-GRAPH-CAPS">
+<ANCHOR id ="GTSGRAPHCLASS" href="gts/gts-graph-class.html#GTSGRAPHCLASS">
+<ANCHOR id ="GTSGRAPH" href="gts/gts-graph-class.html#GTSGRAPH">
+<ANCHOR id ="GTS-GRAPH-CLASS" href="gts/gts-graph-class.html#GTS-GRAPH-CLASS">
+<ANCHOR id ="GTS-GRAPH-NEW" href="gts/gts-graph-class.html#GTS-GRAPH-NEW">
+<ANCHOR id ="GTS-GRAPH-READ" href="gts/gts-graph-class.html#GTS-GRAPH-READ">
+<ANCHOR id ="GTS-GRAPH-PRINT-STATS" href="gts/gts-graph-class.html#GTS-GRAPH-PRINT-STATS">
+<ANCHOR id ="GTS-GRAPH-FOREACH-EDGE" href="gts/gts-graph-class.html#GTS-GRAPH-FOREACH-EDGE">
+<ANCHOR id ="GTSGRAPHTRAVERSE" href="gts/gts-graph-class.html#GTSGRAPHTRAVERSE">
+<ANCHOR id ="GTSTRAVERSETYPE" href="gts/gts-graph-class.html#GTSTRAVERSETYPE">
+<ANCHOR id ="GTS-GRAPH-TRAVERSE-NEW" href="gts/gts-graph-class.html#GTS-GRAPH-TRAVERSE-NEW">
+<ANCHOR id ="GTS-GRAPH-TRAVERSE-NEXT" href="gts/gts-graph-class.html#GTS-GRAPH-TRAVERSE-NEXT">
+<ANCHOR id ="GTS-GRAPH-TRAVERSE-WHAT-NEXT" href="gts/gts-graph-class.html#GTS-GRAPH-TRAVERSE-WHAT-NEXT">
+<ANCHOR id ="GTS-GRAPH-TRAVERSE-DESTROY" href="gts/gts-graph-class.html#GTS-GRAPH-TRAVERSE-DESTROY">
+<ANCHOR id ="GTS-GRAPH-EDGES-CUT" href="gts/gts-graph-class.html#GTS-GRAPH-EDGES-CUT">
+<ANCHOR id ="GTS-GRAPH-EDGES-CUT-WEIGHT" href="gts/gts-graph-class.html#GTS-GRAPH-EDGES-CUT-WEIGHT">
+<ANCHOR id ="GTS-GRAPH-DISTANCE-SUM" href="gts/gts-graph-class.html#GTS-GRAPH-DISTANCE-SUM">
+<ANCHOR id ="GTS-GRAPH-FARTHEST" href="gts/gts-graph-class.html#GTS-GRAPH-FARTHEST">
+<ANCHOR id ="GTS-GRAPH-WEIGHT" href="gts/gts-graph-class.html#GTS-GRAPH-WEIGHT">
+<ANCHOR id ="GTS-FNODE-CLASS-CAPS" href="gts/gts-graph-class.html#GTS-FNODE-CLASS-CAPS">
+<ANCHOR id ="GTS-FNODE-CAPS" href="gts/gts-graph-class.html#GTS-FNODE-CAPS">
+<ANCHOR id ="GTS-IS-FNODE-CAPS" href="gts/gts-graph-class.html#GTS-IS-FNODE-CAPS">
+<ANCHOR id ="GTSFNODE" href="gts/gts-graph-class.html#GTSFNODE">
+<ANCHOR id ="GTSFNODECLASS" href="gts/gts-graph-class.html#GTSFNODECLASS">
+<ANCHOR id ="GTS-FNODE-CLASS" href="gts/gts-graph-class.html#GTS-FNODE-CLASS">
+<ANCHOR id ="GTS-FNODE-NEW" href="gts/gts-graph-class.html#GTS-FNODE-NEW">
+<ANCHOR id ="GTS-SURFACE-GRAPH-NEW" href="gts/gts-graph-class.html#GTS-SURFACE-GRAPH-NEW">
+<ANCHOR id ="GTS-SURFACE-GRAPH-SURFACE" href="gts/gts-graph-class.html#GTS-SURFACE-GRAPH-SURFACE">
+<ANCHOR id ="GTS-WEIGHTED-GRAPH" href="gts/gts-weighted-graph.html">
+<ANCHOR id ="GTS-WGEDGE-CLASS-CAPS" href="gts/gts-weighted-graph.html#GTS-WGEDGE-CLASS-CAPS">
+<ANCHOR id ="GTS-WGEDGE-CAPS" href="gts/gts-weighted-graph.html#GTS-WGEDGE-CAPS">
+<ANCHOR id ="GTS-IS-WGEDGE-CAPS" href="gts/gts-weighted-graph.html#GTS-IS-WGEDGE-CAPS">
+<ANCHOR id ="GTSWGEDGECLASS" href="gts/gts-weighted-graph.html#GTSWGEDGECLASS">
+<ANCHOR id ="GTSWGEDGE" href="gts/gts-weighted-graph.html#GTSWGEDGE">
+<ANCHOR id ="GTS-WGEDGE-CLASS" href="gts/gts-weighted-graph.html#GTS-WGEDGE-CLASS">
+<ANCHOR id ="GTS-WGEDGE-NEW" href="gts/gts-weighted-graph.html#GTS-WGEDGE-NEW">
+<ANCHOR id ="GTS-WGNODE-CLASS-CAPS" href="gts/gts-weighted-graph.html#GTS-WGNODE-CLASS-CAPS">
+<ANCHOR id ="GTS-WGNODE-CAPS" href="gts/gts-weighted-graph.html#GTS-WGNODE-CAPS">
+<ANCHOR id ="GTS-IS-WGNODE-CAPS" href="gts/gts-weighted-graph.html#GTS-IS-WGNODE-CAPS">
+<ANCHOR id ="GTSWGNODECLASS" href="gts/gts-weighted-graph.html#GTSWGNODECLASS">
+<ANCHOR id ="GTSWGNODE" href="gts/gts-weighted-graph.html#GTSWGNODE">
+<ANCHOR id ="GTS-WGNODE-CLASS" href="gts/gts-weighted-graph.html#GTS-WGNODE-CLASS">
+<ANCHOR id ="GTS-WGNODE-NEW" href="gts/gts-weighted-graph.html#GTS-WGNODE-NEW">
+<ANCHOR id ="GTS-WGRAPH-CLASS-CAPS" href="gts/gts-weighted-graph.html#GTS-WGRAPH-CLASS-CAPS">
+<ANCHOR id ="GTS-WGRAPH-CAPS" href="gts/gts-weighted-graph.html#GTS-WGRAPH-CAPS">
+<ANCHOR id ="GTS-IS-WGRAPH-CAPS" href="gts/gts-weighted-graph.html#GTS-IS-WGRAPH-CAPS">
+<ANCHOR id ="GTSWGRAPHCLASS" href="gts/gts-weighted-graph.html#GTSWGRAPHCLASS">
+<ANCHOR id ="GTSWGRAPH" href="gts/gts-weighted-graph.html#GTSWGRAPH">
+<ANCHOR id ="GTS-WGRAPH-CLASS" href="gts/gts-weighted-graph.html#GTS-WGRAPH-CLASS">
+<ANCHOR id ="GTS-WGRAPH-WEIGHT-MAX" href="gts/gts-weighted-graph.html#GTS-WGRAPH-WEIGHT-MAX">
+<ANCHOR id ="GTS-PROGRESSIVE-GRAPH" href="gts/gts-progressive-graph.html">
+<ANCHOR id ="GTS-GNODE-SPLIT-CLASS-CAPS" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-CLASS-CAPS">
+<ANCHOR id ="GTS-GNODE-SPLIT-CAPS" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-CAPS">
+<ANCHOR id ="GTS-IS-GNODE-SPLIT-CAPS" href="gts/gts-progressive-graph.html#GTS-IS-GNODE-SPLIT-CAPS">
+<ANCHOR id ="GTS-GNODE-SPLIT-N1-CAPS" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-N1-CAPS">
+<ANCHOR id ="GTS-GNODE-SPLIT-N2-CAPS" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-N2-CAPS">
+<ANCHOR id ="GTSGNODESPLITCLASS" href="gts/gts-progressive-graph.html#GTSGNODESPLITCLASS">
+<ANCHOR id ="GTSGNODESPLIT" href="gts/gts-progressive-graph.html#GTSGNODESPLIT">
+<ANCHOR id ="GTS-GNODE-SPLIT-CLASS" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-CLASS">
+<ANCHOR id ="GTS-GNODE-SPLIT-NEW" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-NEW">
+<ANCHOR id ="GTS-GNODE-SPLIT-COLLAPSE" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-COLLAPSE">
+<ANCHOR id ="GTS-GNODE-SPLIT-EXPAND" href="gts/gts-progressive-graph.html#GTS-GNODE-SPLIT-EXPAND">
+<ANCHOR id ="GTS-PGRAPH-CLASS-CAPS" href="gts/gts-progressive-graph.html#GTS-PGRAPH-CLASS-CAPS">
+<ANCHOR id ="GTS-PGRAPH-CAPS" href="gts/gts-progressive-graph.html#GTS-PGRAPH-CAPS">
+<ANCHOR id ="GTS-IS-PGRAPH-CAPS" href="gts/gts-progressive-graph.html#GTS-IS-PGRAPH-CAPS">
+<ANCHOR id ="GTSPGRAPHCLASS" href="gts/gts-progressive-graph.html#GTSPGRAPHCLASS">
+<ANCHOR id ="GTSPGRAPH" href="gts/gts-progressive-graph.html#GTSPGRAPH">
+<ANCHOR id ="GTS-PGRAPH-CLASS" href="gts/gts-progressive-graph.html#GTS-PGRAPH-CLASS">
+<ANCHOR id ="GTS-PGRAPH-NEW" href="gts/gts-progressive-graph.html#GTS-PGRAPH-NEW">
+<ANCHOR id ="GTS-PGRAPH-ADD-NODE" href="gts/gts-progressive-graph.html#GTS-PGRAPH-ADD-NODE">
+<ANCHOR id ="GTS-PGRAPH-REMOVE-NODE" href="gts/gts-progressive-graph.html#GTS-PGRAPH-REMOVE-NODE">
+<ANCHOR id ="GTS-PGRAPH-DOWN" href="gts/gts-progressive-graph.html#GTS-PGRAPH-DOWN">
+<ANCHOR id ="GTS-PGRAPH-SET-NODE-NUMBER" href="gts/gts-progressive-graph.html#GTS-PGRAPH-SET-NODE-NUMBER">
+<ANCHOR id ="GTS-PGRAPH-GET-NODE-NUMBER" href="gts/gts-progressive-graph.html#GTS-PGRAPH-GET-NODE-NUMBER">
+<ANCHOR id ="GTS-PGRAPH-MAX-NODE-NUMBER" href="gts/gts-progressive-graph.html#GTS-PGRAPH-MAX-NODE-NUMBER">
+<ANCHOR id ="GTS-PGRAPH-MIN-NODE-NUMBER" href="gts/gts-progressive-graph.html#GTS-PGRAPH-MIN-NODE-NUMBER">
+<ANCHOR id ="GTS-PGRAPH-FOREACH-NODE" href="gts/gts-progressive-graph.html#GTS-PGRAPH-FOREACH-NODE">
+<ANCHOR id ="GTS-GRAPH-PARTITIONING" href="gts/gts-graph-partitioning.html">
+<ANCHOR id ="GTSGRAPHBISECTION" href="gts/gts-graph-partitioning.html#GTSGRAPHBISECTION">
+<ANCHOR id ="GTS-GRAPH-BISECTION-NEW" href="gts/gts-graph-partitioning.html#GTS-GRAPH-BISECTION-NEW">
+<ANCHOR id ="GTS-GRAPH-GGG-BISECTION" href="gts/gts-graph-partitioning.html#GTS-GRAPH-GGG-BISECTION">
+<ANCHOR id ="GTS-GRAPH-BFGG-BISECTION" href="gts/gts-graph-partitioning.html#GTS-GRAPH-BFGG-BISECTION">
+<ANCHOR id ="GTS-GRAPH-BISECTION-CHECK" href="gts/gts-graph-partitioning.html#GTS-GRAPH-BISECTION-CHECK">
+<ANCHOR id ="GTS-GRAPH-BISECTION-KL-REFINE" href="gts/gts-graph-partitioning.html#GTS-GRAPH-BISECTION-KL-REFINE">
+<ANCHOR id ="GTS-GRAPH-BISECTION-BKL-REFINE" href="gts/gts-graph-partitioning.html#GTS-GRAPH-BISECTION-BKL-REFINE">
+<ANCHOR id ="GTS-GRAPH-RECURSIVE-BISECTION" href="gts/gts-graph-partitioning.html#GTS-GRAPH-RECURSIVE-BISECTION">
+<ANCHOR id ="GTS-GRAPH-BISECTION-DESTROY" href="gts/gts-graph-partitioning.html#GTS-GRAPH-BISECTION-DESTROY">
+<ANCHOR id ="GTS-GRAPH-BUBBLE-PARTITION" href="gts/gts-graph-partitioning.html#GTS-GRAPH-BUBBLE-PARTITION">
+<ANCHOR id ="GTS-GRAPH-EDGES-CUT" href="gts/gts-graph-partitioning.html#GTS-GRAPH-EDGES-CUT">
+<ANCHOR id ="GTS-GRAPH-EDGES-CUT-WEIGHT" href="gts/gts-graph-partitioning.html#GTS-GRAPH-EDGES-CUT-WEIGHT">
+<ANCHOR id ="GTS-GRAPH-PARTITION-EDGES-CUT" href="gts/gts-graph-partitioning.html#GTS-GRAPH-PARTITION-EDGES-CUT">
+<ANCHOR id ="GTS-GRAPH-PARTITION-BALANCE" href="gts/gts-graph-partitioning.html#GTS-GRAPH-PARTITION-BALANCE">
+<ANCHOR id ="GTS-GRAPH-PARTITION-CLONE" href="gts/gts-graph-partitioning.html#GTS-GRAPH-PARTITION-CLONE">
+<ANCHOR id ="GTS-GRAPH-PARTITION-PRINT-STATS" href="gts/gts-graph-partitioning.html#GTS-GRAPH-PARTITION-PRINT-STATS">
+<ANCHOR id ="GTS-GRAPH-PARTITION-EDGES-CUT-WEIGHT" href="gts/gts-graph-partitioning.html#GTS-GRAPH-PARTITION-EDGES-CUT-WEIGHT">
+<ANCHOR id ="GTS-GRAPH-PARTITION-DESTROY" href="gts/gts-graph-partitioning.html#GTS-GRAPH-PARTITION-DESTROY">
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 0000000..b3890d9
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,21 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\
+	 -DG_LOG_DOMAIN=\"Gts-examples\"
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+bin_PROGRAMS = transform
+
+noinst_PROGRAMS = \
+	set \
+	volume \
+	cleanup \
+	coarsen \
+	iso \
+	delaunay \
+	gtstoc \
+	oocs \
+	partition \
+	traverse \
+	cartesian
diff --git a/examples/Makefile.in b/examples/Makefile.in
new file mode 100644
index 0000000..bdf54d5
--- /dev/null
+++ b/examples/Makefile.in
@@ -0,0 +1,454 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) 	 -DG_LOG_DOMAIN=\"Gts-examples\"
+
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+bin_PROGRAMS = transform
+
+noinst_PROGRAMS =  	set 	volume 	cleanup 	coarsen 	iso 	delaunay 	gtstoc 	oocs 	partition 	traverse 	cartesian
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+PROGRAMS =  $(bin_PROGRAMS) $(noinst_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+LIBS = @LIBS@
+transform_SOURCES = transform.c
+transform_OBJECTS =  transform.o
+transform_LDADD = $(LDADD)
+transform_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+transform_LDFLAGS = 
+set_SOURCES = set.c
+set_OBJECTS =  set.o
+set_LDADD = $(LDADD)
+set_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+set_LDFLAGS = 
+volume_SOURCES = volume.c
+volume_OBJECTS =  volume.o
+volume_LDADD = $(LDADD)
+volume_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+volume_LDFLAGS = 
+cleanup_SOURCES = cleanup.c
+cleanup_OBJECTS =  cleanup.o
+cleanup_LDADD = $(LDADD)
+cleanup_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+cleanup_LDFLAGS = 
+coarsen_SOURCES = coarsen.c
+coarsen_OBJECTS =  coarsen.o
+coarsen_LDADD = $(LDADD)
+coarsen_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+coarsen_LDFLAGS = 
+iso_SOURCES = iso.c
+iso_OBJECTS =  iso.o
+iso_LDADD = $(LDADD)
+iso_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+iso_LDFLAGS = 
+delaunay_SOURCES = delaunay.c
+delaunay_OBJECTS =  delaunay.o
+delaunay_LDADD = $(LDADD)
+delaunay_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+delaunay_LDFLAGS = 
+gtstoc_SOURCES = gtstoc.c
+gtstoc_OBJECTS =  gtstoc.o
+gtstoc_LDADD = $(LDADD)
+gtstoc_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+gtstoc_LDFLAGS = 
+oocs_SOURCES = oocs.c
+oocs_OBJECTS =  oocs.o
+oocs_LDADD = $(LDADD)
+oocs_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+oocs_LDFLAGS = 
+partition_SOURCES = partition.c
+partition_OBJECTS =  partition.o
+partition_LDADD = $(LDADD)
+partition_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+partition_LDFLAGS = 
+traverse_SOURCES = traverse.c
+traverse_OBJECTS =  traverse.o
+traverse_LDADD = $(LDADD)
+traverse_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+traverse_LDFLAGS = 
+cartesian_SOURCES = cartesian.c
+cartesian_OBJECTS =  cartesian.o
+cartesian_LDADD = $(LDADD)
+cartesian_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+cartesian_LDFLAGS = 
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = transform.c set.c volume.c cleanup.c coarsen.c iso.c delaunay.c gtstoc.c oocs.c partition.c traverse.c cartesian.c
+OBJECTS = transform.o set.o volume.o cleanup.o coarsen.o iso.o delaunay.o gtstoc.o oocs.o partition.o traverse.o cartesian.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+	    $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	done
+
+mostlyclean-noinstPROGRAMS:
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+distclean-noinstPROGRAMS:
+
+maintainer-clean-noinstPROGRAMS:
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+transform: $(transform_OBJECTS) $(transform_DEPENDENCIES)
+	@rm -f transform
+	$(LINK) $(transform_LDFLAGS) $(transform_OBJECTS) $(transform_LDADD) $(LIBS)
+
+set: $(set_OBJECTS) $(set_DEPENDENCIES)
+	@rm -f set
+	$(LINK) $(set_LDFLAGS) $(set_OBJECTS) $(set_LDADD) $(LIBS)
+
+volume: $(volume_OBJECTS) $(volume_DEPENDENCIES)
+	@rm -f volume
+	$(LINK) $(volume_LDFLAGS) $(volume_OBJECTS) $(volume_LDADD) $(LIBS)
+
+cleanup: $(cleanup_OBJECTS) $(cleanup_DEPENDENCIES)
+	@rm -f cleanup
+	$(LINK) $(cleanup_LDFLAGS) $(cleanup_OBJECTS) $(cleanup_LDADD) $(LIBS)
+
+coarsen: $(coarsen_OBJECTS) $(coarsen_DEPENDENCIES)
+	@rm -f coarsen
+	$(LINK) $(coarsen_LDFLAGS) $(coarsen_OBJECTS) $(coarsen_LDADD) $(LIBS)
+
+iso: $(iso_OBJECTS) $(iso_DEPENDENCIES)
+	@rm -f iso
+	$(LINK) $(iso_LDFLAGS) $(iso_OBJECTS) $(iso_LDADD) $(LIBS)
+
+delaunay: $(delaunay_OBJECTS) $(delaunay_DEPENDENCIES)
+	@rm -f delaunay
+	$(LINK) $(delaunay_LDFLAGS) $(delaunay_OBJECTS) $(delaunay_LDADD) $(LIBS)
+
+gtstoc: $(gtstoc_OBJECTS) $(gtstoc_DEPENDENCIES)
+	@rm -f gtstoc
+	$(LINK) $(gtstoc_LDFLAGS) $(gtstoc_OBJECTS) $(gtstoc_LDADD) $(LIBS)
+
+oocs: $(oocs_OBJECTS) $(oocs_DEPENDENCIES)
+	@rm -f oocs
+	$(LINK) $(oocs_LDFLAGS) $(oocs_OBJECTS) $(oocs_LDADD) $(LIBS)
+
+partition: $(partition_OBJECTS) $(partition_DEPENDENCIES)
+	@rm -f partition
+	$(LINK) $(partition_LDFLAGS) $(partition_OBJECTS) $(partition_LDADD) $(LIBS)
+
+traverse: $(traverse_OBJECTS) $(traverse_DEPENDENCIES)
+	@rm -f traverse
+	$(LINK) $(traverse_LDFLAGS) $(traverse_OBJECTS) $(traverse_LDADD) $(LIBS)
+
+cartesian: $(cartesian_OBJECTS) $(cartesian_DEPENDENCIES)
+	@rm -f cartesian
+	$(LINK) $(cartesian_LDFLAGS) $(cartesian_OBJECTS) $(cartesian_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = examples
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+cartesian.o: cartesian.c ../config.h ../src/gts.h ../src/gtsconfig.h
+cleanup.o: cleanup.c ../config.h ../src/gts.h ../src/gtsconfig.h
+coarsen.o: coarsen.c ../config.h ../src/gts.h ../src/gtsconfig.h
+delaunay.o: delaunay.c ../config.h ../src/gts.h ../src/gtsconfig.h
+gtstoc.o: gtstoc.c ../src/gts.h ../src/gtsconfig.h
+iso.o: iso.c ../config.h ../src/gts.h ../src/gtsconfig.h
+oocs.o: oocs.c ../src/gts.h ../src/gtsconfig.h
+partition.o: partition.c ../config.h ../src/gts.h ../src/gtsconfig.h
+set.o: set.c ../src/gts.h ../src/gtsconfig.h
+transform.o: transform.c ../config.h ../src/gts.h ../src/gtsconfig.h
+traverse.o: traverse.c ../config.h ../src/gts.h ../src/gtsconfig.h
+volume.o: volume.c ../config.h ../src/gts.h ../src/gtsconfig.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \
+		mostlyclean-compile mostlyclean-libtool \
+		mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \
+		clean-libtool clean-tags clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-binPROGRAMS distclean-noinstPROGRAMS \
+		distclean-compile distclean-libtool distclean-tags \
+		distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-binPROGRAMS \
+		maintainer-clean-noinstPROGRAMS \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/examples/cartesian.c b/examples/cartesian.c
new file mode 100644
index 0000000..0010a8f
--- /dev/null
+++ b/examples/cartesian.c
@@ -0,0 +1,452 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+typedef struct _CartesianGrid CartesianGrid;
+
+struct _CartesianGrid {
+  GtsVertex *** vertices;
+  guint nx, ny;
+  gdouble xmin, xmax, ymin, ymax;
+};
+
+static void ** malloc2D (guint nx, guint ny, gulong size)
+{
+  void ** m = g_malloc (nx*sizeof (void *));
+  guint i;
+
+  for (i = 0; i < nx; i++)
+    m[i] = g_malloc0 (ny*size);
+
+  return m;
+}
+
+static void free2D (void ** m, guint nx)
+{
+  guint i;
+
+  g_return_if_fail (m != NULL);
+
+  for (i = 0; i < nx; i++)
+    g_free (m[i]);
+  g_free (m);
+}
+
+static CartesianGrid * cartesian_grid_new (guint nx, guint ny)
+{
+  CartesianGrid * grid;
+
+  grid = g_malloc (sizeof (CartesianGrid));
+  grid->vertices = (GtsVertex ***) malloc2D (nx, ny, sizeof (GtsVertex *));
+  grid->nx = nx;
+  grid->ny = ny;
+  grid->xmin = G_MAXDOUBLE;
+  grid->xmax = - G_MAXDOUBLE;
+  grid->ymin = G_MAXDOUBLE;
+  grid->ymax = - G_MAXDOUBLE;
+
+  return grid;
+}
+
+static void cartesian_grid_destroy (CartesianGrid * g,
+				    gboolean destroy_vertices)
+{
+  g_return_if_fail (g != NULL);
+
+  if (destroy_vertices) {
+    guint i, j;
+
+    gts_allow_floating_vertices = TRUE;
+    for (i = 0; i < g->nx; i++)
+      for (j = 0; j < g->ny; j++)
+	if (g->vertices[i][j])
+	  gts_object_destroy (GTS_OBJECT (g->vertices[i][j]));
+    gts_allow_floating_vertices = FALSE;
+  }
+
+  free2D ((void **) g->vertices, g->nx);
+  g_free (g);
+}
+
+static CartesianGrid * cartesian_grid_read (GtsVertexClass * klass,
+					    guint * line)
+{
+  CartesianGrid * grid;
+  guint nx, ny, line_number = 1, i, j;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  
+  if (scanf ("%u %u", &nx, &ny) != 2) {
+    if (line)
+      *line = line_number;
+    return NULL;
+  }
+  line_number++;
+
+  grid = cartesian_grid_new (nx, ny);
+  for (i = 0; i < nx; i++)
+    for (j = 0; j < ny; j++) {
+      gdouble x, y, z;
+      if (scanf ("%lf %lf %lf", &x, &y, &z) != 3) {
+	cartesian_grid_destroy (grid, TRUE);
+	if (line)
+	  *line = line_number;
+	return NULL;
+      }
+      if (z != 0.)
+	grid->vertices[i][j] = gts_vertex_new (klass, x, y, z);
+      if (x > grid->xmax) grid->xmax = x;
+      if (x < grid->xmin) grid->xmin = x;
+      if (y > grid->ymax) grid->ymax = y;
+      if (y < grid->ymin) grid->ymin = y;
+      line_number++;
+    }
+
+  return grid;
+}
+
+static GtsEdge * new_edge (GtsVertex * v1, GtsVertex * v2)
+{
+  GtsSegment * s = gts_vertices_are_connected (v1, v2);
+  return s == NULL ? 
+    gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), v1, v2) :
+    GTS_EDGE (s);
+}
+
+static void cartesian_grid_triangulate (CartesianGrid * g,
+					GtsSurface * s)
+{
+  gint i, j;
+  GtsVertex *** v;
+
+  g_return_if_fail (g != NULL);
+  g_return_if_fail (s != NULL);
+
+  v = g->vertices;
+  for (i = 0; i < g->nx - 1; i++)
+    for (j = 0; j < g->ny - 1; j++)
+      if (v[i][j]) {
+	if (v[i][j+1]) {
+	  if (v[i+1][j+1]) {
+	    GtsEdge * e1 = new_edge (v[i][j+1], v[i][j]);
+	    GtsEdge * e2 = 
+	      gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), 
+			    v[i][j], v[i+1][j+1]);
+	    GtsEdge * e3 = new_edge (v[i+1][j+1], v[i][j+1]);
+	    gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3));
+	    if (v[i+1][j]) {
+	      e1 = new_edge (v[i+1][j], v[i+1][j+1]);
+	      e3 = new_edge (v[i][j], v[i+1][j]);
+	      gts_surface_add_face (s, 
+				    gts_face_new (s->face_class, e1, e2, e3));
+	    }
+	  }
+	  else if (v[i+1][j]) {
+	    GtsEdge * e1 = new_edge (v[i][j+1], v[i][j]);
+	    GtsEdge * e2 = new_edge (v[i][j], v[i+1][j]);
+	    GtsEdge * e3 = 
+	      gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()), 
+			    v[i+1][j], v[i][j+1]);
+	    gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3));
+	  }
+	}
+	else if (v[i+1][j] && v[i+1][j+1]) {
+	  GtsEdge * e1 = new_edge (v[i][j], v[i+1][j]);
+	  GtsEdge * e2 = new_edge (v[i+1][j], v[i+1][j+1]);
+	  GtsEdge * e3 = 
+	    gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()),
+			  v[i+1][j+1], v[i][j]);
+	  gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3));
+	}
+      }
+      else if (v[i][j+1] && v[i+1][j+1] && v[i+1][j]) {
+	GtsEdge * e1 = new_edge (v[i+1][j], v[i+1][j+1]);
+	GtsEdge * e2 = new_edge (v[i+1][j+1], v[i][j+1]);
+	GtsEdge * e3 = 
+	  gts_edge_new (GTS_EDGE_CLASS (gts_constraint_class ()),
+			v[i][j+1], v[i+1][j]);
+	gts_surface_add_face (s, gts_face_new (s->face_class, e1, e2, e3));
+      }
+}
+
+static gboolean triangle_is_hole (GtsTriangle * t)
+{
+  GtsEdge * e1, * e2, * e3;
+  GtsVertex * v1, * v2, * v3;
+
+  gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3);
+
+  if ((GTS_IS_CONSTRAINT (e1) && GTS_SEGMENT (e1)->v2 != v1) ||
+      (GTS_IS_CONSTRAINT (e2) && GTS_SEGMENT (e2)->v2 != v2) ||
+      (GTS_IS_CONSTRAINT (e3) && GTS_SEGMENT (e3)->v2 != v3))
+    return TRUE;
+  return FALSE;
+}
+
+static void mark_as_hole (GtsFace * f, GtsSurface * s)
+{
+  GtsEdge * e1, * e2, * e3;
+
+  if (GTS_OBJECT (f)->reserved == f)
+    return;
+
+  GTS_OBJECT (f)->reserved = f;
+  e1 = GTS_TRIANGLE (f)->e1;
+  e2 = GTS_TRIANGLE (f)->e2;
+  e3 = GTS_TRIANGLE (f)->e3;
+
+  if (!GTS_IS_CONSTRAINT (e1)) {
+    GSList * i = e1->triangles;
+    while (i) {
+      GtsFace * f1 = i->data;
+      if (f1 != f && GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s))
+	mark_as_hole (f1, s);
+      i = i->next;
+    }
+  }
+  if (!GTS_IS_CONSTRAINT (e2)) {
+    GSList * i = e2->triangles;
+    while (i) {
+      GtsFace * f1 = i->data;
+      if (f1 != f && GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s))
+	mark_as_hole (f1, s);
+      i = i->next;
+    }
+  }
+  if (!GTS_IS_CONSTRAINT (e3)) {
+    GSList * i = e3->triangles;
+    while (i) {
+      GtsFace * f1 = i->data;
+      if (f1 != f && GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s))
+	mark_as_hole (f1, s);
+      i = i->next;
+    }
+  }
+}
+
+static void edge_mark_as_hole (GtsEdge * e, GtsSurface * s)
+{
+  GSList * i = e->triangles;
+
+  while (i) {
+    GtsFace * f = i->data;
+    if (GTS_IS_FACE (f) && 
+	gts_face_has_parent_surface (f, s) &&
+	triangle_is_hole (GTS_TRIANGLE (f)))
+      mark_as_hole (f, s);
+    i = i->next;
+  }
+}
+
+static gboolean face_is_marked (GtsObject * o)
+{
+  if (o->reserved == o || gts_triangle_is_duplicate (GTS_TRIANGLE (o)))
+    return TRUE;
+  return FALSE;
+}
+
+static void build_constraint_list (GtsEdge * e, gpointer * data)
+{
+  GtsSurface * s = data[0];
+  GSList ** constraints = data[1];
+  
+  if (gts_edge_is_boundary (e, s))
+    *constraints = g_slist_prepend (*constraints, e);
+}
+
+static GtsSurface * cartesian_grid_triangulate_holes (CartesianGrid * grid,
+						      GtsSurface * s)
+{
+  GtsVertex * v1, * v2, * v3, * v4;
+  GtsEdge * e1, * e2, * e3, * e4, * e5;
+  gdouble w, h;
+  GtsSurface * box;
+  GSList * constraints = NULL, * vertices = NULL, * i;
+  gpointer data[2];
+
+  g_return_val_if_fail (grid != NULL, NULL);
+  g_return_val_if_fail (s != NULL, NULL);
+
+  /* build enclosing box */
+  w = grid->xmax - grid->xmin;
+  h = grid->ymax - grid->ymin;
+  v1 = gts_vertex_new (s->vertex_class, grid->xmin - w, grid->ymin - h, 0.);
+  v2 = gts_vertex_new (s->vertex_class, grid->xmax + w, grid->ymin - h, 0.);
+  v3 = gts_vertex_new (s->vertex_class, grid->xmax + w, grid->ymax + h, 0.);
+  v4 = gts_vertex_new (s->vertex_class, grid->xmin - w, grid->ymax + h, 0.);
+
+  e1 = gts_edge_new (s->edge_class, v1, v2);
+  e2 = gts_edge_new (s->edge_class, v2, v3);
+  e3 = gts_edge_new (s->edge_class, v3, v4);
+  e4 = gts_edge_new (s->edge_class, v4, v1);
+  e5 = gts_edge_new (s->edge_class, v1, v3);
+
+  box = gts_surface_new (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass), 
+			 s->face_class, 
+			 s->edge_class, 
+			 s->vertex_class);
+  gts_surface_add_face (box, gts_face_new (s->face_class, e1, e2, e5));
+  gts_surface_add_face (box, gts_face_new (s->face_class, e3, e4, e5));
+
+  /* build vertex and constraint list from the boundaries of the input
+     surface s */
+  data[0] = s;
+  data[1] = &constraints;
+  gts_surface_foreach_edge (s, (GtsFunc) build_constraint_list, data);
+  vertices = gts_vertices_from_segments (constraints);
+
+  /* triangulate holes */
+  i = vertices;
+  while (i) {
+    g_assert (!gts_delaunay_add_vertex (box, i->data, NULL));
+    i = i->next;
+  }
+  g_slist_free (vertices);
+
+  i = constraints;
+  while (i) {
+    g_assert (!gts_delaunay_add_constraint (box, i->data));
+    i = i->next;
+  }
+
+  /* destroy corners of the enclosing box */
+  gts_allow_floating_vertices = TRUE;
+  gts_object_destroy (GTS_OBJECT (v1));
+  gts_object_destroy (GTS_OBJECT (v2));
+  gts_object_destroy (GTS_OBJECT (v3));
+  gts_object_destroy (GTS_OBJECT (v4));
+  gts_allow_floating_vertices = FALSE;
+
+  /* remove parts of the mesh which are not holes */
+  i = constraints;
+  while (i) {
+    edge_mark_as_hole (i->data, box);
+    i = i->next;
+  }
+  g_slist_free (constraints);
+
+  /* remove marked and duplicate faces */
+  gts_surface_foreach_face_remove (box, (GtsFunc) face_is_marked, NULL);
+
+  /* box now contains only the triangulated holes. */
+  return box;
+}
+
+int main (int argc, char * argv[])
+{
+  gboolean verbose = FALSE;
+  gboolean triangulate_holes = TRUE;
+  gboolean write_holes = FALSE;
+  int c = 0;
+  CartesianGrid * grid;
+  guint line;
+  GtsSurface * s;
+  GTimer * timer;
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"holes", no_argument, NULL, 'H'},
+      {"keep", no_argument, NULL, 'k'},
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvHk", 
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvHk"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'H': /* holes */
+      write_holes = TRUE;
+      break;
+    case 'k': /* keep */
+      triangulate_holes = FALSE;
+      break;
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: cartesian [OPTION] < FILE\n"
+	     "Triangulates vertices of a regular cartesian mesh\n"
+	     "(possibly containing holes)\n"
+	     "\n"
+	     "  -k    --keep     keep holes\n"
+	     "  -H    --holes    write holes only\n"
+	     "  -v    --verbose  print statistics about the surface\n"
+	     "  -h    --help     display this help and exit\n"
+	       "\n"
+	     "Reports bugs to %s\n",
+	       GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `cartesian --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+  
+  grid = cartesian_grid_read (gts_vertex_class (), &line);
+  if (grid == NULL) {
+    fprintf (stderr, 
+	   "cartesian: file on standard input is not a valid cartesian grid\n"
+	   "error at line %u\n", line);
+    return 1;
+  }
+
+  timer = g_timer_new ();
+  g_timer_start (timer);
+  s = gts_surface_new (gts_surface_class (), 
+		       gts_face_class (), 
+		       gts_edge_class (), 
+		       gts_vertex_class ());
+  cartesian_grid_triangulate (grid, s);
+  if (triangulate_holes) {    
+    GtsSurface * holes = cartesian_grid_triangulate_holes (grid, s);
+    if (write_holes) {
+      gts_object_destroy (GTS_OBJECT (s));
+      s = holes;
+    }
+    else
+      gts_surface_merge (s, holes);
+  }
+  g_timer_stop (timer);
+  
+  if (verbose) {
+    gts_surface_print_stats (s, stderr);
+    fprintf (stderr, "# Triangulation time: %g s speed: %.0f vertex/s\n", 
+	     g_timer_elapsed (timer, NULL),
+	     gts_surface_vertex_number (s)/g_timer_elapsed (timer, NULL));
+  }
+
+  gts_surface_write (s, stdout);
+
+  return 0; /* success */
+}
diff --git a/examples/cleanup.c b/examples/cleanup.c
new file mode 100644
index 0000000..eb5eae2
--- /dev/null
+++ b/examples/cleanup.c
@@ -0,0 +1,224 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+static void build_list (gpointer data, GSList ** list)
+{
+  /* always use O(1) g_slist_prepend instead of O(n) g_slist_append */
+  *list = g_slist_prepend (*list, data);
+}
+
+static void build_list1 (gpointer data, GList ** list)
+{
+  /* always use O(1) g_list_prepend instead of O(n) g_list_append */
+  *list = g_list_prepend (*list, data);
+}
+
+static void vertex_cleanup (GtsVertex * v)
+{
+  gts_vertex_is_contact (v, TRUE);
+}
+
+static void edge_cleanup (GtsSurface * surface)
+{
+  GSList * edges = NULL;
+  GSList * i;
+
+  g_return_if_fail (surface != NULL);
+
+  /* build list of edges */
+  gts_surface_foreach_edge (surface, (GtsFunc) build_list, &edges);
+
+  /* remove degenerate and duplicate edges.
+     Note: we could use gts_edges_merge() to remove the duplicates and then
+     remove the degenerate edges but it is more efficient to do everything 
+     at once (and it's more pedagogical too ...) */
+
+  /* We want to control manually the destruction of edges */
+  gts_allow_floating_edges = TRUE;
+
+  i = edges;
+  while (i) {
+    GtsEdge * e = i->data;
+    GtsEdge * duplicate;
+    if (GTS_SEGMENT (e)->v1 == GTS_SEGMENT (e)->v2) /* edge is degenerate */
+      /* destroy e */
+      gts_object_destroy (GTS_OBJECT (e));
+    else if ((duplicate = gts_edge_is_duplicate (e))) {
+      /* replace e with its duplicate */
+      gts_edge_replace (e, duplicate);
+      /* destroy e */
+      gts_object_destroy (GTS_OBJECT (e));
+    }
+    i = i->next;
+  }
+  
+  /* don't forget to reset to default */
+  gts_allow_floating_edges = FALSE;
+
+  /* free list of edges */
+  g_slist_free (edges);
+}
+
+static void triangle_cleanup (GtsSurface * s)
+{
+  GSList * triangles = NULL;
+  GSList * i;
+
+  g_return_if_fail (s != NULL);
+
+  /* build list of triangles */
+  gts_surface_foreach_face (s, (GtsFunc) build_list, &triangles);
+  
+  /* remove duplicate triangles */
+  i = triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (gts_triangle_is_duplicate (t))
+      /* destroy t, its edges (if not used by any other triangle)
+	 and its corners (if not used by any other edge) */
+      gts_object_destroy (GTS_OBJECT (t));
+    i = i->next;
+  }
+  
+  /* free list of triangles */
+  g_slist_free (triangles);
+}
+
+/* cleanup - using a given threshold merge vertices which are too close.
+   Eliminate degenerate and duplicate edges.
+   Eliminate duplicate triangles . */
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  GList * vertices = NULL;
+  gboolean verbose = FALSE, sever = FALSE;
+  gdouble threshold;
+  int c = 0;
+  guint line;
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"sever", no_argument, NULL, 's'},
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvs", 
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvs"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 's': /* sever */
+      sever = TRUE;
+      break;
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: cleanup [OPTION] THRESHOLD < FILE\n"
+	     "Merge vertices of the GTS surface FILE if they are closer than THRESHOLD,\n"
+	     "eliminate degenerate, duplicate edges and duplicate triangles.\n"
+	     "\n"
+	     "  -s    --sever    sever \"contact\" vertices\n"
+	     "  -v    --verbose  print statistics about the surface\n"
+	     "  -h    --help     display this help and exit\n"
+	     "\n"
+	     "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `cleanup --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+
+  if (optind >= argc) { /* missing threshold */
+    fprintf (stderr, 
+	     "cleanup: missing THRESHOLD\n"
+	     "Try `cleanup --help' for more information.\n");
+    return 1; /* failure */
+  }
+
+  threshold = atof (argv[optind]);
+
+  if (threshold < 0.0) { /* threshold must be positive */
+     fprintf (stderr, 
+	     "cleanup: THRESHOLD must be >= 0.0\n"
+	     "Try `cleanup --help' for more information.\n");
+    return 1; /* failure */
+  }
+
+  /* read surface in */
+  s = gts_surface_new (gts_surface_class (),
+		       gts_face_class (),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+  line = gts_surface_read (s, stdin);
+  if (line) {
+    fputs ("cleanup: file on standard input is not a valid GTS file\n", 
+	   stderr);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1; /* failure */
+  }
+
+  /* if verbose on print stats */
+  if (verbose)
+    gts_surface_print_stats (s, stderr);
+ 
+  /* merge vertices which are close enough */
+  /* build list of vertices */
+  gts_surface_foreach_vertex (s, (GtsFunc) build_list1, &vertices);
+  /* merge vertices: we MUST update the variable vertices because this function
+     modifies the list (i.e. removes the merged vertices). */
+  vertices = gts_vertices_merge (vertices, threshold);
+
+  if (sever)
+    g_list_foreach (vertices, (GFunc) vertex_cleanup, NULL);
+
+  /* free the list */
+  g_list_free (vertices);
+
+  /* eliminate degenerate and duplicate edges */
+  edge_cleanup (s);
+  /* eliminate duplicate triangles */
+  triangle_cleanup (s);
+
+  /* if verbose on print stats */
+  if (verbose)
+    gts_surface_print_stats (s, stderr);
+
+  /* write surface */
+  gts_surface_write (s, stdout);
+
+  return 0; /* success */
+}
diff --git a/examples/coarsen.c b/examples/coarsen.c
new file mode 100644
index 0000000..f42b002
--- /dev/null
+++ b/examples/coarsen.c
@@ -0,0 +1,301 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+#ifndef PI
+#define PI 3.14159265359
+#endif
+
+typedef enum { NUMBER, COST } StopOptions;
+typedef enum { COST_LENGTH, COST_OPTIMIZED } CostOptions;
+typedef enum { MIDVERTEX, OPTIMIZED } MidvertexOptions;
+
+static gboolean stop_number_verbose (gdouble cost, guint number, guint * min)
+{
+  static guint nmax = 0, nold = 0;
+  static GTimer * timer = NULL, * total_timer = NULL;
+
+  g_return_val_if_fail (min != NULL, TRUE);
+
+  if (timer == NULL) {
+    nmax = nold = number;
+    timer = g_timer_new ();
+    total_timer = g_timer_new ();
+    g_timer_start (total_timer);
+  }
+
+  if (number != nold && number % 121 == 0 &&
+      number < nmax && nmax > *min) {
+    gdouble total_elapsed = g_timer_elapsed (total_timer, NULL);
+    gdouble remaining;
+    gdouble hours, mins, secs;
+    gdouble hours1, mins1, secs1;
+
+    g_timer_stop (timer);
+
+    hours = floor (total_elapsed/3600.);
+    mins = floor ((total_elapsed - 3600.*hours)/60.);
+    secs = floor (total_elapsed - 3600.*hours - 60.*mins);
+
+    remaining = total_elapsed*((nmax - *min)/(gdouble) (nmax - number) - 1.);
+    hours1 = floor (remaining/3600.);
+    mins1 = floor ((remaining - 3600.*hours1)/60.);
+    secs1 = floor (remaining - 3600.*hours1 - 60.*mins1);
+
+    fprintf (stderr, 
+	     "\rEdges: %10u %3.0f%% %6.0f edges/s "
+	     "Elapsed: %02.0f:%02.0f:%02.0f "
+	     "Remaining: %02.0f:%02.0f:%02.0f ",
+	     number, 
+	     100.*(nmax - number)/(nmax - *min),
+	     (nold - number)/g_timer_elapsed (timer, NULL),
+	     hours, mins, secs,
+	     hours1, mins1, secs1);
+    fflush (stderr);
+
+    nold = number;
+    g_timer_start (timer);
+  }
+  if (number < *min) {
+    g_timer_destroy (timer);
+    g_timer_destroy (total_timer);
+    return TRUE;
+  }
+  return FALSE;
+}
+
+static gboolean stop_cost_verbose (gdouble cost, guint number, gdouble * max)
+{
+  g_return_val_if_fail (max != NULL, TRUE);
+
+  if (number % 121 == 0) {
+    fprintf (stderr, "\rEdges: %10u Cost: %10g ", number, cost);
+    fflush (stderr);
+  }
+  if (cost > *max)
+    return TRUE;
+  return FALSE;
+}
+
+/* coarsen - produce a coarsened version of the input */
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  GtsPSurface * ps = NULL;
+  gboolean verbose = FALSE;
+  gboolean progressive = FALSE;
+  guint number = 0;
+  gdouble cmax = 0.0;
+  StopOptions stop = NUMBER;
+  CostOptions cost = COST_OPTIMIZED;
+  MidvertexOptions mid = OPTIMIZED;
+  GtsKeyFunc cost_func = NULL;
+  GtsCoarsenFunc coarsen_func = NULL;
+  GtsStopFunc stop_func = NULL;
+  int c = 0;
+  guint line;
+  gdouble fold = PI/180.;
+  GtsVolumeOptimizedParams params = { 0.5, 0.5, 0. };
+  gpointer coarsen_data = NULL, cost_data = NULL;
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"progressive", no_argument, NULL, 'p'},
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'},
+      {"number", required_argument, NULL, 'n'},
+      {"length", no_argument, NULL, 'l'},
+      {"midvertex", no_argument, NULL, 'm'},
+      {"cost", required_argument, NULL, 'c'},
+      {"fold", required_argument, NULL, 'f'},
+      {"vweight", required_argument, NULL, 'w'},
+      {"bweight", required_argument, NULL, 'b'},
+      {"sweight", required_argument, NULL, 's'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvmc:n:lpf:w:b:s:",
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvmc:n:lpf:w:b:s:"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'p': /* write progressive surface */
+      progressive = TRUE;
+      break;
+    case 'n': /* stop by number */
+      stop = NUMBER;
+      number = atoi (optarg);
+      break;
+    case 'c': /* stop by cost */
+      stop = COST;
+      cmax = atof (optarg);
+      break;
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'm': /* midvertex */
+      mid = MIDVERTEX;
+      break;
+    case 'l': /* cost is length */
+      cost = COST_LENGTH;
+      break;
+    case 'f': /* fold angle */
+      fold = atof (optarg)*PI/180.;
+      break;
+    case 'w': /* volume optimized weight */
+      params.volume_weight = atof (optarg);
+      break;
+    case 'b': /* boundary optimized weight */
+      params.boundary_weight = atof (optarg);
+      break;
+    case 's': /* shape optimized weight */
+      params.shape_weight = atof (optarg);
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: coarsen [OPTION] < file.gts\n"
+	     "Construct a coarsened version of the input.\n"
+	     "\n"
+	     "  -n N, --number=N    stop the coarsening process if the number of\n"
+	     "                      edges was to fall below N\n"
+	     "  -c C, --cost=C      stop the coarsening process if the cost of collapsing\n"
+	     "                      an edge is larger than C\n"
+	     "  -m    --midvertex   use midvertex as replacement vertex\n"
+	     "                      default is volume optimized point\n"
+	     "  -l    --length      use length^2 as cost function\n"
+	     "                      default is optimized point cost\n"
+	     "  -f F, --fold=F      set maximum fold angle to F degrees\n"
+	     "                      default is one degree\n"
+	     "  -w W, --vweight=W   set weight used for volume optimization\n"
+	     "                      default is 0.5\n"
+	     "  -b W, --bweight=W   set weight used for boundary optimization\n"
+	     "                      default is 0.5\n"
+	     "  -s W, --sweight=W   set weight used for shape optimization\n"
+	     "                      default is 0.0\n"
+	     "  -p    --progressive write progressive surface file\n"
+	     "  -v    --verbose     print statistics about the surface\n"
+	     "  -h    --help        display this help and exit\n"
+	     "\n"
+	     "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `coarsen --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+  
+  /* read surface in */
+  s = gts_surface_new (gts_surface_class (),
+		       gts_face_class (),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+  line = gts_surface_read (s, stdin);
+  if (line) {
+    fputs ("coarsen: the file on standard input is not a valid GTS file\n", 
+	   stderr);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1; /* failure */
+  }
+
+  /* if verbose on print stats */
+  if (verbose) {
+    gts_surface_print_stats (s, stderr);
+    fprintf (stderr, "# volume: %g area: %g\n", 
+	     gts_surface_volume (s), gts_surface_area (s));
+  }
+
+  /* select the right coarsening process */
+  switch (cost) {
+  case COST_OPTIMIZED: 
+    cost_func = (GtsKeyFunc) gts_volume_optimized_cost; 
+    cost_data = ¶ms;
+    break;
+  case COST_LENGTH:
+    cost_func = NULL; break;
+  default:
+    g_assert_not_reached ();
+  }
+  switch (mid) {
+  case MIDVERTEX:
+    coarsen_func = NULL; break;
+  case OPTIMIZED:
+    coarsen_func = (GtsCoarsenFunc) gts_volume_optimized_vertex; 
+    coarsen_data = ¶ms;
+    break;
+  default:
+    g_assert_not_reached ();
+  }
+  switch (stop) {
+  case NUMBER:
+    if (verbose)
+      stop_func = (GtsStopFunc) stop_number_verbose;
+    else
+      stop_func = (GtsStopFunc) gts_coarsen_stop_number; 
+    break;
+  case COST:
+    if (verbose)
+      stop_func = (GtsStopFunc) stop_cost_verbose;
+    else
+      stop_func = (GtsStopFunc) gts_coarsen_stop_cost; 
+    break;
+  default:
+    g_assert_not_reached ();
+  }
+  if (progressive)
+    ps = gts_psurface_new (gts_psurface_class (),
+			   s, gts_split_class (),
+			   cost_func, cost_data,
+			   coarsen_func, coarsen_data,
+			   stop_func, &number, 
+			   fold);
+  else
+    gts_surface_coarsen (s, 
+			 cost_func, cost_data, 
+			 coarsen_func, coarsen_data, 
+			 stop_func, &number, fold);
+
+  /* if verbose on print stats */
+  if (verbose) {
+    fputc ('\n', stderr);
+    gts_surface_print_stats (s, stderr);
+    fprintf (stderr, "# volume: %g area: %g\n", 
+	     gts_surface_volume (s), gts_surface_area (s));
+  }
+
+  /* write resulting surface to standard output */
+  if (progressive)
+    gts_psurface_write (ps, stdout);
+  else
+    gts_surface_write (s, stdout);
+
+  return 0; /* success */
+}
diff --git a/examples/delaunay.c b/examples/delaunay.c
new file mode 100644
index 0000000..ee203c6
--- /dev/null
+++ b/examples/delaunay.c
@@ -0,0 +1,481 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+/* the file format is the classic GTS file format but only the vertex and 
+ * edge sections are read. */
+static guint read_list (GPtrArray * vertices,
+			GtsFifo * constraints,
+			GtsEdgeClass * edge_class,
+			FILE * fptr)
+{
+  guint nv, ne, nt, i;
+  guint line = 1;
+
+  g_return_val_if_fail (vertices != NULL, 1);
+  g_return_val_if_fail (constraints != NULL, 1);
+  g_return_val_if_fail (edge_class != NULL, 1);
+  g_return_val_if_fail (fptr != NULL, 1);
+
+  if (fscanf (fptr, "%u %u %u", &nv, &ne, &nt) != 3)
+    return line;
+  line++;
+
+  g_ptr_array_set_size (vertices, nv);
+  i = 1;
+  while (i <= nv) {
+    gdouble x, y, z;
+
+    if (fscanf (fptr, "%lf %lf %lf", &x, &y, &z) != 3)
+      return line;
+    line++;
+
+    g_ptr_array_index (vertices, i++ - 1) = 
+      gts_vertex_new (gts_vertex_class (), x, y, z);
+  }
+  
+  i = 1;
+  while (i <= ne) {
+    guint iv1, iv2;
+
+    if (fscanf (fptr, "%u %u", &iv1, &iv2) != 2 ||
+	iv1 <= 0 || iv1 > nv || iv2 <= 0 || iv2 > nv)
+      return line;
+    line++;
+
+    gts_fifo_push (constraints, 
+		   gts_edge_new (edge_class,
+				 g_ptr_array_index (vertices, iv1 - 1),
+				 g_ptr_array_index (vertices, iv2 - 1)));
+    i++;
+  }
+
+  return 0;
+}
+
+static gdouble triangle_cost (GtsTriangle * t, gpointer * data)
+{
+  gdouble * min_quality = data[0];
+  gdouble * max_area = data[1];
+  gdouble quality = gts_triangle_quality (t);
+  gdouble area = gts_triangle_area (t);
+  
+  if (quality < *min_quality || area > *max_area)
+    return quality;
+  return 0.;
+}
+
+static gboolean triangle_is_hole (GtsTriangle * t)
+{
+  GtsEdge * e1, * e2, * e3;
+  GtsVertex * v1, * v2, * v3;
+
+  gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3);
+
+  if ((GTS_IS_CONSTRAINT (e1) && GTS_SEGMENT (e1)->v1 != v1) ||
+      (GTS_IS_CONSTRAINT (e2) && GTS_SEGMENT (e2)->v1 != v2) ||
+      (GTS_IS_CONSTRAINT (e3) && GTS_SEGMENT (e3)->v1 != v3))
+    return TRUE;
+  return FALSE;
+}
+
+static guint delaunay_remove_holes (GtsSurface * surface)
+{
+  g_return_val_if_fail (surface != NULL, 0);
+
+  return gts_surface_foreach_face_remove (surface, 
+					  (GtsFunc) triangle_is_hole, NULL);
+}
+
+static void gts_constraint_split (GtsConstraint * c, 
+				  GtsSurface * s,
+				  GtsFifo * fifo)
+{
+  GSList * i;
+  GtsVertex * v1, * v2;
+  GtsEdge * e;
+
+  g_return_if_fail (c != NULL);
+  g_return_if_fail (s != NULL);
+
+  v1 = GTS_SEGMENT (c)->v1;
+  v2 = GTS_SEGMENT (c)->v2;
+  e = GTS_EDGE (c);
+
+  i = e->triangles;
+  while (i) {
+    GtsFace * f = i->data;
+    if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, s)) {
+      GtsVertex * v = gts_triangle_vertex_opposite (GTS_TRIANGLE (f), e);
+      if (gts_point_orientation (GTS_POINT (v1), 
+				 GTS_POINT (v2), 
+				 GTS_POINT (v)) == 0.) {
+	GSList * j = e->triangles;
+	GtsFace * f1 = NULL;
+	GtsEdge * e1, * e2;
+
+	/* replaces edges with constraints */
+	gts_triangle_vertices_edges (GTS_TRIANGLE (f), e,
+				     &v1, &v2, &v, &e, &e1, &e2);
+	if (!GTS_IS_CONSTRAINT (e1)) {
+	  GtsEdge * ne1 = 
+	    gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (c)->klass), v2, v);
+	  gts_edge_replace (e1, ne1);
+	  gts_object_destroy (GTS_OBJECT (e1));
+	  e1 = ne1;
+	  if (fifo) gts_fifo_push (fifo, e1);
+	}
+	if (!GTS_IS_CONSTRAINT (e2)) {
+	  GtsEdge * ne2 = 
+	    gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (c)->klass), v, v1);
+	  gts_edge_replace (e2, ne2);
+	  gts_object_destroy (GTS_OBJECT (e2));
+	  e2 = ne2;
+	  if (fifo) gts_fifo_push (fifo, e2);
+	}
+
+	/* look for face opposite */
+	while (j && !f1) {
+	  if (GTS_IS_FACE (j->data) && 
+	      gts_face_has_parent_surface (j->data, s))
+	    f1 = j->data;
+	  j = j->next;
+	}
+	if (f1) { /* c is not a boundary of s */
+	  GtsEdge * e3, * e4, * e5;
+	  GtsVertex * v3;
+	  gts_triangle_vertices_edges (GTS_TRIANGLE (f1), e,
+				       &v1, &v2, &v3, &e, &e3, &e4);
+	  e5 = gts_edge_new (s->edge_class, v, v3);
+	  gts_surface_add_face (s, gts_face_new (s->face_class, e5, e2, e3));
+	  gts_surface_add_face (s, gts_face_new (s->face_class, e5, e4, e1));
+	  gts_object_destroy (GTS_OBJECT (f1));
+	}
+	gts_object_destroy (GTS_OBJECT (f));
+	return;
+      }
+    }
+    i = i->next;
+  }
+}
+
+static void add_constraint (GtsConstraint * c, GtsSurface * s)
+{
+  g_assert (gts_delaunay_add_constraint (s, c) == NULL);
+}
+
+static void split_constraint (GtsConstraint * c, gpointer * data)
+{
+  GtsSurface * s = data[0];
+  GtsFifo * fifo = data[1];
+
+  gts_constraint_split (c, s, fifo);
+}
+
+static void shuffle_array (GPtrArray * a)
+{
+  guint i;
+
+  for (i = 0; i < a->len; i++) {
+    guint j = (gdouble) rand ()*(a->len - 1)/(gdouble) RAND_MAX;
+    guint k = (gdouble) rand ()*(a->len - 1)/(gdouble) RAND_MAX;
+    gpointer tmp;
+
+    if (j >= a->len) j = a->len - 1;
+    if (k >= a->len) k = a->len - 1;
+
+    tmp = g_ptr_array_index (a, j);
+    g_ptr_array_index (a, j) = g_ptr_array_index (a, k);
+    g_ptr_array_index (a, k) = tmp;
+  }
+}
+
+int main (int argc, char * argv[])
+{
+  GPtrArray * vertices;
+  GtsFifo * edges;
+  guint i, line;
+  GtsTriangle * t;
+  GtsVertex * v1, * v2, * v3;
+  GtsSurface * surface;
+  gboolean keep_hull = TRUE;
+  gboolean verbose = FALSE;
+  gboolean add_constraints = TRUE;
+  gboolean remove_holes = FALSE;
+  gboolean check_delaunay = FALSE;
+  gboolean conform = FALSE;
+  gboolean refine = FALSE;
+  gboolean split_constraints = FALSE;
+  gboolean randomize = FALSE;
+  gint steiner_max = -1;
+  gdouble quality = 0., area = G_MAXDOUBLE;
+  int c = 0, status = 0;
+  const char * fname = NULL;
+  GTimer * timer;
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'},
+      {"randomize", no_argument, NULL, 'r'},
+      {"hull", no_argument, NULL, 'b'},
+      {"noconst", no_argument, NULL, 'e'},
+      {"holes", no_argument, NULL, 'H'},
+      {"split", no_argument, NULL, 'S'},
+      {"check", no_argument, NULL, 'c'},
+      {"files", required_argument, NULL, 'f'},
+      {"conform", no_argument, NULL, 'o'},
+      {"steiner", required_argument, NULL, 's'},
+      {"quality", required_argument, NULL, 'q'},
+      {"area", required_argument, NULL, 'a'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvbecf:os:q:a:HSr",
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvbecf:os:q:a:HSr"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'b': /* do not keep convex hull */
+      keep_hull = FALSE;
+      break;
+    case 'e': /* do not add constrained edges */
+      add_constraints = FALSE;
+      break;
+    case 'H': /* remove holes */
+      remove_holes = TRUE;
+      break;
+    case 'S': /* split constraints */
+      split_constraints = TRUE;
+      break;
+    case 'r': /* randomize */
+      randomize = TRUE;
+      break;
+    case 'c': /* check Delaunay property */
+      check_delaunay = TRUE;
+      break;
+    case 'f': /* generates files */
+      fname = optarg;
+      break;      
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'o': /* conform */
+      conform = TRUE;
+      break;
+    case 's': /* steiner */
+      steiner_max = atoi (optarg);
+      break;
+    case 'q': /* quality */
+      conform = TRUE;
+      refine = TRUE;
+      quality = atof (optarg);
+      break;
+    case 'a': /* area */
+      conform = TRUE;
+      refine = TRUE;
+      area = atof (optarg);
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: delaunay [OPTION] < file.gts\n"
+	     "Construct the constrained Delaunay triangulation of the input\n"
+	     "\n"
+	     "  -b       --hull         do not keep convex hull\n"
+	     "  -e       --noconst      do not add constrained edges\n"
+	     "  -S       --split        split constraints (experimental)\n"
+	     "  -H       --holes        remove holes from the triangulation\n"
+	     "  -r       --randomize    shuffle input vertex list\n"
+	     "  -c       --check        check Delaunay property\n"
+	     "  -f FNAME --files=FNAME  generate evolution files\n"
+	     "  -o       --conform      generate conforming triangulation\n"
+	     "  -s N     --steiner=N    maximum number of Steiner points for\n"
+	     "                          conforming triangulation (default is no limit)\n"
+	     "  -q Q     --quality=Q    Set the minimum acceptable face quality\n"
+	     "  -a A     --area=A       Set the maximum acceptable face area\n"
+	     "  -v       --verbose      print statistics about the triangulation\n"
+	     "  -h       --help         display this help and exit\n"
+	     "\n"
+	     "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `delaunay --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+
+  /* read file => two lists: vertices and constraints */
+
+  edges = gts_fifo_new ();
+  vertices = g_ptr_array_new ();
+  if (add_constraints) /* the edge class is a GtsConstraintClass */
+    line = read_list (vertices, edges, 
+		      GTS_EDGE_CLASS (gts_constraint_class ()),
+		      stdin);
+  else /* the edge class is a "normal" edge: GtsEdgeClass */
+    line = read_list (vertices, edges, 
+		      gts_edge_class (), 
+		      stdin);
+
+  if (line > 0) {
+    fprintf (stderr, "delaunay: error in input file at line %u\n", line);
+    return 1;
+  }
+
+  timer = g_timer_new ();
+  g_timer_start (timer);
+
+  if (randomize)
+    shuffle_array (vertices);
+
+  /* create triangle enclosing all the vertices */
+  {
+    GSList * list = NULL;
+    for (i = 0; i < vertices->len; i++)
+      list = g_slist_prepend (list, g_ptr_array_index (vertices, i));
+    t = gts_triangle_enclosing (gts_triangle_class (), list, 100.);
+    g_slist_free (list);
+  }
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+
+  /* create surface with one face: the enclosing triangle */
+  surface = gts_surface_new (gts_surface_class (),
+			     gts_face_class (),
+			     gts_edge_class (),
+			     gts_vertex_class ());
+  gts_surface_add_face (surface, gts_face_new (gts_face_class (),
+					       t->e1, t->e2, t->e3));
+
+  /* add vertices */
+  for (i = 0; i < vertices->len; i++) {
+    GtsVertex * v1 = g_ptr_array_index (vertices, i);
+    GtsVertex * v = gts_delaunay_add_vertex (surface, v1, NULL);
+    g_assert (v != v1);
+    if (v != NULL) {
+      fprintf (stderr, "delaunay: duplicate vertex (%g,%g) in input file\n",
+	       GTS_POINT (v)->x, GTS_POINT (v)->y);
+      return 1; /* Failure */
+    }
+    if (fname) {
+      static guint nf = 1;
+      char s[80];
+      FILE * fp;
+
+      g_snprintf (s, 80, "%s.%u", fname, nf++);
+      fp = fopen (s, "wt");
+      gts_surface_write_oogl (surface, fp);
+      fclose (fp);
+
+      if (check_delaunay && gts_delaunay_check (surface)) {
+	fprintf (stderr, "delaunay: triangulation is not Delaunay\n");
+	return 1;
+      }
+    }
+  }
+  g_ptr_array_free (vertices, TRUE);
+
+  /* add remaining constraints */
+  if (add_constraints)
+    gts_fifo_foreach (edges, (GtsFunc) add_constraint, surface);
+
+  /* destroy enclosing triangle */
+  gts_allow_floating_vertices = TRUE;
+  gts_object_destroy (GTS_OBJECT (v1));
+  gts_object_destroy (GTS_OBJECT (v2));
+  gts_object_destroy (GTS_OBJECT (v3));
+  gts_allow_floating_vertices = FALSE;
+
+  if (!keep_hull)
+    gts_delaunay_remove_hull (surface);
+
+  if (remove_holes)
+    delaunay_remove_holes (surface);
+
+  if (split_constraints) {
+    gpointer data[2];
+
+    data[0] = surface;
+    data[1] = edges;
+    gts_fifo_foreach (edges, (GtsFunc) split_constraint, data);
+  }
+
+  if (conform) {
+    guint encroached_number = 
+      gts_delaunay_conform (surface, 
+			    steiner_max,
+			    (GtsEncroachFunc) gts_vertex_encroaches_edge,
+			    NULL);
+    if (encroached_number == 0 && refine) {
+      guint unrefined_number;
+      gpointer data[2];
+      
+      data[0] = &quality;
+      data[1] = &area;
+      unrefined_number = 
+	gts_delaunay_refine (surface, 
+			     steiner_max,
+			     (GtsEncroachFunc) gts_vertex_encroaches_edge,
+			     NULL,
+			     (GtsKeyFunc) triangle_cost,
+			     data);
+      if (verbose && unrefined_number > 0)
+	fprintf (stderr, 
+		 "delaunay: ran out of Steiner points (max: %d) during refinement\n"
+		 "%d unrefined faces left\n",
+		 steiner_max, unrefined_number);
+    }
+    else if (verbose && encroached_number > 0)
+      fprintf (stderr, 
+	       "delaunay: ran out of Steiner points (max: %d) during conforming\n"
+	       "Delaunay triangulation: %d encroached constraints left\n",
+	       steiner_max, encroached_number);
+  }
+  g_timer_stop (timer);
+
+  if (verbose) {
+    gts_surface_print_stats (surface, stderr);
+    fprintf (stderr, "# Triangulation time: %g s speed: %.0f vertex/s\n", 
+	  g_timer_elapsed (timer, NULL),
+	  gts_surface_vertex_number (surface)/g_timer_elapsed (timer, NULL));
+  }
+
+  if (check_delaunay && gts_delaunay_check (surface)) {
+    fprintf (stderr, "delaunay: triangulation is not Delaunay\n");
+    status = 1; /* failure */
+  }
+
+  /* write triangulation */
+  gts_surface_write (surface, stdout);
+
+  return status;
+}
diff --git a/examples/gtstoc.c b/examples/gtstoc.c
new file mode 100644
index 0000000..7dc5244
--- /dev/null
+++ b/examples/gtstoc.c
@@ -0,0 +1,80 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+static void write_vertex (GtsVertex * v, guint * nv)
+{
+  printf ("  GtsVertex * v%u = gts_vertex_new (gts_vertex_class (), %g, %g, %g);\n",
+	  *nv, GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z);
+  GTS_OBJECT (v)->reserved = GUINT_TO_POINTER ((*nv)++);
+}
+
+static void write_edge (GtsSegment * s, guint * ne)
+{
+  printf ("  GtsEdge * e%u = gts_edge_new (gts_edge_class (), v%u, v%u);\n",
+	  *ne, 
+	  GPOINTER_TO_UINT (GTS_OBJECT (s->v1)->reserved),
+	  GPOINTER_TO_UINT (GTS_OBJECT (s->v2)->reserved));
+  GTS_OBJECT (s)->reserved = GUINT_TO_POINTER ((*ne)++);
+}
+
+static void write_face (GtsTriangle * t, guint * nf)
+{
+  printf ("  GtsFace * f%u = gts_face_new (gts_face_class (),\n"
+	  "                                e%u, e%u, e%u);\n",
+	  (*nf)++, 
+	  GPOINTER_TO_UINT (GTS_OBJECT (t->e1)->reserved),
+	  GPOINTER_TO_UINT (GTS_OBJECT (t->e2)->reserved),
+	  GPOINTER_TO_UINT (GTS_OBJECT (t->e3)->reserved));
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  guint i, line;
+  guint nv = 1, ne = 1, nf = 1;
+
+  s = gts_surface_new (gts_surface_class (),
+		       gts_face_class (),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+  line = gts_surface_read (s, stdin);
+  if (line) {
+    fputs ("gtstoc: file on standard input is not a valid GTS file\n", 
+	   stderr);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1; /* failure */
+  }
+
+  printf ("  GtsSurface * surface = gts_surface_new (gts_surface_class (),\n"
+	  "                                          gts_face_class (),\n"
+	  "                                          gts_edge_class (),\n"
+	  "                                          gts_vertex_class ());\n\n");
+  gts_surface_foreach_vertex (s, (GtsFunc) write_vertex, &nv);
+  printf ("\n");
+  gts_surface_foreach_edge (s, (GtsFunc) write_edge, &ne);  
+  printf ("\n");
+  gts_surface_foreach_face (s, (GtsFunc) write_face, &nf);  
+  printf ("  \n");
+  for (i = 1; i < nf; i++)
+    printf ("  gts_surface_add_face (surface, f%u);\n", i);
+
+  return 0;
+}
diff --git a/examples/iso.c b/examples/iso.c
new file mode 100644
index 0000000..394210f
--- /dev/null
+++ b/examples/iso.c
@@ -0,0 +1,199 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+#ifndef PI
+#  define PI 3.14159265359
+#endif
+
+static void sphere (gdouble ** f, GtsCartesianGrid g, guint k, gpointer data)
+{
+  gdouble x, y, z = g.z;
+  guint i, j;
+
+  for (i = 0, x = g.x; i < g.nx; i++, x += g.dx)
+    for (j = 0, y = g.y; j < g.ny; j++, y += g.dy)
+      f[i][j] = x*x + y*y + z*z;
+}
+
+/* The Clebsch diagonal surface: a smooth cubic surface admitting the
+ * symmetry of the tetrahedron (courtesy Johannes Beigel).
+ */
+static void clebsch (gdouble ** f, GtsCartesianGrid g, guint k, gpointer data)
+{
+  gdouble x, y, z = g.z;
+  guint i, j;
+  gdouble w2 = sqrt (2.0);
+
+  for (i = 0, x = g.x; i < g.nx; i++, x += g.dx)
+    for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) {
+      /* tetrahedral coordinates */
+      gdouble p = 1. - z - w2*x;
+      gdouble q = 1. - z + w2*x;
+      gdouble r = 1. + z + w2*y;
+      gdouble s = 1. + z - w2*y;
+      /* symmetric polynomials */
+      gdouble c1 = p + q + r - s;
+      gdouble c2 = p*p*p + q*q*q + r*r*r - s*s*s;
+      
+      f[i][j] = c2 - c1*c1*c1;
+    }
+}
+
+/* The Barth decic: a degree 10 surface with 345 ordinary double points.
+ * (courtesy Johannes Beigel again).
+ */
+static void barth (gdouble ** f, GtsCartesianGrid g, guint k, gpointer data)
+{
+  gdouble x, y, z = g.z;
+  guint i, j;
+  gdouble  t = (1. + sqrt(5.))/2.;
+
+  for (i = 0, x = g.x; i < g.nx; i++, x += g.dx)
+    for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) {
+      gdouble t4 = t*t*t*t;
+      gdouble p1 = x*x - t4*y*y;
+      gdouble p2 = y*y - t4*z*z;
+      gdouble p3 = z*z - t4*x*x;
+      gdouble p4 = x*x*x*x + y*y*y*y + z*z*z*z 
+	- 2.*x*x*y*y - 2.*y*y*z*z - 2.*x*x*z*z;
+      gdouble tmp = x*x + y*y + z*z - 1.;
+      gdouble q1 = tmp*tmp;
+      gdouble tmp1 = x*x + y*y + z*z - (2. - t);
+      gdouble q2 = tmp1*tmp1;
+      
+      f[i][j] = 8.*p1*p2*p3*p4 + (3. + 5.*t)*q1*q2;
+    }
+}
+
+/* Returns isosurface f(x, y, z) = iso with f(x, y, z) = x*x + y*y + z*z. */
+int main (int argc, char * argv[])
+{
+  int c = 0;
+  GtsCartesianGrid g;
+  GtsSurface * surface;
+  gdouble iso;
+  gboolean verbose = FALSE;
+  GtsIsoCartesianFunc func = sphere;
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"barth", no_argument, NULL, 'b'},
+      {"clebsch", no_argument, NULL, 'c'},
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvbc", 
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvbc"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'b': /* Barth function */
+      func = barth;
+      break;
+    case 'c': /* Clebsch function */
+      func = clebsch;
+      break;
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: iso [OPTION] NX NY NZ VAL< file.gts\n"
+	     "Compute the isosurface of various functions (default is a sphere).\n"
+	     "The size of the cartesian mesh is given by NX, NY and NZ and the isosurface value by VAL.\n"
+	     "\n"
+	     "  -b    --barth    use the Barth decic function\n"
+	     "  -c    --clebsch  use the Clebsch function\n"
+	     "  -v    --verbose  print statistics about the surface\n"
+	     "  -h    --help     display this help and exit\n"
+	     "\n"
+	     "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `iso --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+
+  if (optind >= argc) { /* missing NX */
+    fprintf (stderr, 
+	     "iso: missing NX\n"
+	     "Try `iso --help' for more information.\n");
+    return 1; /* failure */
+  }
+  g.nx = atoi (argv[optind]);
+  
+  if (optind + 1 >= argc) { /* missing NY */
+    fprintf (stderr, 
+	     "iso: missing NY\n"
+	     "Try `iso --help' for more information.\n");
+    return 1; /* failure */
+  }
+  g.ny = atoi (argv[optind + 1]);
+
+  if (optind + 2 >= argc) { /* missing NZ */
+    fprintf (stderr, 
+	     "iso: missing NZ\n"
+	     "Try `iso --help' for more information.\n");
+    return 1; /* failure */
+  }
+  g.nz = atoi (argv[optind + 2]);
+
+  if (optind + 3 >= argc) { /* missing VAL */
+    fprintf (stderr, 
+	     "iso: missing VAL\n"
+	     "Try `iso --help' for more information.\n");
+    return 1; /* failure */
+  }
+  iso = atof (argv[optind + 3]);
+
+  /* interval is [-10:10][-10:10][-10:10] */
+  g.x = -10.0; g.dx = 20./(gdouble) (g.nx - 1);
+  g.y = -10.0; g.dy = 20./(gdouble) (g.ny - 1);
+  g.z = -10.0; g.dz = 20./(gdouble) (g.nz - 1);
+
+  surface = gts_surface_new (gts_surface_class (),
+			     gts_face_class (),
+			     gts_edge_class (),
+			     gts_vertex_class ());
+  gts_isosurface_cartesian (surface, g, func, NULL, iso);
+
+  if (verbose)
+    gts_surface_print_stats (surface, stderr);
+  gts_surface_write (surface, stdout);
+
+  return 0;
+}
diff --git a/examples/oocs.c b/examples/oocs.c
new file mode 100644
index 0000000..b4c88ed
--- /dev/null
+++ b/examples/oocs.c
@@ -0,0 +1,79 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#include "gts.h"
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  GtsBBox * bbox;
+  gdouble delta;
+  GtsPoint * p1, * p2, * p3;
+  guint nt;
+  GtsRange cluster_stats;
+  GtsClusterGrid * cluster_grid;
+  
+  if (argc != 2) {
+    fprintf (stderr, "usage: oocs DELTA < infile > outfile\n");
+    return 1;
+  }
+
+  s = gts_surface_new (gts_surface_class (),
+		       gts_face_class (),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+
+  bbox = gts_bbox_new (gts_bbox_class (), s, 0., 0., 0., 0., 0., 0.);
+  scanf ("%u", &nt);
+  scanf ("%lf %lf %lf", &bbox->x1, &bbox->y1, &bbox->z1);
+  scanf ("%lf %lf %lf", &bbox->x2, &bbox->y2, &bbox->z2);
+  delta = atof (argv[1])*sqrt (gts_bbox_diagonal2 (bbox));
+
+  cluster_grid = gts_cluster_grid_new (gts_cluster_grid_class (), 
+				       gts_cluster_class (), 
+				       s, bbox, delta);
+
+  p1 = gts_point_new (gts_point_class (), 0., 0., 0.);
+  p2 = gts_point_new (gts_point_class (), 0., 0., 0.);
+  p3 = gts_point_new (gts_point_class (), 0., 0., 0.);
+
+  while (scanf ("%lf %lf %lf", &p1->x, &p1->y, &p1->z) == 3 &&
+	 scanf ("%lf %lf %lf", &p2->x, &p2->y, &p2->z) == 3 &&
+	 scanf ("%lf %lf %lf", &p3->x, &p3->y, &p3->z) == 3)
+    gts_cluster_grid_add_triangle (cluster_grid, p1, p2, p3, NULL);
+  cluster_stats = gts_cluster_grid_update (cluster_grid);
+
+  gts_object_destroy (GTS_OBJECT (p1));
+  gts_object_destroy (GTS_OBJECT (p2));
+  gts_object_destroy (GTS_OBJECT (p3));
+  gts_object_destroy (GTS_OBJECT (cluster_grid));
+
+  fprintf (stderr, "Initial number of triangles: %u\n", nt);
+  fprintf (stderr, "%d clusters of size: min: %g avg: %.1f|%.1f max: %g\n",
+	   cluster_stats.n,
+	   cluster_stats.min, 
+	   cluster_stats.mean, cluster_stats.stddev, 
+	   cluster_stats.max);
+  gts_surface_print_stats (s, stderr);
+  gts_surface_write (s, stdout);
+
+  return 0;
+}
diff --git a/examples/partition.c b/examples/partition.c
new file mode 100644
index 0000000..4b27b8e
--- /dev/null
+++ b/examples/partition.c
@@ -0,0 +1,220 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+static GtsColor default_face_color = { 1., 1., 1.};
+
+static GtsColor random_color (void)
+{
+  GtsColor c;
+
+  c.r = rand ()/(gfloat) RAND_MAX;  
+  c.g = rand ()/(gfloat) RAND_MAX;  
+  c.b = rand ()/(gfloat) RAND_MAX;  
+
+  return c;
+}
+
+static GtsColor face_color (GtsObject * o)
+{
+  return default_face_color;
+}
+
+static gint compare_line (GtsNGNode * n1, GtsNGNode * n2)
+{
+  if (n1->id < n2->id)
+    return -1;
+  return 1;
+}
+
+static void create_heap (GtsGNode * n, GtsHeap * heap)
+{
+  gts_heap_insert (heap, n);
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  GtsGraph * g;
+  guint line, np;
+  guint nmin = 100;
+  guint mmax = 50;
+  guint ntry = 10;
+  GSList * partition;
+  int c = 0;
+  gboolean verbose = FALSE;
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'},
+      {"try", required_argument, NULL, 't'},
+      {"mmax", required_argument, NULL, 'm'},
+      {"nmin", required_argument, NULL, 'n'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvt:m:n:", 
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvt:m:n:"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 't': /* try */
+      ntry = atoi (optarg);
+      break;
+    case 'm': /* mmax */
+      mmax = atoi (optarg);
+      break;
+    case 'n': /* nmin */
+      nmin = atoi (optarg);
+      break;
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+	       "Usage: partition [OPTION] N < FILE\n"
+	       "Partition the graph defined by FILE into 2^N parts using recursive multilevel\n"
+	       "bisection.\n"
+	       "FILE can be either a GTS file or a GRAPH file (Jostle graph format).\n"
+	       "For GTS input the output is a OOGL (Geomview) description of the partitions.\n"
+	       "For GRAPH input the output is a graph partition (.ptn format) as defined in\n"
+	       "\"The Graph Partitioning Archive\" (http://www.gre.ac.uk/~c.walshaw/partition/).\n"
+	       "\n"
+	       "  -t N  --try=N    number of tries for graph growing (default 10)\n"
+	       "  -m N  --mmax=N   number of unsuccessful moves for Kernighan-Lin (default 50)\n"
+	       "  -n N  --nmin=N   minimum number of nodes on coarsest graph (default 100)\n"
+	       "  -v    --verbose  print statistics about the graph and partition\n"
+	       "  -h    --help     display this help and exit\n"
+	       "\n"
+	       "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `partition --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+
+  if (optind >= argc) { /* missing N */  
+    fprintf (stderr, 
+	     "partition: missing N\n"
+	     "Try `partition --help' for more information.\n");
+    return 1; /* failure */
+  }
+  np = atoi (argv[optind]);
+
+  s = gts_surface_new (gts_surface_class (),
+		       gts_face_class (),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+
+  line = gts_surface_read (s, stdin);
+  if (line) {
+    gts_object_destroy (GTS_OBJECT (s));
+    s = NULL;
+    rewind (stdin);
+    
+    g = gts_graph_new (GTS_GRAPH_CLASS (gts_wgraph_class ()),
+		       gts_gnode_class (), gts_gedge_class ());
+    line = gts_graph_read (g, stdin);
+    if (line) {
+      fputs ("partition: file on standard input is neither a valid GTS file nor a valid GRAPH file\n",
+	     stderr);
+      fprintf (stderr, "GRAPH format error at line %d\n", line);
+      return 1; /* failure */
+    }
+  }
+  else {
+    g = gts_surface_graph_new (GTS_GRAPH_CLASS (gts_wgraph_class ()), s);
+    if (verbose)
+      gts_surface_print_stats (s, stderr);
+  }
+
+  if (verbose)
+    gts_graph_print_stats (g, stderr);
+  partition = gts_graph_recursive_bisection (GTS_WGRAPH (g), 
+					     np, ntry, mmax, nmin);
+  if (verbose)
+    gts_graph_partition_print_stats (partition, stderr);
+
+  if (s) {
+    GSList * i;
+
+    printf ("LIST {\n");
+    GTS_OBJECT_CLASS (gts_face_class ())->color = face_color;
+    i = partition;
+    while (i) {
+      GtsSurface * s1 = gts_surface_graph_surface (i->data, s);
+      
+      gts_surface_write_oogl_boundary (s1, stdout);
+      default_face_color = random_color ();
+      gts_surface_write_oogl (s1, stdout);
+      gts_object_destroy (GTS_OBJECT (s1));
+      
+      i = i->next;
+    }
+    printf ("}\n");
+  }
+  else {
+    GSList * i = partition;
+    guint np = 0;
+    GtsHeap * heap;
+    GtsGNode * n;
+
+    while (i) {
+      GTS_OBJECT (i->data)->reserved = GUINT_TO_POINTER (np++);
+      i = i->next;
+    }
+
+    heap = gts_heap_new ((GCompareFunc) compare_line);
+    gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) create_heap, heap);
+
+    while ((n = gts_heap_remove_top (heap))) {
+      GSList * j = partition;
+      GtsGraph * own = NULL;
+      while (j && !own) {
+	if (gts_containee_is_contained (GTS_CONTAINEE (n), j->data))
+	  own = j->data;
+	j = j->next;
+      }
+      g_assert (own);
+      printf ("%d\n", GPOINTER_TO_UINT (GTS_OBJECT (own)->reserved));
+    }
+
+    gts_heap_destroy (heap);
+  }
+
+  return 0;
+}
+
diff --git a/examples/set.c b/examples/set.c
new file mode 100644
index 0000000..bf5f8f6
--- /dev/null
+++ b/examples/set.c
@@ -0,0 +1,137 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "gts.h"
+
+
+/* set - compute set operations between surfaces */
+int main (int argc, char * argv[])
+{
+  GtsSurface * s1, * s2, * s3;
+  GtsSurfaceInter * si;
+  GNode * tree1, * tree2;
+  FILE * fp;
+  guint line;
+
+  if (argc != 4) {
+    fprintf (stderr, 
+	     "%s: compute set operations between surfaces\n"
+	     "usage: %s OPERATION FILE1 FILE2\n"
+	     "where OPERATION is either union, inter, diff\n",
+	     argv[0], argv[0]);
+    return 1;
+  }
+
+  /* open first file */
+  if ((fp = fopen (argv[2], "rt")) == NULL) {
+    fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[2]);
+    return 1;
+  }
+  /* reads in first surface file */
+  s1 = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (gts_surface_class ())));
+  if ((line = gts_surface_read (s1, fp))) {
+    fprintf (stderr, "%s: `%s' is not a valid GTS surface file\n", 
+	     argv[0], argv[2]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+  fclose (fp);
+
+  /* open second file */
+  if ((fp = fopen (argv[3], "rt")) == NULL) {
+    fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[3]);
+    return 1;
+  }
+  /* reads in second surface file */
+  s2 = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (gts_surface_class ())));
+  if ((line = gts_surface_read (s2, fp))) {
+    fprintf (stderr, "%s: `%s' is not a valid GTS surface file\n", 
+	     argv[0], argv[3]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+  fclose (fp);
+
+  /* display summary information about both surfaces */
+  gts_surface_print_stats (s1, stderr);
+  gts_surface_print_stats (s2, stderr);
+
+  /* check that the surfaces are orientable manifolds */
+  if (!gts_surface_is_orientable (s1)) {
+    fprintf (stderr, "surface `%s' is not an orientable manifold\n",
+	     argv[2]);
+    return 1;
+  }
+  if (!gts_surface_is_orientable (s2)) {
+    fprintf (stderr, "surface `%s' is not an orientable manifold\n",
+	     argv[3]);
+    return 1;
+  }
+
+  /* build bounding box tree for first surface */
+  tree1 = gts_bb_tree_surface (s1);
+
+  /* build bounding box tree for second surface */
+  tree2 = gts_bb_tree_surface (s2);
+
+  si = gts_surface_inter_new (gts_surface_inter_class (),
+			      s1, s2, tree1, tree2);
+  g_assert (gts_surface_inter_check (si));
+  s3 = gts_surface_new (gts_surface_class (),
+			gts_face_class (),
+			gts_edge_class (),
+			gts_vertex_class ());  
+  if (!strcmp (argv[1], "union")) {
+    gts_surface_inter_boolean (si, s3, GTS_1_OUT_2);
+    gts_surface_inter_boolean (si, s3, GTS_2_OUT_1);
+  }
+  else if (!strcmp (argv[1], "inter")) {
+    gts_surface_inter_boolean (si, s3, GTS_1_IN_2);
+    gts_surface_inter_boolean (si, s3, GTS_2_IN_1);
+  }
+  else if (!strcmp (argv[1], "diff")) {
+    gts_surface_inter_boolean (si, s3, GTS_1_OUT_2);
+    gts_surface_inter_boolean (si, s3, GTS_2_IN_1);
+    gts_surface_foreach_face (si->s2, (GtsFunc) gts_triangle_revert, NULL);
+    gts_surface_foreach_face (s2, (GtsFunc) gts_triangle_revert, NULL);
+  }
+  else {
+    fprintf (stderr, "%s: operation `%s' unknown\n", argv[0], argv[1]);
+    return 1;
+  }
+  
+  /* display summary information about the resulting surface */
+  gts_surface_print_stats (s3, stderr);
+  /* write resulting surface to standard output */
+  gts_surface_write (s3, stdout);
+
+  /* destroy surfaces */
+  gts_object_destroy (GTS_OBJECT (s1));
+  gts_object_destroy (GTS_OBJECT (s2));
+  gts_object_destroy (GTS_OBJECT (s3));
+  gts_object_destroy (GTS_OBJECT (si));
+
+  /* destroy bounding box trees (including bounding boxes) */
+  gts_bb_tree_destroy (tree1, TRUE);
+  gts_bb_tree_destroy (tree2, TRUE);  
+
+  return 0;
+}
diff --git a/examples/transform.c b/examples/transform.c
new file mode 100644
index 0000000..4d1df97
--- /dev/null
+++ b/examples/transform.c
@@ -0,0 +1,253 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+#ifndef PI
+#define PI 3.14159265359
+#endif
+
+static void point_translate (GtsPoint * p, GtsVector t)
+{
+  p->x += t[0];
+  p->y += t[1];
+  p->z += t[2];
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  guint line;
+  GtsMatrix * m;
+  GtsVector translate = { 0., 0., 0. };
+  int c = 0;
+  gboolean verbose = FALSE;
+  gboolean revert = FALSE;
+
+  m = gts_matrix_new (1., 0., 0.,
+		      0., 1., 0.,
+		      0., 0., 1.);
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"rx", required_argument, NULL, 'r'},
+      {"ry", required_argument, NULL, 'm'},
+      {"rz", required_argument, NULL, 'n'},
+      {"scale", required_argument, NULL, 's'},
+      {"sx", required_argument, NULL, 'R'},
+      {"sy", required_argument, NULL, 'M'},
+      {"sz", required_argument, NULL, 'N'},
+      {"tx", required_argument, NULL, 't'},
+      {"ty", required_argument, NULL, 'u'},
+      {"tz", required_argument, NULL, 'w'},
+      {"revert", no_argument, NULL, 'i'},
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'},
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvr:m:n:s:R:M:N:it:u:w:",
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvr:m:n:s:R:M:N:it:u:w:"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'r': { /* rotate around x-axis */
+      gdouble angle, cosa, sina;
+      GtsMatrix * rot, * p;
+      
+      rot = gts_matrix_new (1., 0., 0.,
+			    0., 1., 0.,
+			    0., 0., 1.);
+      angle = atof (optarg)*PI/180.;
+      cosa = cos (angle);
+      sina = sin (angle);
+      rot[1][1] = cosa; rot[1][2] = -sina;
+      rot[2][1] = sina; rot[2][2] = cosa;
+      p = gts_matrix_product (m, rot);
+      gts_matrix_destroy (rot);
+      gts_matrix_destroy (m);
+      m = p;
+      break;
+    }
+    case 'm': { /* rotate around y-axis */
+      gdouble angle, cosa, sina;
+      GtsMatrix * rot, * p;
+      
+      rot = gts_matrix_new (1., 0., 0.,
+			    0., 1., 0.,
+			    0., 0., 1.);
+      angle = atof (optarg)*PI/180.;
+      cosa = cos (angle);
+      sina = sin (angle);
+      rot[0][0] = cosa; rot[0][2] = sina;
+      rot[2][0] = -sina; rot[2][2] = cosa;
+      p = gts_matrix_product (m, rot);
+      gts_matrix_destroy (rot);
+      gts_matrix_destroy (m);
+      m = p;
+      break;
+    }
+    case 'n': { /* rotate around z-axis */
+      gdouble angle, cosa, sina;
+      GtsMatrix * rot, * p;
+      
+      rot = gts_matrix_new (1., 0., 0.,
+			    0., 1., 0.,
+			    0., 0., 1.);
+      angle = atof (optarg)*PI/180.;
+      cosa = cos (angle);
+      sina = sin (angle);
+      rot[0][0] = cosa; rot[0][1] = -sina;
+      rot[1][0] = sina; rot[1][1] = cosa;
+      p = gts_matrix_product (m, rot);
+      gts_matrix_destroy (rot);
+      gts_matrix_destroy (m);
+      m = p;
+      break;
+    }
+    case 's': { /* scale */
+      GtsMatrix * scale, * p;
+      gdouble s = atof (optarg);
+
+      scale = gts_matrix_new (s,  0., 0.,
+			      0., s,  0.,
+			      0., 0., s);
+      p = gts_matrix_product (m, scale);
+      gts_matrix_destroy (scale);
+      gts_matrix_destroy (m);
+      m = p;
+      break;
+    }
+    case 'R': { /* sx */
+      GtsMatrix * scale, * p;
+      gdouble s = atof (optarg);
+
+      scale = gts_matrix_new (s,  0., 0.,
+			      0., 1., 0.,
+			      0., 0., 1.);
+      p = gts_matrix_product (m, scale);
+      gts_matrix_destroy (scale);
+      gts_matrix_destroy (m);
+      m = p;
+      break;
+    }
+    case 'M': { /* sy */
+      GtsMatrix * scale, * p;
+      gdouble s = atof (optarg);
+
+      scale = gts_matrix_new (1., 0., 0.,
+			      0., s,  0.,
+			      0., 0., 1.);
+      p = gts_matrix_product (m, scale);
+      gts_matrix_destroy (scale);
+      gts_matrix_destroy (m);
+      m = p;
+      break;
+    }
+    case 'N': { /* sz */
+      GtsMatrix * scale, * p;
+      gdouble s = atof (optarg);
+
+      scale = gts_matrix_new (1., 0., 0.,
+			      0., 1., 0.,
+			      0., 0., s);
+      p = gts_matrix_product (m, scale);
+      gts_matrix_destroy (scale);
+      gts_matrix_destroy (m);
+      m = p;
+      break;
+    }
+    case 't': /* tx */
+      translate[0] += atof (optarg);
+      break;
+    case 'u': /* ty */
+      translate[1] += atof (optarg);
+      break;
+    case 'w': /* tz */
+      translate[2] += atof (optarg);
+      break;
+    case 'i': /* revert */
+      revert = TRUE;
+      break;
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: transform [OPTION] < file.gts\n"
+	     "Apply geometric transformations to the input.\n"
+	     "\n"
+	     "  -r ANGLE  --rx=ANGLE      rotate around x-axis\n"
+	     "  -m ANGLE  --ry=ANGLE      rotate around y-axis\n"
+	     "  -n ANGLE  --rz=ANGLE      rotate around z-axis\n"
+	     "  -s FACTOR --scale=FACTOR  scale by FACTOR\n"
+	     "  -R FACTOR --sx=FACTOR     scale x-axis by FACTOR\n"
+	     "  -M FACTOR --sy=FACTOR     scale y-axis by FACTOR\n"
+	     "  -N FACTOR --sz=FACTOR     scale z-axis by FACTOR\n"
+             "  -t V      --tx=V          translate of V along x-axis\n"
+             "  -u V      --ty=V          translate of V along y-axis\n"
+             "  -w V      --tz=V          translate of V along z-axis\n"
+	     "  -i        --revert        turn surface inside out\n"
+	     "  -v        --verbose       print statistics about the surface\n"
+	     "  -h        --help          display this help and exit\n"
+	     "\n"
+	     "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `transform --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+
+  s = gts_surface_new (gts_surface_class (),
+		       gts_face_class (),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+
+  line = gts_surface_read (s, stdin);
+  if (line) {
+    fputs ("transform: file on standard input is not a valid GTS file\n", 
+	   stderr);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1; /* failure */
+  }
+
+  if (verbose)
+    gts_surface_print_stats (s, stderr);
+
+  if (revert)
+    gts_surface_foreach_face (s, (GtsFunc) gts_triangle_revert, NULL);
+  gts_surface_foreach_vertex (s, (GtsFunc) gts_point_transform, m);
+  gts_surface_foreach_vertex (s, (GtsFunc) point_translate, translate);
+  gts_surface_write (s, stdout);
+
+  return 0;
+}
diff --git a/examples/traverse.c b/examples/traverse.c
new file mode 100644
index 0000000..2a19bd6
--- /dev/null
+++ b/examples/traverse.c
@@ -0,0 +1,269 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+GtsRange depth_range;
+
+/* Colormap definition */
+
+typedef struct {
+  GPtrArray * colors;
+  gboolean reversed;
+} Colormap;
+
+Colormap * colormap = NULL;
+
+static GtsColor * color_new (gdouble r, gdouble g, gdouble b)
+{
+  GtsColor * c = g_malloc (sizeof (GtsColor));
+  c->r = r; c->g = g; c->b = b;
+  return c;
+}
+
+static Colormap * colormap_read (FILE * fptr)
+{
+  Colormap * cmap = g_malloc (sizeof (Colormap));
+  GtsColor c;
+  cmap->reversed = FALSE;
+  cmap->colors = g_ptr_array_new ();
+  while (fscanf (fptr, "%f %f %f", &c.r, &c.g, &c.b) == 3)
+    g_ptr_array_add (cmap->colors, color_new (c.r/255., c.g/255., c.b/255.));
+  return cmap;
+}
+
+static Colormap * colormap_red_blue (void)
+{
+  Colormap * cmap = g_malloc (sizeof (Colormap));
+  cmap->reversed = FALSE;
+  cmap->colors = g_ptr_array_new ();
+  g_ptr_array_add (cmap->colors, color_new (1.0, 0.0, 0.0));
+  g_ptr_array_add (cmap->colors, color_new (0.0, 0.0, 1.0));
+  return cmap;
+}
+
+static GtsColor colormap_color (Colormap * cmap, gdouble val)
+{
+  GtsColor c = {1., 1., 1.}, * c1, * c2;
+  guint i, n;
+  gdouble coef;
+
+  g_return_val_if_fail (cmap != NULL, c);
+
+  if (val > 1.0) val = 1.0;
+  else if (val < 0.0) val = 0.0;
+  if (cmap->reversed)
+    val = 1.0 - val;
+
+  n = cmap->colors->len;
+  if (n == 0)
+    return c;
+  if (n == 1)
+    return *((GtsColor *)cmap->colors->pdata[0]);
+
+  i = floor((gdouble)val*(gdouble)(n - 1));
+  if (i == n - 1)
+    return *((GtsColor *)cmap->colors->pdata[cmap->colors->len - 1]);
+  coef = val*(gdouble)(n - 1) - (gdouble)i;
+  c1 = cmap->colors->pdata[i];
+  c2 = cmap->colors->pdata[i+1];
+  c.r = c1->r + coef*(c2->r - c1->r);
+  c.g = c1->g + coef*(c2->g - c1->g);
+  c.b = c1->b + coef*(c2->b - c1->b);
+  return c;
+}
+
+/* New Face class definition */
+
+typedef struct _DepthFace         DepthFace;
+typedef struct _DepthFaceClass    DepthFaceClass;
+
+struct _DepthFace {
+  GtsFaceClass face;
+
+  guint depth;
+};
+
+struct _DepthFaceClass {
+  GtsFaceClass parent_class;
+};
+
+#define DEPTH_FACE(obj)            GTS_OBJECT_CAST (obj,\
+					           DepthFace,\
+					           depth_face_class ())
+#define DEPTH_FACE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         DepthFaceClass,\
+						         depth_face_class())
+#define IS_DEPTH_FACE(obj)         (gts_object_is_from_class (obj,\
+						   depth_face_class ()))
+     
+DepthFaceClass * depth_face_class                (void);
+
+static GtsColor depth_face_color (GtsObject * object)
+{
+  guint depth = DEPTH_FACE (object)->depth;
+
+  return colormap_color (colormap, (gdouble) depth/depth_range.max);
+}
+
+static void depth_face_class_init (DepthFaceClass * klass)
+{
+  /* overload color definition */
+  GTS_OBJECT_CLASS (klass)->color = depth_face_color;
+}
+
+static void depth_face_init (DepthFace * dface)
+{
+  dface->depth = 0;
+}
+
+DepthFaceClass * depth_face_class (void)
+{
+  static DepthFaceClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo depth_face_info = {
+      "DepthFace",
+      sizeof (DepthFace),
+      sizeof (DepthFaceClass),
+      (GtsObjectClassInitFunc) depth_face_class_init,
+      (GtsObjectInitFunc) depth_face_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_face_class ()),
+				  &depth_face_info);
+  }
+
+  return klass;
+}
+
+/* main functions */
+
+static void pick_first_face (GtsFace * f, GtsFace ** first)
+{
+  if (*first == NULL)
+    *first = f;
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  guint line;
+  GtsFace * first = NULL;
+  int c = 0;
+  gboolean verbose = FALSE;
+
+  colormap = colormap_red_blue (); /* default */
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"cmap", required_argument, NULL, 'c'},
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hvc:", 
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hvc:"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'c': { /* cmap */
+      FILE * fptr = fopen (optarg, "rt");
+      if (!fptr) {
+	fprintf (stderr, "traverse: cannot open colormap file `%s'.\n",
+		 optarg);
+	return 1;
+      }
+      colormap = colormap_read (fptr);
+      fclose (fptr);
+      break;
+    }
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: traverse [OPTION] < file.gts > file.oogl\n"
+	     "Output an OOGL (geomview) surface colored according to the (graph) distance\n"
+	     "from a random face to the others\n"
+	     "\n"
+	     "  -c FILE --cmap=FILE  load FILE as colormap\n"
+	     "  -v      --verbose    print statistics about the surface\n"
+	     "  -h      --help       display this help and exit\n"
+	     "\n"
+	     "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `traverse --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+
+  s = gts_surface_new (gts_surface_class (),
+		       GTS_FACE_CLASS (depth_face_class ()),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+  line = gts_surface_read (s, stdin);
+  if (line) {
+    fputs ("traverse: file on standard input is not a valid GTS file\n", 
+	   stderr);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1; /* failure */
+  }
+
+  if (verbose)
+    gts_surface_print_stats (s, stderr);
+
+  gts_surface_foreach_face (s, (GtsFunc) pick_first_face, &first);
+  gts_range_init (&depth_range);
+  if (first) {
+    GtsSurfaceTraverse * t = gts_surface_traverse_new (s, first);
+    GtsFace * f;
+    guint level;
+    while ((f = gts_surface_traverse_next (t, &level))) {
+      DEPTH_FACE (f)->depth = level;
+      gts_range_add_value (&depth_range, level);
+    }
+    gts_surface_traverse_destroy (t);
+  }
+  gts_range_update (&depth_range);
+  if (verbose) {
+    fputs ("distance: ", stderr);
+    gts_range_print (&depth_range, stderr);
+    fputc ('\n', stderr);
+  }
+  gts_surface_write_oogl (s, stdout);
+
+  return 0;
+}
diff --git a/examples/volume.c b/examples/volume.c
new file mode 100644
index 0000000..ba0fc34
--- /dev/null
+++ b/examples/volume.c
@@ -0,0 +1,102 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+/* volume - compute the volume of a given surface if it is a closed and
+   orientable manifold */
+int main (int argc, char * argv[])
+{
+  GtsSurface * s;
+  gboolean verbose = FALSE;
+  int c = 0;
+  guint line;
+
+  /* parse options using getopt */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"help", no_argument, NULL, 'h'},
+      {"verbose", no_argument, NULL, 'v'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "hv", 
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "hv"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'v': /* verbose */
+      verbose = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: volume [OPTION] < file.gts\n"
+	     "Compute the volume of the domain bounded by the surface defined by file.srf.\n"
+	     "Print the volume and exit successfully if the surface is a closed orientable\n"
+	     "manifold. Exit unsuccessfully otherwise.\n"
+	     "\n"
+	     "  -v    --verbose  print statistics about the surface\n"
+	     "  -h    --help     display this help and exit\n"
+	     "\n"
+	     "Reports bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0; /* success */
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `volume --help' for more information.\n");
+      return 1; /* failure */
+    }
+  }
+  
+  /* read surface in */
+  s = gts_surface_new (gts_surface_class (),
+		       gts_face_class (),
+		       gts_edge_class (),
+		       gts_vertex_class ());
+  line = gts_surface_read (s, stdin);
+  if (line) {
+    fputs ("volume: the file on standard input is not a valid GTS file\n", 
+	   stderr);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1; /* failure */
+  }
+
+  /* if verbose on print stats */
+  if (verbose)
+    gts_surface_print_stats (s, stdout);
+
+  /* test if surface is a closed and orientable manifold.
+     we don't need to test if s is a manifold since both tests below
+     implies that. */
+  if (!gts_surface_is_closed (s) || !gts_surface_is_orientable (s))
+    return 1; /* failure */
+  
+  /* print volume */
+  printf ("%g\n", gts_surface_volume (s));
+
+  return 0; /* success */
+}
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..e9de238
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/ltconfig b/ltconfig
new file mode 100755
index 0000000..a01334f
--- /dev/null
+++ b/ltconfig
@@ -0,0 +1,3078 @@
+#! /bin/sh
+
+# ltconfig - Create a system-specific libtool.
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A lot of this script is taken from autoconf-2.10.
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+echo=echo
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec "$SHELL" "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# Find the correct PATH separator.  Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != Xset; then
+  UNAME=${UNAME-`uname 2>/dev/null`}
+  case X$UNAME in
+    *-DOS) PATH_SEPARATOR=';' ;;
+    *)     PATH_SEPARATOR=':' ;;
+  esac
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test "X${echo_test_string+set}" != Xset; then
+  # find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
+   test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+  for dir in $PATH /usr/ucb; do
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running ltconfig again with it.
+      ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf "%s\n"'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+	   test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+	CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
+	   test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "$0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# The name of this program.
+progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
+
+# Constants:
+PROGRAM=ltconfig
+PACKAGE=libtool
+VERSION=1.3.4
+TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+rm="rm -f"
+
+help="Try \`$progname --help' for more information."
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+enable_shared=yes
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+enable_static=yes
+enable_fast_install=yes
+enable_dlopen=unknown
+enable_win32_dll=no
+ltmain=
+silent=
+srcdir=
+ac_config_guess=
+ac_config_sub=
+host=
+nonopt=
+ofile="$default_ofile"
+verify_host=yes
+with_gcc=no
+with_gnu_ld=no
+need_locks=yes
+ac_ext=c
+objext=o
+libext=a
+exeext=
+cache_file=
+
+old_AR="$AR"
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+old_CPPFLAGS="$CPPFLAGS"
+old_LDFLAGS="$LDFLAGS"
+old_LD="$LD"
+old_LN_S="$LN_S"
+old_LIBS="$LIBS"
+old_NM="$NM"
+old_RANLIB="$RANLIB"
+old_DLLTOOL="$DLLTOOL"
+old_OBJDUMP="$OBJDUMP"
+old_AS="$AS"
+
+# Parse the command line options.
+args=
+prev=
+for option
+do
+  case "$option" in
+  -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    eval "$prev=\$option"
+    prev=
+    continue
+  fi
+
+  case "$option" in
+  --help) cat <<EOM
+Usage: $progname [OPTION]... [HOST [LTMAIN]]
+
+Generate a system-specific libtool script.
+
+    --debug                enable verbose shell tracing
+    --disable-shared       do not build shared libraries
+    --disable-static       do not build static libraries
+    --disable-fast-install do not optimize for fast installation
+    --enable-dlopen        enable dlopen support
+    --enable-win32-dll     enable building dlls on win32 hosts
+    --help                 display this help and exit
+    --no-verify            do not verify that HOST is a valid host type
+-o, --output=FILE          specify the output file [default=$default_ofile]
+    --quiet                same as \`--silent'
+    --silent               do not print informational messages
+    --srcdir=DIR           find \`config.guess' in DIR
+    --version              output version information and exit
+    --with-gcc             assume that the GNU C compiler will be used
+    --with-gnu-ld          assume that the C compiler uses the GNU linker
+    --disable-lock         disable file locking
+    --cache-file=FILE      configure cache file
+
+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
+that provides basic libtool functionality.
+
+HOST is the canonical host system name [default=guessed].
+EOM
+  exit 0
+  ;;
+
+  --debug)
+    echo "$progname: enabling shell trace mode"
+    set -x
+    ;;
+
+  --disable-shared) enable_shared=no ;;
+
+  --disable-static) enable_static=no ;;
+
+  --disable-fast-install) enable_fast_install=no ;;
+
+  --enable-dlopen) enable_dlopen=yes ;;
+
+  --enable-win32-dll) enable_win32_dll=yes ;;
+
+  --quiet | --silent) silent=yes ;;
+
+  --srcdir) prev=srcdir ;;
+  --srcdir=*) srcdir="$optarg" ;;
+
+  --no-verify) verify_host=no ;;
+
+  --output | -o) prev=ofile ;;
+  --output=*) ofile="$optarg" ;;
+
+  --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
+
+  --with-gcc) with_gcc=yes ;;
+  --with-gnu-ld) with_gnu_ld=yes ;;
+
+  --disable-lock) need_locks=no ;;
+
+  --cache-file=*) cache_file="$optarg" ;;
+
+  -*)
+    echo "$progname: unrecognized option \`$option'" 1>&2
+    echo "$help" 1>&2
+    exit 1
+    ;;
+
+  *)
+    if test -z "$ltmain"; then
+      ltmain="$option"
+    elif test -z "$host"; then
+# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
+#      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
+#        echo "$progname: warning \`$option' is not a valid host type" 1>&2
+#      fi
+      host="$option"
+    else
+      echo "$progname: too many arguments" 1>&2
+      echo "$help" 1>&2
+      exit 1
+    fi ;;
+  esac
+done
+
+if test -z "$ltmain"; then
+  echo "$progname: you must specify a LTMAIN file" 1>&2
+  echo "$help" 1>&2
+  exit 1
+fi
+
+if test ! -f "$ltmain"; then
+  echo "$progname: \`$ltmain' does not exist" 1>&2
+  echo "$help" 1>&2
+  exit 1
+fi
+
+# Quote any args containing shell metacharacters.
+ltconfig_args=
+for arg
+do
+  case "$arg" in
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ltconfig_args="$ltconfig_args '$arg'" ;;
+  *) ltconfig_args="$ltconfig_args $arg" ;;
+  esac
+done
+
+# A relevant subset of AC_INIT.
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 5 compiler messages saved in config.log
+# 6 checking for... messages and results
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>>./config.log
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
+if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
+
+if test -n "$cache_file" && test -r "$cache_file"; then
+  echo "loading cache $cache_file within ltconfig"
+  . $cache_file
+fi
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+if test -z "$srcdir"; then
+  # Assume the source directory is the same one as the path to LTMAIN.
+  srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
+  test "$srcdir" = "$ltmain" && srcdir=.
+fi
+
+trap "$rm conftest*; exit 1" 1 2 15
+if test "$verify_host" = yes; then
+  # Check for config.guess and config.sub.
+  ac_aux_dir=
+  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+    if test -f $ac_dir/config.guess; then
+      ac_aux_dir=$ac_dir
+      break
+    fi
+  done
+  if test -z "$ac_aux_dir"; then
+    echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
+    echo "$help" 1>&2
+    exit 1
+  fi
+  ac_config_guess=$ac_aux_dir/config.guess
+  ac_config_sub=$ac_aux_dir/config.sub
+
+  # Make sure we can run config.sub.
+  if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
+  else
+    echo "$progname: cannot run $ac_config_sub" 1>&2
+    echo "$help" 1>&2
+    exit 1
+  fi
+
+  echo $ac_n "checking host system type""... $ac_c" 1>&6
+
+  host_alias=$host
+  case "$host_alias" in
+  "")
+    if host_alias=`$SHELL $ac_config_guess`; then :
+    else
+      echo "$progname: cannot guess host type; you must specify one" 1>&2
+      echo "$help" 1>&2
+      exit 1
+    fi ;;
+  esac
+  host=`$SHELL $ac_config_sub $host_alias`
+  echo "$ac_t$host" 1>&6
+
+  # Make sure the host verified.
+  test -z "$host" && exit 1
+
+elif test -z "$host"; then
+  echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
+  echo "$help" 1>&2
+  exit 1
+else
+  host_alias=$host
+fi
+
+# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+case "$host_os" in
+linux-gnu*) ;;
+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+esac
+
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+case "$host_os" in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR cru $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+# Set a sane default for `AR'.
+test -z "$AR" && AR=ar
+
+# Set a sane default for `OBJDUMP'.
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+# If RANLIB is not set, then run the test.
+if test "${RANLIB+set}" != "set"; then
+  result=no
+
+  echo $ac_n "checking for ranlib... $ac_c" 1>&6
+  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
+      RANLIB="ranlib"
+      result="ranlib"
+      break
+    fi
+  done
+  IFS="$save_ifs"
+
+  echo "$ac_t$result" 1>&6
+fi
+
+if test -n "$RANLIB"; then
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+fi
+
+# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$AS" && AS=as
+
+# Check to see if we are using GCC.
+if test "$with_gcc" != yes || test -z "$CC"; then
+  # If CC is not set, then try to find GCC or a usable CC.
+  if test -z "$CC"; then
+    echo $ac_n "checking for gcc... $ac_c" 1>&6
+    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+    for dir in $PATH; do
+      test -z "$dir" && dir=.
+      if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
+	CC="gcc"
+	break
+      fi
+    done
+    IFS="$save_ifs"
+
+    if test -n "$CC"; then
+      echo "$ac_t$CC" 1>&6
+    else
+      echo "$ac_t"no 1>&6
+    fi
+  fi
+
+  # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
+  if test -z "$CC"; then
+    echo $ac_n "checking for cc... $ac_c" 1>&6
+    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+    cc_rejected=no
+    for dir in $PATH; do
+      test -z "$dir" && dir=.
+      if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
+	if test "$dir/cc" = "/usr/ucb/cc"; then
+	  cc_rejected=yes
+	  continue
+	fi
+	CC="cc"
+	break
+      fi
+    done
+    IFS="$save_ifs"
+    if test $cc_rejected = yes; then
+      # We found a bogon in the path, so make sure we never use it.
+      set dummy $CC
+      shift
+      if test $# -gt 0; then
+	# We chose a different compiler from the bogus one.
+	# However, it has the same name, so the bogon will be chosen
+	# first if we set CC to just the name; use the full file name.
+	shift
+	set dummy "$dir/cc" "$@"
+	shift
+	CC="$@"
+      fi
+    fi
+
+    if test -n "$CC"; then
+      echo "$ac_t$CC" 1>&6
+    else
+      echo "$ac_t"no 1>&6
+    fi
+
+    if test -z "$CC"; then
+      echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
+      exit 1
+    fi
+  fi
+
+  # Now see if the compiler is really GCC.
+  with_gcc=no
+  echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
+  echo "$progname:581: checking whether we are using GNU C" >&5
+
+  $rm conftest.c
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+    with_gcc=yes
+  fi
+  $rm conftest.c
+  echo "$ac_t$with_gcc" 1>&6
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler="$2"
+
+echo $ac_n "checking for object suffix... $ac_c" 1>&6
+$rm conftest*
+echo 'int i = 1;' > conftest.c
+echo "$progname:603: checking for object suffix" >& 5
+if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
+  # Append any warnings to the config.log.
+  cat conftest.err 1>&5
+
+  for ac_file in conftest.*; do
+    case $ac_file in
+    *.c) ;;
+    *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
+    esac
+  done
+else
+  cat conftest.err 1>&5
+  echo "$progname: failed program was:" >&5
+  cat conftest.c >&5
+fi
+$rm conftest*
+echo "$ac_t$objext" 1>&6
+
+echo $ac_n "checking for executable suffix... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_exeext="no"
+  $rm conftest*
+  echo 'main () { return 0; }' > conftest.c
+  echo "$progname:629: checking for executable suffix" >& 5
+  if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
+    # Append any warnings to the config.log.
+    cat conftest.err 1>&5
+
+    for ac_file in conftest.*; do
+      case $ac_file in
+      *.c | *.err | *.$objext ) ;;
+      *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
+      esac
+    done
+  else
+    cat conftest.err 1>&5
+    echo "$progname: failed program was:" >&5
+    cat conftest.c >&5
+  fi
+  $rm conftest*
+fi
+if test "X$ac_cv_exeext" = Xno; then
+  exeext=""
+else
+  exeext="$ac_cv_exeext"
+fi
+echo "$ac_t$ac_cv_exeext" 1>&6
+
+echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
+pic_flag=
+special_shlib_compile_flags=
+wl=
+link_static_flag=
+no_builtin_flag=
+
+if test "$with_gcc" = yes; then
+  wl='-Wl,'
+  link_static_flag='-static'
+
+  case "$host_os" in
+  beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+    # PIC is the default for these OSes.
+    ;;
+  aix*)
+    # Below there is a dirty hack to force normal static linking with -ldl
+    # The problem is because libdl dynamically linked with both libc and
+    # libC (AIX C++ library), which obviously doesn't included in libraries
+    # list by gcc. This cause undefined symbols with -static flags.
+    # This hack allows C programs to be linked with "-static -ldl", but
+    # we not sure about C++ programs.
+    link_static_flag="$link_static_flag ${wl}-lC"
+    ;;
+  cygwin* | mingw* | os2*)
+    # We can build DLLs from non-PIC.
+    ;;
+  amigaos*)
+    # FIXME: we need at least 68020 code to build shared libraries, but
+    # adding the `-m68020' flag to GCC prevents building anything better,
+    # like `-m68040'.
+    pic_flag='-m68020 -resident32 -malways-restore-a4'
+    ;;
+  sysv4*MP*)
+    if test -d /usr/nec; then
+       pic_flag=-Kconform_pic
+    fi
+    ;;
+  *)
+    pic_flag='-fPIC'
+    ;;
+  esac
+else
+  # PORTME Check for PIC flags for the system compiler.
+  case "$host_os" in
+  aix3* | aix4*)
+    # All AIX code is PIC.
+    link_static_flag='-bnso -bI:/lib/syscalls.exp'
+    ;;
+
+  hpux9* | hpux10* | hpux11*)
+    # Is there a better link_static_flag that works with the bundled CC?
+    wl='-Wl,'
+    link_static_flag="${wl}-a ${wl}archive"
+    pic_flag='+Z'
+    ;;
+
+  irix5* | irix6*)
+    wl='-Wl,'
+    link_static_flag='-non_shared'
+    # PIC (with -KPIC) is the default.
+    ;;
+
+  cygwin* | mingw* | os2*)
+    # We can build DLLs from non-PIC.
+    ;;
+
+  osf3* | osf4* | osf5*)
+    # All OSF/1 code is PIC.
+    wl='-Wl,'
+    link_static_flag='-non_shared'
+    ;;
+
+  sco3.2v5*)
+    pic_flag='-Kpic'
+    link_static_flag='-dn'
+    special_shlib_compile_flags='-belf'
+    ;;
+
+  solaris*)
+    pic_flag='-KPIC'
+    link_static_flag='-Bstatic'
+    wl='-Wl,'
+    ;;
+
+  sunos4*)
+    pic_flag='-PIC'
+    link_static_flag='-Bstatic'
+    wl='-Qoption ld '
+    ;;
+
+  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+    pic_flag='-KPIC'
+    link_static_flag='-Bstatic'
+    wl='-Wl,'
+    ;;
+
+  uts4*)
+    pic_flag='-pic'
+    link_static_flag='-Bstatic'
+    ;;
+  sysv4*MP*)
+    if test -d /usr/nec ;then
+      pic_flag='-Kconform_pic'
+      link_static_flag='-Bstatic'
+    fi
+    ;;
+  *)
+    can_build_shared=no
+    ;;
+  esac
+fi
+
+if test -n "$pic_flag"; then
+  echo "$ac_t$pic_flag" 1>&6
+
+  # Check to make sure the pic_flag actually works.
+  echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
+  $rm conftest*
+  echo "int some_variable = 0;" > conftest.c
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $pic_flag -DPIC"
+  echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
+  if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+    # Append any warnings to the config.log.
+    cat conftest.err 1>&5
+    
+    case "$host_os" in
+    hpux9* | hpux10* | hpux11*)
+      # On HP-UX, both CC and GCC only warn that PIC is supported... then they
+      # create non-PIC objects.  So, if there were any warnings, we assume that
+      # PIC is not supported.
+      if test -s conftest.err; then
+	echo "$ac_t"no 1>&6
+	can_build_shared=no
+	pic_flag=
+      else
+	echo "$ac_t"yes 1>&6
+	pic_flag=" $pic_flag"
+      fi
+      ;;
+    *)
+      echo "$ac_t"yes 1>&6
+      pic_flag=" $pic_flag"
+      ;;
+    esac
+  else
+    # Append any errors to the config.log.
+    cat conftest.err 1>&5
+    can_build_shared=no
+    pic_flag=
+    echo "$ac_t"no 1>&6
+  fi
+  CFLAGS="$save_CFLAGS"
+  $rm conftest*
+else
+  echo "$ac_t"none 1>&6
+fi
+
+# Check to see if options -o and -c are simultaneously supported by compiler
+echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
+$rm conftest*
+echo "int some_variable = 0;" > conftest.c
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+# that will create temporary files in the current directory regardless of
+# the output directory.  Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do parallel
+# builds.
+chmod -w .
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -o out/conftest2.o"
+echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
+if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
+
+  # The compiler can only warn and ignore the option if not recognized
+  # So say no if there are warnings
+    if test -s out/conftest.err; then
+      echo "$ac_t"no 1>&6
+      compiler_c_o=no
+    else
+      echo "$ac_t"yes 1>&6
+      compiler_c_o=yes
+    fi
+else
+  # Append any errors to the config.log.
+  cat out/conftest.err 1>&5
+  compiler_c_o=no
+  echo "$ac_t"no 1>&6
+fi
+CFLAGS="$save_CFLAGS"
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
+
+if test x"$compiler_c_o" = x"yes"; then
+  # Check to see if we can write to a .lo
+  echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
+  $rm conftest*
+  echo "int some_variable = 0;" > conftest.c
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -c -o conftest.lo"
+  echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
+if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
+
+    # The compiler can only warn and ignore the option if not recognized
+    # So say no if there are warnings
+      if test -s conftest.err; then
+	echo "$ac_t"no 1>&6
+	compiler_o_lo=no
+      else
+	echo "$ac_t"yes 1>&6
+	compiler_o_lo=yes
+      fi
+  else
+    # Append any errors to the config.log.
+    cat conftest.err 1>&5
+    compiler_o_lo=no
+    echo "$ac_t"no 1>&6
+  fi
+  CFLAGS="$save_CFLAGS"
+  $rm conftest*
+else
+  compiler_o_lo=no
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links="nottested"
+if test "$compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$ac_t$hard_links" 1>&6
+  $rm conftest*
+  if test "$hard_links" = no; then
+    echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+if test "$with_gcc" = yes; then
+  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
+  echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
+  $rm conftest*
+  echo "int some_variable = 0;" > conftest.c
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
+  echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+  if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+
+    # The compiler can only warn and ignore the option if not recognized
+    # So say no if there are warnings
+      if test -s conftest.err; then
+	echo "$ac_t"no 1>&6
+	compiler_rtti_exceptions=no
+      else
+	echo "$ac_t"yes 1>&6
+	compiler_rtti_exceptions=yes
+      fi
+  else
+    # Append any errors to the config.log.
+    cat conftest.err 1>&5
+    compiler_rtti_exceptions=no
+    echo "$ac_t"no 1>&6
+  fi
+  CFLAGS="$save_CFLAGS"
+  $rm conftest*
+
+  if test "$compiler_rtti_exceptions" = "yes"; then
+    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+  else
+    no_builtin_flag=' -fno-builtin'
+  fi
+  
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$special_shlib_compile_flags"; then
+  echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
+  if echo "$old_CC $old_CFLAGS " | egrep -e "[ 	]$special_shlib_compile_flags[ 	]" >/dev/null; then :
+  else
+    echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
+    can_build_shared=no
+  fi
+fi
+
+echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
+$rm conftest*
+echo 'main(){return(0);}' > conftest.c
+save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $link_static_flag"
+echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  echo "$ac_t$link_static_flag" 1>&6
+else
+  echo "$ac_t"none 1>&6
+  link_static_flag=
+fi
+LDFLAGS="$save_LDFLAGS"
+$rm conftest*
+
+if test -z "$LN_S"; then
+  # Check to see if we can use ln -s, or we need hard links.
+  echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
+  $rm conftest.dat
+  if ln -s X conftest.dat 2>/dev/null; then
+    $rm conftest.dat
+    LN_S="ln -s"
+  else
+    LN_S=ln
+  fi
+  if test "$LN_S" = "ln -s"; then
+    echo "$ac_t"yes 1>&6
+  else
+    echo "$ac_t"no 1>&6
+  fi
+fi
+
+# Make sure LD is an absolute path.
+if test -z "$LD"; then
+  ac_prog=ld
+  if test "$with_gcc" = yes; then
+    # Check if gcc -print-prog-name=ld gives a path.
+    echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
+    echo "$progname:991: checking for ld used by GCC" >&5
+    ac_prog=`($CC -print-prog-name=ld) 2>&5`
+    case "$ac_prog" in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+    "")
+      # If it fails, then pretend we are not using GCC.
+      ac_prog=ld
+      ;;
+    *)
+      # If it is relative, then search for the first ld in PATH.
+      with_gnu_ld=unknown
+      ;;
+    esac
+  elif test "$with_gnu_ld" = yes; then
+    echo $ac_n "checking for GNU ld... $ac_c" 1>&6
+    echo "$progname:1015: checking for GNU ld" >&5
+  else
+    echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+    echo "$progname:1018: checking for non-GNU ld" >&5
+  fi
+
+  if test -z "$LD"; then
+    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+    for ac_dir in $PATH; do
+      test -z "$ac_dir" && ac_dir=.
+      if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+	LD="$ac_dir/$ac_prog"
+	# Check to see if the program is GNU ld.  I'd rather use --version,
+	# but apparently some GNU ld's only accept -v.
+	# Break only if it was the GNU/non-GNU ld that we prefer.
+	if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	  test "$with_gnu_ld" != no && break
+	else
+	  test "$with_gnu_ld" != yes && break
+	fi
+      fi
+    done
+    IFS="$ac_save_ifs"
+  fi
+
+  if test -n "$LD"; then
+    echo "$ac_t$LD" 1>&6
+  else
+    echo "$ac_t"no 1>&6
+  fi
+
+  if test -z "$LD"; then
+    echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
+    exit 1
+  fi
+fi
+
+# Check to see if it really is or is not GNU ld.
+echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
+# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+echo "$ac_t$with_gnu_ld" 1>&6
+
+# See if the linker supports building shared libraries.
+echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
+
+allow_undefined_flag=
+no_undefined_flag=
+need_lib_prefix=unknown
+need_version=unknown
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+archive_cmds=
+archive_expsym_cmds=
+old_archive_from_new_cmds=
+export_dynamic_flag_spec=
+whole_archive_flag_spec=
+thread_safe_flag_spec=
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+hardcode_shlibpath_var=unsupported
+runpath_var=
+always_export_symbols=no
+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *always*
+# included in the symbol list
+include_expsyms=
+# exclude_expsyms can be an egrep regular expression of symbols to exclude
+# it will be wrapped by ` (' and `)$', so one must not match beginning or
+# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+# platforms (ab)use it in PIC code, but their linkers get confused if
+# the symbol is explicitly referenced.  Since portable code cannot
+# rely on this symbol name, it's probably fine to never include it in
+# preloaded symbol tables.
+
+case "$host_os" in
+cygwin* | mingw*)
+  # FIXME: the MSVC++ port hasn't been tested in a loooong time
+  # When not using gcc, we currently assume that we are using
+  # Microsoft Visual C++.
+  if test "$with_gcc" != yes; then
+    with_gnu_ld=no
+  fi
+  ;;
+
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # If archive_cmds runs LD, not CC, wlarc should be empty
+  wlarc='${wl}'
+
+  # See if GNU ld supports shared libraries.
+  case "$host_os" in
+  aix3* | aix4*)
+    # On AIX, the GNU linker is very broken
+    ld_shlibs=no
+    cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+    ;;
+
+  amigaos*)
+    archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+
+    # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+    # that the semantics of dynamic libraries on AmigaOS, at least up
+    # to version 4, is to share data among multiple programs linked
+    # with the same dynamic library.  Since this doesn't match the
+    # behavior of shared libraries on other platforms, we can use
+    # them.
+    ld_shlibs=no
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+  cygwin* | mingw*)
+    # hardcode_libdir_flag_spec is actually meaningless, as there is
+    # no search path for DLLs.
+    hardcode_libdir_flag_spec='-L$libdir'
+    allow_undefined_flag=unsupported
+    always_export_symbols=yes
+
+    # Extract the symbol export list from an `--export-all' def file,
+    # then regenerate the def file from the symbol export list, so that
+    # the compiled dll only exports the symbol export list.
+    export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+      test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
+      $DLLTOOL --export-all --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs $convenience~
+      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
+
+    archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
+      _lt_hint=1;
+      for symbol in `cat $export_symbols`; do
+	echo "	\$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
+	_lt_hint=`expr 1 + \$_lt_hint`;
+      done~
+      test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
+      test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
+      $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+      $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
+      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
+      $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry at 12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
+
+      old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' 
+    ;;
+
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    else
+      archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
+      # can we support soname and/or expsyms with a.out? -oliva
+    fi
+    ;;
+
+  solaris* | sysv5*)
+    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+      ld_shlibs=no
+      cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;      
+
+  sunos4*)
+    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
+    wlarc=
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  *)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
+      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+    else
+      ld_shlibs=no
+    fi
+    ;;
+  esac
+
+  if test "$ld_shlibs" = yes; then
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    case $host_os in
+    cygwin* | mingw*)
+      # dlltool doesn't understand --whole-archive et. al.
+      whole_archive_flag_spec=
+      ;;
+    *)
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+        whole_archive_flag_spec=
+      fi
+      ;;
+    esac
+  fi
+else
+  # PORTME fill in a description of your system's linker (not GNU ld)
+  case "$host_os" in
+  aix3*)
+    allow_undefined_flag=unsupported
+    always_export_symbols=yes
+    archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
+    # Note: this linker hardcodes the directories in LIBPATH if there
+    # are no directories specified by -L.
+    hardcode_minus_L=yes
+    if test "$with_gcc" = yes && test -z "$link_static_flag"; then
+      # Neither direct hardcoding nor static linking is supported with a
+      # broken collect2.
+      hardcode_direct=unsupported
+    fi
+    ;;
+
+  aix4*)
+    hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
+    hardcode_libdir_separator=':'
+    if test "$with_gcc" = yes; then
+      collect2name=`${CC} -print-prog-name=collect2`
+      if test -f "$collect2name" && \
+	 strings "$collect2name" | grep resolve_lib_name >/dev/null
+      then
+	# We have reworked collect2
+	hardcode_direct=yes
+      else
+	# We have old collect2
+	hardcode_direct=unsupported
+	# It fails to find uninstalled libraries when the uninstalled
+	# path is not listed in the libpath.  Setting hardcode_minus_L
+	# to unsupported forces relinking
+	hardcode_minus_L=yes
+	hardcode_libdir_flag_spec='-L$libdir'
+	hardcode_libdir_separator=
+      fi
+      shared_flag='-shared'
+    else
+      shared_flag='${wl}-bM:SRE'
+      hardcode_direct=yes
+    fi
+    allow_undefined_flag=' ${wl}-berok'
+    archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
+    archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
+    case "$host_os" in aix4.[01]|aix4.[01].*)
+      # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
+      always_export_symbols=yes ;;
+    esac
+   ;;
+
+  amigaos*)
+    archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+    # see comment about different semantics on the GNU ld section
+    ld_shlibs=no
+    ;;
+
+  cygwin* | mingw*)
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    # hardcode_libdir_flag_spec is actually meaningless, as there is
+    # no search path for DLLs.
+    hardcode_libdir_flag_spec=' '
+    allow_undefined_flag=unsupported
+    # Tell ltmain to make .lib files, not .a files.
+    libext=lib
+    # FIXME: Setting linknames here is a bad hack.
+    archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+    # The linker will automatically build a .lib file if we build a DLL.
+    old_archive_from_new_cmds='true'
+    # FIXME: Should let the user specify the lib program.
+    old_archive_cmds='lib /OUT:$oldlib$oldobjs'
+    fix_srcfile_path='`cygpath -w $srcfile`'
+    ;;
+
+  freebsd1*)
+    ld_shlibs=no
+    ;;
+
+  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+  # support.  Future versions do this automatically, but an explicit c++rt0.o
+  # does not break anything, and helps significantly (at the cost of a little
+  # extra space).
+  freebsd2.2*)
+    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+  freebsd2*)
+    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+    hardcode_direct=yes
+    hardcode_minus_L=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+  freebsd*)
+    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  hpux9* | hpux10* | hpux11*)
+    case "$host_os" in
+    hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
+    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
+    esac
+    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator=:
+    hardcode_direct=yes
+    hardcode_minus_L=yes # Not in the search PATH, but as the default
+			 # location of the library.
+    export_dynamic_flag_spec='${wl}-E'
+    ;;
+
+  irix5* | irix6*)
+    if test "$with_gcc" = yes; then
+      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+    else
+      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+    fi
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    ;;
+
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'  # a.out
+    else
+      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts'      # ELF
+    fi
+    hardcode_libdir_flag_spec='${wl}-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  openbsd*)
+    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_direct=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  os2*)
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_minus_L=yes
+    allow_undefined_flag=unsupported
+    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
+    old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
+    ;;
+
+  osf3*)
+    if test "$with_gcc" = yes; then
+      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+    else
+      allow_undefined_flag=' -expect_unresolved \*'
+      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+    fi
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    ;;
+
+  osf4* | osf5*)  # As osf3* with the addition of the -msym flag
+    if test "$with_gcc" = yes; then
+      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+    else
+      allow_undefined_flag=' -expect_unresolved \*'
+      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+    fi
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    ;;
+
+  sco3.2v5*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+    hardcode_shlibpath_var=no
+    runpath_var=LD_RUN_PATH
+    hardcode_runpath_var=yes
+    ;;
+
+  solaris*)
+    no_undefined_flag=' -z text'
+    # $CC -shared without GNU ld will not create a library from C++
+    # object files and a static libstdc++, better avoid it by now
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+    hardcode_libdir_flag_spec='-R$libdir'
+    hardcode_shlibpath_var=no
+    case "$host_os" in
+    solaris2.[0-5] | solaris2.[0-5].*) ;;
+    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+    esac
+    ;;
+
+  sunos4*)
+    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_direct=yes
+    hardcode_minus_L=yes
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+    runpath_var='LD_RUN_PATH'
+    hardcode_shlibpath_var=no
+    hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
+    ;;  
+
+  sysv4.3*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+    hardcode_shlibpath_var=no
+    export_dynamic_flag_spec='-Bexport'
+    ;;
+
+  sysv5*)
+    no_undefined_flag=' -z text'
+    # $CC -shared without GNU ld will not create a library from C++
+    # object files and a static libstdc++, better avoid it by now
+    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+    hardcode_libdir_flag_spec=
+    hardcode_shlibpath_var=no
+    runpath_var='LD_RUN_PATH'
+    ;;
+
+  uts4*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_shlibpath_var=no
+    ;;
+
+  dgux*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+    hardcode_libdir_flag_spec='-L$libdir'
+    hardcode_shlibpath_var=no
+    ;;
+
+  sysv4*MP*)
+    if test -d /usr/nec; then
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+      hardcode_shlibpath_var=no
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ld_shlibs=yes
+    fi
+    ;;
+
+  sysv4.2uw2*)
+    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
+    hardcode_direct=yes
+    hardcode_minus_L=no
+    hardcode_shlibpath_var=no
+    hardcode_runpath_var=yes
+    runpath_var=LD_RUN_PATH
+    ;;
+
+  unixware7*)
+    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+    runpath_var='LD_RUN_PATH'
+    hardcode_shlibpath_var=no
+    ;;
+
+  *)
+    ld_shlibs=no
+    ;;
+  esac
+fi
+echo "$ac_t$ld_shlibs" 1>&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+if test -z "$NM"; then
+  echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
+  case "$NM" in
+  [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
+  *)
+    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+    for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
+      test -z "$ac_dir" && ac_dir=.
+      if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	  NM="$ac_dir/nm -B"
+	  break
+	elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	  NM="$ac_dir/nm -p"
+	  break
+	else
+	  NM=${NM="$ac_dir/nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	fi
+      fi
+    done
+    IFS="$ac_save_ifs"
+    test -z "$NM" && NM=nm
+    ;;
+  esac
+  echo "$ac_t$NM" 1>&6
+fi
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+
+# Define system-specific variables.
+case "$host_os" in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
+  ;;
+irix*)
+  symcode='[BCDEGRST]'
+  ;;
+solaris*)
+  symcode='[BDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+  symcode='[ABCDGISTW]'
+fi
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Write the raw and C identifiers.
+  global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode\)[ 	][ 	]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+  $rm conftest*
+  cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  echo "$progname:1635: checking if global_symbol_pipe works" >&5
+  if { (eval echo $progname:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { echo "$progname:1639: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
+	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
+
+	  cat <<EOF >> conftest.c
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+	  sed 's/^. \(.*\) \(.*\)$/  {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
+	  cat <<\EOF >> conftest.c
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$objext conftstm.$objext
+	  save_LIBS="$LIBS"
+	  save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$objext"
+	  CFLAGS="$CFLAGS$no_builtin_flag"
+	  if { (eval echo $progname:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+	    pipe_works=yes
+	  else
+	    echo "$progname: failed program was:" >&5
+	    cat conftest.c >&5
+	  fi
+	  LIBS="$save_LIBS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.c >&5
+  fi
+  $rm conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    global_symbol_pipe=
+  fi
+done
+if test "$pipe_works" = yes; then
+  echo "${ac_t}ok" 1>&6
+else
+  echo "${ac_t}failed" 1>&6
+fi
+
+if test -z "$global_symbol_pipe"; then
+  global_symbol_to_cdecl=
+fi
+
+# Check hardcoding attributes.
+echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var"; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$hardcode_shlibpath_var" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+echo "$ac_t$hardcode_action" 1>&6
+
+
+reload_flag=
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
+# PORTME Some linkers may need a different reload flag.
+reload_flag='-r'
+echo "$ac_t$reload_flag" 1>&6
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
+# PORTME Fill in your ld.so characteristics
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+file_magic_cmd=
+file_magic_test_file=
+deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
+case "$host_os" in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}.so$major'
+  ;;
+
+aix4*)
+  version_type=linux
+  # AIX has no versioning support, so currently we can not hardcode correct
+  # soname into executable. Probably we can add versioning support to
+  # collect2, so additional links can be useful in future.
+  # We preserve .a as extension for shared libraries though AIX4.2
+  # and later linker supports .so
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
+  shlibpath_var=LIBPATH
+  deplibs_check_method=pass_all
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}.so'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  deplibs_check_method=pass_all
+  lt_cv_dlopen="load_add_on"
+  lt_cv_dlopen_libs=
+  lt_cv_dlopen_self=yes
+  ;;
+
+bsdi4*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=/shlib/libc.so
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  export_dynamic_flag_spec=-rdynamic
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw*)
+  version_type=windows
+  need_version=no
+  need_lib_prefix=no
+  if test "$with_gcc" = yes; then
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
+  else
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+  fi
+  dynamic_linker='Win32 ld.exe'
+  deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  file_magic_cmd='${OBJDUMP} -f'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  lt_cv_dlopen="LoadLibrary"
+  lt_cv_dlopen_libs=
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+  
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case "$version_type" in
+    freebsd-elf*)
+      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+      file_magic_cmd=/usr/bin/file
+      file_magic_test_file=`echo /usr/lib/libc.so*`
+      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      deplibs_check_method=unknown
+      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case "$host_os" in
+  freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  dynamic_linker="$host_os dld.sl"
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  shlibpath_var=SHLIB_PATH
+  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
+  soname_spec='${libname}${release}.sl$major'
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6*)
+  version_type=irix
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}.so.$major'
+  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
+  case "$host_os" in
+  irix5*)
+    libsuff= shlibsuff=
+    # this will be overridden with pass_all, but let us keep it just in case
+    deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+    ;;
+  *)
+    case "$LD" in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+  deplibs_check_method='pass_all'
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+
+  if test -f /lib/ld.so.1; then
+    dynamic_linker='GNU ld.so'
+  else
+    # Only the GNU ld.so supports shared libraries on MkLinux.
+    case "$host_cpu" in
+    powerpc*) dynamic_linker=no ;;
+    *) dynamic_linker='Linux ld.so' ;;
+    esac
+  fi
+  ;;
+
+netbsd*)
+  version_type=sunos
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
+    soname_spec='${libname}${release}.so$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+openbsd*)
+  version_type=sunos
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+    need_version=no
+  fi
+  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+os2*)
+  libname_spec='$name'
+  need_lib_prefix=no
+  library_names_spec='$libname.dll $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_version=no
+  soname_spec='${libname}${release}.so'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  # this will be overridden with pass_all, but let us keep it just in case
+  deplibs_check_method='file_magic COFF format alpha shared library'
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=/shlib/libc.so
+  deplibs_check_method='pass_all'
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=/lib/libc.so
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case "$host_vendor" in
+    ncr)
+      deplibs_check_method='pass_all'
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+      file_magic_cmd=/usr/bin/file
+      file_magic_test_file=`echo /usr/lib/libc.so*`
+      ;;
+  esac
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
+    soname_spec='$libname.so.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$ac_t$dynamic_linker" 1>&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+# Report the final consequences.
+echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
+
+# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
+# configure.in, otherwise build static only libraries.
+case "$host_os" in
+cygwin* | mingw* | os2*)
+  if test x$can_build_shared = xyes; then
+    test x$enable_win32_dll = xno && can_build_shared=no
+    echo "checking if package supports dlls... $can_build_shared" 1>&6
+  fi
+;;
+esac
+
+if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
+  case "$deplibs_check_method" in
+  "file_magic "*)
+    file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+    if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+       egrep "$file_magic_regex" > /dev/null; then
+      :
+    else
+      cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+    fi ;;
+  esac
+fi
+
+echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+esac
+
+echo "$ac_t$enable_shared" 1>&6
+
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+
+echo "checking whether to build static libraries... $enable_static" 1>&6
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+echo $ac_n "checking for objdir... $ac_c" 1>&6
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$ac_t$objdir" 1>&6
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
+  lt_cv_dlopen=no lt_cv_dlopen_libs=
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "$progname:2212: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2220 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo $progname:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen""... $ac_c" 1>&6
+echo "$progname:2252: checking for dlopen" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2257 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+dlopen();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_dlopen=yes"
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dlopen=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="dlopen"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
+echo "$progname:2299: checking for dld_link in -ldld" >&5
+ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldld  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2307 "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link();
+
+int main() {
+dld_link()
+; return 0; }
+EOF
+if { (eval echo $progname:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load""... $ac_c" 1>&6
+echo "$progname:2339: checking for shl_load" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2344 "ltconfig"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+shl_load();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo $progname:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_shl_load=yes"
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_shl_load=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="shl_load"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
+echo "$progname:2387: checking for shl_load in -ldld" >&5
+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldld  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2395 "ltconfig"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load();
+
+int main() {
+shl_load()
+; return 0; }
+EOF
+if { (eval echo $progname:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+    
+fi
+
+  
+fi
+
+
+fi
+
+fi
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  fi
+
+  case "$lt_cv_dlopen" in
+  dlopen)
+for ac_hdr in dlfcn.h; do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "$progname:2452: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2457 "ltconfig"
+#include <$ac_hdr>
+int fnord = 0;
+EOF
+ac_try="$ac_compile >/dev/null 2>conftest.out"
+{ (eval echo $progname:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+    if test "x$ac_cv_header_dlfcn_h" = xyes; then
+      CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    fi
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+  echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2490: checking whether a program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+    lt_cv_dlopen_self=cross
+  else
+    cat > conftest.c <<EOF
+#line 2498 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL	RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+#  define LTDL_GLOBAL	DL_GLOBAL
+# else
+#  define LTDL_GLOBAL	0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+#  define LTDL_LAZY_OR_NOW	RTLD_LAZY
+# else
+#  ifdef DL_LAZY
+#   define LTDL_LAZY_OR_NOW	DL_LAZY
+#  else
+#   ifdef RTLD_NOW
+#    define LTDL_LAZY_OR_NOW	RTLD_NOW
+#   else
+#    ifdef DL_NOW
+#     define LTDL_LAZY_OR_NOW	DL_NOW
+#    else
+#     define LTDL_LAZY_OR_NOW	0
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
+
+EOF
+if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+  lt_cv_dlopen_self=yes
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  lt_cv_dlopen_self=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self" 1>&6
+
+  if test "$lt_cv_dlopen_self" = yes; then
+    LDFLAGS="$LDFLAGS $link_static_flag"
+  echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
+echo "$progname:2563: checking whether a statically linked program can dlopen itself" >&5
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+    lt_cv_dlopen_self_static=cross
+  else
+    cat > conftest.c <<EOF
+#line 2571 "ltconfig"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LTDL_GLOBAL	RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+#  define LTDL_GLOBAL	DL_GLOBAL
+# else
+#  define LTDL_GLOBAL	0
+# endif
+#endif
+
+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LTDL_LAZY_OR_NOW
+# ifdef RTLD_LAZY
+#  define LTDL_LAZY_OR_NOW	RTLD_LAZY
+# else
+#  ifdef DL_LAZY
+#   define LTDL_LAZY_OR_NOW	DL_LAZY
+#  else
+#   ifdef RTLD_NOW
+#    define LTDL_LAZY_OR_NOW	RTLD_NOW
+#   else
+#    ifdef DL_NOW
+#     define LTDL_LAZY_OR_NOW	DL_NOW
+#    else
+#     define LTDL_LAZY_OR_NOW	0
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+    if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
+
+EOF
+if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+  lt_cv_dlopen_self_static=yes
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  lt_cv_dlopen_self_static=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
+fi
+    ;;
+  esac
+
+  case "$lt_cv_dlopen_self" in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case "$lt_cv_dlopen_self_static" in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+# Copy echo and quote the copy, instead of the original, because it is
+# used later.
+ltecho="$echo"
+if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ltecho="$CONFIG_SHELL \$0 --fallback-echo"
+fi
+LTSHELL="$SHELL"
+
+LTCONFIG_VERSION="$VERSION"
+
+# Only quote variables if we're using ltmain.sh.
+case "$ltmain" in
+*.sh)
+  # Now quote all the things that may contain metacharacters.
+  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
+    old_LD old_LDFLAGS old_LIBS \
+    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
+    AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
+    reload_flag reload_cmds wl \
+    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+    library_names_spec soname_spec \
+    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
+    file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
+    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+    hardcode_libdir_flag_spec hardcode_libdir_separator  \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+
+    case "$var" in
+    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case "$ltecho" in
+  *'\$0 --fallback-echo"')
+    ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+  trap "$rm \"$ofile\"; exit 1" 1 2 15
+  echo "creating $ofile"
+  $rm "$ofile"
+  cat <<EOF > "$ofile"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
+#
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+### BEGIN LIBTOOL CONFIG
+EOF
+  cfgfile="$ofile"
+  ;;
+
+*)
+  # Double-quote the variables that need it (for aesthetics).
+  for var in old_CC old_CFLAGS old_CPPFLAGS \
+    old_LD old_LDFLAGS old_LIBS \
+    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
+    eval "$var=\\\"\$var\\\""
+  done
+
+  # Just create a config file.
+  cfgfile="$ofile.cfg"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  echo "creating $cfgfile"
+  $rm "$cfgfile"
+  cat <<EOF > "$cfgfile"
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+EOF
+  ;;
+esac
+
+cat <<EOF >> "$cfgfile"
+# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
+# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
+# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
+#   $0$ltconfig_args
+#
+# Compiler and other test output produced by $progname, useful for
+# debugging $progname, is in ./config.log if it exists.
+
+# The version of $progname that generated this script.
+LTCONFIG_VERSION=$LTCONFIG_VERSION
+
+# Shell to use when invoking shell scripts.
+SHELL=$LTSHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$ltecho
+
+# The archiver.
+AR=$AR
+
+# The default C compiler.
+CC=$CC
+
+# The linker used to build libraries.
+LD=$LD
+
+# Whether we need hard or soft links.
+LN_S=$LN_S
+
+# A BSD-compatible nm program.
+NM=$NM
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$reload_flag
+reload_cmds=$reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$wl
+
+# Object file suffix (normally "o").
+objext="$objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$pic_flag
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=$compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=$need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$RANLIB
+old_archive_cmds=$old_archive_cmds
+old_postinstall_cmds=$old_postinstall_cmds
+old_postuninstall_cmds=$old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$old_archive_from_new_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$archive_cmds
+archive_expsym_cmds=$archive_expsym_cmds
+postinstall_cmds=$postinstall_cmds
+postuninstall_cmds=$postuninstall_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$global_symbol_to_cdecl
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$include_expsyms
+
+EOF
+
+case "$ltmain" in
+*.sh)
+  echo '### END LIBTOOL CONFIG' >> "$ofile"
+  echo >> "$ofile"
+  case "$host_os" in
+  aix3*)
+    cat <<\EOF >> "$ofile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # Append the ltmain.sh script.
+  sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+
+  chmod +x "$ofile"
+  ;;
+
+*)
+  # Compile the libtool program.
+  echo "FIXME: would compile $ltmain"
+  ;;
+esac
+
+test -n "$cache_file" || exit 0
+
+# AC_CACHE_SAVE
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644
index 0000000..50515ad
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,4012 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun ltconfig.
+#
+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.3.4
+TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \015\012 \040\040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+if test "$LTCONFIG_VERSION" != "$VERSION"; then
+  echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
+  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit 1
+fi
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  echo "$modename: not configured to build any kind of library" 1>&2
+  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+  arg="$1"
+  shift
+
+  case "$arg" in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case "$prev" in
+    execute_dlfiles)
+      eval "$prev=\"\$$prev \$arg\""
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case "$arg" in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    exit 0
+    ;;
+
+  --config)
+    sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
+    exit 0
+    ;;
+
+  --debug)
+    echo "$progname: enabling shell trace mode"
+    set -x
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      echo "enable shared libraries"
+    else
+      echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      echo "enable static libraries"
+    else
+      echo "disable static libraries"
+    fi
+    exit 0
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --quiet | --silent)
+    show=:
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+fi
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    case "$nonopt" in
+    *cc | *++ | gcc* | *-gcc*)
+      mode=link
+      for arg
+      do
+	case "$arg" in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case "$mode" in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    lastarg=
+    srcfile="$nonopt"
+    suppress_output=
+
+    user_target=no
+    for arg
+    do
+      # Accept any command-line options.
+      case "$arg" in
+      -o)
+	if test "$user_target" != "no"; then
+	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	  exit 1
+	fi
+	user_target=next
+	;;
+
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+      esac
+
+      case "$user_target" in
+      next)
+	# The next one is the -o target name
+	user_target=yes
+	continue
+	;;
+      yes)
+	# We got the output file
+	user_target=set
+	libobj="$arg"
+	continue
+	;;
+      esac
+
+      # Accept the current argument as the source file.
+      lastarg="$srcfile"
+      srcfile="$arg"
+
+      # Aesthetically quote the previous argument.
+
+      # Backslashify any backslashes, double quotes, and dollar signs.
+      # These are the only characters that are still specially
+      # interpreted inside of double-quoted scrings.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly in scan
+      # sets, so we specify it separately.
+      case "$lastarg" in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      # Add the previous argument to base_compile.
+      if test -z "$base_compile"; then
+	base_compile="$lastarg"
+      else
+	base_compile="$base_compile $lastarg"
+      fi
+    done
+
+    case "$user_target" in
+    set)
+      ;;
+    no)
+      # Get the name of the library object.
+      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    *)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit 1
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSfmso]'
+    case "$libobj" in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case "$libobj" in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit 1
+      ;;
+    esac
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $libobj"
+    else
+      removelist="$libobj"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit 1" 1 2 15
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit 1" 1 2 15
+    else
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until ln "$0" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+      echo $srcfile > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      # All platforms use -DPIC, to notify preprocessed assembler code.
+      command="$base_compile $srcfile $pic_flag -DPIC"
+      if test "$build_old_libs" = yes; then
+	lo_libobj="$libobj"
+	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$dir" = "X$libobj"; then
+	  dir="$objdir"
+	else
+	  dir="$dir/$objdir"
+	fi
+	libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+	if test -d "$dir"; then
+	  $show "$rm $libobj"
+	  $run $rm $libobj
+	else
+	  $show "$mkdir $dir"
+	  $run $mkdir $dir
+	  status=$?
+	  if test $status -ne 0 && test ! -d $dir; then
+	    exit $status
+	  fi
+	fi
+      fi
+      if test "$compiler_o_lo" = yes; then
+	output_obj="$libobj"
+	command="$command -o $output_obj"
+      elif test "$compiler_c_o" = yes; then
+	output_obj="$obj"
+	command="$command -o $output_obj"
+      fi
+
+      $run $rm "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+	echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test x"$output_obj" != x"$libobj"; then
+	$show "$mv $output_obj $libobj"
+	if $run $mv $output_obj $libobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # If we have no pic_flag, then copy the object into place and finish.
+      if test -z "$pic_flag" && test "$build_old_libs" = yes; then
+	# Rename the .lo from within objdir to obj
+	if test -f $obj; then
+	  $show $rm $obj
+	  $run $rm $obj
+	fi
+
+	$show "$mv $libobj $obj"
+	if $run $mv $libobj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+
+	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$xdir" = "X$obj"; then
+	  xdir="."
+	else
+	  xdir="$xdir"
+	fi
+	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+	# Now arrange that obj and lo_libobj become the same file
+	$show "(cd $xdir && $LN_S $baseobj $libobj)"
+	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+	  exit 0
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Allow error messages only from the first compilation.
+      suppress_output=' >/dev/null 2>&1'
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      command="$base_compile $srcfile"
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+	output_obj="$obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+	echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed
+      if test x"$output_obj" != x"$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Create an invalid libtool object if no PIC, so that we do not
+      # accidentally link it into a program.
+      if test "$build_libtool_libs" != yes; then
+	$show "echo timestamp > $libobj"
+	$run eval "echo timestamp > \$libobj" || exit $?
+      else
+	# Move the .lo from within objdir
+	$show "$mv $libobj $lo_libobj"
+	if $run $mv $libobj $lo_libobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+    fi
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $rm "$lockfile"
+    fi
+
+    exit 0
+    ;;
+
+  # libtool link mode
+  link)
+    modename="$modename: link"
+    case "$host" in
+    *-*-cygwin* | *-*-mingw* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invokation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+
+      # This is a source program that is used to create dlls on Windows
+      # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+      # This is a source program that is used to create import libraries
+      # on Windows for dlls which lack them. Don't remove nor modify the
+      # starting and closing comments
+# /* impgen.c starts here */
+# /*   Copyright (C) 1999 Free Software Foundation, Inc.
+# 
+#  This file is part of GNU libtool.
+# 
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+# 
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+# 
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#  */
+# 
+#  #include <stdio.h>		/* for printf() */
+#  #include <unistd.h>		/* for open(), lseek(), read() */
+#  #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
+#  #include <string.h>		/* for strdup() */
+# 
+#  static unsigned int
+#  pe_get16 (fd, offset)
+#       int fd;
+#       int offset;
+#  {
+#    unsigned char b[2];
+#    lseek (fd, offset, SEEK_SET);
+#    read (fd, b, 2);
+#    return b[0] + (b[1]<<8);
+#  }
+# 
+#  static unsigned int
+#  pe_get32 (fd, offset)
+#      int fd;
+#      int offset;
+#  {
+#    unsigned char b[4];
+#    lseek (fd, offset, SEEK_SET);
+#    read (fd, b, 4);
+#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+#  }
+# 
+#  static unsigned int
+#  pe_as32 (ptr)
+#       void *ptr;
+#  {
+#    unsigned char *b = ptr;
+#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+#  }
+# 
+#  int
+#  main (argc, argv)
+#      int argc;
+#      char *argv[];
+#  {
+#      int dll;
+#      unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+#      unsigned long export_rva, export_size, nsections, secptr, expptr;
+#      unsigned long name_rvas, nexp;
+#      unsigned char *expdata, *erva;
+#      char *filename, *dll_name;
+# 
+#      filename = argv[1];
+# 
+#      dll = open(filename, O_RDONLY|O_BINARY);
+#      if (!dll)
+#  	return 1;
+# 
+#      dll_name = filename;
+#    
+#      for (i=0; filename[i]; i++)
+#  	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
+#  	    dll_name = filename + i +1;
+# 
+#      pe_header_offset = pe_get32 (dll, 0x3c);
+#      opthdr_ofs = pe_header_offset + 4 + 20;
+#      num_entries = pe_get32 (dll, opthdr_ofs + 92);
+# 
+#      if (num_entries < 1) /* no exports */
+#  	return 1;
+# 
+#      export_rva = pe_get32 (dll, opthdr_ofs + 96);
+#      export_size = pe_get32 (dll, opthdr_ofs + 100);
+#      nsections = pe_get16 (dll, pe_header_offset + 4 +2);
+#      secptr = (pe_header_offset + 4 + 20 +
+#  	      pe_get16 (dll, pe_header_offset + 4 + 16));
+# 
+#      expptr = 0;
+#      for (i = 0; i < nsections; i++)
+#      {
+#  	char sname[8];
+#  	unsigned long secptr1 = secptr + 40 * i;
+#  	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
+#  	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
+#  	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
+#  	lseek(dll, secptr1, SEEK_SET);
+#  	read(dll, sname, 8);
+#  	if (vaddr <= export_rva && vaddr+vsize > export_rva)
+#  	{
+#  	    expptr = fptr + (export_rva - vaddr);
+#  	    if (export_rva + export_size > vaddr + vsize)
+#  		export_size = vsize - (export_rva - vaddr);
+#  	    break;
+#  	}
+#      }
+# 
+#      expdata = (unsigned char*)malloc(export_size);
+#      lseek (dll, expptr, SEEK_SET);
+#      read (dll, expdata, export_size);
+#      erva = expdata - export_rva;
+# 
+#      nexp = pe_as32 (expdata+24);
+#      name_rvas = pe_as32 (expdata+32);
+# 
+#      printf ("EXPORTS\n");
+#      for (i = 0; i<nexp; i++)
+#      {
+#  	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
+#  	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+#      }
+# 
+#      return 0;
+#  }
+# /* impgen.c ends here */
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    linkopts=
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      lib_search_path=
+    fi
+    # now prepend the system-specific ones
+    eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+    
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    link_against_libtool_libs=
+    ltlibs=
+    module=no
+    objs=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case "$arg" in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test $# -gt 0; do
+      arg="$1"
+      shift
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case "$prev" in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case "$prev" in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case "$arg" in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit 1
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case "$arg" in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit 1
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi
+
+      prevarg="$arg"
+
+      case "$arg" in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: not more than one -exported-symbols argument allowed"
+	  exit 1
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case "$dir" in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    absdir="$dir"
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case " $deplibs " in
+	*" $arg "*) ;;
+	*) deplibs="$deplibs $arg";;
+	esac
+	case " $lib_search_path " in
+	*" $dir "*) ;;
+	*) lib_search_path="$lib_search_path $dir";;
+	esac
+	case "$host" in
+	*-*-cygwin* | *-*-mingw* | *-*-os2*)
+	  dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+	  case ":$dllsearchpath:" in
+	  ::) dllsearchpath="$dllsearchdir";;
+	  *":$dllsearchdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
+	  esac
+	  ;;
+	esac
+	;;
+
+      -l*)
+	if test "$arg" = "-lc"; then
+	  case "$host" in
+	  *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+	    # These systems don't actually have c library (as such)
+	    continue
+	    ;;
+	  esac
+	elif test "$arg" = "-lm"; then
+	  case "$host" in
+	  *-*-cygwin* | *-*-beos*)
+	    # These systems don't actually have math library (as such)
+	    continue
+	    ;;
+	  esac
+	fi
+	deplibs="$deplibs $arg"
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case "$dir" in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit 1
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# If we have no pic_flag, then this is the same as -all-static.
+	if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case "$arg" in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+
+      *.o | *.obj | *.a | *.lib)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A library object.
+	if test "$prev" = dlfiles; then
+	  dlfiles="$dlfiles $arg"
+	  if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
+	    prev=
+	    continue
+	  else
+	    # If libtool objects are unsupported, then we need to preload.
+	    prev=dlprefiles
+	  fi
+	fi
+
+	if test "$prev" = dlprefiles; then
+	  # Preload the old-style object.
+	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+	  prev=
+	fi
+	libobjs="$libobjs $arg"
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	dlname=
+	libdir=
+	library_names=
+	old_library=
+
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
+	  exit 1
+	fi
+
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variable installed.
+	installed=yes
+
+	# Read the .la file
+	# If there is no directory component, then add one.
+	case "$arg" in
+	*/* | *\\*) . $arg ;;
+	*) . ./$arg ;;
+	esac
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
+	  exit 1
+	fi
+
+	# Find the relevant object directory and library name.
+	name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
+
+	if test "X$installed" = Xyes; then
+	  dir="$libdir"
+	else
+	  dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$dir" = "X$arg"; then
+	    dir="$objdir"
+	  else
+	    dir="$dir/$objdir"
+	  fi
+	fi
+
+	if test -n "$dependency_libs"; then
+	  # Extract -R and -L from dependency_libs
+	  temp_deplibs=
+	  for deplib in $dependency_libs; do
+	    case "$deplib" in
+	    -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+		 case " $rpath $xrpath " in
+		 *" $temp_xrpath "*) ;;
+		 *) xrpath="$xrpath $temp_xrpath";;
+		 esac;;
+	    -L*) case "$compile_command $temp_deplibs " in
+		 *" $deplib "*) ;;
+		 *) temp_deplibs="$temp_deplibs $deplib";;
+		 esac
+		 temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+		 case " $lib_search_path " in
+		 *" $temp_dir "*) ;;
+		 *) lib_search_path="$lib_search_path $temp_dir";;
+		 esac
+		 ;;
+	    *) temp_deplibs="$temp_deplibs $deplib";;
+	    esac
+	  done
+	  dependency_libs="$temp_deplibs"
+	fi
+
+	if test -z "$libdir"; then
+	  # It is a libtool convenience library, so add in its objects.
+	  convenience="$convenience $dir/$old_library"
+	  old_convenience="$old_convenience $dir/$old_library"
+	  deplibs="$deplibs$dependency_libs"
+	  compile_command="$compile_command $dir/$old_library$dependency_libs"
+	  finalize_command="$finalize_command $dir/$old_library$dependency_libs"
+	  continue
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$prev" = dlfiles; then
+	  dlfiles="$dlfiles $arg"
+	  if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking statically,
+	    # we need to preload.
+	    prev=dlprefiles
+	  else
+	    # We should not create a dependency on this library, but we
+	    # may need any libraries it requires.
+	    compile_command="$compile_command$dependency_libs"
+	    finalize_command="$finalize_command$dependency_libs"
+	    prev=
+	    continue
+	  fi
+	fi
+
+	# The library was specified with -dlpreopen.
+	if test "$prev" = dlprefiles; then
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    dlprefiles="$dlprefiles $dir/$old_library"
+	  else
+	    dlprefiles="$dlprefiles $dir/$linklib"
+	  fi
+	  prev=
+	fi
+
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  link_against_libtool_libs="$link_against_libtool_libs $arg"
+	  if test -n "$shlibpath_var"; then
+	    # Make sure the rpath contains only unique directories.
+	    case "$temp_rpath " in
+	    *" $dir "*) ;;
+	    *) temp_rpath="$temp_rpath $dir" ;;
+	    esac
+	  fi
+
+	  # We need an absolute path.
+	  case "$dir" in
+	  [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+	  *)
+	    absdir=`cd "$dir" && pwd`
+	    if test -z "$absdir"; then
+	      $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+	      $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	      absdir="$dir"
+	    fi
+	    ;;
+	  esac
+	  
+	  # This is the magic to use -rpath.
+	  # Skip directories that are in the system default run-time
+	  # search path, unless they have been requested with -R.
+	  case " $sys_lib_dlsearch_path " in
+	  *" $absdir "*) ;;
+	  *)
+	    case "$compile_rpath " in
+	    *" $absdir "*) ;;
+	    *) compile_rpath="$compile_rpath $absdir" 
+	    esac
+	    ;;
+	  esac
+
+	  case " $sys_lib_dlsearch_path " in
+	  *" $libdir "*) ;;
+	  *)
+	    case "$finalize_rpath " in
+	    *" $libdir "*) ;;
+	    *) finalize_rpath="$finalize_rpath $libdir"
+	    esac
+	    ;;
+	  esac
+
+	  lib_linked=yes
+	  case "$hardcode_action" in
+	  immediate | unsupported)
+	    if test "$hardcode_direct" = no; then
+	      compile_command="$compile_command $dir/$linklib"
+	      deplibs="$deplibs $dir/$linklib"
+	      case "$host" in
+	      *-*-cygwin* | *-*-mingw* | *-*-os2*)
+		dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
+		if test -n "$dllsearchpath"; then
+		  dllsearchpath="$dllsearchpath:$dllsearchdir"
+		else
+		  dllsearchpath="$dllsearchdir"
+		fi
+		;;
+	      esac
+	    elif test "$hardcode_minus_L" = no; then
+	      case "$host" in
+	      *-*-sunos*)
+		compile_shlibpath="$compile_shlibpath$dir:"
+		;;
+	      esac
+	      case "$compile_command " in
+	      *" -L$dir "*) ;;
+	      *) compile_command="$compile_command -L$dir";;
+	      esac
+	      compile_command="$compile_command -l$name"
+	      deplibs="$deplibs -L$dir -l$name"
+	    elif test "$hardcode_shlibpath_var" = no; then
+	      case ":$compile_shlibpath:" in
+	      *":$dir:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$dir:";;
+	      esac
+	      compile_command="$compile_command -l$name"
+	      deplibs="$deplibs -l$name"
+	    else
+	      lib_linked=no
+	    fi
+	    ;;
+
+	  relink)
+	    if test "$hardcode_direct" = yes; then
+	      compile_command="$compile_command $absdir/$linklib"
+	      deplibs="$deplibs $absdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      case "$compile_command " in
+	      *" -L$absdir "*) ;;
+	      *) compile_command="$compile_command -L$absdir";;
+	      esac
+	      compile_command="$compile_command -l$name"
+	      deplibs="$deplibs -L$absdir -l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case ":$compile_shlibpath:" in
+	      *":$absdir:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$absdir:";;
+	      esac
+	      compile_command="$compile_command -l$name"
+	      deplibs="$deplibs -l$name"
+	    else
+	      lib_linked=no
+	    fi
+	    ;;
+
+	  *)
+	    lib_linked=no
+	    ;;
+	  esac
+
+	  if test "$lib_linked" != yes; then
+	    $echo "$modename: configuration error: unsupported hardcode properties"
+	    exit 1
+	  fi
+
+	  # Finalize command for both is simple: just hardcode it.
+	  if test "$hardcode_direct" = yes; then
+	    finalize_command="$finalize_command $libdir/$linklib"
+	  elif test "$hardcode_minus_L" = yes; then
+	    case "$finalize_command " in
+	    *" -L$libdir "*) ;;
+	    *) finalize_command="$finalize_command -L$libdir";;
+	    esac
+	    finalize_command="$finalize_command -l$name"
+	  elif test "$hardcode_shlibpath_var" = yes; then
+	    case ":$finalize_shlibpath:" in
+	    *":$libdir:"*) ;;
+	    *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
+	    esac
+	    finalize_command="$finalize_command -l$name"
+	  else
+	    # We cannot seem to hardcode it, guess we'll fake it.
+	    case "$finalize_command " in
+	    *" -L$dir "*) ;;
+	    *) finalize_command="$finalize_command -L$libdir";;
+	    esac
+	    finalize_command="$finalize_command -l$name"
+	  fi
+	else
+	  # Transform directly to old archives if we don't build new libraries.
+	  if test -n "$pic_flag" && test -z "$old_library"; then
+	    $echo "$modename: cannot find static library for \`$arg'" 1>&2
+	    exit 1
+	  fi
+
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_command="$compile_command $dir/$linklib"
+	    finalize_command="$finalize_command $dir/$linklib"
+	  else
+	    case "$compile_command " in
+	    *" -L$dir "*) ;;
+	    *) compile_command="$compile_command -L$dir";;
+	    esac
+	    compile_command="$compile_command -l$name"
+	    case "$finalize_command " in
+	    *" -L$dir "*) ;;
+	    *) finalize_command="$finalize_command -L$dir";;
+	    esac
+	    finalize_command="$finalize_command -l$name"
+	  fi
+	fi
+
+	# Add in any libraries that this one depends upon.
+	compile_command="$compile_command$dependency_libs"
+	finalize_command="$finalize_command$dependency_libs"
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case "$arg" in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	  arg="\"$arg\""
+	  ;;
+	esac
+	;;
+      esac
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    case "$output" in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+      ;;
+
+    *.a | *.lib)
+      if test -n "$link_against_libtool_libs"; then
+	$echo "$modename: error: cannot link libtool libraries into archives" 1>&2
+	exit 1
+      fi
+
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      ;;
+
+    *.la)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case "$outputname" in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$output_objdir" = "X$output"; then
+	output_objdir="$objdir"
+      else
+	output_objdir="$output_objdir/$objdir"
+      fi
+
+      if test -n "$objs"; then
+	$echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
+	exit 1
+      fi
+
+      # How the heck are we supposed to write a wrapper for a shared library?
+      if test -n "$link_against_libtool_libs"; then
+	 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
+	 exit 1
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test $# -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  libext=al
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+	dependency_libs="$deplibs"
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	current="$2"
+	revision="$3"
+	age="$4"
+
+	# Check that each of the things are valid numbers.
+	case "$current" in
+	0 | [1-9] | [1-9][0-9]*) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case "$revision" in
+	0 | [1-9] | [1-9][0-9]*) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case "$age" in
+	0 | [1-9] | [1-9][0-9]*) ;;
+	*)
+	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	if test $age -gt $current; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case "$version_type" in
+	none) ;;
+
+	irix)
+	  major=`expr $current - $age + 1`
+	  versuffix="$major.$revision"
+	  verstring="sgi$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test $loop != 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="sgi$major.$iface:$verstring"
+	  done
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test $loop != 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	windows)
+	  # Like Linux, but with '-' rather than '.', since we only
+	  # want one extension on Windows 95.
+	  major=`expr $current - $age`
+	  versuffix="-$major-$age-$revision"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  verstring="0.0"
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+	
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+
+	dependency_libs="$deplibs"
+	case "$host" in
+	*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
+	  # these systems don't actually have a c library (as such)!
+	  ;;
+	*)
+	  # Add libc to deplibs on all other systems.
+	  deplibs="$deplibs -lc"
+	  ;;
+	esac
+      fi
+
+      # Create the output directory, or remove our outputs if we need to.
+      if test -d $output_objdir; then
+	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+      else
+	$show "$mkdir $output_objdir"
+	$run $mkdir $output_objdir
+	status=$?
+	if test $status -ne 0 && test ! -d $output_objdir; then
+	  exit $status
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      if test "$build_libtool_libs" = yes; then
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case "$deplibs_check_method" in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behaviour.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $CC -o conftest conftest.c $deplibs
+	  if test $? -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+	      if test "$name" != "" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		set dummy $deplib_matches
+		deplib_match=$2
+		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		  newdeplibs="$newdeplibs $i"
+		else
+		  droppeddeps=yes
+		  echo
+		  echo "*** Warning: This library needs some functionality provided by $i."
+		  echo "*** I have the capability to make that library automatically link in when"
+		  echo "*** you link to this library.  But I can only do this if you have a"
+		  echo "*** shared version of the library, which you do not appear to have."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occured in the first compile.  Let's try to salvage the situation:
+	    # Compile a seperate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	     # If $name is empty we are operating on a -L argument.
+	      if test "$name" != "" ; then
+		$rm conftest
+		$CC -o conftest conftest.c $i
+		# Did it work?
+		if test $? -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    echo
+		    echo "*** Warning: This library needs some functionality provided by $i."
+		    echo "*** I have the capability to make that library automatically link in when"
+		    echo "*** you link to this library.  But I can only do this if you have a"
+		    echo "*** shared version of the library, which you do not appear to have."
+		  fi
+		else
+		  droppeddeps=yes
+		  echo
+		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  echo "***  make it link in!  You will probably need to install it or some"
+		  echo "*** library that it depends on before this library will be fully"
+		  echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test "$name" != "" ; then
+	      libname=`eval \\$echo \"$libname_spec\"`
+	      for i in $lib_search_path; do
+		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		    for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue 
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+			case "$potliblink" in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | sed 10q \
+			 | egrep "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		    done
+	      done
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		echo
+		echo "*** Warning: This library needs some functionality provided by $a_deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have."
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
+	     grep . >/dev/null; then
+	    echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    echo
+	    echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    echo "*** a static module, that should work as long as the dlopening"
+	    echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      echo
+	      echo "*** However, this would only work if libtool was able to extract symbol"
+	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      echo "*** not find such a program.  So, this module is probably useless."
+	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    echo "*** The inter-library dependencies that have been dropped here will be"
+	    echo "*** automatically added whenever a program is linked with this library"
+	    echo "*** or is declared to -dlopen it."
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+      
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	# Get the real and link names of the library.
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Ensure that we have .o objects for linkers which dislike .lo
+	# (e.g. aix) in case we are running --disable-static
+	for obj in $libobjs; do
+	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$obj"; then
+	    xdir="."
+	  else
+	    xdir="$xdir"
+	  fi
+	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+	  if test ! -f $xdir/$oldobj; then
+	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+	  fi
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    eval cmds=\"$export_symbols_cmds\"
+	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      $show "$cmd"
+	      $run eval "$cmd" || exit $?
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "mkdir $gentop"
+	    $run mkdir "$gentop"
+	    status=$?
+	    if test $status -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	    generated="$generated $gentop"
+
+	    for xlib in $convenience; do
+	      # Extract the objects.
+	      case "$xlib" in
+	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	      *) xabs=`pwd`"/$xlib" ;;
+	      esac
+	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	      xdir="$gentop/$xlib"
+
+	      $show "${rm}r $xdir"
+	      $run ${rm}r "$xdir"
+	      $show "mkdir $xdir"
+	      $run mkdir "$xdir"
+	      status=$?
+	      if test $status -ne 0 && test ! -d "$xdir"; then
+		exit $status
+	      fi
+	      $show "(cd $xdir && $AR x $xabs)"
+	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	      libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+	    done
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linkopts="$linkopts $flag"
+	fi
+
+	# Do each of the archive commands.
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval cmds=\"$archive_expsym_cmds\"
+	else
+	  eval cmds=\"$archive_cmds\"
+	fi
+	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    *.lo | *.o | *.obj)
+      if test -n "$link_against_libtool_libs"; then
+	$echo "$modename: error: cannot link libtool libraries into objects" 1>&2
+	exit 1
+      fi
+
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case "$output" in
+      *.lo)
+	if test -n "$objs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit 1
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl= 
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  $show "${rm}r $gentop"
+	  $run ${rm}r "$gentop"
+	  $show "mkdir $gentop"
+	  $run mkdir "$gentop"
+	  status=$?
+	  if test $status -ne 0 && test ! -d "$gentop"; then
+	    exit $status
+	  fi
+	  generated="$generated $gentop"
+
+	  for xlib in $convenience; do
+	    # Extract the objects.
+	    case "$xlib" in
+	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	    *) xabs=`pwd`"/$xlib" ;;
+	    esac
+	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	    xdir="$gentop/$xlib"
+
+	    $show "${rm}r $xdir"
+	    $run ${rm}r "$xdir"
+	    $show "mkdir $xdir"
+	    $run mkdir "$xdir"
+	    status=$?
+	    if test $status -ne 0 && test ! -d "$xdir"; then
+	      exit $status
+	    fi
+	    $show "(cd $xdir && $AR x $xabs)"
+	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	    reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+	  done
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
+
+      output="$obj"
+      eval cmds=\"$reload_cmds\"
+      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit 0
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	$show "echo timestamp > $libobj"
+	$run eval "echo timestamp > $libobj" || exit $?
+	exit 0
+      fi
+
+      if test -n "$pic_flag"; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	eval cmds=\"$reload_cmds\"
+	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      else
+	# Just create a symlink.
+	$show $rm $libobj
+	$run $rm $libobj
+	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+	if test "X$xdir" = "X$libobj"; then
+	  xdir="."
+	else
+	  xdir="$xdir"
+	fi
+	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
+	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit 0
+      ;;
+
+    # Anything else should be a program.
+    *)
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi 
+      fi
+    
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$compile_rpath " in
+	  *" $libdir "*) ;;
+	  *) compile_rpath="$compile_rpath $libdir" ;;
+	  esac
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$output_objdir" = "X$output"; then
+	output_objdir="$objdir"
+      else
+	output_objdir="$output_objdir/$objdir"
+      fi
+
+      # Create the binary in the object directory, then wrap it.
+      if test ! -d $output_objdir; then
+	$show "$mkdir $output_objdir"
+	$run $mkdir $output_objdir
+	status=$?
+	if test $status -ne 0 && test ! -d $output_objdir; then
+	  exit $status
+	fi
+      fi
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case "$dlsyms" in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+	    
+	    if test -n "$export_symbols_regex"; then
+	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$output.exp"
+	      $run $rm $export_symbols
+	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`echo "$arg" | sed -e 's%^.*/%%'`
+	    $run eval 'echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    sed -n -e 's/^: \([^ ]*\) $/  {\"\1\", (lt_ptr_t) 0},/p' \
+		-e 's/^. \([^ ]*\) \([^ ]*\)$/  {"\2", (lt_ptr_t) \&\2},/p' \
+		  < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr_t) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case "$host" in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit 1
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+	
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case "$dir" in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+	
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+      
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+	case "$0" in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit 1" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  link_against_libtool_libs='$link_against_libtool_libs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  echo >> $output "\
+  program=lt-'$outputname'
+  progdir=\"\$thisdir/$objdir\"
+  
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if (cd \"\$thisdir\" && eval \$relink_command); then :
+      else
+	$rm \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	*-*-cygwin* | *-*-mingw | *-*-os2*)
+	  # win32 systems need to use the prog path for dll
+	  # lookup to work
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+	*)
+	  $echo >> $output "\
+      # Export the path to the program.
+      PATH=\"\$progdir:\$PATH\"
+      export PATH
+
+      exec \$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit 0
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	$show "${rm}r $gentop"
+	$run ${rm}r "$gentop"
+	$show "mkdir $gentop"
+	$run mkdir "$gentop"
+	status=$?
+	if test $status -ne 0 && test ! -d "$gentop"; then
+	  exit $status
+	fi
+	generated="$generated $gentop"
+	  
+	# Add in members from convenience archives.
+	for xlib in $addlibs; do
+	  # Extract the objects.
+	  case "$xlib" in
+	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	  *) xabs=`pwd`"/$xlib" ;;
+	  esac
+	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	  xdir="$gentop/$xlib"
+
+	  $show "${rm}r $xdir"
+	  $run ${rm}r "$xdir"
+	  $show "mkdir $xdir"
+	  $run mkdir "$xdir"
+	  status=$?
+	  if test $status -ne 0 && test ! -d "$xdir"; then
+	    exit $status
+	  fi
+	  $show "(cd $xdir && $AR x $xabs)"
+	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+	done
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	eval cmds=\"$old_archive_from_new_cmds\"
+      else
+	# Ensure that we have .o objects in place in case we decided
+	# not to build a shared library, and have fallen back to building
+	# static libs even though --disable-static was passed!
+	for oldobj in $oldobjs; do
+	  if test ! -f $oldobj; then
+	    xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$oldobj"; then
+	      xdir="."
+	    else
+	      xdir="$xdir"
+	    fi
+	    baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+	    obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+	    $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+	    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+	  fi
+	done
+
+	eval cmds=\"$old_archive_cmds\"
+      fi
+      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case "$output" in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      if test -n "$xrpath"; then
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	done
+	dependency_libs="$temp_xrpath $dependency_libs"
+      fi
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	  fi
+	  $rm $output
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$dlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'\
+"
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
+      ;;
+    esac
+    exit 0
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case "$arg" in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case "$arg" in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case "$arg" in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case "$arg" in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test $# -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+    fi
+    case "$destdir" in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case "$file" in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case "$file" in
+      *.a | *.lib)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	library_names=
+	old_library=
+	# If there is no directory component, then add one.
+	case "$file" in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$realname $destdir/$realname"
+	  $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+
+	  if test $# -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  eval cmds=\"$postinstall_cmds\"
+	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case "$destfile" in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.o | *.obj)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit 0
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Do a test to see if this is really a libtool program.
+	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  link_against_libtool_libs=
+	  relink_command=
+
+	  # If there is no directory component, then add one.
+	  case "$file" in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$link_against_libtool_libs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+	    exit 1
+	  fi
+
+	  finalize=yes
+	  for lib in $link_against_libtool_libs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case "$lib" in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+	      else
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      # Do each command in the postinstall commands.
+      eval cmds=\"$old_postinstall_cmds\"
+      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec $SHELL $0 --finish$current_libdirs
+      exit 1
+    fi
+
+    exit 0
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  eval cmds=\"$finish_cmds\"
+	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit 0
+
+    echo "----------------------------------------------------------------------"
+    echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      echo "   $libdir"
+    done
+    echo
+    echo "If you ever happen to want to link against installed libraries"
+    echo "in a given directory, LIBDIR, you must either use libtool, and"
+    echo "specify the full pathname of the library, or use \`-LLIBDIR'"
+    echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    echo
+    echo "See any operating system documentation about shared libraries for"
+    echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    echo "----------------------------------------------------------------------"
+    exit 0
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit 1
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+
+      dir=
+      case "$file" in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case "$file" in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit 1
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case "$file" in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case "$file" in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+        # Export the shlibpath_var.
+        eval "export $shlibpath_var"
+      fi
+
+      # Restore saved enviroment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now actually exec the command.
+      eval "exec \$cmd$args"
+
+      $echo "$modename: cannot exec \$cmd$args"
+      exit 1
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+        $echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit 0
+    fi
+    ;;
+
+  # libtool uninstall mode
+  uninstall)
+    modename="$modename: uninstall"
+    rm="$nonopt"
+    files=
+
+    for arg
+    do
+      case "$arg" in
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$dir" = "X$file" && dir=.
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      rmfiles="$file"
+
+      case "$name" in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $dir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
+
+	  $show "$rm $rmfiles"
+	  $run $rm $rmfiles
+
+	  if test -n "$library_names"; then
+	    # Do each command in the postuninstall commands.
+	    eval cmds=\"$postuninstall_cmds\"
+	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      $show "$cmd"
+	      $run eval "$cmd"
+	    done
+	    IFS="$save_ifs"
+	  fi
+
+	  if test -n "$old_library"; then
+	    # Do each command in the old_postuninstall commands.
+	    eval cmds=\"$old_postuninstall_cmds\"
+	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      $show "$cmd"
+	      $run eval "$cmd"
+	    done
+	    IFS="$save_ifs"
+	  fi
+
+	  # FIXME: should reinstall the best remaining shared library.
+	fi
+	;;
+
+      *.lo)
+	if test "$build_old_libs" = yes; then
+	  oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+	  rmfiles="$rmfiles $dir/$oldobj"
+	fi
+	$show "$rm $rmfiles"
+	$run $rm $rmfiles
+	;;
+
+      *)
+	$show "$rm $rmfiles"
+	$run $rm $rmfiles
+	;;
+      esac
+    done
+    exit 0
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+    ;;
+  esac
+
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$generic_help" 1>&2
+  exit 1
+fi # test -z "$show_help"
+
+# We need to display help for each of the modes.
+case "$mode" in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --version         print version information
+
+MODE must be one of the following:
+
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+  exit 0
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+  ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/missing b/missing
new file mode 100755
index 0000000..7789652
--- /dev/null
+++ b/missing
@@ -0,0 +1,190 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing - GNU libit 0.0"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`configure.in'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`configure.in'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`configure.in'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755
index 0000000..4f58503
--- /dev/null
+++ b/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
+
+errstatus=0
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+        echo "mkdir $pathcomp"
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+  	  errstatus=$lasterr
+        fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..6b39e18
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,90 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = -I$(top_srcdir) -I$(includedir) -DG_LOG_DOMAIN=\"Gts\"
+
+bin_SCRIPTS=gts-config
+
+BUILT_SOURCES= \
+	gts-config \
+	predicates_init.h
+
+gts-config: gts-config.in
+
+noinst_PROGRAMS = \
+	predicates_init
+
+predicates_init_SOURCES = \
+	predicates_init.c \
+	rounding.h
+
+lib_LTLIBRARIES = libgts.la
+
+libgts_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\
+	-release $(LT_RELEASE) -export-dynamic $(windoze_ldflags)
+
+libgts_la_DEPENDENCIES = \
+	predicates_init.h
+
+libgts_la_SOURCES = \
+	predicates_init.h \
+	object.c \
+	point.c \
+	vertex.c \
+	segment.c \
+	edge.c \
+	triangle.c \
+	face.c \
+	kdtree.c \
+	bbtree.c \
+	misc.c \
+	gts.h \
+	gts-private.h \
+	predicates.c \
+	predicates.h \
+	heap.c \
+	eheap.c \
+	fifo.c \
+	matrix.c \
+	surface.c \
+	stripe.c \
+	vopt.c \
+	refine.c \
+	iso.c \
+	split.c \
+	psurface.c \
+	hsurface.c \
+	cdt.c \
+	boolean.c \
+	named.c \
+	oocs.c \
+	container.c \
+	graph.c \
+	pgraph.c \
+	partition.c
+
+include_HEADERS = \
+	gts.h gtsconfig.h
+
+predicates.o: predicates.c predicates_init.h predicates.h
+	$(COMPILE) -c $(srcdir)/predicates.c
+
+predicates_init.h: predicates_init
+	./predicates_init >  $(srcdir)/predicates_init.h
+
+CLEANFILES += $(BUILT_SOURCES)
+
+gts.def: libgts.la .libs/libgts.a
+	nm -g .libs/libgts.a | awk 'BEGIN{print "EXPORTS"}{if ($$2 == "T") print "    " $$3}' > gts.def
+
+EXTRA_DIST = \
+	gts.m4 \
+	makefile.msc \
+	config.h.win32 \
+	gts.def \
+	NOTES
+
+dist-hook: gts.def
+	cd $(distdir); rm -f $(BUILT_SOURCES)
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = gts.m4
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..adb33e2
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,495 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+INCLUDES = -I$(top_srcdir) -I$(includedir) -DG_LOG_DOMAIN=\"Gts\"
+
+bin_SCRIPTS = gts-config
+
+BUILT_SOURCES =  	gts-config 	predicates_init.h
+
+
+noinst_PROGRAMS =  	predicates_init
+
+
+predicates_init_SOURCES =  	predicates_init.c 	rounding.h
+
+
+lib_LTLIBRARIES = libgts.la
+
+libgts_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 	-release $(LT_RELEASE) -export-dynamic $(windoze_ldflags)
+
+
+libgts_la_DEPENDENCIES =  	predicates_init.h
+
+
+libgts_la_SOURCES =  	predicates_init.h 	object.c 	point.c 	vertex.c 	segment.c 	edge.c 	triangle.c 	face.c 	kdtree.c 	bbtree.c 	misc.c 	gts.h 	gts-private.h 	predicates.c 	predicates.h 	heap.c 	eheap.c 	fifo.c 	matrix.c 	surface.c 	stripe.c 	vopt.c 	refine.c 	iso.c 	split.c 	psurface.c 	hsurface.c 	cdt.c 	boolean.c 	named.c 	oocs.c 	container.c 	graph.c 	pgraph.c 	partition.c
+
+
+include_HEADERS =  	gts.h gtsconfig.h
+
+
+CLEANFILES =  $(BUILT_SOURCES)
+
+EXTRA_DIST =  	gts.m4 	makefile.msc 	config.h.win32 	gts.def 	NOTES
+
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = gts.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =  gts-config
+LTLIBRARIES =  $(lib_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+LIBS = @LIBS@
+libgts_la_LIBADD = 
+libgts_la_OBJECTS =  object.lo point.lo vertex.lo segment.lo edge.lo \
+triangle.lo face.lo kdtree.lo bbtree.lo misc.lo predicates.lo heap.lo \
+eheap.lo fifo.lo matrix.lo surface.lo stripe.lo vopt.lo refine.lo \
+iso.lo split.lo psurface.lo hsurface.lo cdt.lo boolean.lo named.lo \
+oocs.lo container.lo graph.lo pgraph.lo partition.lo
+PROGRAMS =  $(noinst_PROGRAMS)
+
+predicates_init_OBJECTS =  predicates_init.o
+predicates_init_LDADD = $(LDADD)
+predicates_init_DEPENDENCIES = 
+predicates_init_LDFLAGS = 
+SCRIPTS =  $(bin_SCRIPTS)
+
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DATA =  $(m4data_DATA)
+
+HEADERS =  $(include_HEADERS)
+
+DIST_COMMON =  Makefile.am Makefile.in gts-config.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libgts_la_SOURCES) $(predicates_init_SOURCES)
+OBJECTS = $(libgts_la_OBJECTS) $(predicates_init_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+gts-config: $(top_builddir)/config.status gts-config.in
+	cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+mostlyclean-libLTLIBRARIES:
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+
+distclean-libLTLIBRARIES:
+
+maintainer-clean-libLTLIBRARIES:
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libgts.la: $(libgts_la_OBJECTS) $(libgts_la_DEPENDENCIES)
+	$(LINK) -rpath $(libdir) $(libgts_la_LDFLAGS) $(libgts_la_OBJECTS) $(libgts_la_LIBADD) $(LIBS)
+
+mostlyclean-noinstPROGRAMS:
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+distclean-noinstPROGRAMS:
+
+maintainer-clean-noinstPROGRAMS:
+
+predicates_init: $(predicates_init_OBJECTS) $(predicates_init_DEPENDENCIES)
+	@rm -f predicates_init
+	$(LINK) $(predicates_init_LDFLAGS) $(predicates_init_OBJECTS) $(predicates_init_LDADD) $(LIBS)
+
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+	    $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+	  else if test -f $(srcdir)/$$p; then \
+	    echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+	    $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+	  else :; fi; fi; \
+	done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+	done
+
+install-m4dataDATA: $(m4data_DATA)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(m4datadir)
+	@list='$(m4data_DATA)'; for p in $$list; do \
+	  if test -f $(srcdir)/$$p; then \
+	    echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4datadir)/$$p"; \
+	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4datadir)/$$p; \
+	  else if test -f $$p; then \
+	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(m4datadir)/$$p"; \
+	    $(INSTALL_DATA) $$p $(DESTDIR)$(m4datadir)/$$p; \
+	  fi; fi; \
+	done
+
+uninstall-m4dataDATA:
+	@$(NORMAL_UNINSTALL)
+	list='$(m4data_DATA)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(m4datadir)/$$p; \
+	done
+
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
+	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	list='$(include_HEADERS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(includedir)/$$p; \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
+bbtree.lo bbtree.o : bbtree.c gts.h gtsconfig.h
+boolean.lo boolean.o : boolean.c gts.h gtsconfig.h
+cdt.lo cdt.o : cdt.c gts.h gtsconfig.h
+container.lo container.o : container.c gts.h gtsconfig.h
+edge.lo edge.o : edge.c gts.h gtsconfig.h
+eheap.lo eheap.o : eheap.c gts.h gtsconfig.h
+face.lo face.o : face.c gts.h gtsconfig.h
+fifo.lo fifo.o : fifo.c gts.h gtsconfig.h
+graph.lo graph.o : graph.c gts.h gtsconfig.h
+heap.lo heap.o : heap.c gts.h gtsconfig.h
+hsurface.lo hsurface.o : hsurface.c gts.h gtsconfig.h
+iso.lo iso.o : iso.c gts.h gtsconfig.h
+kdtree.lo kdtree.o : kdtree.c gts.h gtsconfig.h
+matrix.lo matrix.o : matrix.c gts.h gtsconfig.h
+misc.lo misc.o : misc.c gts.h gtsconfig.h gts-private.h ../config.h
+named.lo named.o : named.c gts.h gtsconfig.h
+object.lo object.o : object.c gts.h gtsconfig.h gts-private.h
+oocs.lo oocs.o : oocs.c gts.h gtsconfig.h
+partition.lo partition.o : partition.c gts.h gtsconfig.h
+pgraph.lo pgraph.o : pgraph.c gts.h gtsconfig.h
+point.lo point.o : point.c gts.h gtsconfig.h gts-private.h predicates.h
+predicates_init.o: predicates_init.c rounding.h ../config.h
+predicates.lo predicates.o : predicates.c predicates.h predicates_init.h \
+	rounding.h ../config.h
+psurface.lo psurface.o : psurface.c gts.h gtsconfig.h
+refine.lo refine.o : refine.c gts.h gtsconfig.h
+segment.lo segment.o : segment.c gts.h gtsconfig.h
+split.lo split.o : split.c gts.h gtsconfig.h
+stripe.lo stripe.o : stripe.c gts.h gtsconfig.h
+surface.lo surface.o : surface.c gts.h gtsconfig.h
+triangle.lo triangle.o : triangle.c gts.h gtsconfig.h
+vertex.lo vertex.o : vertex.c gts.h gtsconfig.h
+vopt.lo vopt.o : vopt.c gts.h gtsconfig.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-libLTLIBRARIES install-binSCRIPTS
+install-exec: install-exec-am
+
+install-data-am: install-m4dataDATA install-includeHEADERS
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-libLTLIBRARIES uninstall-binSCRIPTS \
+		uninstall-m4dataDATA uninstall-includeHEADERS
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
+		$(HEADERS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) \
+		$(DESTDIR)$(m4datadir) $(DESTDIR)$(includedir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean-am:  mostlyclean-libLTLIBRARIES mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-noinstPROGRAMS \
+		mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-libLTLIBRARIES clean-compile clean-libtool \
+		clean-noinstPROGRAMS clean-tags clean-generic \
+		mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-libLTLIBRARIES distclean-compile \
+		distclean-libtool distclean-noinstPROGRAMS \
+		distclean-tags distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-libLTLIBRARIES \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
+		maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
+clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
+uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool mostlyclean-noinstPROGRAMS \
+distclean-noinstPROGRAMS clean-noinstPROGRAMS \
+maintainer-clean-noinstPROGRAMS uninstall-binSCRIPTS install-binSCRIPTS \
+uninstall-m4dataDATA install-m4dataDATA uninstall-includeHEADERS \
+install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
+maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+gts-config: gts-config.in
+
+predicates.o: predicates.c predicates_init.h predicates.h
+	$(COMPILE) -c $(srcdir)/predicates.c
+
+predicates_init.h: predicates_init
+	./predicates_init >  $(srcdir)/predicates_init.h
+
+gts.def: libgts.la .libs/libgts.a
+	nm -g .libs/libgts.a | awk 'BEGIN{print "EXPORTS"}{if ($$2 == "T") print "    " $$3}' > gts.def
+
+dist-hook: gts.def
+	cd $(distdir); rm -f $(BUILT_SOURCES)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/NOTES b/src/NOTES
new file mode 100644
index 0000000..c697949
--- /dev/null
+++ b/src/NOTES
@@ -0,0 +1,3 @@
+- hsurface may create surfaces with duplicates edges and triangles (because of 
+ collapses of "empty triangles").
+- psurface however will not.
diff --git a/src/bbtree.c b/src/bbtree.c
new file mode 100644
index 0000000..4be35d5
--- /dev/null
+++ b/src/bbtree.c
@@ -0,0 +1,1218 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include "gts.h"
+
+static void bbox_init (GtsBBox * bbox)
+{
+  bbox->bounded = NULL;
+}
+
+/**
+ * gts_bbox_class:
+ *
+ * Returns: the #GtsBBoxClass.
+ */
+GtsBBoxClass * gts_bbox_class (void)
+{
+  static GtsBBoxClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo bbox_info = {
+      "GtsBBox",
+      sizeof (GtsBBox),
+      sizeof (GtsBBoxClass),
+      (GtsObjectClassInitFunc) NULL,
+      (GtsObjectInitFunc) bbox_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &bbox_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_bbox_set:
+ * @bbox: a #GtsBBox.
+ * @bounded: the object to be bounded.
+ * @x1: x-coordinate of the lower left corner.
+ * @y1: y-coordinate of the lower left corner.
+ * @z1: z-coordinate of the lower left corner.
+ * @x2: x-coordinate of the upper right corner.
+ * @y2: y-coordinate of the upper right corner.
+ * @z2: z-coordinate of the upper right corner.
+ *
+ * Sets fields of @bbox.
+ */
+void gts_bbox_set (GtsBBox * bbox,
+		   gpointer bounded,
+		   gdouble x1, gdouble y1, gdouble z1,
+		   gdouble x2, gdouble y2, gdouble z2)
+{
+  g_return_if_fail (bbox != NULL);
+  g_return_if_fail (x2 >= x1 && y2 >= y1 && z2 >= z1);
+
+  bbox->x1 = x1; bbox->y1 = y1; bbox->z1 = z1;
+  bbox->x2 = x2; bbox->y2 = y2; bbox->z2 = z2;
+  bbox->bounded = bounded;
+}
+
+/**
+ * gts_bbox_new:
+ * @klass: a #GtsBBoxClass.
+ * @bounded: the object to be bounded.
+ * @x1: x-coordinate of the lower left corner.
+ * @y1: y-coordinate of the lower left corner.
+ * @z1: z-coordinate of the lower left corner.
+ * @x2: x-coordinate of the upper right corner.
+ * @y2: y-coordinate of the upper right corner.
+ * @z2: z-coordinate of the upper right corner.
+ *
+ * Returns: a new #GtsBBox.
+ */
+GtsBBox * gts_bbox_new (GtsBBoxClass * klass,
+			gpointer bounded,
+			gdouble x1, gdouble y1, gdouble z1,
+			gdouble x2, gdouble y2, gdouble z2)
+{
+  GtsBBox * bbox;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  bbox = GTS_BBOX (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  gts_bbox_set (bbox, bounded, x1, y1, z1, x2, y2, z2);
+  return bbox;
+}
+
+/**
+ * gts_bbox_triangle:
+ * @klass: a #GtsBBoxClass.
+ * @t: a #GtsTriangle.
+ *
+ * Returns: a new #GtsBBox bounding box of @t.
+ */
+GtsBBox * gts_bbox_triangle (GtsBBoxClass * klass,
+			     GtsTriangle * t)
+{
+  GtsBBox * bbox;
+  GtsPoint * p;
+
+  g_return_val_if_fail (t != NULL, NULL);
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  p = GTS_POINT (GTS_SEGMENT (t->e1)->v1);
+  bbox = gts_bbox_new (klass, t, p->x, p->y, p->z, p->x, p->y, p->z);
+
+  p = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  if (p->x > bbox->x2) bbox->x2 = p->x;
+  if (p->x < bbox->x1) bbox->x1 = p->x;
+  if (p->y > bbox->y2) bbox->y2 = p->y;
+  if (p->y < bbox->y1) bbox->y1 = p->y;
+  if (p->z > bbox->z2) bbox->z2 = p->z;
+  if (p->z < bbox->z1) bbox->z1 = p->z;
+  p = GTS_POINT (gts_triangle_vertex (t));
+  if (p->x > bbox->x2) bbox->x2 = p->x;
+  if (p->x < bbox->x1) bbox->x1 = p->x;
+  if (p->y > bbox->y2) bbox->y2 = p->y;
+  if (p->y < bbox->y1) bbox->y1 = p->y;
+  if (p->z > bbox->z2) bbox->z2 = p->z;
+  if (p->z < bbox->z1) bbox->z1 = p->z;
+  
+  return bbox;
+}
+
+/**
+ * gts_bbox_segment:
+ * @klass: a #GtsBBoxClass.
+ * @s: a #GtsSegment.
+ * 
+ * Returns: a new #GtsBBox bounding box of @s.
+ */
+GtsBBox * gts_bbox_segment (GtsBBoxClass * klass, GtsSegment * s)
+{
+  GtsBBox * bbox;
+  GtsPoint * p1, * p2;
+
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  bbox = gts_bbox_new (klass, s, 0., 0., 0., 0., 0., 0.);
+
+  p1 = GTS_POINT (s->v1); 
+  p2 = GTS_POINT (s->v2);
+  if (p1->x > p2->x) {
+    bbox->x2 = p1->x; bbox->x1 = p2->x;
+  }
+  else {
+    bbox->x1 = p1->x; bbox->x2 = p2->x;
+  }
+  if (p1->y > p2->y) {
+    bbox->y2 = p1->y; bbox->y1 = p2->y;
+  }
+  else {
+    bbox->y1 = p1->y; bbox->y2 = p2->y;
+  }
+  if (p1->z > p2->z) {
+    bbox->z2 = p1->z; bbox->z1 = p2->z;
+  }
+  else {
+    bbox->z1 = p1->z; bbox->z2 = p2->z;
+  }
+
+  return bbox;
+}
+
+static void bbox_foreach_vertex (GtsPoint * p, GtsBBox * bb)
+{
+  if (p->x < bb->x1) bb->x1 = p->x;
+  if (p->y < bb->y1) bb->y1 = p->y;
+  if (p->z < bb->z1) bb->z1 = p->z;
+  if (p->x > bb->x2) bb->x2 = p->x;
+  if (p->y > bb->y2) bb->y2 = p->y;
+  if (p->z > bb->z2) bb->z2 = p->z;
+}
+
+/**
+ * gts_bbox_surface:
+ * @klass: a #GtsBBoxClass.
+ * @surface: a #GtsSurface.
+ *
+ * Returns: a new #GtsBBox bounding box of @surface.
+ */
+GtsBBox * gts_bbox_surface (GtsBBoxClass * klass, GtsSurface * surface)
+{
+  GtsBBox * bbox;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (surface != NULL, NULL);
+
+  bbox = gts_bbox_new (klass, surface, 0., 0., 0., 0., 0., 0.);
+  bbox->x1 = bbox->y1 = bbox->z1 = G_MAXDOUBLE;
+  bbox->x2 = bbox->y2 = bbox->z2 = -G_MAXDOUBLE;
+
+  gts_surface_foreach_vertex (surface, (GtsFunc) bbox_foreach_vertex, bbox);
+
+  return bbox;
+}
+
+/**
+ * gts_bbox_bboxes:
+ * @klass: a #GtsBBoxClass.
+ * @bboxes: a list of #GtsBBox.
+ * 
+ * Returns: a new #GtsBBox bounding box of all the bounding boxes in
+ * @bboxes.  
+ */
+GtsBBox * gts_bbox_bboxes (GtsBBoxClass * klass, GSList * bboxes)
+{
+  GtsBBox * bbox;
+  GtsBBox * bb;
+
+  g_return_val_if_fail (bboxes != NULL, NULL);
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  bb = bboxes->data;
+  bbox = gts_bbox_new (klass, bboxes, 
+		       bb->x1, bb->y1, bb->z1, bb->x2, bb->y2, bb->z2);
+  bboxes = bboxes->next;
+  while (bboxes) {
+    bb = bboxes->data;
+    if (bb->x1 < bbox->x1) bbox->x1 = bb->x1;
+    if (bb->y1 < bbox->y1) bbox->y1 = bb->y1;
+    if (bb->z1 < bbox->z1) bbox->z1 = bb->z1;
+    if (bb->x2 > bbox->x2) bbox->x2 = bb->x2;
+    if (bb->y2 > bbox->y2) bbox->y2 = bb->y2;
+    if (bb->z2 > bbox->z2) bbox->z2 = bb->z2;
+    bboxes = bboxes->next;
+  }
+
+  return bbox;
+}
+
+/**
+ * gts_bbox_points:
+ * @klass: a #GtsBBoxClass.
+ * @points: a list of #GtsPoint.
+ *
+ * Returns: a new #GtsBBox bounding box of @points.
+ */
+GtsBBox * gts_bbox_points (GtsBBoxClass * klass, GSList * points)
+{
+  GtsPoint * p;
+  GtsBBox * bbox;
+  GSList * i;
+
+  if (points == NULL) 
+    return NULL;
+
+  p = points->data;  
+  bbox = gts_bbox_new (klass, points, p->x, p->y, p->z, p->x, p->y, p->z);
+
+  i = points->next;
+  while (i) {
+    p = i->data;
+    if (p->x > bbox->x2) 
+      bbox->x2 = p->x;
+    else if (p->x < bbox->x1) 
+      bbox->x1 = p->x;
+    if (p->y > bbox->y2) 
+      bbox->y2 = p->y;
+    else if (p->y < bbox->y1) 
+      bbox->y1 = p->y;
+    if (p->z > bbox->z2) 
+      bbox->z2 = p->z;
+    else if (p->z < bbox->z1) 
+      bbox->z1 = p->z;
+    i = i->next;
+  }
+  
+  return bbox;
+}
+
+/**
+ * gts_bboxes_are_overlapping:
+ * @bb1: a #GtsBBox.
+ * @bb2: a #GtsBBox.
+ *
+ * Returns: %TRUE if the bounding boxes @bb1 and @bb2 are overlapping
+ * (including just touching), %FALSE otherwise.
+ */
+gboolean gts_bboxes_are_overlapping (GtsBBox * bb1, GtsBBox * bb2)
+{
+  if (bb1 == bb2)
+    return TRUE;
+  if (bb1->x1 > bb2->x2)
+    return FALSE;
+  if (bb2->x1 > bb1->x2)
+    return FALSE;
+  if (bb1->y1 > bb2->y2)
+    return FALSE;
+  if (bb2->y1 > bb1->y2)
+    return FALSE;
+  if (bb1->z1 > bb2->z2)
+    return FALSE;
+  if (bb2->z1 > bb1->z2)
+    return FALSE;  
+  return TRUE;
+}
+
+#define bbox_volume(bb) (((bb)->x2 -\
+                          (bb)->x1)*\
+                         ((bb)->y2 -\
+                          (bb)->y1)*\
+                         ((bb)->z2 -\
+                          (bb)->z1))
+
+/**
+ * gts_bbox_diagonal2:
+ * @bb: a #GtsBBox.
+ *
+ * Returns: the squared length of the diagonal of @bb.
+ */
+gdouble gts_bbox_diagonal2 (GtsBBox * bb)
+{
+  gdouble x, y, z;
+
+  g_return_val_if_fail (bb != NULL, 0.);
+
+  x = bb->x2 - bb->x1;
+  y = bb->y2 - bb->y1;
+  z = bb->z2 - bb->z1;
+
+  return x*x + y*y + z*z;
+}
+
+/**
+ * gts_bbox_draw:
+ * @bb: a #GtsBBox.
+ * @fptr: a file pointer.
+ * 
+ * Writes in file @fptr an OOGL (Geomview) description of @bb.
+ */
+void gts_bbox_draw (GtsBBox * bb, FILE * fptr)
+{
+  g_return_if_fail (bb != NULL);
+
+  fprintf (fptr, "OFF 8 6 12\n");
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x1, bb->y1, bb->z1);
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x2, bb->y1, bb->z1);
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x2, bb->y2, bb->z1);
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x1, bb->y2, bb->z1);
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x1, bb->y1, bb->z2);
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x2, bb->y1, bb->z2);
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x2, bb->y2, bb->z2);
+  fprintf (fptr, "%g %g %g\n",
+	   bb->x1, bb->y2, bb->z2);
+  fputs ("4 3 2 1 0\n"
+	 "4 4 5 6 7\n"
+	 "4 2 3 7 6\n"
+	 "4 0 1 5 4\n"
+	 "4 0 4 7 3\n"
+	 "4 1 2 6 5\n",
+	 fptr);
+}
+
+#define MINMAX(x1, x2, xmin, xmax) { if (x1 < x2) { xmin = x1; xmax = x2; }\
+                                     else { xmin = x2; xmax = x1; } }
+
+/**
+ * gts_bbox_point_distance2:
+ * @bb: a #GtsBBox.
+ * @p: a #GtsPoint.
+ * @min: a pointer on a gdouble.
+ * @max: a pointer on a gdouble.
+ * 
+ * Sets @min and @max to lower and upper bounds for the square of the
+ * Euclidean distance between the object contained in @bb and @p. For these
+ * bounds to make any sense the bounding box must be "tight" i.e. each of the
+ * 6 faces of the box must at least be touched by one point of the bounded
+ * object.
+ */
+void gts_bbox_point_distance2 (GtsBBox * bb, GtsPoint * p,
+			       gdouble * min, gdouble * max)
+{
+  gdouble x1, y1, z1, x2, y2, z2, x, y, z;
+  gdouble dmin = 0.0, dmax, xd1, xd2, yd1, yd2, zd1, zd2;
+
+  g_return_if_fail (bb != NULL);
+  g_return_if_fail (p != NULL);
+  g_return_if_fail (min != NULL);
+  g_return_if_fail (max != NULL);
+
+  x1 = bb->x1; y1 = bb->y1; z1 = bb->z1; 
+  x2 = bb->x2; y2 = bb->y2; z2 = bb->z2;
+  x = p->x; y = p->y; z = p->z;
+
+  xd1 = (x1 - x)*(x1 - x);
+  xd2 = (x - x2)*(x - x2);
+  yd1 = (y1 - y)*(y1 - y);
+  yd2 = (y - y2)*(y - y2);
+  zd1 = (z1 - z)*(z1 - z);
+  zd2 = (z - z2)*(z - z2);
+  
+  dmin += x < x1 ? xd1 : x > x2 ? xd2 : 0.0;
+  dmin += y < y1 ? yd1 : y > y2 ? yd2 : 0.0;
+  dmin += z < z1 ? zd1 : z > z2 ? zd2 : 0.0;
+
+#if 0
+  dmax = MAX (xd1, xd2);
+  dmax += MAX (yd1, yd2);
+  dmax += MAX (zd1, zd2);
+#else
+  {
+    gdouble mx, Mx, my, My, mz, Mz;
+    
+    MINMAX (xd1, xd2, mx, Mx);
+    MINMAX (yd1, yd2, my, My);
+    MINMAX (zd1, zd2, mz, Mz);
+
+    dmax = mx + My + Mz;
+    dmax = MIN (dmax, Mx + my + Mz);
+    dmax = MIN (dmax, Mx + My + mz);
+  }
+#endif
+  
+  *min = dmin;
+  *max = dmax;
+}
+
+/**
+ * gts_bbox_is_stabbed:
+ * @bb: a #GtsBBox.
+ * @p: a #GtsPoint.
+ *
+ * Returns: %TRUE if the ray starting at @p and ending at (@p->x,
+ * @p->y, +infty) intersects with @bb, %FALSE otherwise.
+ */
+gboolean gts_bbox_is_stabbed (GtsBBox * bb, GtsPoint * p)
+{
+  g_return_val_if_fail (bb != NULL, FALSE);
+  g_return_val_if_fail (p != NULL, FALSE);
+
+  if (p->x < bb->x1 || p->x > bb->x2 ||
+      p->y < bb->y1 || p->y > bb->y2 ||
+      p->z > bb->z2)
+    return FALSE;
+  return TRUE;
+}
+
+/**
+ * gts_bb_tree_new:
+ * @bboxes: a list of #GtsBBox.
+ *
+ * Builds a new hierarchy of bounding boxes for @bboxes. At each
+ * level, the GNode->data field contains a #GtsBBox bounding box of
+ * all the children. The tree is binary and is built by repeatedly
+ * cutting in two approximately equal halves the bounding boxes at
+ * each level until a leaf node (i.e. a bounding box given in @bboxes)
+ * is reached. In order to minimize the depth of the tree, the cutting
+ * direction is always chosen as perpendicular to the longest
+ * dimension of the bounding box.
+ *
+ * Returns: a new hierarchy of bounding boxes.  */
+GNode * gts_bb_tree_new (GSList * bboxes)
+{
+  GSList * i, * positive = NULL, * negative = NULL;
+  GNode * node;
+  GtsBBox * bbox;
+  guint dir, np = 0, nn = 0;
+  gdouble * p1, * p2;
+  gdouble cut;
+  
+  g_return_val_if_fail (bboxes != NULL, NULL);
+
+  if (bboxes->next == NULL) /* leaf node */
+    return g_node_new (bboxes->data);
+
+  bbox = gts_bbox_bboxes (gts_bbox_class (), bboxes);
+  node = g_node_new (bbox);
+
+  if (bbox->x2 - bbox->x1 > bbox->y2 - bbox->y1) {
+    if (bbox->z2 - bbox->z1 > bbox->x2 - bbox->x1)
+      dir = 2;
+    else
+      dir = 0;
+  }
+  else if (bbox->z2 - bbox->z1 > bbox->y2 - bbox->y1)
+    dir = 2;
+  else
+    dir = 1;
+
+  p1 = (gdouble *) &bbox->x1;
+  p2 = (gdouble *) &bbox->x2;
+  cut = (p1[dir] + p2[dir])/2.;
+  i = bboxes;
+  while (i) {
+    bbox = i->data; 
+    p1 = (gdouble *) &bbox->x1;
+    p2 = (gdouble *) &bbox->x2;
+    if ((p1[dir] + p2[dir])/2. > cut) {
+      positive = g_slist_prepend (positive, bbox);
+      np++;
+    }
+    else {
+      negative = g_slist_prepend (negative, bbox);
+      nn++;
+    }
+    i = i->next;
+  }
+  if (!positive) {
+    GSList * last = g_slist_nth (negative, (nn - 1)/2);
+    positive = last->next;
+    last->next = NULL;
+  }
+  else if (!negative) {
+    GSList * last = g_slist_nth (positive, (np - 1)/2);
+    negative = last->next;
+    last->next = NULL;
+  }
+  g_node_prepend (node, gts_bb_tree_new (positive));
+  g_slist_free (positive);
+  g_node_prepend (node, gts_bb_tree_new (negative));
+  g_slist_free (negative);
+  
+  return node;
+}
+
+static void prepend_triangle_bbox (GtsTriangle * t, GSList ** bboxes)
+{
+  *bboxes = g_slist_prepend (*bboxes, 
+			     gts_bbox_triangle (gts_bbox_class (), t));
+}
+
+/**
+ * gts_bb_tree_surface:
+ * @s: a #GtsSurface.
+ *
+ * Returns: a new hierarchy of bounding boxes bounding the faces of @s.
+ */
+GNode * gts_bb_tree_surface (GtsSurface * s)
+{
+  GSList * bboxes = NULL;
+  GNode * tree;
+
+  g_return_val_if_fail (s != NULL, NULL);
+
+  gts_surface_foreach_face (s, (GtsFunc) prepend_triangle_bbox, &bboxes);
+  tree = gts_bb_tree_new (bboxes);
+  g_slist_free (bboxes);
+
+  return tree;
+}
+
+/**
+ * gts_bb_tree_stabbed:
+ * @tree: a bounding box tree.
+ * @p: a #GtsPoint.
+ *
+ * Returns: a list of bounding boxes, leaves of @tree which are
+ * stabbed by the ray defined by @p (see gts_bbox_is_stabbed()).
+ */
+GSList * gts_bb_tree_stabbed (GNode * tree, GtsPoint * p)
+{
+  GSList * list = NULL;
+  GtsBBox * bb;
+  GNode * i;
+
+  g_return_val_if_fail (tree != NULL, NULL);
+  g_return_val_if_fail (p != NULL, NULL);
+
+  bb = tree->data;
+  if (!gts_bbox_is_stabbed (bb, p))
+    return NULL;
+  if (tree->children == NULL) /* leaf node */
+    return g_slist_prepend (NULL, bb);
+  i = tree->children;
+  while (i) {
+    list = g_slist_concat (list, gts_bb_tree_stabbed (i, p));
+    i = i->next;
+  }
+  return list;
+}
+
+/**
+ * gts_bb_tree_overlap:
+ * @tree: a bounding box tree.
+ * @bbox: a #GtsBBox.
+ *
+ * Returns: a list of bounding boxes, leaves of @tree which overlap @bbox.  */
+GSList * gts_bb_tree_overlap (GNode * tree, GtsBBox * bbox)
+{
+  GSList * list = NULL;
+  GtsBBox * bb;
+  GNode * i;
+
+  g_return_val_if_fail (tree != NULL, NULL);
+  g_return_val_if_fail (bbox != NULL, NULL);
+
+  bb = tree->data;
+  if (!gts_bboxes_are_overlapping (bbox, bb))
+    return NULL;
+  if (tree->children == NULL) /* leaf node */
+    return g_slist_prepend (NULL, bb);
+  i = tree->children;
+  while (i) {
+    list = g_slist_concat (list, gts_bb_tree_overlap (i, bbox));
+    i = i->next;
+  }
+  return list;
+}
+
+/**
+ * gts_bb_tree_is_overlapping:
+ * @tree: a bounding box tree.
+ * @bbox: a #GtsBBox.
+ *
+ * Returns: %TRUE if any leaf of @tree overlaps @bbox, %FALSE otherwise.
+ */
+gboolean gts_bb_tree_is_overlapping (GNode * tree, GtsBBox * bbox)
+{
+  GtsBBox * bb;
+  GNode * i;
+
+  g_return_val_if_fail (tree != NULL, FALSE);
+  g_return_val_if_fail (bbox != NULL, FALSE);
+
+  bb = tree->data;
+  if (!gts_bboxes_are_overlapping (bbox, bb))
+    return FALSE;
+  if (tree->children == NULL) /* leaf node */
+    return TRUE;
+  i = tree->children;
+  while (i) {
+    if (gts_bb_tree_is_overlapping (i, bbox))
+      return TRUE;
+    i = i->next;
+  }
+  return FALSE;
+}
+
+/**
+ * gts_bb_tree_traverse_overlapping:
+ * @tree1: a bounding box tree.
+ * @tree2: a bounding box tree.
+ * @func: a #GtsBBTreeTraverseFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func for each overlapping pair of leaves of @tree1 and @tree2.
+ */
+void gts_bb_tree_traverse_overlapping (GNode * tree1, GNode * tree2,
+				       GtsBBTreeTraverseFunc func,
+				       gpointer data)
+{
+  GtsBBox * bb1, * bb2;
+
+  g_return_if_fail (tree1 != NULL && tree2 != NULL);
+
+  bb1 = tree1->data; bb2 = tree2->data;
+  if (!gts_bboxes_are_overlapping (bb1, bb2))
+    return;
+
+  if (tree1->children == NULL && tree2->children == NULL)
+    (*func) (tree1->data, tree2->data, data);
+  else if (tree2->children == NULL || 
+	   (tree1->children != NULL && 
+	    bbox_volume (bb1) > bbox_volume (bb2))) {
+    GNode * i = tree1->children;
+    while (i) {
+      gts_bb_tree_traverse_overlapping (i, tree2, func, data);
+      i = i->next;
+    }
+  }
+  else {
+    GNode * i = tree2->children;
+    while (i) {
+      gts_bb_tree_traverse_overlapping (tree1, i, func, data);
+      i = i->next;
+    }
+  }
+}
+
+/**
+ * gts_bb_tree_draw:
+ * @tree: a bounding box tree.
+ * @depth: a specified depth.
+ * @fptr: a file pointer.
+ *
+ * Write in @fptr an OOGL (Geomview) description of @tree for the
+ * depth specified by @depth.
+ */
+void gts_bb_tree_draw (GNode * tree, guint depth, FILE * fptr)
+{
+  guint d;
+
+  g_return_if_fail (tree != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  d = g_node_depth (tree);
+
+  if (d == 1)
+    fprintf (fptr, "{ LIST");
+
+  if (d == depth)
+    gts_bbox_draw (tree->data, fptr);
+  else if (d < depth) {
+    GNode * i = tree->children;
+    while (i) {
+      gts_bb_tree_draw (i, depth, fptr);
+      i = i->next;
+    }
+  }
+
+  if (d == 1)
+    fprintf (fptr, "}\n");
+}
+
+static void bb_tree_free (GNode * tree, gboolean free_leaves)
+{
+  GNode * i;
+
+  g_return_if_fail (tree != NULL);
+
+  if (!free_leaves && tree->children == NULL) /* leaf node */
+    return;
+
+  gts_object_destroy (tree->data);
+
+  i = tree->children;
+  while (i) {
+    bb_tree_free (i, free_leaves);
+    i = i->next;
+  }
+}
+
+/**
+ * gts_bb_tree_destroy:
+ * @tree: a bounding box tree.
+ * @free_leaves: if %TRUE the bounding boxes given by the user are freed.
+ *
+ * Destroys all the bounding boxes created by @tree and destroys the
+ * tree itself. If @free_leaves is set to %TRUE, destroys boxes given
+ * by the user when creating the tree (i.e. leaves of the tree).  
+ */
+void gts_bb_tree_destroy (GNode * tree, gboolean free_leaves)
+{
+  g_return_if_fail (tree != NULL);
+  
+  bb_tree_free (tree, free_leaves);
+  g_node_destroy (tree);
+}
+
+static gdouble bb_tree_min_max (GNode * tree,
+				GtsPoint * p,
+				gdouble min_max,
+				GSList ** list)
+{
+  GNode * tree1, * tree2;
+  gdouble min1, max1, min2, max2;
+
+  if (tree->children == NULL) {
+    *list = g_slist_prepend (*list, tree->data);
+    return min_max;
+  }
+  tree1 = tree->children;
+  gts_bbox_point_distance2 (tree1->data, p, &min1, &max1);
+  if (max1 < min_max)
+    min_max = max1;
+
+  tree2 = tree1->next;
+  gts_bbox_point_distance2 (tree2->data, p, &min2, &max2);
+  if (max2 < min_max)
+    min_max = max2;
+
+  if (min1 < min2) {
+    if (min1 <= min_max) {
+      min_max = bb_tree_min_max (tree1, p, min_max, list);
+      if (min2 <= min_max)
+	min_max = bb_tree_min_max (tree2, p, min_max, list);
+    }
+  }
+  else {
+    if (min2 <= min_max) {
+      min_max = bb_tree_min_max (tree2, p, min_max, list);
+      if (min1 <= min_max)
+	min_max = bb_tree_min_max (tree1, p, min_max, list);
+    }
+  }
+
+  return min_max;
+}
+
+/**
+ * gts_bb_tree_point_closest_bboxes:
+ * @tree: a bounding box tree.
+ * @p: a #GtsPoint.
+ *
+ * Returns: a list of #GtsBBox. One of the bounding boxes is assured to contain
+ * the object of @tree closest to @p.
+ */
+GSList * gts_bb_tree_point_closest_bboxes (GNode * tree, 
+					   GtsPoint * p)
+{
+  gdouble min, min_max;
+  GSList * list = NULL, * i, * prev = NULL;
+
+  g_return_val_if_fail (tree != NULL, NULL);
+  g_return_val_if_fail (p != NULL, NULL);
+
+  gts_bbox_point_distance2 (tree->data, p, &min, &min_max);
+  min_max = bb_tree_min_max (tree, p, min_max, &list);
+
+  i = list;
+  while (i) {
+    GSList * next = i->next;
+    gdouble min, max;
+
+    gts_bbox_point_distance2 (i->data, p, &min, &max);
+
+    if (min > min_max) {
+      if (prev == NULL)
+	list = next;
+      else
+	prev->next = next;
+      g_slist_free_1 (i);
+    }
+    else
+      prev = i;
+    i = next;
+  }
+
+  return list;
+}
+
+/**
+ * gts_bb_tree_point_distance:
+ * @tree: a bounding box tree.
+ * @p: a #GtsPoint.
+ * @distance: a #GtsBBoxDistFunc.
+ * @bbox: if not %NULL is set to the bounding box containing the closest 
+ * object.
+ *
+ * Returns: the distance as evaluated by @distance between @p and the closest
+ * object in @tree.
+ */
+gdouble gts_bb_tree_point_distance (GNode * tree, 
+				    GtsPoint * p,
+				    GtsBBoxDistFunc distance,
+				    GtsBBox ** bbox)
+{
+  GSList * list, * i;
+  gdouble dmin = G_MAXDOUBLE;
+
+  g_return_val_if_fail (tree != NULL, dmin);
+  g_return_val_if_fail (p != NULL, dmin);
+  g_return_val_if_fail (distance != NULL, dmin);
+
+  i = list = gts_bb_tree_point_closest_bboxes (tree, p);
+  while (i) {
+    gdouble d = (*distance) (p, GTS_BBOX (i->data)->bounded);
+
+    if (fabs (d) < fabs (dmin)) {
+      dmin = d;
+      if (bbox)
+	*bbox = i->data;
+    }
+    i = i->next;
+  }
+  g_slist_free (list);
+
+  return dmin;
+}
+
+/**
+ * gts_bb_tree_point_closest:
+ * @tree: a bounding box tree.
+ * @p: a #GtsPoint.
+ * @closest: a #GtsBBoxClosestFunc.
+ * @distance: if not %NULL is set to the distance between @p and the 
+ * new #GtsPoint.
+ *
+ * Returns: a new #GtsPoint, closest point to @p and belonging to an object of
+ * @tree.
+ */
+GtsPoint * gts_bb_tree_point_closest (GNode * tree, 
+				      GtsPoint * p,
+				      GtsBBoxClosestFunc closest,
+				      gdouble * distance)
+{
+  GSList * list, * i;
+  gdouble dmin = G_MAXDOUBLE;
+  GtsPoint * np = NULL;
+
+  g_return_val_if_fail (tree != NULL, NULL);
+  g_return_val_if_fail (p != NULL, NULL);
+  g_return_val_if_fail (closest != NULL, NULL);
+
+  i = list = gts_bb_tree_point_closest_bboxes (tree, p);
+  while (i) {
+    GtsPoint * tp = (*closest) (p, GTS_BBOX (i->data)->bounded);
+    gdouble d = gts_point_distance2 (tp, p);
+
+    if (d < dmin) {
+      if (np)
+	gts_object_destroy (GTS_OBJECT (np));
+      np = tp;
+      dmin = d;
+    }
+    else
+      gts_object_destroy (GTS_OBJECT (tp));
+    i = i->next;
+  }
+  g_slist_free (list);
+
+  if (distance)
+    *distance = dmin;
+
+  return np;  
+}
+
+/**
+ * gts_bb_tree_triangle_distance:
+ * @tree: a bounding box tree.
+ * @t: a #GtsTriangle.
+ * @distance: a #GtsBBoxDistFunc.
+ * @delta: spatial scale of the sampling to be used.
+ * @range: a #GtsRange to be filled with the results.
+ * 
+ * Given a triangle @t, points are sampled regularly on its surface
+ * using @delta as increment. The distance from each of these points
+ * to the closest object of @tree is computed using @distance and the
+ * gts_bb_tree_point_distance() function. The fields of @range are
+ * filled with the number of points sampled, the minimum, average and
+ * maximum value and the standard deviation.  
+ */
+void gts_bb_tree_triangle_distance (GNode * tree,
+				    GtsTriangle * t,
+				    GtsBBoxDistFunc distance,
+				    gdouble delta,
+				    GtsRange * range)
+{
+  GtsPoint * p1, * p2, * p3, * p;
+  GtsVector p1p2, p1p3;
+  gdouble l1, t1, dt1;
+  guint i, n1;
+
+  g_return_if_fail (tree != NULL);
+  g_return_if_fail (t != NULL);
+  g_return_if_fail (distance != NULL);
+  g_return_if_fail (delta > 0.);
+  g_return_if_fail (range != NULL);
+
+  gts_triangle_vertices (t, 
+			 (GtsVertex **) &p1, 
+			 (GtsVertex **) &p2, 
+			 (GtsVertex **) &p3);
+
+  gts_vector_init (p1p2, p1, p2);
+  gts_vector_init (p1p3, p1, p3);
+  gts_range_init (range);
+  p = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class ())));
+
+  l1 = sqrt (gts_vector_scalar (p1p2, p1p2));
+  n1 = l1/delta + 1;
+  dt1 = 1.0/(gdouble) n1;
+  t1 = 0.0;
+  for (i = 0; i <= n1; i++, t1 += dt1) {
+    gdouble t2 = 1. - t1;
+    gdouble x = t2*p1p3[0];
+    gdouble y = t2*p1p3[1];
+    gdouble z = t2*p1p3[2];
+    gdouble l2 = sqrt (x*x + y*y + z*z);
+    guint j, n2 = l2/delta + 1;
+    gdouble dt2 = t2/(gdouble) n2;
+
+    x = t2*p1->x + t1*p2->x;
+    y = t2*p1->y + t1*p2->y;
+    z = t2*p1->z + t1*p2->z;
+    
+    t2 = 0.0;
+    for (j = 0; j <= n2; j++, t2 += dt2) {
+      p->x = x + t2*p1p3[0];
+      p->y = y + t2*p1p3[1];
+      p->z = z + t2*p1p3[2];
+
+      gts_range_add_value (range,
+		    gts_bb_tree_point_distance (tree, p, distance, NULL));
+    }
+  }
+
+  gts_object_destroy (GTS_OBJECT (p));
+  gts_range_update (range);
+}
+
+/**
+ * gts_bb_tree_segment_distance:
+ * @tree: a bounding box tree.
+ * @s: a #GtsSegment.
+ * @distance: a #GtsBBoxDistFunc.
+ * @delta: spatial scale of the sampling to be used.
+ * @range: a #GtsRange to be filled with the results.
+ * 
+ * Given a segment @s, points are sampled regularly on its length
+ * using @delta as increment. The distance from each of these points
+ * to the closest object of @tree is computed using @distance and the
+ * gts_bb_tree_point_distance() function. The fields of @range are
+ * filled with the number of points sampled, the minimum, average and
+ * maximum value and the standard deviation.  
+ */
+void gts_bb_tree_segment_distance (GNode * tree,
+				   GtsSegment * s,
+				   gdouble (*distance) (GtsPoint *, 
+							gpointer),
+				   gdouble delta,
+				   GtsRange * range)
+{
+  GtsPoint * p1, * p2, * p;
+  GtsVector p1p2;
+  gdouble l, t, dt;
+  guint i, n;
+
+  g_return_if_fail (tree != NULL);
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (distance != NULL);
+  g_return_if_fail (delta > 0.);
+  g_return_if_fail (range != NULL);
+
+  p1 = GTS_POINT (s->v1);
+  p2 = GTS_POINT (s->v2);
+
+  gts_vector_init (p1p2, p1, p2);
+  gts_range_init (range);
+  p = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class())));
+
+  l = sqrt (gts_vector_scalar (p1p2, p1p2));
+  n = l/delta + 1;
+  dt = 1.0/(gdouble) n;
+  t = 0.0;
+  for (i = 0; i <= n; i++, t += dt) {
+    p->x = p1->x + t*p1p2[0];
+    p->y = p1->y + t*p1p2[1];
+    p->z = p1->z + t*p1p2[2];
+    
+    gts_range_add_value (range,
+			 gts_bb_tree_point_distance (tree, p, distance, NULL));
+  }
+
+  gts_object_destroy (GTS_OBJECT (p));
+  gts_range_update (range);
+}
+
+static void surface_distance_foreach_triangle (GtsTriangle * t, 
+					       gpointer * data)
+{
+  gdouble * delta = data[1];
+  GtsRange * range = data[2];
+  gdouble * total_area = data[3], area;
+  GtsRange range_triangle;
+
+  gts_bb_tree_triangle_distance (data[0], t, data[4], *delta, &range_triangle);
+
+  if (range_triangle.min < range->min)
+    range->min = range_triangle.min;
+  if (range_triangle.max > range->max)
+    range->max = range_triangle.max;
+  range->n += range_triangle.n;
+
+  area = gts_triangle_area (t);
+  *total_area += area;
+  range->mean += area*range_triangle.mean;
+  range->stddev += area*range_triangle.mean*range_triangle.mean;
+}
+
+/**
+ * gts_bb_tree_surface_distance:
+ * @tree: a bounding box tree.
+ * @s: a #GtsSurface.
+ * @distance: a #GtsBBoxDistFunc.
+ * @delta: a sampling increment defined as the percentage of the diagonal
+ * of the root bounding box of @tree.
+ * @range: a #GtsRange to be filled with the results.
+ *
+ * Calls gts_bb_tree_triangle_distance() for each face of @s. The
+ * fields of @range are filled with the minimum, maximum and average
+ * distance. The average distance is defined as the sum of the average
+ * distances for each triangle weighthed by their area and divided by
+ * the total area of the surface. The standard deviation is defined
+ * accordingly. The @n field of @range is filled with the number of
+ * sampled points used.  
+ */
+void gts_bb_tree_surface_distance (GNode * tree,
+				   GtsSurface * s,
+				   GtsBBoxDistFunc distance,
+				   gdouble delta,
+				   GtsRange * range)
+{
+  gpointer data[5];
+  gdouble total_area = 0.;
+
+  g_return_if_fail (tree != NULL);
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (delta > 0. && delta < 1.);
+  g_return_if_fail (range != NULL);
+
+  gts_range_init (range);
+  delta *= sqrt (gts_bbox_diagonal2 (tree->data));
+  data[0] = tree;
+  data[1] = δ
+  data[2] = range;
+  data[3] = &total_area;
+  data[4] = distance;
+
+  gts_surface_foreach_face (s, 
+			    (GtsFunc) surface_distance_foreach_triangle, 
+			    data);
+
+  if (total_area > 0.) {
+    range->stddev = sqrt ((range->stddev - range->mean*range->mean/total_area)
+			  /total_area);
+    range->mean /= total_area;
+  }
+  else
+    range->min = range->max = 0.;
+}
+
+static void surface_distance_foreach_boundary (GtsEdge * e,
+					       gpointer * data)
+{
+  gdouble * delta = data[1];
+  GtsRange * range = data[2];
+  gdouble * total_length = data[3], length;
+  GtsRange range_edge;
+
+  if (gts_edge_is_boundary (e, NULL)) {
+    GtsSegment * s =  GTS_SEGMENT (e);
+
+    gts_bb_tree_segment_distance (data[0], s, data[4], *delta, &range_edge);
+
+    if (range_edge.min < range->min)
+      range->min = range_edge.min;
+    if (range_edge.max > range->max)
+      range->max = range_edge.max;
+    range->n += range_edge.n;
+    
+    length = gts_point_distance (GTS_POINT (s->v1), GTS_POINT (s->v2));
+    *total_length += length;
+    range->mean += length*range_edge.mean;
+    range->stddev += length*range_edge.mean*range_edge.mean;
+  }
+}
+
+/**
+ * gts_bb_tree_surface_boundary_distance:
+ * @tree: a bounding box tree.
+ * @s: a #GtsSurface.
+ * @distance: a #GtsBBoxDistFunc.
+ * @delta: a sampling increment defined as the percentage of the diagonal
+ * of the root bounding box of @tree.
+ * @range: a #GtsRange to be filled with the results.
+ *
+ * Calls gts_bb_tree_segment_distance() for each edge boundary of @s.
+ * The fields of @range are filled with the minimum, maximum and
+ * average distance. The average distance is defined as the sum of the
+ * average distances for each boundary edge weighthed by their length
+ * and divided by the total length of the boundaries. The standard
+ * deviation is defined accordingly. The @n field of @range is filled
+ * with the number of sampled points used.  
+ */
+void gts_bb_tree_surface_boundary_distance (GNode * tree,
+					    GtsSurface * s,
+					    gdouble (*distance) (GtsPoint *,
+								 gpointer),
+					    gdouble delta,
+					    GtsRange * range)
+{
+  gpointer data[5];
+  gdouble total_length = 0.;
+
+  g_return_if_fail (tree != NULL);
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (delta > 0. && delta < 1.);
+  g_return_if_fail (range != NULL);
+
+  gts_range_init (range);
+  delta *= sqrt (gts_bbox_diagonal2 (tree->data));
+  data[0] = tree;
+  data[1] = δ
+  data[2] = range;
+  data[3] = &total_length;
+  data[4] = distance;
+
+  gts_surface_foreach_edge (s, 
+			    (GtsFunc) surface_distance_foreach_boundary, 
+			    data);
+
+  if (total_length > 0.) {
+    range->stddev = sqrt ((range->stddev - 
+			   range->mean*range->mean/total_length)
+			  /total_length);
+    range->mean /= total_length;
+  }
+  else
+    range->min = range->max = 0.;
+}
diff --git a/src/boolean.c b/src/boolean.c
new file mode 100644
index 0000000..db06421
--- /dev/null
+++ b/src/boolean.c
@@ -0,0 +1,844 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+/*#define DEBUG
+  #define DEBUG_NAMED*/
+
+#ifdef DEBUG
+static void write_edges_vertices (GSList * edges, 
+				  GSList * vertices,
+				  FILE * fptr)
+{
+  GSList * i = vertices;
+  guint v = 1;
+  
+  fprintf (fptr, "%u %u 0\n", 
+	   g_slist_length (vertices), 
+	   g_slist_length (edges));
+  while (i) {
+    GtsPoint * p = i->data;
+    fprintf (fptr, "%.30g %.30g %.30g %p:%s\n",
+	     p->x, p->y, p->z, p, GTS_NVERTEX (p)->name);
+    GTS_OBJECT (p)->reserved = GUINT_TO_POINTER (v++);
+    i = i->next;
+  }
+  i = edges;
+  while (i) {
+    GtsSegment * s = i->data;
+    fprintf (fptr, "%u %u %p:%s\n", 
+	     GPOINTER_TO_UINT (GTS_OBJECT (s->v1)->reserved),
+	     GPOINTER_TO_UINT (GTS_OBJECT (s->v2)->reserved),
+	     s, GTS_NEDGE (s)->name);
+    i = i->next;
+  }
+  i = vertices;
+  while (i) {
+    GTS_OBJECT (i->data)->reserved = NULL;
+    i = i->next;
+  }
+}
+#endif
+
+static void surface_inter_destroy (GtsObject * object)
+{
+  GtsSurfaceInter * si = GTS_SURFACE_INTER (object);
+
+  gts_object_destroy (GTS_OBJECT (si->s1));
+  gts_object_destroy (GTS_OBJECT (si->s2));
+  g_slist_free (si->edges);
+
+  (* GTS_OBJECT_CLASS (gts_surface_inter_class ())->parent_class->destroy)
+    (object);
+}
+
+static void surface_inter_class_init (GtsObjectClass * klass)
+{
+  klass->destroy = surface_inter_destroy;
+}
+
+static void surface_inter_init (GtsSurfaceInter * si)
+{
+  si->s1 = si->s2 = NULL;
+  si->edges = NULL;
+}
+
+/**
+ * gts_surface_inter_class:
+ *
+ * Returns: the #GtsSurfaceInterClass.
+ */
+GtsSurfaceInterClass * gts_surface_inter_class (void)
+{
+  static GtsSurfaceInterClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo surface_inter_info = {
+      "GtsSurfaceInter",
+      sizeof (GtsSurfaceInter),
+      sizeof (GtsSurfaceInterClass),
+      (GtsObjectClassInitFunc) surface_inter_class_init,
+      (GtsObjectInitFunc) surface_inter_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &surface_inter_info);
+  }
+
+  return klass;
+}
+
+/* see gts_segment_triangle_intersection() for a description.
+ * @cut is set to the edge of @t exactly cut by @s or %NULL otherwise.
+ */
+static GtsPoint * segment_triangle_intersection (GtsSegment * s,
+						 GtsTriangle * t,
+						 GtsPointClass * klass,
+						 GtsEdge ** cut)
+{
+  GtsPoint * A, * B, * C, * D, * E;
+  gdouble ABCE, ABCD, ADCE, ABDE, BCDE;
+  GtsPoint * pi = NULL;
+  GtsEdge * AB, * BC, * CA;
+
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (t != NULL, NULL);
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (cut != NULL, NULL);
+
+  gts_triangle_vertices_edges (t, NULL, 
+			       (GtsVertex **) &A, 
+			       (GtsVertex **) &B, 
+			       (GtsVertex **) &C, 
+			       &AB, &BC, &CA);
+  D = GTS_POINT (s->v1);
+  E = GTS_POINT (s->v2);
+  *cut = NULL;
+
+  ABCE = gts_point_orientation_3d (A, B, C, E);
+  ABCD = gts_point_orientation_3d (A, B, C, D);
+  if (ABCE < 0.0 || ABCD > 0.0) {
+    GtsPoint * tmpp;
+    gdouble tmp;
+    tmpp = E; E = D; D = tmpp;
+    tmp = ABCE; ABCE = ABCD; ABCD = tmp;
+  }
+  if (ABCE < 0.0 || ABCD > 0.0)
+    return NULL;
+  ADCE = gts_point_orientation_3d (A, D, C, E);
+  if (ADCE < 0.)
+    return NULL;
+  ABDE = gts_point_orientation_3d (A, B, D, E);
+  if (ABDE < 0.)
+    return NULL;
+  BCDE = gts_point_orientation_3d (B, C, D, E);
+  if (BCDE < 0.)
+    return NULL;
+  if (ABCE == 0.0) {
+    if (ABCD == 0.0)
+      /* s is contained in the plane defined by t*/
+      return NULL;
+    pi = E;
+  }
+  else if (ABCD == 0.0)
+    pi = D;
+  if (ABDE == 0.) {
+    if (ADCE == 0.) {
+      if (pi && pi != A) {
+	gts_vertex_replace (GTS_VERTEX (A), GTS_VERTEX (pi));
+	gts_object_destroy (GTS_OBJECT (A));
+	return pi;
+      }
+      return A;
+    }
+    if (BCDE == 0.) {
+      if (pi && pi != B) {
+	gts_vertex_replace (GTS_VERTEX (B), GTS_VERTEX (pi));
+	gts_object_destroy (GTS_OBJECT (B));
+	return pi;
+      }
+      return B;
+    }
+    *cut = AB;
+  }
+  else if (BCDE == 0.) {
+    if (ADCE == 0.) {
+      if (pi && pi != C) {
+	gts_vertex_replace (GTS_VERTEX (C), GTS_VERTEX (pi));
+	gts_object_destroy (GTS_OBJECT (C));
+	return pi;
+      }
+      return C;
+    }
+    *cut = BC;
+  }
+  else if (ADCE == 0.)
+    *cut = CA;
+  if (pi == NULL) {
+    gdouble c = ABCE/(ABCE - ABCD);
+    pi = gts_point_new (klass,
+			E->x + c*(D->x - E->x),
+			E->y + c*(D->y - E->y),
+			E->z + c*(D->z - E->z));
+  }
+  return pi;
+}
+
+#define prepend_unique(list, data) (g_slist_find (list, data) ?\
+				    list :\
+				    g_slist_prepend (list, data))
+
+static GtsVertex * intersects (GtsEdge * e,
+			       GtsTriangle * t,
+			       GtsSurface * surface)
+{
+  GtsPoint * pi;
+  GtsVertex * vi = NULL;
+  GSList * vertices = GTS_OBJECT (e)->reserved, * i;
+  GtsEdge * cut;
+  GtsSegment * s;
+  GtsVertex * v1, * v2, * v3;
+
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+  i = vertices;
+  while (i) {
+    GtsVertex * v = i->data;
+    gpointer cut = GTS_OBJECT (v)->reserved;
+    if (cut == t || 
+	cut == t->e1 || cut == t->e2 || cut == t->e3 ||
+	v == v1 || v == v2 || v == v3)
+      return v;
+    i = i->next;
+  }
+  s = GTS_SEGMENT (e);
+  /* Warning: wild cast! */
+  pi = segment_triangle_intersection (s, t,
+		  GTS_POINT_CLASS (surface->vertex_class), &cut);
+  if (pi) {
+    vi = GTS_VERTEX (pi);
+    if (cut) {
+      GtsObject * o = GTS_OBJECT (cut);
+
+      i = o->reserved;
+      while (i) {
+	GtsVertex * v = i->data;
+	if (v != vi && GTS_OBJECT (v)->reserved == e) {
+	  gts_object_destroy (GTS_OBJECT (vi));
+	  vi = v;
+	}
+	i = i->next;
+      }
+      GTS_OBJECT (vi)->reserved = cut;
+      o->reserved = prepend_unique (o->reserved, vi);
+#ifdef DEBUG_NAMED
+      if (GTS_NVERTEX (vi)->name[0] == '\0')
+	g_snprintf (GTS_NVERTEX (vi)->name, GTS_NAME_LENGTH, "%s|%s",
+		    GTS_NEDGE (e)->name, GTS_NEDGE (cut)->name);
+#endif
+    }
+    else {
+      GTS_OBJECT (vi)->reserved = t;
+#ifdef DEBUG_NAMED
+      if (GTS_NVERTEX (vi)->name[0] == '\0')
+	g_snprintf (GTS_NVERTEX (vi)->name, GTS_NAME_LENGTH, "%s|%s",
+		    GTS_NEDGE (e)->name, GTS_NFACE (t)->name);
+#endif
+    }
+    if (vi != s->v1 && vi != s->v2)
+      GTS_OBJECT (s)->reserved = prepend_unique (vertices, vi);
+  }
+  return vi;
+}
+
+/* see figure misc/orientation.fig */
+static gdouble intersection_orientation (GtsTriangle * t1, 
+					 GtsEdge * e,
+					 GtsTriangle * t2)
+{
+  GtsVertex * v1, * v2, * v3;
+  GtsEdge * e2, * e3;
+  GtsVertex * v4, * v5, * v6;
+  gdouble o1;
+
+  gts_triangle_vertices_edges (t1, e, &v1, &v2, &v3, &e, &e2, &e3);
+  gts_triangle_vertices (t2, &v4, &v5, &v6);
+
+  o1 = 
+    gts_point_orientation_3d (GTS_POINT (v4), GTS_POINT (v5), GTS_POINT (v6),
+			      GTS_POINT (v2));
+  if (o1 != 0.)
+    return o1;
+  return
+    - gts_point_orientation_3d (GTS_POINT (v4), GTS_POINT (v5), GTS_POINT (v6),
+				GTS_POINT (v1));
+}
+
+#define UPDATE_ORIENTATION if (o > 0.) vi2 = v; else if (o < 0.) {\
+                             vi2 = vi1; vi1 = v; } else coincident = TRUE;
+
+static void intersect_edges (GtsBBox * bb1, GtsBBox * bb2,
+			     GtsSurfaceInter * si)
+{
+  GtsSurface * surface = si->s1;
+  GtsTriangle * t1, * t2;
+  GtsVertex * v, * vi1 = NULL, * vi2 = NULL;
+  gboolean coincident = FALSE;
+
+  t1 = GTS_TRIANGLE (bb1->bounded);
+  t2 = GTS_TRIANGLE (bb2->bounded);
+
+  vi1 = intersects (t2->e1, t1, surface);
+  v = intersects (t2->e2, t1, surface);
+  if (!vi1)
+    vi1 = v;
+  else if (v && v != vi1) {
+    gdouble o = intersection_orientation (t2, t2->e2, t1);
+    UPDATE_ORIENTATION;
+  }
+  if (!vi2) {
+    v = intersects (t2->e3, t1, surface);
+    if (!vi1)
+      vi1 = v;
+    else if (v && v != vi1) {
+      gdouble o = intersection_orientation (t2, t2->e3, t1);
+      UPDATE_ORIENTATION;
+    }
+  }
+  if (!vi2) {
+    v = intersects (t1->e1, t2, surface);
+    if (!vi1)
+      vi1 = v;
+    else if (v && v != vi1) {
+      gdouble o = - intersection_orientation (t1, t1->e1, t2);
+      UPDATE_ORIENTATION;
+    }
+  }
+  if (!vi2) {
+    v = intersects (t1->e2, t2, surface);
+    if (!vi1)
+      vi1 = v;
+    else if (v && v != vi1) {
+      gdouble o = - intersection_orientation (t1, t1->e2, t2);
+      UPDATE_ORIENTATION;
+    }
+  }
+  if (!vi2) {
+    v = intersects (t1->e3, t2, surface);
+    if (!vi1)
+      vi1 = v;
+    else if (v && v != vi1) {
+      gdouble o = - intersection_orientation (t1, t1->e3, t2);
+      UPDATE_ORIENTATION;
+    }
+  }
+
+  if ((vi1 || vi2) && !coincident) {
+    gts_surface_add_face (si->s1, GTS_FACE (t1));
+    gts_surface_add_face (si->s2, GTS_FACE (t2));
+  }
+  if (vi1 && vi2 && !coincident) {
+    GtsEdge * e;
+    GtsSegment * s = gts_vertices_are_connected (vi1, vi2);
+
+    if (!GTS_IS_EDGE (s)) {
+      e = gts_edge_new (si->s1->edge_class, vi1, vi2);
+#ifdef DEBUG_NAMED
+      g_snprintf (GTS_NEDGE (e)->name, GTS_NAME_LENGTH, "%s:%s",
+		  GTS_NVERTEX (vi1)->name, GTS_NVERTEX (vi2)->name);
+#endif  
+    }
+    else {
+      GtsEdge * duplicate;
+      e = GTS_EDGE (s);
+      while ((duplicate = gts_edge_is_duplicate (e))) {
+	gts_edge_replace (duplicate, e);
+	gts_object_destroy (GTS_OBJECT (duplicate));
+      }
+      if (s->v1 != vi1) {
+	s->v1 = vi1;
+	s->v2 = vi2;
+      }
+    }
+    GTS_OBJECT (t1)->reserved = prepend_unique (GTS_OBJECT (t1)->reserved, e);
+    GTS_OBJECT (t2)->reserved = prepend_unique (GTS_OBJECT (t2)->reserved, e);
+    si->edges = prepend_unique (si->edges, e);
+  }
+}
+
+static void segment_detach_endpoints (GtsSegment * s)
+{
+  s->v1->segments = g_slist_remove (s->v1->segments, s);
+  s->v2->segments = g_slist_remove (s->v2->segments, s);
+}
+
+static void segment_attach_endpoints (GtsSegment * s)
+{
+  s->v1->segments = g_slist_prepend (s->v1->segments, s);
+  s->v2->segments = g_slist_prepend (s->v2->segments, s);
+  g_assert (!gts_segment_is_duplicate (s));
+}
+
+static void triangulate_face (GtsTriangle * t, GtsSurface * sn)
+{
+  GSList * edges, * vertices = NULL, * i;
+  GtsSurface * s = gts_surface_new (gts_surface_class (), 
+				    sn->face_class,
+				    sn->edge_class,
+				    sn->vertex_class);
+  GtsTriangle * enclosing;
+  GtsVertex * v1, * v2, * v3;
+  GtsMatrix * project, * unproject;
+  GtsVector * coords;
+  guint nvertices, n;
+#ifdef DEBUG
+  static guint nt = 0;
+  guint nv, nc;
+  char name[80];
+  FILE * fptr;
+
+  fprintf (stderr, 
+	   "=============== triangulation t.%d: %p:%d %p->%p->%p\n", 
+	   nt, t, id (t), t->e1, t->e2, t->e3);
+  sprintf (name, "t.%d", nt++);
+  fptr = fopen (name, "wt");
+#endif
+
+  /* build constraints list */
+  i = edges = GTS_OBJECT (t)->reserved;
+  GTS_OBJECT (t)->reserved = NULL;
+
+  if (GTS_OBJECT (t->e1)->reserved) {
+    vertices = g_slist_concat (g_slist_copy (GTS_OBJECT (t->e1)->reserved), 
+			       vertices);
+    /* deconnecte t->e1 from its endpoints to avoid it being used
+       during triangulation */
+    segment_detach_endpoints (GTS_SEGMENT (t->e1));
+  }
+  else
+    edges = prepend_unique (edges, t->e1);
+  if (GTS_OBJECT (t->e2)->reserved) {
+    vertices = g_slist_concat (g_slist_copy (GTS_OBJECT (t->e2)->reserved), 
+			       vertices);
+    segment_detach_endpoints (GTS_SEGMENT (t->e2));
+  }
+  else
+    edges = prepend_unique (edges, t->e2);
+  if (GTS_OBJECT (t->e3)->reserved) {
+    vertices = g_slist_concat (g_slist_copy (GTS_OBJECT (t->e3)->reserved), 
+			       vertices);
+    segment_detach_endpoints (GTS_SEGMENT (t->e3));
+  }
+  else
+    edges = prepend_unique (edges, t->e3);
+
+  /* add triangle summits */
+  vertices = g_slist_prepend (vertices, GTS_SEGMENT (t->e1)->v1);
+  vertices = g_slist_prepend (vertices, GTS_SEGMENT (t->e1)->v2);
+  vertices = g_slist_prepend (vertices, gts_triangle_vertex (t));
+
+  /* add edges endpoints */
+  i = edges;
+  while (i) {
+    GtsSegment * s = i->data;
+    vertices = prepend_unique (vertices, s->v1);
+    vertices = prepend_unique (vertices, s->v2);
+    i = i->next;
+  }
+
+  /* if there is only three vertices, they are the summits of @t */
+  nvertices = g_slist_length (vertices);
+  if (nvertices == 3) {
+    g_slist_free (vertices);
+    g_slist_free (edges);
+    gts_surface_add_face (sn, GTS_FACE (t));
+    return;
+  }
+
+  /* reset reserved field of vertices */
+  g_slist_foreach (vertices, (GFunc) gts_object_reset_reserved, NULL);
+
+  /* project vertices on t */
+  unproject = gts_matrix_projection (t);
+  project = gts_matrix_transpose (unproject);
+  gts_matrix_destroy (unproject);
+  coords = g_malloc (sizeof (GtsVector)*nvertices);
+  n = 0;
+  i = vertices;
+  while (i) {
+    GtsPoint * p = i->data;
+    coords[n][0] = p->x;
+    coords[n][1] = p->y;
+    coords[n++][2] = p->z;
+    gts_point_transform (p, project);
+    i = i->next;
+  }
+  gts_matrix_destroy (project);
+  
+  /* build enclosing triangle */
+  enclosing = gts_triangle_enclosing (gts_triangle_class (), vertices, 10.);
+  gts_triangle_vertices (enclosing, &v1, &v2, &v3);
+  gts_surface_add_face (s, gts_face_new (gts_face_class (),
+					 enclosing->e1,
+					 enclosing->e2,
+					 enclosing->e3));
+#ifdef DEBUG
+  write_edges_vertices (edges, vertices, fptr);
+  fclose (fptr);
+  nv = nc = 0;
+#endif
+
+  /* set edges as constraints, saving there initial class in reserved */
+  i = edges;
+  while (i) {
+    GtsObject * e = i->data;
+#ifdef DEBUG
+    fprintf (stderr, "constraint: %p->%d\n", e, id (e));
+#endif
+    g_assert (!e->reserved);
+    e->reserved = e->klass;
+    e->klass = GTS_OBJECT_CLASS (gts_constraint_class ());
+    i = i->next;
+  }
+
+  /* add vertices */
+  i = vertices;
+  while (i) {
+#ifdef DEBUG
+    fprintf (stderr, "adding %p->%d: (%.20g,%.20g,%.20g)\n",
+	     i->data, id (i->data),
+	     GTS_POINT (i->data)->x,
+	     GTS_POINT (i->data)->y,
+	     GTS_POINT (i->data)->z);
+#endif
+    g_assert (gts_delaunay_add_vertex (s, i->data, NULL) == NULL);
+    i = i->next;
+  }
+
+  /* add remaining constraints */
+  i = edges;
+  while (i) {
+#ifdef DEBUG
+    GSList * inter;
+    fprintf (stderr, "adding constraint %p->%d: %p:%d->%p:%d\n",
+	     i->data, id (i->data),
+	     GTS_SEGMENT (i->data)->v1, id (GTS_SEGMENT (i->data)->v1),
+	     GTS_SEGMENT (i->data)->v2, id (GTS_SEGMENT (i->data)->v2));
+    inter = gts_delaunay_add_constraint (s, i->data);
+    if (inter != NULL) {
+      fprintf (stderr, "  intersects with:\n");
+      i = inter;
+      while (i) {
+	GtsSegment * s = i->data;
+	fprintf (stderr, "  %p->%d: %p:%d->%p:%d\n", 
+		 s, id (s), s->v1, id (s->v1), s->v2, id (s->v2));
+	i = i->next;
+      }
+      g_assert_not_reached ();
+    }
+#else
+    g_assert (gts_delaunay_add_constraint (s, i->data) == NULL);
+#endif
+    i = i->next;
+  }
+  
+  /* undo projection */
+  i = vertices;
+  n = 0;
+  while (i) {
+    GtsPoint * p = i->data;
+    p->x = coords[n][0];
+    p->y = coords[n][1];
+    p->z = coords[n++][2];
+    i = i->next;
+  }
+  g_free (coords);
+  g_slist_free (vertices);
+
+  /* restore edges classes */
+  i = edges;
+  while (i) {
+    GtsObject * e = i->data;
+    g_assert (e->reserved);
+    e->klass = e->reserved;
+    e->reserved = NULL;
+    i = i->next;
+  }
+  g_slist_free (edges);
+
+  /* destroy enclosing triangle */
+  gts_allow_floating_vertices = TRUE;
+  gts_object_destroy (GTS_OBJECT (v1));
+  gts_object_destroy (GTS_OBJECT (v2));
+  gts_object_destroy (GTS_OBJECT (v3));
+  gts_allow_floating_vertices = FALSE;
+
+  /* call the attributes() method for each face with @t as argument */
+  if (GTS_OBJECT_CLASS (sn->face_class)->attributes)
+    gts_surface_foreach_face (s, (GtsFunc) gts_object_attributes, t);
+
+  /* add new faces to si */
+  gts_surface_merge (sn, s);
+  gts_object_destroy (GTS_OBJECT (s));
+
+  /* restore edges of t */
+  if (GTS_OBJECT (t->e1)->reserved)
+    segment_attach_endpoints (GTS_SEGMENT (t->e1));
+  if (GTS_OBJECT (t->e2)->reserved)
+    segment_attach_endpoints (GTS_SEGMENT (t->e2));
+  if (GTS_OBJECT (t->e3)->reserved)
+    segment_attach_endpoints (GTS_SEGMENT (t->e3));
+}
+
+static void free_vertex_list (GtsObject * o)
+{
+  g_slist_free (o->reserved);
+  o->reserved = NULL;
+}
+
+/**
+ * gts_surface_inter_new:
+ * @klass: a #GtsSurfaceInterClass.
+ * @s1: a #GtsSurface.
+ * @s2: a #GtsSurface.
+ * @faces_tree1: a bounding box tree (see gts_bb_tree_new()) for
+ * the faces of @s1.
+ * @faces_tree2: a bounding box tree for the faces of @s2.
+ *
+ * When triangulating the cut faces, the new faces inherit the
+ * attributes of these original faces through their attributes()
+ * method.
+ *
+ * Returns: a new #GtsSurfaceInter describing the intersection of @s1
+ * and @s2.  
+ */
+GtsSurfaceInter* gts_surface_inter_new (GtsSurfaceInterClass * klass,
+					GtsSurface * s1,
+					GtsSurface * s2,
+					GNode * faces_tree1,
+					GNode * faces_tree2)
+{
+  GtsSurfaceInter * si;
+  GtsSurface * s;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (s1 != NULL, NULL);
+  g_return_val_if_fail (s2 != NULL, NULL);
+  g_return_val_if_fail (faces_tree1 != NULL, NULL);
+  g_return_val_if_fail (faces_tree2 != NULL, NULL);
+
+  si = GTS_SURFACE_INTER (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  si->s1 = gts_surface_new (gts_surface_class (),
+			    s1->face_class,
+			    s1->edge_class,
+			    s1->vertex_class);
+  si->s2 = gts_surface_new (gts_surface_class (),
+			    s2->face_class,
+			    s2->edge_class,
+			    s2->vertex_class);
+  gts_bb_tree_traverse_overlapping (faces_tree1, faces_tree2,
+				    (GtsBBTreeTraverseFunc) intersect_edges, 
+				    si);
+
+  s = gts_surface_new (gts_surface_class (),
+		       s1->face_class,
+		       s1->edge_class,
+		       s1->vertex_class);
+  gts_surface_foreach_face (si->s1, (GtsFunc) triangulate_face, s);
+  gts_surface_foreach_edge (si->s1, (GtsFunc) free_vertex_list, NULL);
+  gts_object_destroy (GTS_OBJECT (si->s1));
+  si->s1 = s;
+  GTS_OBJECT (si->s1)->reserved = s1;
+
+  s = gts_surface_new (gts_surface_class (),
+		       s2->face_class,
+		       s2->edge_class,
+		       s2->vertex_class);
+  gts_surface_foreach_face (si->s2, (GtsFunc) triangulate_face, s);
+  gts_surface_foreach_edge (si->s2, (GtsFunc) free_vertex_list, NULL);
+  gts_object_destroy (GTS_OBJECT (si->s2));
+  si->s2 = s;
+  GTS_OBJECT (si->s2)->reserved = s2;
+
+  si->s1->keep_faces = si->s2->keep_faces = TRUE;
+
+  return si;
+}
+
+/**
+ * gts_surface_inter_check:
+ * @si: a #GtsSurfaceInter.
+ *
+ * Returns: %TRUE if the curve described by @si is an orientable
+ * manifold, %FALSE otherwise.
+ */
+gboolean gts_surface_inter_check (GtsSurfaceInter * si)
+{
+  GSList * i; gboolean ok = TRUE;
+
+  g_return_val_if_fail (si != NULL, FALSE);
+
+  /* mark edges as used by si */
+  i = si->edges;
+  while (i) {
+    GTS_OBJECT (i->data)->reserved = si;
+    i = i->next;
+  }
+
+  i = si->edges;
+  while (i && ok) {
+    GtsSegment * s = i->data;
+    GSList * j = s->v1->segments;
+    while (j && ok) {
+      GtsSegment * s1 = j->data;
+      if (s1 != s && GTS_OBJECT (s1)->reserved == si && s1->v2 != s->v1)
+	ok = FALSE;
+      j = j->next;
+    }
+    i = i->next;
+  }
+
+  g_slist_foreach (si->edges, (GFunc) gts_object_reset_reserved, NULL);
+
+  return ok;
+}
+
+/* Given @e and @f returns a #GtsFace compatible with @f and belonging to
+   @s1 or @s2 */
+static GtsFace * next_compatible_face (GtsEdge * e, 
+				       GtsFace * f, 
+				       GtsSurface * s1,
+				       GtsSurface * s2,
+				       GtsSurface * ssss)
+{
+  GSList * i = e->triangles;
+  GtsFace * f2 = NULL, * f3 = NULL;
+
+  while (i) {
+    GtsFace * f1 = i->data;
+    if (f1 != f && GTS_IS_FACE (f1)) {
+      if (gts_face_has_parent_surface (f1, s1))
+	return f1;
+      if (gts_face_has_parent_surface (f1, s2)) {
+	if (f2 == NULL) f2 = f1;
+	else if (f3 == NULL) f3 = f1;
+	else g_assert_not_reached (); /* s2 is a non-manifold surface */
+      }
+    }
+    i = i->next;
+  }
+  if (f3 == NULL) {
+    if (gts_edge_is_boundary (e, s2))
+      return NULL;
+    return f2; 
+  }
+  if (gts_triangles_are_compatible (GTS_TRIANGLE (f), GTS_TRIANGLE (f2), e))
+    return f2;
+  return f3;
+}
+
+static void walk_faces (GtsEdge * e, GtsFace * f, 
+			GtsSurface * s1,
+			GtsSurface * s2,
+			GtsSurface * s)
+{
+  GtsTriangle * t;
+
+  if (f == NULL || GTS_OBJECT (f)->reserved)
+    return;
+
+  gts_surface_add_face (s, f);
+  GTS_OBJECT (f)->reserved = s;
+  t = GTS_TRIANGLE (f);
+  if (t->e1 != e && !GTS_OBJECT (t->e1)->reserved)
+    walk_faces (t->e1, next_compatible_face (t->e1, f, s1, s2, s), s1, s2, s);
+  if (t->e2 != e && !GTS_OBJECT (t->e2)->reserved)
+    walk_faces (t->e2, next_compatible_face (t->e2, f, s1, s2, s), s1, s2, s);
+  if (t->e3 != e && !GTS_OBJECT (t->e3)->reserved)
+    walk_faces (t->e3, next_compatible_face (t->e3, f, s1, s2, s), s1, s2, s);
+}
+
+static gint triangle_orientation (GtsTriangle * t, GtsEdge * e)
+{
+  GtsSegment * s = GTS_SEGMENT (t->e1 == e ? t->e2 
+				: 
+				t->e2 == e ? t->e3 
+				: 
+				t->e1);
+  GtsVertex * v2 = GTS_SEGMENT (e)->v2;
+
+  if (s->v1 == v2 || s->v2 == v2)
+    return 1;
+  return -1;
+}
+
+/**
+ * gts_surface_inter_boolean:
+ * @si: a #GtsSurfaceInter.
+ * @surface: a #GtsSurface.
+ * @op: a #GtsBooleanOperation.
+ *
+ * Adds to @surface the part of the surface described by @si and @op.
+ */
+void gts_surface_inter_boolean (GtsSurfaceInter * si,
+				GtsSurface * surface,
+				GtsBooleanOperation op)
+{
+  GSList * i;
+  GtsSurface * s = NULL;
+  gint orient = 1;
+
+  g_return_if_fail (si != NULL);
+  g_return_if_fail (surface != NULL);
+
+  switch (op) {
+  case GTS_1_OUT_2: s = si->s1; orient = 1; break;
+  case GTS_1_IN_2: s = si->s1; orient = -1; break;
+  case GTS_2_OUT_1: s = si->s2; orient = -1; break;
+  case GTS_2_IN_1: s = si->s2; orient = 1; break;
+  default: g_assert_not_reached ();
+  }
+
+  /* mark edges as belonging to intersection */
+  i = si->edges;
+  while (i) {
+    GTS_OBJECT (i->data)->reserved = si;
+    i = i->next;
+  }
+
+  i = si->edges;
+  while (i) {
+    GtsEdge * e = i->data;
+    GSList * j = e->triangles;
+
+    while (j) {
+      if (gts_face_has_parent_surface (j->data, s) &&
+	  orient*triangle_orientation (j->data, e) > 0) {
+	walk_faces (e, j->data, s, GTS_OBJECT (s)->reserved, surface);
+	break;
+      }
+      j = j->next;
+    }
+    i = i->next;
+  }
+
+  g_slist_foreach (si->edges, (GFunc) gts_object_reset_reserved, NULL);
+  gts_surface_foreach_face (surface, 
+			    (GtsFunc) gts_object_reset_reserved, NULL);
+}
diff --git a/src/cdt.c b/src/cdt.c
new file mode 100644
index 0000000..6cecd55
--- /dev/null
+++ b/src/cdt.c
@@ -0,0 +1,915 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include "gts.h"
+
+/* Due to an unkown reason g_hash_table_foreach does not allow to stop 
+ * the loop, hence the redefinition. I hope they don't change
+ * the GHashTable, GHashNode structures ... */
+typedef struct _GHashNode      GHashNode;
+
+struct _GHashNode
+{
+  gpointer key;
+  gpointer value;
+  GHashNode *next;
+};
+
+struct _GHashTable
+{
+  gint size;
+  gint nnodes;
+  guint frozen;
+  GHashNode **nodes;
+  GHashFunc hash_func;
+  GCompareFunc key_compare_func;
+};
+
+/* select the face closest to @p among n^1/3 randomly picked faces
+ *  of @surface */
+static GtsFace * closest_face (GtsSurface * s, GtsPoint * p)
+{
+  guint i, n, nt, ns;
+  gdouble dmin = G_MAXDOUBLE, d;
+  GtsFace * closest = NULL;
+  GHashNode * node;
+  GHashTable * hash_table = s->faces;
+
+  nt = g_hash_table_size (hash_table);
+  if (!nt)
+    return NULL;
+  ns = exp(log((gdouble) nt)/3.);
+
+  for (i = 0, n = 0; i < hash_table->size && n < ns; i++)
+    for (node = hash_table->nodes[i]; node && n < ns; node = node->next, n++) {
+      GtsFace * f = node->key;
+
+      d = gts_point_distance2 (p, 
+		   GTS_POINT (GTS_SEGMENT (GTS_TRIANGLE (f)->e1)->v1));
+      if (d < dmin) {
+	dmin = d;
+	closest = f;
+      }
+    }
+  return closest;
+}
+
+/* returns the face belonging to @surface and neighbor of @f via @e */
+static GtsFace * neighbor (GtsFace * f,
+			   GtsEdge * e,
+			   GtsSurface * surface)
+{
+  GSList * i = e->triangles;
+  GtsTriangle * t = GTS_TRIANGLE (f);
+
+  while (i) {
+    GtsTriangle * t1 = i->data;
+    if (t1 != t &&
+	GTS_IS_FACE (t1) &&
+	gts_face_has_parent_surface (GTS_FACE (t1), surface))
+      return GTS_FACE (t1);
+    i = i->next;
+  }
+  return NULL;
+}
+
+/* given a triangle @t and a segment s (@o -> @p). 
+   @o must be in @t. Returns the
+   edge of @t which is intersected by s or %NULL if @p is also
+   contained in @t (on_summit is set to %FALSE) or if s intersects @t 
+   exactly on one of its summit (on_summit is set to %TRUE). */
+static GtsEdge * triangle_next_edge (GtsTriangle * t,
+				     GtsPoint * o, GtsPoint * p,
+				     gboolean * on_summit)
+{
+  GtsVertex * v1, * v2, * v3;
+  GtsEdge * e1, * e2, * e3;
+  gdouble orient = 0.0;
+  
+  gts_triangle_vertices_edges (t, NULL,
+			       &v1, &v2, &v3, 
+			       &e1, &e2, &e3);
+
+  *on_summit = FALSE;
+  orient = gts_point_orientation (o, GTS_POINT (v1), p);
+  if (orient > 0.0) {
+    orient = gts_point_orientation (o, GTS_POINT (v2), p);
+    if (orient > 0.0) {
+      if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0)
+	return NULL;
+      return e2;
+    }
+    if (orient < 0.0) {
+      if (gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p) >= 0.0)
+	return NULL;
+      return e1;
+    }
+    if (gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p) < 0.0)
+      *on_summit = TRUE;
+    return NULL;
+  }
+
+  if (orient < 0.0) {
+    orient = gts_point_orientation (o, GTS_POINT (v3), p);
+    if (orient > 0.0) {
+      if (gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p) >= 0.0)
+	return NULL;
+      return e3;
+    }
+    if (orient < 0.0) {
+      if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0)
+	return NULL;
+      return e2;
+    }
+    if (gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p) < 0.0)
+      *on_summit = TRUE;
+    return NULL;
+  }
+
+  if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) < 0.0 ||
+      gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p) < 0.0)
+    *on_summit = TRUE;
+  return NULL;
+}
+
+static void triangle_barycenter (GtsTriangle * t, GtsPoint * b)
+{
+  GtsPoint * p = GTS_POINT (gts_triangle_vertex (t));
+  b->x = (p->x + 
+	  GTS_POINT (GTS_SEGMENT(t->e1)->v1)->x +
+	  GTS_POINT (GTS_SEGMENT(t->e1)->v2)->x)/3.;
+  b->y = (p->y + 
+	  GTS_POINT (GTS_SEGMENT(t->e1)->v1)->y +
+	  GTS_POINT (GTS_SEGMENT(t->e1)->v2)->y)/3.;
+}
+
+static GtsFace * point_locate (GtsPoint * o,
+			       GtsPoint * p,
+			       GtsFace * f,
+			       GtsSurface * surface)
+{
+  GtsEdge * prev;
+  gboolean on_summit;
+  GtsVertex * v1, * v2, * v3;
+  GtsEdge * e2, * e3;    
+  
+  prev = triangle_next_edge (GTS_TRIANGLE (f), o, p, &on_summit);
+
+  if (!prev) {
+    GtsFace * f1;
+
+    if (!on_summit)
+      return f; /* p is inside f */
+
+    /* s intersects f exactly on a summit: restarts from a neighbor of f */
+    if ((f1 = neighbor (f, GTS_TRIANGLE (f)->e1, surface)) ||
+	(f1 = neighbor (f, GTS_TRIANGLE (f)->e2, surface)) ||
+	(f1 = neighbor (f, GTS_TRIANGLE (f)->e3, surface))) {
+      triangle_barycenter (GTS_TRIANGLE (f1), o);
+      return point_locate (o, p, f1, surface);
+    }
+    return NULL;
+  }
+  
+  f = neighbor (f, prev, surface);
+  gts_triangle_vertices_edges (GTS_TRIANGLE (f), prev, 
+			       &v1, &v2, &v3, &prev, &e2, &e3);
+  while (f) {
+    gdouble orient = gts_point_orientation (o, GTS_POINT (v3), p);
+
+    if (orient < 0.0) {
+      if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0)
+	return f; /* p is inside f */
+      f = neighbor (f, e2, surface);
+      prev = e2;
+      v1 = v3;      
+    }
+    else if (orient > 0.0) {
+      if (gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p) >= 0.0)
+	return f; /* p is inside f */
+      f = neighbor (f, e3, surface);
+      prev = e3;
+      v2 = v3;
+    }
+    else {
+      GtsFace * f1;
+
+      if (gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p) >= 0.0)
+	return f; /* p is inside f */
+
+      /* s intersects f exactly on v3: restarts from a neighbor of f */
+      if ((f1 = neighbor (f, e2, surface)) ||
+	  (f1 = neighbor (f, e3, surface))) {
+	triangle_barycenter (GTS_TRIANGLE (f1), o);
+	return point_locate (o, p, f1, surface);
+      }
+      return NULL;
+    }
+    /* update e2, e3, v3 for the new triangle */
+    if (f) {
+      if (prev == GTS_TRIANGLE (f)->e1) {
+	e2 = GTS_TRIANGLE (f)->e2; e3 = GTS_TRIANGLE (f)->e3;
+      }
+      else if (prev == GTS_TRIANGLE (f)->e2) {
+	e2 = GTS_TRIANGLE (f)->e3; e3 = GTS_TRIANGLE (f)->e1;
+      }
+      else {
+	e2 = GTS_TRIANGLE (f)->e1; e3 = GTS_TRIANGLE (f)->e2;
+      }
+      if (GTS_SEGMENT (e2)->v1 == v1 || GTS_SEGMENT (e2)->v1 == v2)
+	v3 = GTS_SEGMENT (e2)->v2;
+      else
+	v3 = GTS_SEGMENT (e2)->v1;
+    }
+  }
+  return NULL;
+}
+
+/**
+ * gts_point_locate:
+ * @p: a #GtsPoint.
+ * @surface: a #GtsSurface.
+ * @guess: %NULL or a face of @surface close to @p.
+ *
+ * Locates the face of the planar projection of @surface containing
+ * @p. The planar projection of @surface must define a connected set
+ * of triangles without holes and bounded by a convex boundary. The
+ * algorithm is randomized and performs in O(n^1/3) expected time
+ * where n is the number of triangles of @surface.
+ *
+ * If a good @guess is given the point location can be significantly faster.
+ *
+ * Returns: a #GtsFace of @surface containing @p or %NULL if @p is not
+ * contained within the boundary of @surface.  
+ */
+GtsFace * gts_point_locate (GtsPoint * p, 
+			    GtsSurface * surface,
+			    GtsFace * guess)
+{
+  GtsFace * fr;
+  GtsPoint * o;
+
+  g_return_val_if_fail (p != NULL, NULL);
+  g_return_val_if_fail (surface != NULL, NULL);
+  g_return_val_if_fail (guess == NULL || 
+			gts_face_has_parent_surface (guess, surface), NULL);
+
+  if (guess == NULL)
+    guess = closest_face (surface, p);
+  if (guess == NULL)
+    return NULL;
+
+  o = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class ())));
+  triangle_barycenter (GTS_TRIANGLE (guess), o);
+  fr = point_locate (o, p, guess, surface);
+  gts_object_destroy (GTS_OBJECT (o));
+
+  return fr;
+}
+
+struct _GtsConstraint {
+  GtsEdge edge;
+};
+
+struct _GtsConstraintClass {
+  GtsEdgeClass parent_class;
+};
+
+/**
+ * gts_constraint_class:
+ *
+ * Returns: the #GtsConstraintClass.
+ */
+GtsConstraintClass * gts_constraint_class (void)
+{
+  static GtsConstraintClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo constraint_info = {
+      "GtsConstraint",
+      sizeof (GtsConstraint),
+      sizeof (GtsConstraintClass),
+      (GtsObjectClassInitFunc) NULL,
+      (GtsObjectInitFunc) NULL,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_edge_class ()), 
+				  &constraint_info);
+  }
+
+  return klass;
+}
+
+/* cf. figure misc/swap.fig */
+static void swap_if_in_circle (GtsFace * f1,
+			       GtsVertex * v1, 
+			       GtsVertex * v2, 
+			       GtsVertex * v3,
+			       GtsEdge * e1, 
+			       GtsEdge * e2, 
+			       GtsEdge * e3,
+			       GtsSurface * surface)
+{
+  GtsFace * f2;
+  GtsEdge * e4, *e5;
+  GtsVertex * v4;
+
+  if (GTS_IS_CONSTRAINT (e1)) /* @e1 is a constraint can not swap */
+    return;
+
+  f2 = neighbor (f1, e1, surface);
+  if (f2 == NULL) /* @e1 is a boundary of @surface */
+    return;
+
+  if (GTS_TRIANGLE (f2)->e1 == e1) {
+    e4 = GTS_TRIANGLE (f2)->e2; e5 = GTS_TRIANGLE (f2)->e3;
+  }
+  else if (GTS_TRIANGLE (f2)->e2 == e1) {
+    e4 = GTS_TRIANGLE (f2)->e3; e5 = GTS_TRIANGLE (f2)->e1;
+  }
+  else {
+    e4 = GTS_TRIANGLE (f2)->e1; e5 = GTS_TRIANGLE (f2)->e2;
+  }
+  if (GTS_SEGMENT (e4)->v1 == GTS_SEGMENT (e1)->v1 || 
+      GTS_SEGMENT (e4)->v1 == GTS_SEGMENT (e1)->v2)
+    v4 = GTS_SEGMENT (e4)->v2;
+  else
+    v4 = GTS_SEGMENT (e4)->v1;
+
+  if (gts_point_in_circle (GTS_POINT (v4), GTS_POINT (v1), 
+			   GTS_POINT (v2), GTS_POINT (v3)) > 0.0) {
+    GtsEdge * en;
+    GtsSegment * sn = gts_vertices_are_connected (v3, v4);
+
+    if (!GTS_IS_EDGE (sn))
+      en = gts_edge_new (surface->edge_class, v3, v4);
+    else
+      en = GTS_EDGE (sn);
+
+    f1 = gts_face_new (surface->face_class, en, e5, e2);
+    gts_surface_add_face (surface, f1);
+    f2 = gts_face_new (surface->face_class, en, e3, e4);
+    gts_surface_add_face (surface, f2);
+    gts_object_destroy (GTS_OBJECT (e1));
+
+    swap_if_in_circle (f1, v4, v2, v3, e5, e2, en, surface);
+    swap_if_in_circle (f2, v1, v4, v3, e4, en, e3, surface);
+  }
+}
+
+/**
+ * gts_delaunay_add_vertex_to_face:
+ * @surface: a #GtsSurface.
+ * @v: a #GtsVertex.
+ * @f: a #GtsFace belonging to @surface.
+ *
+ * Adds vertex @v to the face @f of the Delaunay triangulation defined
+ * by @surface.
+ *
+ * Returns: %NULL is @v has been successfully added to @surface or was
+ * already contained in @surface or a #GtsVertex having the same x and
+ * y coordinates as @v.  
+ */
+GtsVertex * gts_delaunay_add_vertex_to_face (GtsSurface * surface, 
+					     GtsVertex * v,
+					     GtsFace * f)
+{
+  GtsEdge * e1, * e2, * e3;
+  GtsSegment * s4, * s5, * s6;
+  GtsEdge * e4, * e5, * e6;
+  GtsVertex * v1, * v2, * v3;
+  GtsFace * f1, * f2, * f3;
+
+  g_return_val_if_fail (surface != NULL, v);
+  g_return_val_if_fail (v != NULL, v);
+  g_return_val_if_fail (f != NULL, v);
+
+  gts_triangle_vertices_edges (GTS_TRIANGLE (f), NULL, 
+			       &v1, &v2, &v3, &e1, &e2, &e3);
+  if (v == v1 || v == v2 || v == v3) /* v already in @surface */
+    return NULL;
+  if (GTS_POINT (v)->x == GTS_POINT (v1)->x &&
+      GTS_POINT (v)->y == GTS_POINT (v1)->y)
+    return v1;
+  if (GTS_POINT (v)->x == GTS_POINT (v2)->x &&
+      GTS_POINT (v)->y == GTS_POINT (v2)->y)
+    return v2;
+  if (GTS_POINT (v)->x == GTS_POINT (v3)->x &&
+      GTS_POINT (v)->y == GTS_POINT (v3)->y)
+    return v3;
+
+  s4 = gts_vertices_are_connected (v, v1);
+  if (!GTS_IS_EDGE (s4))
+    e4 = gts_edge_new (surface->edge_class, v, v1);
+  else
+    e4 = GTS_EDGE (s4);
+  s5 = gts_vertices_are_connected (v, v2);
+  if (!GTS_IS_EDGE (s5))
+    e5 = gts_edge_new (surface->edge_class, v, v2);
+  else
+    e5 = GTS_EDGE (s5);
+  s6 = gts_vertices_are_connected (v, v3);
+  if (!GTS_IS_EDGE (s6))
+    e6 = gts_edge_new (surface->edge_class, v, v3);
+  else
+    e6 = GTS_EDGE (s6);
+
+  /* cf. figure misc/swap.fig */
+  f1 = gts_face_new (surface->face_class, e4, e1, e5);
+  f2 = gts_face_new (surface->face_class, e5, e2, e6);
+  f3 = gts_face_new (surface->face_class, e6, e3, e4);
+
+  gts_surface_remove_face (surface, f);
+  gts_surface_add_face (surface, f1);
+  gts_surface_add_face (surface, f2);
+  gts_surface_add_face (surface, f3);
+
+  swap_if_in_circle (f1, v1, v2, v, e1, e5, e4, surface);
+  swap_if_in_circle (f2, v2, v3, v, e2, e6, e5, surface);
+  swap_if_in_circle (f3, v3, v1, v, e3, e4, e6, surface);
+
+  return NULL;
+}
+
+/** 
+ * gts_delaunay_add_vertex: 
+ * @surface: a #GtsSurface.  
+ * @v: a #GtsVertex.  
+ * @guess: %NULL or a #GtsFace belonging to @surface to be used as an initial
+ * guess for point location.
+ *
+ * Adds vertex @v to the Delaunay triangulation defined by
+ * @surface. If @v is not contained in the convex hull bounding
+ * @surface, @v is not added to the triangulation.
+ *
+ * Returns: %NULL is @v has been successfully added to @surface or was
+ * already contained in @surface, @v if @v is not contained in the
+ * convex hull bounding surface or a #GtsVertex having the same x and
+ * y coordinates as @v.  
+ */
+GtsVertex * gts_delaunay_add_vertex (GtsSurface * surface, 
+				     GtsVertex * v,
+				     GtsFace * guess)
+{
+  GtsFace * f;
+
+  g_return_val_if_fail (surface != NULL, v);
+  g_return_val_if_fail (v != NULL, v);
+
+  if (!(f = gts_point_locate (GTS_POINT (v), surface, guess)))
+    return v;
+  return gts_delaunay_add_vertex_to_face (surface, v, f);
+}
+
+static gboolean polygon_in_circle (GSList * poly,
+				   GtsPoint * p1, 
+				   GtsPoint * p2,
+				   GtsPoint * p3)
+{
+  GtsVertex * v1 = NULL, * v2 = NULL;
+
+  while (poly) {
+    GtsSegment * s = poly->data;
+    GtsVertex * v;
+    v = s->v1;
+    if (v != v1 && v != v2 &&
+	v != GTS_VERTEX (p1) &&
+	v != GTS_VERTEX (p2) &&
+	v != GTS_VERTEX (p3) &&
+	gts_point_in_circle (GTS_POINT (v), p1, p2, p3) > 0.)
+      return TRUE;
+    v = s->v2;
+    if (v != v1 && v != v2 &&
+	v != GTS_VERTEX (p1) &&
+	v != GTS_VERTEX (p2) &&
+	v != GTS_VERTEX (p3) &&
+	gts_point_in_circle (GTS_POINT (v), p1, p2, p3) > 0.)
+      return TRUE;
+    v1 = s->v1;
+    v2 = s->v2;
+    poly = poly->next;
+  }
+  return FALSE;
+}
+
+static void triangulate_polygon (GSList * poly, GtsSurface * surface)
+{
+  GSList * i, * poly1, * poly2;
+  GtsVertex * v1, * v2, * v3 = NULL;
+  gboolean found = FALSE;
+  GtsSegment * s, * s1, * s2;
+  GtsEdge * e1, * e2;
+
+  if (poly == NULL || poly->next == NULL) {
+    g_slist_free (poly);
+    return;
+  }
+
+  s = poly->data;
+  s1 = poly->next->data;
+  if (s->v1 == s1->v1 || s->v1 == s1->v2) {
+    v1 = s->v2;
+    v2 = s->v1;
+  }
+  else {
+    g_assert (s->v2 == s1->v1 || s->v2 == s1->v2);
+    v1 = s->v1;
+    v2 = s->v2;
+  }
+
+  i = poly->next;
+  v3 = v2;
+  while (i && !found) {
+    s1 = i->data;
+    if (s1->v1 == v3)
+      v3 = s1->v2;
+    else {
+      g_assert (s1->v2 == v3);
+      v3 = s1->v1;
+    }
+    if (v3 != v1 &&
+	gts_point_orientation (GTS_POINT (v1), 
+			       GTS_POINT (v2), 
+			       GTS_POINT (v3)) >= 0. &&
+	!polygon_in_circle (poly, 
+			    GTS_POINT (v1), 
+			    GTS_POINT (v2), 
+			    GTS_POINT (v3)))
+      found = TRUE;
+    else 
+      i = i->next;
+  }
+
+  if (!found) {
+    g_slist_free (poly);
+    return;
+  }
+
+  s1 = gts_vertices_are_connected (v2, v3);
+  if (!GTS_IS_EDGE (s1))
+    e1 = gts_edge_new (surface->edge_class, v2, v3);
+  else
+    e1 = GTS_EDGE (s1);
+  s2 = gts_vertices_are_connected (v3, v1);
+  if (!GTS_IS_EDGE (s2))
+    e2 = gts_edge_new (surface->edge_class, v3, v1);
+  else
+    e2 = GTS_EDGE (s2);
+  gts_surface_add_face (surface,
+	    gts_face_new (surface->face_class, GTS_EDGE (s), e1, e2));
+
+  poly1 = poly->next;
+  g_slist_free_1 (poly);
+  if (i->next && e2 != i->next->data)
+    poly2 = g_slist_prepend (i->next, e2);
+  else
+    poly2 = i->next;
+  if (e1 != i->data)
+    i->next = g_slist_prepend (NULL, e1);
+  else
+    i->next = NULL;
+
+ triangulate_polygon (poly1, surface);
+ triangulate_polygon (poly2, surface);
+}
+
+/**
+ * gts_delaunay_remove_vertex:
+ * @surface: a #GtsSurface.
+ * @v: a #GtsVertex.
+ *
+ * Removes @v from the Delaunay triangulation defined by @surface,
+ * restores the Delaunay property and destroys @v. Vertex @v must not
+ * be used by any constrained edge otherwise the triangulation is not
+ * guaranteed to be Delaunay.  
+ */
+void gts_delaunay_remove_vertex (GtsSurface * surface, GtsVertex * v)
+{
+  g_return_if_fail (surface != NULL);
+  g_return_if_fail (v != NULL);
+
+  triangulate_polygon (gts_vertex_fan_oriented (v, surface), surface);
+  gts_object_destroy (GTS_OBJECT (v));
+}
+
+#define NEXT_CUT(edge, edge1, list) { next = neighbor (f, edge, surface);\
+                                      if (constraint)\
+					destroy_triangles (e);\
+				      else\
+				        gts_object_destroy (GTS_OBJECT (e));\
+                                      g_assert (next);\
+				      *list = g_slist_prepend (*list, edge1);\
+                                      return g_slist_concat (constraint,\
+                                        remove_intersected_edge (s, edge,\
+					       next, surface, left, right));\
+                                    }
+
+static void destroy_triangles (GtsEdge * e)
+{
+  GSList * i = e->triangles;
+  while (i) {
+    GSList * next = i->next;
+    gts_object_destroy (i->data);
+    i = next;
+  }
+  g_slist_free (e->triangles);
+  e->triangles = NULL;
+}
+
+static GSList * 
+remove_intersected_edge (GtsSegment * s,
+			 GtsEdge * e,
+			 GtsFace * f,
+			 GtsSurface * surface,
+			 GSList ** left, GSList ** right)
+{
+  GtsVertex * v1, * v2, * v3;
+  GtsEdge * e1, * e2;
+  gdouble o1, o2;
+  GtsFace * next;
+  GSList * constraint = NULL;
+
+  if (GTS_IS_CONSTRAINT (e))
+    constraint = g_slist_prepend (NULL, e);
+
+  gts_triangle_vertices_edges (GTS_TRIANGLE (f), e, 
+			       &v1, &v2, &v3, &e, &e1, &e2);
+  
+  o1 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), 
+			      GTS_POINT (s->v2));
+  o2 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), 
+			      GTS_POINT (s->v2));
+
+  if (o1 >= 0.) {
+    if (o2 >= 0.) { /* @s->v2 is inside (or on the edge) of @f */
+      g_assert (o1 == 0. && o2 == 0.);
+      if (constraint)
+	destroy_triangles (e);
+      else
+	gts_object_destroy (GTS_OBJECT (e));
+      *left = g_slist_prepend (*left, e2);
+      *right = g_slist_prepend (*right, e1);
+      return constraint;
+    }
+    NEXT_CUT (e2, e1, right)
+  }
+  else if (o2 >= 0.)
+    NEXT_CUT (e1, e2, left)
+  else {
+    gdouble o3 = gts_point_orientation (GTS_POINT (s->v1), GTS_POINT (s->v2),
+					GTS_POINT (v3));
+    if (o3 > 0.)
+      NEXT_CUT (e1, e2, left)
+    else
+      NEXT_CUT (e2, e1, right)
+  }
+  return constraint;
+}
+
+static GSList * 
+remove_intersected_vertex (GtsSegment * s,
+			   GtsVertex * v,
+			   GtsSurface * surface,
+			   GSList ** left,
+			   GSList ** right)
+{
+  GSList * triangles = gts_vertex_triangles (v, NULL);
+  GSList * i;
+
+  i = triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (GTS_IS_FACE (t) && 
+	gts_face_has_parent_surface (GTS_FACE (t), surface)) {
+      GtsVertex * v1, * v2, * v3;
+      gdouble o1, o2;
+
+      gts_triangle_vertices (t, &v1, &v2, &v3);
+      if (v == v2) {
+	v2 = v3;
+	v3 = v1;
+      }
+      else if (v == v3) {
+	v3 = v2;
+	v2 = v1;	
+      }
+      else
+	g_assert (v == v1);
+
+      if ((o1 = gts_point_orientation (GTS_POINT (v), GTS_POINT (v2),
+				       GTS_POINT (s->v2))) >= 0. &&
+	  (o2 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v),
+				       GTS_POINT (s->v2))) >= 0.) {
+	gdouble o3 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3),
+					    GTS_POINT (s->v2));
+	GtsEdge * e = gts_triangle_edge_opposite (t, v);
+	GtsEdge * e1, * e2;
+	GtsFace * next = neighbor (GTS_FACE (t), e, surface);
+	
+	gts_triangle_vertices_edges (t, e, &v2, &v3, &v, &e, &e2, &e1);
+
+	g_slist_free (triangles);
+
+	if (o3 >= 0.) /* @s->v2 is inside (or on the edge) of t */
+	  return NULL;
+
+	gts_object_destroy (GTS_OBJECT (t));
+	*left = g_slist_prepend (*left, e2);
+	*right = g_slist_prepend (*right, e1);
+
+	g_assert (next);
+	return remove_intersected_edge (s, e, next, surface, left, right);
+      }
+    }
+    i = i->next;
+  }
+
+  g_assert_not_reached ();
+  return NULL;
+}
+
+/**
+ * gts_delaunay_add_constraint:
+ * @surface: a #GtsSurface.
+ * @c: a #GtsConstraint.
+ *
+ * Add constraint @c to the constrained Delaunay triangulation defined by
+ * @surface.
+ *
+ * Returns: a list of #GtsConstraint conflicting (i.e. intersecting) with @c 
+ * which were removed from @surface.
+ */
+GSList * gts_delaunay_add_constraint (GtsSurface * surface,
+				      GtsConstraint * c)
+{
+  GSList * constraints;
+  GtsVertex * v1, * v2;
+  GSList * left = NULL, * right = NULL;
+
+  g_return_val_if_fail (surface != NULL, NULL);
+  g_return_val_if_fail (c != NULL, NULL);
+  g_return_val_if_fail (GTS_IS_CONSTRAINT (c), NULL);
+  
+  v1 = GTS_SEGMENT (c)->v1;
+  v2 = GTS_SEGMENT (c)->v2;
+  
+  gts_allow_floating_edges = TRUE;
+  constraints = remove_intersected_vertex (GTS_SEGMENT (c), v1, surface,
+					   &left, &right);
+  gts_allow_floating_edges = FALSE;
+#if 1
+  triangulate_polygon (g_slist_prepend (g_slist_reverse (right), c), surface);
+  triangulate_polygon (g_slist_prepend (left, c), surface);
+#else
+  right = g_slist_prepend (g_slist_reverse (right), c);
+  left = g_slist_prepend (left, c);
+  {
+    FILE * fp0 = fopen ("hole", "wt");
+    FILE * fp1 = fopen ("right", "wt");
+    FILE * fp2 = fopen ("left", "wt");
+    GSList * i = left;
+
+    gts_surface_write (surface, fp0);
+    fclose (fp0);
+ 
+    fprintf (fp2, "LIST {\n");
+    while (i) {
+      GtsSegment * s = i->data;
+      fprintf (fp2, 
+	       "# %p: %p->%p\n"
+	       "VECT 1 2 0 2 0 %g %g 0 %g %g 0\n",
+	       s, s->v1, s->v2,
+	       GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y,
+	       GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y);
+      i = i->next;
+    }
+    fprintf (fp2, "}\n");
+    fprintf (fp1, "LIST {\n");
+    i = right;
+    while (i) {
+      GtsSegment * s = i->data;
+      fprintf (fp1, 
+	       "# %p: %p->%p\n"
+	       "VECT 1 2 0 2 0 %g %g 0 %g %g 0\n",
+	       s, s->v1, s->v2,
+	       GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y,
+	       GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y);
+      i = i->next;
+    }
+    fprintf (fp1, "}\n");
+    fclose (fp1);
+    fclose (fp2);
+  }
+  triangulate_polygon (right, surface);
+  triangulate_polygon (left, surface);
+#endif
+  return constraints;
+}
+
+static void delaunay_check (GtsTriangle * t, gpointer * data)
+{
+  GtsSurface * surface = data[0];
+  GtsFace ** face = data[1];
+
+  if (*face == NULL) {
+    GSList * i, * list;
+    GtsVertex * v1, * v2, * v3;
+
+    gts_triangle_vertices (t, &v1, &v2, &v3);
+    list = gts_vertex_neighbors (v1, NULL, surface);
+    list = gts_vertex_neighbors (v2, list, surface);
+    list = gts_vertex_neighbors (v3, list, surface);
+    i = list;
+    while (i && *face == NULL) {
+      GtsVertex * v = i->data;
+      if (v != v1 && v != v2 && v != v3 &&
+	  gts_point_in_circle (GTS_POINT (v), 
+			       GTS_POINT (v1),
+			       GTS_POINT (v2),  
+			       GTS_POINT (v3)) > 0.)
+	*face = GTS_FACE (t);
+      i = i->next;
+    }
+    g_slist_free (list);
+  }
+}
+
+/**
+ * gts_delaunay_check:
+ * @surface: a #GtsSurface.
+ *
+ * Returns: %NULL if the planar projection of @surface is a Delaunay 
+ * triangulation (unconstrained), a #GtsFace violating the Delaunay
+ * property otherwise.
+ */
+GtsFace * gts_delaunay_check (GtsSurface * surface)
+{
+  GtsFace * face = NULL;
+  gpointer data[2];
+
+  g_return_val_if_fail (surface != NULL, FALSE);
+
+  data[0] = surface;
+  data[1] = &face;
+  gts_surface_foreach_face (surface, (GtsFunc) delaunay_check, data);
+
+  return face;
+}
+
+/**
+ * gts_delaunay_remove_hull:
+ * @surface: a #GtsSurface.
+ *
+ * Removes all the edges of the boundary of @surface which are not
+ * constraints.  
+ */
+void gts_delaunay_remove_hull (GtsSurface * surface)
+{
+  GSList * boundary;
+
+  g_return_if_fail (surface != NULL);
+
+  boundary = gts_surface_boundary (surface);
+  gts_allow_floating_edges = TRUE;
+  while (boundary) {
+    GSList * i = boundary;
+    GtsEdge * e = i->data;
+
+    boundary = i->next;
+    g_slist_free_1 (i);
+    if (!GTS_IS_CONSTRAINT (e)) {
+      GtsTriangle * t = GTS_TRIANGLE (gts_edge_is_boundary (e, surface));
+      if (t != NULL) {
+	if (t->e1 != e && !GTS_IS_CONSTRAINT (t->e1) &&
+	    !gts_edge_is_boundary (t->e1, surface))
+	  boundary = g_slist_prepend (boundary, t->e1);
+	if (t->e2 != e && !GTS_IS_CONSTRAINT (t->e2) &&
+	    !gts_edge_is_boundary (t->e2, surface))
+	  boundary = g_slist_prepend (boundary, t->e2);
+	if (t->e3 != e && !GTS_IS_CONSTRAINT (t->e3) &&
+	    !gts_edge_is_boundary (t->e3, surface))
+	  boundary = g_slist_prepend (boundary, t->e3);
+      }
+      gts_object_destroy (GTS_OBJECT (e));
+    }
+  }
+  gts_allow_floating_edges = FALSE;
+}
diff --git a/src/config.h.win32 b/src/config.h.win32
new file mode 100644
index 0000000..c137a54
--- /dev/null
+++ b/src/config.h.win32
@@ -0,0 +1,26 @@
+/* config.h.win32: Handcrafted for Microsoft C */
+
+/* Define if you need to in order for stat and other things to work.  */
+/* #undef _POSIX_SOURCE */
+
+/* Define if you have the ANSI C header files.  */
+#define STDC_HEADERS 1
+
+#define GTS_MAJOR_VERSION 0
+#define GTS_MINOR_VERSION 4
+#define GTS_MICRO_VERSION 1
+#define GTS_INTERFACE_AGE 0
+#define GTS_BINARY_AGE 1
+
+/* Define if you have the <floatingpoint.h> header file.  */
+/* #undef HAVE_FLOATINGPOINT_H */
+
+/* Define if you have the <fpu_control.h> header file.  */
+/* #undef HAVE_FPU_CONTROL_H */
+
+/* Define if this is Win32, possibly using the Cygwin emulation layer. */
+#define WIN32 1
+
+/* Define if this is Win32 without Cygwin.  */
+#define NATIVE_WIN32 1
+
diff --git a/src/container.c b/src/container.c
new file mode 100644
index 0000000..940854b
--- /dev/null
+++ b/src/container.c
@@ -0,0 +1,455 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+/* GtsContainee */
+
+static void containee_class_init (GtsContaineeClass * klass)
+{
+  klass->remove_container = NULL;
+  klass->add_container = NULL;
+  klass->is_contained = NULL;
+}
+
+GtsContaineeClass * gts_containee_class (void)
+{
+  static GtsContaineeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo containee_info = {
+      "GtsContainee",
+      sizeof (GtsContainee),
+      sizeof (GtsContaineeClass),
+      (GtsObjectClassInitFunc) containee_class_init,
+      (GtsObjectInitFunc) NULL,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (),
+				  &containee_info);
+  }
+
+  return klass;
+}
+
+GtsContainee * gts_containee_new (GtsContaineeClass * klass)
+{
+  GtsContainee * object;
+
+  object = GTS_CONTAINEE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+
+  return object;
+}
+
+gboolean gts_containee_is_contained (GtsContainee * item,
+				     GtsContainer * c)
+{
+  g_return_val_if_fail (item != NULL, FALSE);
+  g_return_val_if_fail (c != NULL, FALSE);
+
+  if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->is_contained)
+    return
+      (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->is_contained) (item, c);
+  return FALSE;
+}
+
+/* GtsSListContainee */
+
+static void slist_containee_destroy (GtsObject * object)
+{
+  GtsSListContainee * item = GTS_SLIST_CONTAINEE (object);
+  GSList * i;
+
+  i = item->containers;
+  while (i) {
+    GSList * next = i->next;
+    gts_container_remove (i->data, GTS_CONTAINEE (item));
+    i = next;
+  }
+  g_assert (item->containers == NULL);
+
+  (* GTS_OBJECT_CLASS (gts_slist_containee_class ())->parent_class->destroy) 
+    (object);
+}
+
+static void slist_containee_remove_container (GtsContainee * i, 
+					      GtsContainer * c)
+{
+  GtsSListContainee * item = GTS_SLIST_CONTAINEE (i);
+  item->containers = g_slist_remove (item->containers, c);
+}
+
+static void slist_containee_add_container (GtsContainee * i, 
+					   GtsContainer * c)
+{
+  GtsSListContainee * item = GTS_SLIST_CONTAINEE (i);
+  if (!g_slist_find (item->containers, c))
+    item->containers = g_slist_prepend (item->containers, c);
+}
+
+static gboolean slist_containee_is_contained (GtsContainee * i,
+					      GtsContainer * c)
+{
+  return g_slist_find (GTS_SLIST_CONTAINEE (i)->containers, c) ? TRUE : FALSE;
+}
+
+static void slist_containee_class_init (GtsSListContaineeClass * klass)
+{
+  GTS_CONTAINEE_CLASS (klass)->remove_container = 
+    slist_containee_remove_container;
+  GTS_CONTAINEE_CLASS (klass)->add_container = 
+    slist_containee_add_container;
+ GTS_CONTAINEE_CLASS (klass)->is_contained = 
+    slist_containee_is_contained;
+
+  GTS_OBJECT_CLASS (klass)->destroy = slist_containee_destroy;
+}
+
+static void slist_containee_init (GtsSListContainee * object)
+{
+  object->containers = NULL;
+}
+
+GtsSListContaineeClass * gts_slist_containee_class (void)
+{
+  static GtsSListContaineeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo slist_containee_info = {
+      "GtsSListContainee",
+      sizeof (GtsSListContainee),
+      sizeof (GtsSListContaineeClass),
+      (GtsObjectClassInitFunc) slist_containee_class_init,
+      (GtsObjectInitFunc) slist_containee_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_containee_class ()),
+				  &slist_containee_info);
+  }
+
+  return klass;
+}
+
+/* GtsContainer */
+
+static void remove_container (GtsContainee * item, GtsContainer * c)
+{
+  if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container)
+    (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container) 
+      (item, c);
+}
+
+static void container_destroy (GtsObject * object)
+{
+  GtsContainer * c = GTS_CONTAINER (object);
+
+  gts_container_foreach (c, (GtsFunc) remove_container, c);
+
+  (* GTS_OBJECT_CLASS (gts_container_class ())->parent_class->destroy) 
+    (object);
+}
+
+static void container_add (GtsContainer * c, GtsContainee * item)
+{
+  if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->add_container)
+    (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->add_container)
+      (item, c);
+}
+
+static void container_remove (GtsContainer * c, GtsContainee * item)
+{
+  if (GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container)
+    (* GTS_CONTAINEE_CLASS (GTS_OBJECT (item)->klass)->remove_container)
+      (item, c);
+}
+
+static void container_clone_add (GtsContainee * item, GtsContainer * clone)
+{
+  gts_container_add (clone, item);
+}
+
+static void container_clone (GtsObject * clone, GtsObject * object)
+{
+  gts_object_init (clone, object->klass);
+  gts_container_foreach (GTS_CONTAINER (object), 
+			 (GtsFunc) container_clone_add, clone);
+}
+
+static void container_class_init (GtsContainerClass * klass)
+{
+  klass->add = container_add;
+  klass->remove = container_remove;
+  klass->foreach = NULL;
+  klass->size = NULL;
+
+  GTS_OBJECT_CLASS (klass)->destroy = container_destroy;
+  GTS_OBJECT_CLASS (klass)->clone = container_clone;
+}
+
+GtsContainerClass * gts_container_class (void)
+{
+  static GtsContainerClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo container_info = {
+      "GtsContainer",
+      sizeof (GtsContainer),
+      sizeof (GtsContainerClass),
+      (GtsObjectClassInitFunc) container_class_init,
+      (GtsObjectInitFunc) NULL,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = 
+      gts_object_class_new (GTS_OBJECT_CLASS (gts_slist_containee_class ()), 
+			    &container_info);
+  }
+
+  return klass;
+}
+
+GtsContainer * gts_container_new (GtsContainerClass * klass)
+{
+  GtsContainer * object;
+
+  object = GTS_CONTAINER (gts_object_new (GTS_OBJECT_CLASS (klass)));
+
+  return object;
+}
+
+void gts_container_add (GtsContainer * c,
+			GtsContainee * item)
+{
+  g_return_if_fail (c != NULL);
+  g_return_if_fail (item != NULL);
+
+  g_assert (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->add);
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->add) (c, item);
+}
+
+void gts_container_remove (GtsContainer * c,
+			   GtsContainee * item)
+{
+  g_return_if_fail (c != NULL);
+  g_return_if_fail (item != NULL);
+
+  g_assert (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->remove);
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->remove) (c, item);
+}
+
+void gts_container_foreach (GtsContainer * c,
+			    GtsFunc func,
+			    gpointer data)
+{
+  g_return_if_fail (c != NULL);
+  g_return_if_fail (func != NULL);
+
+  if (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->foreach)
+    (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->foreach) (c, func, data);
+}
+
+guint gts_container_size (GtsContainer * c)
+{
+  g_return_val_if_fail (c != NULL, 0);
+
+  if (GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->size)
+    return (* GTS_CONTAINER_CLASS (GTS_OBJECT (c)->klass)->size) (c);
+  return 0;
+}
+
+/* GtsHashContainer */
+
+static void hash_container_destroy (GtsObject * object)
+{
+  GHashTable * items = GTS_HASH_CONTAINER (object)->items;
+
+  (* GTS_OBJECT_CLASS (gts_hash_container_class ())->parent_class->destroy) 
+    (object);
+
+  g_hash_table_destroy (items);
+}
+
+static void hash_container_add (GtsContainer * c, GtsContainee * item)
+{
+  g_return_if_fail (GTS_HASH_CONTAINER (c)->frozen == FALSE);
+
+  g_hash_table_insert (GTS_HASH_CONTAINER (c)->items, item, NULL);
+
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_hash_container_class ())->parent_class)->add) (c, item);
+}
+
+static void hash_container_remove (GtsContainer * c, GtsContainee * item)
+{
+  g_return_if_fail (GTS_HASH_CONTAINER (c)->frozen == FALSE);
+
+  g_hash_table_remove (GTS_HASH_CONTAINER (c)->items, item);
+
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_hash_container_class ())->parent_class)->remove) (c, item);
+}
+
+static void hash_foreach (GtsContainee * item, 
+			  gpointer item_data, 
+			  gpointer * info)
+{
+  (* ((GtsFunc) info[0])) (item, info[1]);
+}
+
+static void hash_container_foreach (GtsContainer * c, 
+				    GtsFunc func, 
+				    gpointer data)
+{
+  gpointer info[2];
+  
+  info[0] = func;
+  info[1] = data;
+  /* prevent removing or adding items */
+  GTS_HASH_CONTAINER (c)->frozen = TRUE;
+  g_hash_table_foreach (GTS_HASH_CONTAINER (c)->items, 
+			(GHFunc) hash_foreach, info);
+  GTS_HASH_CONTAINER (c)->frozen = FALSE;
+}
+
+static guint hash_container_size (GtsContainer * c)
+{
+  return g_hash_table_size (GTS_HASH_CONTAINER (c)->items);
+}
+
+static void hash_container_class_init (GtsHashContainerClass * klass)
+{
+  GTS_CONTAINER_CLASS (klass)->add = hash_container_add;
+  GTS_CONTAINER_CLASS (klass)->remove = hash_container_remove;
+  GTS_CONTAINER_CLASS (klass)->foreach = hash_container_foreach;
+  GTS_CONTAINER_CLASS (klass)->size = hash_container_size;
+
+  GTS_OBJECT_CLASS (klass)->destroy = hash_container_destroy;
+}
+
+static void hash_container_init (GtsHashContainer * object)
+{
+  object->items = g_hash_table_new (NULL, NULL);
+  object->frozen = FALSE;
+}
+
+GtsHashContainerClass * gts_hash_container_class (void)
+{
+  static GtsHashContainerClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo hash_container_info = {
+      "GtsHashContainer",
+      sizeof (GtsHashContainer),
+      sizeof (GtsHashContainerClass),
+      (GtsObjectClassInitFunc) hash_container_class_init,
+      (GtsObjectInitFunc) hash_container_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_container_class ()),
+				  &hash_container_info);
+  }
+
+  return klass;
+}
+
+/* GtsSListContainer */
+
+static void slist_container_destroy (GtsObject * object)
+{
+  GSList * items = GTS_SLIST_CONTAINER (object)->items;
+
+  (* GTS_OBJECT_CLASS (gts_slist_container_class ())->parent_class->destroy) 
+    (object);
+
+  g_slist_free (items);
+}
+
+static void slist_container_add (GtsContainer * c, GtsContainee * item)
+{
+  g_return_if_fail (GTS_SLIST_CONTAINER (c)->frozen == FALSE);
+
+  if (!g_slist_find (GTS_SLIST_CONTAINER (c)->items, item))
+    GTS_SLIST_CONTAINER (c)->items = 
+      g_slist_prepend (GTS_SLIST_CONTAINER (c)->items, item);
+
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_slist_container_class ())->parent_class)->add) (c, item);
+}
+
+static void slist_container_remove (GtsContainer * c, GtsContainee * item)
+{
+  g_return_if_fail (GTS_SLIST_CONTAINER (c)->frozen == FALSE);
+
+  GTS_SLIST_CONTAINER (c)->items = 
+      g_slist_remove (GTS_SLIST_CONTAINER (c)->items, item);
+
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_slist_container_class ())->parent_class)->remove) (c, item);
+}
+
+static void slist_container_foreach (GtsContainer * c, 
+				     GtsFunc func, 
+				     gpointer data)
+{
+  /* prevent removing or adding items */
+  GTS_SLIST_CONTAINER (c)->frozen = TRUE;
+  g_slist_foreach (GTS_SLIST_CONTAINER (c)->items, (GFunc) func, data);
+  GTS_SLIST_CONTAINER (c)->frozen = FALSE;
+}
+
+static guint slist_container_size (GtsContainer * c)
+{
+  return g_slist_length (GTS_SLIST_CONTAINER (c)->items);
+}
+
+static void slist_container_class_init (GtsSListContainerClass * klass)
+{
+  GTS_CONTAINER_CLASS (klass)->add = slist_container_add;
+  GTS_CONTAINER_CLASS (klass)->remove = slist_container_remove;
+  GTS_CONTAINER_CLASS (klass)->foreach = slist_container_foreach;
+  GTS_CONTAINER_CLASS (klass)->size = slist_container_size;
+
+  GTS_OBJECT_CLASS (klass)->destroy = slist_container_destroy;
+}
+
+static void slist_container_init (GtsSListContainer * object)
+{
+  object->items = NULL;
+  object->frozen = FALSE;
+}
+
+GtsSListContainerClass * gts_slist_container_class (void)
+{
+  static GtsSListContainerClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo slist_container_info = {
+      "GtsSListContainer",
+      sizeof (GtsSListContainer),
+      sizeof (GtsSListContainerClass),
+      (GtsObjectClassInitFunc) slist_container_class_init,
+      (GtsObjectInitFunc) slist_container_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_container_class ()),
+				  &slist_container_info);
+  }
+
+  return klass;
+}
diff --git a/src/edge.c b/src/edge.c
new file mode 100644
index 0000000..582d4e6
--- /dev/null
+++ b/src/edge.c
@@ -0,0 +1,481 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+gboolean gts_allow_floating_edges = FALSE;
+
+static void edge_destroy (GtsObject * object)
+{
+  GtsEdge * edge = GTS_EDGE (object);
+  GSList * i;
+
+  i = edge->triangles;
+  while (i) {
+    GSList * next = i->next;
+    gts_object_destroy (i->data);
+    i = next;
+  }
+  g_assert (edge->triangles == NULL);
+
+  (* GTS_OBJECT_CLASS (gts_edge_class ())->parent_class->destroy) (object);
+}
+
+static void edge_clone (GtsObject * clone, GtsObject * object)
+{
+  (* GTS_OBJECT_CLASS (gts_edge_class ())->parent_class->clone) (clone,
+								 object);
+  GTS_SEGMENT (clone)->v1 = GTS_SEGMENT (clone)->v2 = NULL;
+  GTS_EDGE (clone)->triangles = NULL;
+}
+
+static void edge_class_init (GtsObjectClass * klass)
+{
+  klass->clone = edge_clone;
+  klass->destroy = edge_destroy;
+}
+
+static void edge_init (GtsEdge * edge)
+{
+  edge->triangles = NULL;
+}
+
+/**
+ * gts_edge_class:
+ *
+ * Returns: the #GtsEdgeClass.
+ */
+GtsEdgeClass * gts_edge_class (void)
+{
+  static GtsEdgeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo edge_info = {
+      "GtsEdge",
+      sizeof (GtsEdge),
+      sizeof (GtsEdgeClass),
+      (GtsObjectClassInitFunc) edge_class_init,
+      (GtsObjectInitFunc) edge_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_segment_class ()), 
+				  &edge_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_edge_new:
+ * @klass: a #GtsEdgeClass.
+ * @v1: a #GtsVertex.
+ * @v2: a #GtsVertex.
+ *
+ * Returns: a new #GtsEdge linking @v1 and @v2.
+ */
+GtsEdge * gts_edge_new (GtsEdgeClass * klass,
+			GtsVertex * v1, GtsVertex * v2)
+{
+  return GTS_EDGE (gts_segment_new (GTS_SEGMENT_CLASS (klass), v1, v2));
+}
+
+/**
+ * gts_edge_replace:
+ * @e: a #GtsEdge.
+ * @with: a #GtsEdge.
+ *
+ * Replaces @e with @with. For each triangle which uses @e as an
+ * edge, @e is replaced with @with. The @with->triangles list is
+ * updated appropriately and the @e->triangles list is freed and set
+ * to %NULL.
+ */
+void gts_edge_replace (GtsEdge * e, GtsEdge * with)
+{
+  GSList * i;
+
+  g_return_if_fail (e != NULL && with != NULL && e != with);
+
+  i = e->triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (t->e1 == e) t->e1 = with;
+    if (t->e2 == e) t->e2 = with;
+    if (t->e3 == e) t->e3 = with;
+    if (!g_slist_find (with->triangles, t))
+      with->triangles = g_slist_prepend (with->triangles, t);
+    i = i->next;
+  }
+  g_slist_free (e->triangles);
+  e->triangles = NULL;
+}
+
+/**
+ * gts_edge_has_parent_surface:
+ * @e: a #GtsEdge.
+ * @surface: a #GtsSurface.
+ * 
+ * Returns: a #GtsFace of @surface having @e as an edge, %NULL otherwise.
+ */
+GtsFace * gts_edge_has_parent_surface (GtsEdge * e, GtsSurface * surface)
+{
+  GSList * i;
+
+  g_return_val_if_fail (e != NULL, NULL);
+
+  i = e->triangles;
+  while (i) {
+    if (GTS_IS_FACE (i->data) && 
+	gts_face_has_parent_surface (i->data, surface))
+      return i->data;
+    i = i->next;
+  }
+  return NULL;
+}
+
+/**
+ * gts_edge_has_any_parent_surface:
+ * @e: a #GtsEdge.
+ * 
+ * Returns: %NULL if @e is not an edge of any triangle or if all the
+ * faces having @e has an edge do not belong to any surface,
+ * a #GtsFace belonging to a surface and having @e as an edge.
+ */
+GtsFace * gts_edge_has_any_parent_surface (GtsEdge * e)
+{
+  GSList * i;
+
+  g_return_val_if_fail (e != NULL, NULL);
+
+  i = e->triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (GTS_IS_FACE (t) && GTS_FACE (t)->surfaces != NULL)
+      return GTS_FACE (t);
+    i = i->next;
+  }
+  return NULL;
+}
+
+/**
+ * gts_edge_is_boundary:
+ * @e: a #GtsEdge.
+ * @surface: a #GtsSurface or %NULL.
+ * 
+ * Returns: the unique #GtsFace (which belongs to @surface) and which
+ * has @e as an edge (i.e. @e is a boundary edge (of @surface)) or %NULL 
+ * if there is more than one or no faces (belonging to @surface) and
+ * with @e as an edge.
+ */
+GtsFace * gts_edge_is_boundary (GtsEdge * e, GtsSurface * surface)
+{
+  GSList * i;
+  GtsFace * f = NULL;
+  
+  g_return_val_if_fail (e != NULL, NULL);
+  
+  i = e->triangles;
+  while (i) {
+    if (GTS_IS_FACE (i->data)) {
+      if (!surface || gts_face_has_parent_surface (i->data, surface)) {
+	if (f != NULL)
+	  return NULL;
+	f = i->data;
+      }
+    }
+    i = i->next;    
+  }
+  return f;
+}
+
+/**
+ * gts_edges_from_vertices:
+ * @vertices: a list of #GtsVertex.
+ * @parent: a #GtsSurface.
+ * 
+ * Returns: a list of unique #GtsEdge which have one of their vertices in 
+ * @vertices and are used by a face of @parent. 
+ */
+GSList * gts_edges_from_vertices (GSList * vertices, GtsSurface * parent)
+{
+  GHashTable * hash;
+  GSList * edges = NULL, * i;
+
+  g_return_val_if_fail (parent != NULL, NULL);
+  
+  hash = g_hash_table_new (NULL, NULL);
+  i = vertices;
+  while (i) {
+    GSList * j = GTS_VERTEX (i->data)->segments;
+    while (j) {
+      GtsSegment * s = j->data;
+      if (GTS_IS_EDGE (s) &&
+	  gts_edge_has_parent_surface (GTS_EDGE (s), parent) && 
+	  g_hash_table_lookup (hash, s) == NULL) {
+	edges = g_slist_prepend (edges, s);
+	g_hash_table_insert (hash, s, i);
+      }
+      j = j->next;
+    }
+    i = i->next;
+  }
+  g_hash_table_destroy (hash);
+  return edges;
+}
+
+/**
+ * gts_edge_face_number:
+ * @e: a #GtsEdge.
+ * @s: a #GtsSurface.
+ *
+ * Returns: the number of faces using @e and belonging to @s.
+ */
+guint gts_edge_face_number (GtsEdge * e, GtsSurface * s)
+{
+  GSList * i;
+  guint nt = 0;
+
+  g_return_val_if_fail (e != NULL, 0);
+  g_return_val_if_fail (s != NULL, 0);
+
+  i = e->triangles;
+  while (i) {
+    if (GTS_IS_FACE (i->data) && 
+	gts_face_has_parent_surface (GTS_FACE (i->data), s))
+      nt++;
+    i = i->next;
+  }
+  return nt;
+}
+
+/**
+ * gts_edge_is_duplicate:
+ * @e: a #GtsEdge.
+ *
+ * Returns: the first #GtsEdge different from @e which shares the
+ * same endpoints or %NULL if there is none.
+ */
+GtsEdge * gts_edge_is_duplicate (GtsEdge * e)
+{
+  GSList * i;
+  GtsVertex * v2;
+
+  g_return_val_if_fail (e != NULL, NULL);
+
+  v2 = GTS_SEGMENT (e)->v2;
+  i = GTS_SEGMENT (e)->v1->segments;
+  if (GTS_SEGMENT (e)->v1 == v2) /* e is degenerate: special treatment */
+    while (i) {
+      GtsSegment * s = i->data;
+      if (s != GTS_SEGMENT (e) &&
+	  GTS_IS_EDGE (s) && 
+	  s->v1 == v2 && s->v2 == v2)
+	return GTS_EDGE (s);
+      i = i->next;
+    }
+  else /* e is not degenerate */
+    while (i) {
+      GtsSegment * s = i->data;
+      if (s != GTS_SEGMENT (e) &&
+	  GTS_IS_EDGE (s) && 
+	  (s->v1 == v2 || s->v2 == v2))
+	return GTS_EDGE (s);
+      i = i->next;
+    }
+  return NULL;
+}
+
+/**
+ * gts_edges_merge:
+ * @edges: a list of #GtsEdge.
+ *
+ * For each edge in @edges check if it is duplicated (as
+ * returned by gts_edge_is_duplicate()). If it is replace it by its
+ * duplicate, destroy it and remove it from the list.
+ *
+ * Returns: the updated @edges list.
+ */
+GList * gts_edges_merge (GList * edges)
+{
+  GList * i = edges;
+
+  /* we want to control edge destruction */
+  gts_allow_floating_edges = TRUE;
+  while (i) {
+    GtsEdge * e = i->data;
+    GtsEdge * de = gts_edge_is_duplicate (e);
+    if (de) {
+      GList * next = i->next;
+      edges = g_list_remove_link (edges, i);
+      g_list_free_1 (i);
+      i = next;
+      gts_edge_replace (e, de);
+      gts_object_destroy (GTS_OBJECT (e));
+    }
+    else
+      i = i->next;
+  }
+  gts_allow_floating_edges = FALSE;;
+
+  return edges;
+}
+
+static void triangle_vertices_edges (GtsTriangle * t, 
+				     GtsEdge * e,
+				     GtsVertex ** v,
+				     GtsEdge ** ee1,
+				     GtsEdge ** ee2)
+{
+  GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3;
+  GtsVertex * v1 = GTS_SEGMENT (e)->v1;
+
+  if (e1 == e)        e1 = e3;
+  else if (e2 == e)   e2 = e3;
+  else                g_assert (e3 == e);
+
+  if (GTS_SEGMENT (e2)->v1 == v1 || GTS_SEGMENT (e2)->v2 == v1) {
+    e3 = e1; e1 = e2; e2 = e3;
+  }
+  if (GTS_SEGMENT (e1)->v1 == v1)
+    *v = GTS_SEGMENT (e1)->v2;
+  else
+    *v = GTS_SEGMENT (e1)->v1;
+  *ee1 = e1;
+  *ee2 = e2;
+}
+
+/**
+ * gts_edge_belongs_to_tetrahedron:
+ * @e: a #GtsEdge.
+ *
+ * Returns: %TRUE if @e is used by faces forming a tetrahedron, %FALSE
+ * otherwise.
+ */
+gboolean gts_edge_belongs_to_tetrahedron (GtsEdge * e)
+{
+  GSList * i;
+  GtsVertex * v1, * v2;
+
+  g_return_val_if_fail (e != NULL, FALSE);
+
+  v1 = GTS_SEGMENT (e)->v1;
+  v2 = GTS_SEGMENT (e)->v2;
+  i = e->triangles;
+  while (i) {
+    GtsEdge * e1, * e2;
+    GtsVertex * vt1;
+    GSList * j = i->next;
+    triangle_vertices_edges (i->data, e, &vt1, &e1, &e2);
+    while (j) {      
+      GtsSegment * s5;
+      GtsEdge * e3, * e4;
+      GtsVertex * vt2;
+
+      triangle_vertices_edges (j->data, e, &vt2, &e3, &e4);
+      s5 = gts_vertices_are_connected (vt1, vt2);
+      if (GTS_IS_EDGE (s5) &&
+	  gts_triangle_use_edges (e1, e3, GTS_EDGE (s5)) &&
+	  gts_triangle_use_edges (e2, e4, GTS_EDGE (s5)))
+	return TRUE;
+      j = j->next;
+    }
+    i = i->next;
+  }
+
+  return FALSE;
+}
+
+#define edge_use_vertex(e, v) (GTS_SEGMENT(e)->v1 == v ||\
+			       GTS_SEGMENT(e)->v2 == v)
+
+static GtsEdge * next_edge (GtsTriangle * t,
+			    GtsEdge * e1,
+			    GtsEdge * e)
+{
+  GtsVertex * v1 = GTS_SEGMENT (e)->v1;
+  GtsVertex * v2 = GTS_SEGMENT (e)->v2;
+  
+  if (t->e1 != e1 && t->e1 != e && 
+      (edge_use_vertex (t->e1, v1) || edge_use_vertex (t->e1, v2)))
+    return t->e1;
+  else if (t->e2 != e1 && t->e2 != e && 
+	   (edge_use_vertex (t->e2, v1) || edge_use_vertex (t->e2, v2)))
+    return t->e2;
+  else if (t->e3 != e1 && t->e3 != e && 
+	   (edge_use_vertex (t->e3, v1) || edge_use_vertex (t->e3, v2)))
+    return t->e3;
+  g_assert_not_reached ();
+  return NULL;
+}
+
+static void triangle_next (GtsEdge * e1, GtsEdge * e)
+{
+  GSList * i;
+
+  i = e1->triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (GTS_OBJECT (t)->reserved) {
+      GTS_OBJECT (t)->reserved = NULL;
+      triangle_next (next_edge (t, e1, e), e);
+    }
+    i = i->next;
+  }
+}
+
+/** 
+ * gts_edge_is_contact: 
+ * @e: a #GtsEdge.  
+ *
+ * Returns: the number of sets of connected triangles sharing @e as a
+ * contact edge.  
+ */
+guint gts_edge_is_contact (GtsEdge * e)
+{
+  GSList * i, * triangles;
+  guint ncomponent = 0;
+
+  g_return_val_if_fail (e != NULL, 0);
+
+  triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL);
+  i = triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles);
+  while (i) {
+    GTS_OBJECT (i->data)->reserved = i;
+    i = i->next;
+  }
+
+  i = e->triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (GTS_OBJECT (t)->reserved) {
+      GtsEdge * e1;
+      GTS_OBJECT (t)->reserved = NULL;
+      e1 = next_edge (t, NULL, e);
+      triangle_next (e1, e);
+      triangle_next (next_edge (t, e1, e), e);
+      ncomponent++;
+    }
+    i = i->next;
+  }
+   
+  g_slist_foreach (triangles, (GFunc) gts_object_reset_reserved, NULL);
+  g_slist_free (triangles);
+
+  return ncomponent;
+}
diff --git a/src/eheap.c b/src/eheap.c
new file mode 100644
index 0000000..d9a2a70
--- /dev/null
+++ b/src/eheap.c
@@ -0,0 +1,466 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "gts.h"
+
+#define PARENT(i) ((i) >= 2 ? (i)/2 : 0)
+#define LEFT_CHILD(i) (2*(i))
+#define RIGHT_CHILD(i) (2*(i) + 1)
+
+struct _GtsEHeap {
+  GPtrArray * elts;
+  GtsKeyFunc func;
+  gpointer data;
+  gboolean frozen, randomized;
+  GMemChunk * mem_chunk;
+};
+
+/**
+ * gts_eheap_new:
+ * @key_func: a #GtsKeyFunc or %NULL.
+ * @data: user data to be passed to @key_func.
+ *
+ * Returns: a new #GtsEHeap using @key_func as key.
+ */
+GtsEHeap * gts_eheap_new (GtsKeyFunc key_func,
+			  gpointer data)
+{
+  GtsEHeap * heap;
+
+  heap = g_malloc (sizeof(GtsEHeap));
+  heap->elts = g_ptr_array_new ();
+  heap->func = key_func;
+  heap->data = data;
+  heap->frozen = FALSE;
+  heap->randomized = FALSE;
+  heap->mem_chunk = g_mem_chunk_create (GtsEHeapPair, 512, G_ALLOC_AND_FREE);
+  return heap;
+}
+
+static void sift_up (GtsEHeap * heap, guint i)
+{
+  GtsEHeapPair * parent, * child;
+  guint p;
+  gpointer * pdata = heap->elts->pdata;
+  gdouble key;
+
+  child = pdata[i - 1];
+  key = child->key;
+  while ((p = PARENT (i))) {
+    parent = pdata[p - 1];
+    if (parent->key > key ||
+	(heap->randomized && parent->key == key && rand () < RAND_MAX/2)) {
+      pdata[p - 1] = child;
+      pdata[i - 1] = parent;
+      child->pos = p;
+      parent->pos = i;
+      i = p;
+    }
+    else
+      i = 0;
+  }
+}
+
+/**
+ * gts_eheap_insert:
+ * @heap: a #GtsEHeap.
+ * @p: a pointer to add to the heap.
+ *
+ * Inserts a new element @p in the heap.
+ *
+ * Returns: a #GtsEHeapPair describing the position of the element in the heap.
+ * This pointer is necessary for gts_eheap_remove() and 
+ * gts_eheap_decrease_key().
+ */
+GtsEHeapPair * gts_eheap_insert (GtsEHeap * heap, gpointer p)
+{
+  GtsEHeapPair * pair;
+  GPtrArray * elts;
+
+  g_return_val_if_fail (heap != NULL, NULL);
+  g_return_val_if_fail (heap->func != NULL, NULL);
+
+  elts = heap->elts;
+  pair = g_chunk_new (GtsEHeapPair, heap->mem_chunk);
+  g_ptr_array_add (elts, pair);
+  pair->data = p;
+  pair->pos = elts->len;
+  pair->key = (*heap->func) (p, heap->data);
+  if (!heap->frozen)
+    sift_up (heap, elts->len);
+  return pair;
+}
+
+/**
+ * gts_eheap_insert_with_key:
+ * @heap: a #GtsEHeap.
+ * @p: a pointer to add to the heap.
+ * @key: the value of the key associated to @p.
+ *
+ * Inserts a new element @p in the heap.
+ *
+ * Returns: a #GtsEHeapPair describing the position of the element in the heap.
+ * This pointer is necessary for gts_eheap_remove() and 
+ * gts_eheap_decrease_key().
+ */
+GtsEHeapPair * gts_eheap_insert_with_key (GtsEHeap * heap, 
+					  gpointer p, 
+					  gdouble key)
+{
+  GtsEHeapPair * pair;
+  GPtrArray * elts;
+
+  g_return_val_if_fail (heap != NULL, NULL);
+
+  elts = heap->elts;
+  pair = g_chunk_new (GtsEHeapPair, heap->mem_chunk);
+  g_ptr_array_add (elts, pair);
+  pair->data = p;
+  pair->pos = elts->len;
+  pair->key = key;
+  if (!heap->frozen)
+    sift_up (heap, elts->len);
+  return pair;
+}
+
+static void sift_down (GtsEHeap * heap, guint i)
+{
+  GtsEHeapPair * left_child, * right_child, * child, * parent;
+  guint lc, rc, c;
+  gpointer * pdata = heap->elts->pdata;
+  guint len = heap->elts->len;
+  gdouble key;
+
+  lc = LEFT_CHILD (i);
+  rc = RIGHT_CHILD (i);
+  left_child = lc <= len ? pdata[lc - 1] : NULL;
+  right_child = rc <= len ? pdata[rc - 1] : NULL;
+
+  parent = pdata[i - 1];
+  key = parent->key;
+  while (left_child != NULL) {
+    if (right_child == NULL || left_child->key  < right_child->key) {
+      child = left_child;
+      c = lc;
+    }
+    else {
+      child = right_child;
+      c = rc;
+    }
+    if (key > child->key) {
+      pdata[i - 1] = child;
+      child->pos = i;
+      pdata[c - 1] = parent;
+      parent->pos = c;
+      i = c;
+      lc = LEFT_CHILD (i);
+      rc = RIGHT_CHILD (i);
+      left_child = lc <= len ? pdata[lc - 1] : NULL;
+      right_child = rc <= len ? pdata[rc - 1] : NULL;      
+    }
+    else
+      left_child = NULL;
+  }
+}
+
+/**
+ * gts_eheap_remove_top:
+ * @heap: a #GtsEHeap.
+ * @key: a pointer on a gdouble or %NULL.
+ *
+ * Removes the element at the top of the heap and optionally (if @key is not
+ * %NULL) returns the value of its key.
+ *
+ * Returns: the element at the top of the heap.
+ */
+gpointer gts_eheap_remove_top (GtsEHeap * heap, gdouble * key)
+{
+  gpointer root;
+  GPtrArray * elts;
+  guint len;
+  GtsEHeapPair * pair;
+
+  g_return_val_if_fail (heap != NULL, NULL);
+
+  elts = heap->elts; 
+  len = elts->len;
+
+  if (len == 0)
+    return NULL;
+  if (len == 1) {
+    pair = g_ptr_array_remove_index (elts, 0);
+    root = pair->data;
+    if (key) 
+      *key = pair->key;
+    g_mem_chunk_free (heap->mem_chunk, pair);
+    return root;
+  }
+
+  pair = elts->pdata[0];
+  root = pair->data;
+  if (key) 
+    *key = pair->key;
+  g_mem_chunk_free (heap->mem_chunk, pair);
+  pair = g_ptr_array_remove_index (elts, len - 1);
+  elts->pdata[0] = pair;
+  pair->pos = 1;
+  sift_down (heap, 1);
+  return root;
+}
+
+/**
+ * gts_eheap_top:
+ * @heap: a #GtsEHeap.
+ * @key: a pointer on a gdouble or %NULL.
+ *
+ * Returns: the element at the top of the heap and optionally (if @key is not
+ * %NULL) its key.
+ */
+gpointer gts_eheap_top (GtsEHeap * heap, gdouble * key)
+{
+  GtsEHeapPair * pair;
+  GPtrArray * elts;
+
+  g_return_val_if_fail (heap != NULL, NULL);
+
+  elts = heap->elts;
+
+  if (elts->len == 0)
+    return NULL;
+
+  pair = elts->pdata[0];
+  if (key)
+    *key = pair->key;
+  return pair->data;
+}
+
+/**
+ * gts_eheap_destroy:
+ * @heap: a #GtsEHeap.
+ * 
+ * Free all the memory allocated for @heap.
+ */
+void gts_eheap_destroy (GtsEHeap * heap)
+{
+  g_return_if_fail (heap != NULL);
+
+  g_ptr_array_free (heap->elts, TRUE);
+  g_mem_chunk_destroy (heap->mem_chunk);
+  g_free (heap);
+}
+
+/**
+ * gts_eheap_thaw:
+ * @heap: a #GtsEHeap.
+ *
+ * If @heap has been frozen previously using gts_eheap_freeze(), reorder it
+ * in O(n) time and unfreeze it.
+ */
+void gts_eheap_thaw (GtsEHeap * heap)
+{
+  guint i;
+  
+  g_return_if_fail (heap != NULL);
+
+  if (!heap->frozen)
+    return;
+
+  for (i = heap->elts->len/2; i > 0; i--)
+    sift_down (heap, i);
+
+  heap->frozen = FALSE;
+}
+
+/**
+ * gts_eheap_foreach:
+ * @heap: a #GtsEHeap.
+ * @func: the function to call for each element in the heap.
+ * @data: to pass to @func.
+ */
+void gts_eheap_foreach (GtsEHeap * heap, 
+			GFunc func,
+			gpointer data)
+{
+  guint i;
+  GPtrArray * elts;
+  
+  g_return_if_fail (heap != NULL);
+  g_return_if_fail (func != NULL);
+
+  elts = heap->elts;
+  for (i = 0; i < elts->len; i++)
+    (*func) (((GtsEHeapPair *) elts->pdata[i])->data, data);
+}
+
+/**
+ * gts_eheap_remove:
+ * @heap: a #GtsEHeap.
+ * @p: a #GtsEHeapPair.
+ *
+ * Removes element corresponding to @p from @heap in O(log n).
+ *
+ * Returns: the element just removed from @heap.
+ */
+gpointer gts_eheap_remove (GtsEHeap * heap, GtsEHeapPair * p)
+{
+  GtsEHeapPair ** pdata;
+  GtsEHeapPair * parent;
+  guint i, par;
+  gpointer data;
+
+  g_return_val_if_fail (heap != NULL, NULL);
+  g_return_val_if_fail (p != NULL, NULL);
+
+  pdata = (GtsEHeapPair **)heap->elts->pdata;
+  i = p->pos;
+  data = p->data;
+
+  g_return_val_if_fail (i > 0 && i <= heap->elts->len, NULL);
+  g_return_val_if_fail (p == pdata[i - 1], NULL);
+
+  /* move element to the top */
+  while ((par = PARENT (i))) {
+    parent = pdata[par - 1];
+    pdata[par - 1] = p;
+    pdata[i - 1] = parent;
+    p->pos = par;
+    parent->pos = i;
+    i = par;
+  }
+
+  gts_eheap_remove_top (heap, NULL);
+
+  return data;
+}
+
+/**
+ * gts_eheap_decrease_key:
+ * @heap: a #GtsEHeap.
+ * @p: a #GtsEHeapPair.
+ * @new_key: the new value of the key for this element. Must be smaller than
+ * the current key.
+ *
+ * Decreases the value of the key of the element at position @p.
+ */
+void gts_eheap_decrease_key (GtsEHeap * heap, 
+			     GtsEHeapPair * p,
+			     gdouble new_key)
+{
+  guint i;
+
+  g_return_if_fail (heap != NULL);
+  g_return_if_fail (p != NULL);
+
+  i = p->pos;
+  g_return_if_fail (i > 0 && i <= heap->elts->len);
+  g_return_if_fail (p == heap->elts->pdata[i - 1]);
+
+  g_return_if_fail (new_key <= p->key);
+
+  p->key = new_key;
+  if (!heap->frozen)
+    sift_up (heap, i);
+}
+
+/**
+ * gts_eheap_freeze:
+ * @heap: a #GtsEHeap.
+ *
+ * Freezes the heap. Any subsequent operation will not preserve the heap
+ * property. Used in conjunction with gts_eheap_insert() and gts_eheap_thaw()
+ * to create a heap in O(n) time.
+ */
+void gts_eheap_freeze (GtsEHeap * heap)
+{
+  g_return_if_fail (heap != NULL);
+
+  heap->frozen = TRUE;
+}
+
+/**
+ * gts_eheap_size:
+ * @heap: a #GtsEHeap.
+ *
+ * Returns: the number of items in @heap.
+ */
+guint gts_eheap_size (GtsEHeap * heap)
+{
+  g_return_val_if_fail (heap != NULL, 0);
+
+  return heap->elts->len;
+}
+
+/**
+ * gts_eheap_update:
+ * @heap: a #GtsEHeap.
+ *
+ * Updates the key of each element of @heap and reorders it.
+ */
+void gts_eheap_update (GtsEHeap * heap)
+{
+  guint i, len;
+  GtsEHeapPair ** pairs;
+  gpointer data;
+  GtsKeyFunc func;
+
+  g_return_if_fail (heap != NULL);
+  g_return_if_fail (heap->func != NULL);
+
+  heap->frozen = TRUE;
+
+  len = heap->elts->len;
+  pairs = (GtsEHeapPair **) heap->elts->pdata;
+  data = heap->data;
+  func = heap->func;
+
+  for (i = 0; i < len; i++) {
+    GtsEHeapPair * pair = pairs[i];
+    pair->key = (*func) (pair->data, data);
+  }
+  
+  gts_eheap_thaw (heap);
+}
+
+/**
+ * gts_eheap_key:
+ * @heap: a #GtsEHeap.
+ * @p: a pointer to be tested;
+ *
+ * Returns: the value of the key for pointer @p.
+ */
+gdouble gts_eheap_key (GtsEHeap * heap, gpointer p)
+{
+  g_return_val_if_fail (heap != NULL, 0.);
+  g_return_val_if_fail (heap->func != NULL, 0.);
+
+  return (* heap->func) (p, heap->data);
+}
+
+/**
+ * gts_eheap_randomized:
+ * @heap: a #GtsEHeap.
+ * @randomized: whether @heap should be randomized.
+ */
+void gts_eheap_randomized (GtsEHeap * heap, gboolean randomized)
+{
+  g_return_if_fail (heap != NULL);
+
+  heap->randomized = randomized;
+}
diff --git a/src/face.c b/src/face.c
new file mode 100644
index 0000000..298833b
--- /dev/null
+++ b/src/face.c
@@ -0,0 +1,265 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+gboolean gts_allow_floating_faces = FALSE;
+
+static void face_destroy (GtsObject * object)
+{
+  GtsFace * face = GTS_FACE (object);
+  GSList * i;
+
+  i = face->surfaces;
+  while (i) {
+    GSList * next = i->next;
+    gts_surface_remove_face (i->data, face);
+    i = next;
+  }
+  g_assert (face->surfaces == NULL);
+
+  (* GTS_OBJECT_CLASS (gts_face_class ())->parent_class->destroy) (object);
+}
+
+static void face_clone (GtsObject * clone, GtsObject * object)
+{
+  (* GTS_OBJECT_CLASS (gts_face_class ())->parent_class->clone) (clone, 
+								 object);
+  GTS_FACE (clone)->surfaces = NULL;
+}
+
+static void face_class_init (GtsFaceClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->clone = face_clone;
+  GTS_OBJECT_CLASS (klass)->destroy = face_destroy;
+}
+
+static void face_init (GtsFace * face)
+{
+  face->surfaces = NULL;
+}
+
+/**
+ * gts_face_class:
+ *
+ * Returns: the #GtsFaceClass.
+ */
+GtsFaceClass * gts_face_class (void)
+{
+  static GtsFaceClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo face_info = {
+      "GtsFace",
+      sizeof (GtsFace),
+      sizeof (GtsFaceClass),
+      (GtsObjectClassInitFunc) face_class_init,
+      (GtsObjectInitFunc) face_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_triangle_class ()), 
+				  &face_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_face_new:
+ * @klass: a #GtsFaceClass.
+ * @e1: a #GtsEdge.
+ * @e2: a #GtsEdge.
+ * @e3: a #GtsEdge.
+ *
+ * Returns: a new #GtsFace using @e1, @e2 and @e3 as edges.
+ */
+GtsFace * gts_face_new (GtsFaceClass * klass,
+			GtsEdge * e1, GtsEdge * e2, GtsEdge * e3)
+{
+  GtsFace * f;
+
+  f = GTS_FACE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  gts_triangle_set (GTS_TRIANGLE (f), e1, e2, e3);
+
+  return f;
+}
+
+/**
+ * gts_face_has_parent_surface:
+ * @f: a #GtsFace.
+ * @s: a #GtsSurface.
+ *
+ * Returns: %TRUE if @f belongs to @s, %FALSE otherwise.
+ */
+gboolean gts_face_has_parent_surface (GtsFace * f, GtsSurface * s)
+{
+  GSList * i;
+
+  g_return_val_if_fail (f != NULL, FALSE);
+
+  i = f->surfaces;
+  while (i) {
+    if (i->data == s)
+      return TRUE;
+    i = i->next;
+  }
+  return FALSE;
+}
+
+/**
+ * gts_faces_from_edges:
+ * @edges: a list of #GtsEdge.
+ * @s: a #GtsSurface or %NULL.
+ *
+ * Builds a list of unique faces which belong to @s and have
+ * one of their edges in @edges.
+ * 
+ * Returns: the list of faces.
+ */
+GSList * gts_faces_from_edges (GSList * edges, GtsSurface * s)
+{
+  GHashTable * hash;
+  GSList * faces = NULL, * i;
+
+  hash = g_hash_table_new (NULL, NULL);
+  i = edges;
+  while (i) {
+    GSList * j = GTS_EDGE (i->data)->triangles;
+    while (j) {
+      GtsTriangle * t = j->data;
+      if (GTS_IS_FACE (t) &&
+	  (!s || gts_face_has_parent_surface (GTS_FACE (t), s)) && 
+	  g_hash_table_lookup (hash, t) == NULL) {
+	faces = g_slist_prepend (faces, t);
+	g_hash_table_insert (hash, t, i);
+      }
+      j = j->next;
+    }
+    i = i->next;
+  }
+  g_hash_table_destroy (hash);
+
+  return faces;
+}
+
+/**
+ * gts_face_neighbor_number:
+ * @f: a #GtsFace.
+ * @s: a #GtsSurface or %NULL.
+ *
+ * Returns: the number of faces neighbors of @f and belonging to @s.
+ */
+guint gts_face_neighbor_number (GtsFace * f, GtsSurface * s)
+{
+  GSList * i;
+  guint nn = 0;
+  GtsEdge * e[4], ** e1 = e;
+  
+  g_return_val_if_fail (f != NULL, 0);
+  
+  e[0] = GTS_TRIANGLE (f)->e1; 
+  e[1] = GTS_TRIANGLE (f)->e2; 
+  e[2] = GTS_TRIANGLE (f)->e3; 
+  e[3] = NULL;
+  while (*e1) {
+    i = (*e1++)->triangles;
+    while (i) {
+      GtsTriangle * t = i->data;
+      if (GTS_FACE (t) != f && 
+	  GTS_IS_FACE (t) && 
+	  (!s || gts_face_has_parent_surface (GTS_FACE (t), s)))
+	nn++;
+      i = i->next;
+    }
+  }
+
+  return nn;
+}
+
+/**
+ * gts_face_neighbors:
+ * @f: a #GtsFace.
+ * @s: a #GtsSurface or %NULL.
+ *
+ * Returns: a list of unique #GtsFace neighbors of @f and belonging to @s.
+ */
+GSList * gts_face_neighbors (GtsFace * f, GtsSurface * s)
+{
+  GSList * i, * list = NULL;
+  GtsEdge * e[4], ** e1 = e;
+  
+  g_return_val_if_fail (f != NULL, NULL);
+
+  e[0] = GTS_TRIANGLE (f)->e1; 
+  e[1] = GTS_TRIANGLE (f)->e2; 
+  e[2] = GTS_TRIANGLE (f)->e3; 
+  e[3] = NULL;
+  while (*e1) {
+    i = (*e1++)->triangles;
+    while (i) {
+      GtsTriangle * t = i->data;
+      if (GTS_FACE (t) != f && 
+	  GTS_IS_FACE (t) && 
+	  (!s || gts_face_has_parent_surface (GTS_FACE (t), s)))
+	list = g_slist_prepend (list, t);
+      i = i->next;
+    }
+  }
+
+  return list;
+}
+
+/**
+ * gts_face_foreach_neighbor:
+ * @f: a #GtsFace.
+ * @s: a #GtsSurface or %NULL.
+ * @func: a #GtsFunc.
+ * @data: user data to pass to @func.
+ *
+ * Calls @func for each neighbor of @f belonging to @s (if not %NULL).
+ */
+void gts_face_foreach_neighbor (GtsFace * f, 
+				GtsSurface * s, 
+				GtsFunc func,
+				gpointer data)
+{
+  GSList * i;
+  GtsEdge * e[4], ** e1 = e;
+  
+  g_return_if_fail (f != NULL);
+  g_return_if_fail (func != NULL);
+
+  e[0] = GTS_TRIANGLE (f)->e1;
+  e[1] = GTS_TRIANGLE (f)->e2; 
+  e[2] = GTS_TRIANGLE (f)->e3; 
+  e[3] = NULL;
+  while (*e1) {
+    i = (*e1++)->triangles;
+    while (i) {
+      GtsTriangle * t = i->data;
+      if (GTS_FACE (t) != f && 
+	  GTS_IS_FACE (t) && 
+	  (!s || gts_face_has_parent_surface (GTS_FACE (t), s)))
+	(* func) (t, data);
+      i = i->next;
+    }
+  }
+}
+
diff --git a/src/fifo.c b/src/fifo.c
new file mode 100644
index 0000000..b967e3b
--- /dev/null
+++ b/src/fifo.c
@@ -0,0 +1,178 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+struct _GtsFifo {
+  GList * head;
+  GList * tail;
+};
+
+/**
+ * gts_fifo_new:
+ *
+ * Returns: a new #GtsFifo.
+ */
+GtsFifo * gts_fifo_new ()
+{
+  GtsFifo * fifo = g_malloc (sizeof (GtsFifo));
+
+  fifo->head = fifo->tail = NULL;
+  return fifo;
+}
+
+/**
+ * gts_fifo_write:
+ * @fifo: a #GtsFifo.
+ * @fp: a file pointer.
+ *
+ * Writes the content of @fifo in @fp.
+ */
+void gts_fifo_write (GtsFifo * fifo, FILE * fp)
+{
+  GList * i;
+
+  g_return_if_fail (fifo != NULL);
+  g_return_if_fail (fp != NULL);
+
+  fprintf (fp, "[");
+  i = fifo->head;
+  while (i) {
+    fprintf (fp, "%p ", i->data);
+    i = i->next;
+  }
+  fprintf (fp, "]");
+}
+
+/**
+ * gts_fifo_push:
+ * @fifo: a #GtsFifo.
+ * @data: data to add to @fifo.
+ *
+ * Push @data into @fifo.
+ */
+void gts_fifo_push (GtsFifo * fifo, gpointer data)
+{
+  g_return_if_fail (fifo != NULL);
+
+  fifo->head = g_list_prepend (fifo->head, data);
+  if (fifo->tail == NULL)
+    fifo->tail = fifo->head;
+}
+
+/**
+ * gts_fifo_pop:
+ * @fifo: a #GtsFifo.
+ *
+ * Removes the first element from @fifo.
+ *
+ * Returns: the first element in @fifo or %NULL if @fifo is empty.
+ */
+gpointer gts_fifo_pop (GtsFifo * fifo)
+{
+  gpointer data;
+  GList * tail;
+
+  g_return_val_if_fail (fifo != NULL, NULL);
+
+  if (fifo->tail == NULL)
+    return NULL;
+  tail = fifo->tail->prev;
+  data = fifo->tail->data;
+  fifo->head = g_list_remove_link (fifo->head, fifo->tail);
+  g_list_free_1 (fifo->tail);
+  fifo->tail = tail;
+  return data;
+}
+
+/**
+ * gts_fifo_top:
+ * @fifo: a #GtsFifo.
+ *
+ * Returns: the first element in @fifo or %NULL if @fifo is empty.
+ */
+gpointer gts_fifo_top (GtsFifo * fifo)
+{
+  g_return_val_if_fail (fifo != NULL, NULL);
+
+  if (fifo->tail == NULL)
+    return NULL;
+  return fifo->tail->data;
+}
+
+/**
+ * gts_fifo_size:
+ * @fifo: a #GtsFifo.
+ *
+ * Returns: the number of elements in @fifo.
+ */
+guint gts_fifo_size (GtsFifo * fifo)
+{
+  g_return_val_if_fail (fifo != NULL, 0);
+
+  return g_list_length (fifo->head);
+}
+
+/**
+ * gts_fifo_destroy:
+ * @fifo: a #GtsFifo.
+ *
+ * Frees all the memory allocated for @fifo.
+ */
+void gts_fifo_destroy (GtsFifo * fifo)
+{
+  g_return_if_fail (fifo != NULL);
+  g_list_free (fifo->head);
+  g_free (fifo);
+}
+
+/**
+ * gts_fifo_is_empty:
+ * @fifo: a #GtsFifo.
+ * 
+ * Returns: %TRUE if @fifo is empty, %FALSE otherwise.
+ */
+gboolean gts_fifo_is_empty (GtsFifo * fifo)
+{
+  g_return_val_if_fail (fifo != NULL, TRUE);
+
+  return (fifo->head == NULL);
+}
+
+/**
+ * gts_fifo_foreach:
+ * @fifo: a #GtsFifo.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func in order for each item in @fifo, passing @data.
+ */
+void gts_fifo_foreach (GtsFifo * fifo, GtsFunc func, gpointer data)
+{
+  GList * i;
+
+  g_return_if_fail (fifo != NULL);
+  g_return_if_fail (func != NULL);
+
+  i = fifo->tail;
+  while (i) {
+    (* func) (i->data, data);
+    i = i->prev;
+  }
+}
diff --git a/src/graph.c b/src/graph.c
new file mode 100644
index 0000000..3a23c0d
--- /dev/null
+++ b/src/graph.c
@@ -0,0 +1,1247 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "gts.h"
+
+/* GtsGNode */
+
+gboolean gts_allow_floating_gnodes = FALSE;
+
+static void gnode_remove_container (GtsContainee * i, GtsContainer * c)
+{
+  (* GTS_CONTAINEE_CLASS (GTS_OBJECT_CLASS (gts_gnode_class ())->parent_class)->remove_container) (i, c);
+  if (GTS_SLIST_CONTAINEE (i)->containers == NULL && !gts_allow_floating_gnodes)
+    gts_object_destroy (GTS_OBJECT (i));
+}
+
+static void gnode_class_init (GtsGNodeClass * klass)
+{
+  klass->weight = NULL;
+
+  GTS_CONTAINEE_CLASS (klass)->remove_container = gnode_remove_container;
+}
+
+static void gnode_init (GtsGNode * n)
+{
+  n->level = 0;
+}
+
+/**
+ * gts_gnode_class:
+ * 
+ * Returns: the #GtsGNodeClass.
+ */
+GtsGNodeClass * gts_gnode_class (void)
+{
+  static GtsGNodeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo gnode_info = {
+      "GtsGNode",
+      sizeof (GtsGNode),
+      sizeof (GtsGNodeClass),
+      (GtsObjectClassInitFunc) gnode_class_init,
+      (GtsObjectInitFunc) gnode_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = 
+      gts_object_class_new (GTS_OBJECT_CLASS (gts_slist_container_class ()),
+			    &gnode_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_gnode_new:
+ * @klass: a #GtsGNodeClass.
+ *
+ * Returns: a new #GtsGNode.
+ */
+GtsGNode * gts_gnode_new (GtsGNodeClass * klass)
+{
+  GtsGNode * object;
+
+  object = GTS_GNODE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+
+  return object;
+}
+
+/**
+ * gts_gnode_foreach_neighbor:
+ * @n: a #GtsGNode.
+ * @g: a #GtsGraph or %NULL.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func for each neighbor #GtsGNode of @n (belonging to @g if
+ * @g is not %NULL.  
+ */
+void gts_gnode_foreach_neighbor (GtsGNode * n, 
+				 GtsGraph * g,
+				 GtsFunc func,
+				 gpointer data)
+{
+  GSList * i;
+
+  g_return_if_fail (n != NULL);
+  g_return_if_fail (func != NULL);
+
+  i = GTS_SLIST_CONTAINER (n)->items;
+  while (i) {
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+    if (g == NULL || gts_containee_is_contained (GTS_CONTAINEE (n1),
+						 GTS_CONTAINER (g)))
+      (* func) (n1, data);
+    i = i->next;
+  }
+}
+
+/**
+ * gts_gnode_foreach_edge:
+ * @n: a #GtsGNode.
+ * @g: a #GtsGraph or %NULL.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func for each #GtsGEdge connecting @n to another #GtsGNode
+ * (belonging to @g if @g is not %NULL.  
+ */
+void gts_gnode_foreach_edge (GtsGNode * n, 
+			     GtsGraph * g,
+			     GtsFunc func,
+			     gpointer data)
+{
+  GSList * i;
+
+  g_return_if_fail (n != NULL);
+  g_return_if_fail (func != NULL);
+
+  i = GTS_SLIST_CONTAINER (n)->items;
+  while (i) {
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+    if (g == NULL || gts_containee_is_contained (GTS_CONTAINEE (n1),
+						 GTS_CONTAINER (g)))
+      (* func) (i->data, data);
+    i = i->next;
+  }
+}
+
+/**
+ * gts_gnode_degree:
+ * @n: a #GtsGNode.
+ * @g: a #GtsGraph or %NULL.
+ *
+ * Returns: the number of neighbors of @n (belonging to @g if @g is not %NULL).
+ */
+guint gts_gnode_degree (GtsGNode * n,
+			GtsGraph * g)
+{
+  GSList * i;
+  guint nn = 0;
+
+  g_return_val_if_fail (n != NULL, 0);
+
+  i = GTS_SLIST_CONTAINER (n)->items;
+  while (i) {
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+    if (g == NULL || gts_containee_is_contained (GTS_CONTAINEE (n1),
+						 GTS_CONTAINER (g)))
+      nn++;
+    i = i->next;
+  }
+
+  return nn;
+}
+
+/**
+ * gts_gnode_move_cost:
+ * @n: a #GtsGNode.
+ * @src: a #GtsGraph containing @n.
+ * @dst: another #GtsGraph.
+ *
+ * Returns: the cost (increase in the sum of the weights of the edges cut) of
+ * moving @n from @src to @dst.
+ */
+gfloat gts_gnode_move_cost (GtsGNode * n,
+			    GtsGraph * src,
+			    GtsGraph * dst)
+{
+  GSList * i;
+  gfloat cost = 0.;
+  
+  g_return_val_if_fail (n != NULL, G_MAXFLOAT);
+  g_return_val_if_fail (src != NULL, G_MAXFLOAT);
+  g_return_val_if_fail (dst != NULL, G_MAXFLOAT);
+  g_return_val_if_fail (gts_containee_is_contained (GTS_CONTAINEE (n),
+						    GTS_CONTAINER (src)),
+			G_MAXFLOAT);
+
+  i = GTS_SLIST_CONTAINER (n)->items;
+  while (i) {
+    GtsGEdge * ge = i->data;
+    GtsGNode * neighbor = GTS_GNODE_NEIGHBOR (n, ge);
+
+    if (gts_containee_is_contained (GTS_CONTAINEE (neighbor), 
+				    GTS_CONTAINER (src)))
+      cost += gts_gedge_weight (ge);
+    else if (gts_containee_is_contained (GTS_CONTAINEE (neighbor), 
+					 GTS_CONTAINER (dst)))
+      cost -= gts_gedge_weight (ge);
+    i = i->next;
+  }
+  
+  return cost;
+}
+
+/**
+ * gts_gnode_weight:
+ * @n: a #GtsGNode.
+ *
+ * Returns: the weight of @n as defined by the weight() method of the
+ * #GtsGNodeClass.  
+ */
+gfloat gts_gnode_weight (GtsGNode * n)
+{
+  g_return_val_if_fail (n != NULL, 0.);
+
+  if (GTS_GNODE_CLASS (GTS_OBJECT (n)->klass)->weight)
+    return (* GTS_GNODE_CLASS (GTS_OBJECT (n)->klass)->weight) (n);
+  return 1.;
+}
+
+/* GtsNGNode */
+
+static void ngnode_init (GtsNGNode * n)
+{
+  n->id = 0;
+}
+
+/**
+ * gts_ngnode_class:
+ *
+ * Returns: the #GtsNGNodeClass.
+ */
+GtsNGNodeClass * gts_ngnode_class (void)
+{
+  static GtsNGNodeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo ngnode_info = {
+      "GtsNGNode",
+      sizeof (GtsNGNode),
+      sizeof (GtsNGNodeClass),
+      (GtsObjectClassInitFunc) NULL,
+      (GtsObjectInitFunc) ngnode_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gnode_class ()),
+				  &ngnode_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_ngnode_new:
+ * @klass: a #GtsNGNodeClass.
+ *
+ * Returns: a new #GtsNGNode with identity @id.
+ */
+GtsNGNode * gts_ngnode_new (GtsNGNodeClass * klass,
+			    guint id)
+{
+  GtsNGNode * n;
+
+  n = GTS_NGNODE (gts_gnode_new (GTS_GNODE_CLASS (klass)));
+  n->id = id;
+
+  return n;
+}
+
+/* GtsWGNode */
+
+static gfloat wgnode_weight (GtsGNode * n)
+{
+  return GTS_WGNODE (n)->weight;
+}
+
+static void wgnode_class_init (GtsWGNodeClass * klass)
+{
+  GTS_GNODE_CLASS (klass)->weight = wgnode_weight;
+}
+
+static void wgnode_init (GtsWGNode * n)
+{
+  n->weight = 1.;
+}
+
+/**
+ * gts_wgnode_class:
+ *
+ * Returns: the #GtsWGNodeClass.
+ */
+GtsWGNodeClass * gts_wgnode_class (void)
+{
+  static GtsWGNodeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo wgnode_info = {
+      "GtsWGNode",
+      sizeof (GtsWGNode),
+      sizeof (GtsWGNodeClass),
+      (GtsObjectClassInitFunc) wgnode_class_init,
+      (GtsObjectInitFunc) wgnode_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gnode_class ()),
+				  &wgnode_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_wgnode_new:
+ * @klass: a #GtsWGNodeClass.
+ * @weight: the weight of the #GtsWGNode to create.
+ *
+ * Returns: a new #GtsWGNode of weight @weight.
+ */
+GtsWGNode * gts_wgnode_new (GtsWGNodeClass * klass,
+			    gfloat weight)
+{
+  GtsWGNode * n;
+
+  n = GTS_WGNODE (gts_gnode_new (GTS_GNODE_CLASS (klass)));
+  n->weight = weight;
+
+  return n;
+}
+
+/* GtsFNode */
+
+static void fnode_init (GtsFNode * fn)
+{
+  fn->f = NULL;
+}
+
+/**
+ * gts_fnode_class:
+ *
+ * Returns: the #GtsFNodeClass.
+ */
+GtsFNodeClass * gts_fnode_class (void)
+{
+  static GtsFNodeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo fnode_info = {
+      "GtsFNode",
+      sizeof (GtsFNode),
+      sizeof (GtsFNodeClass),
+      (GtsObjectClassInitFunc) NULL,
+      (GtsObjectInitFunc) fnode_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gnode_class ()),
+				  &fnode_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_fnode_new:
+ * @klass: a #GtsFNodeClass.
+ * @f: a #GtsFace.
+ *
+ * Returns: a new #GtsFNode associated with face @f.
+ */
+GtsFNode * gts_fnode_new (GtsFNodeClass * klass, GtsFace * f)
+{
+  GtsFNode * fn;
+
+  g_return_val_if_fail (f != NULL, NULL);
+
+  fn = GTS_FNODE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  fn->f = f;
+
+  return fn;
+}
+
+/* GtsGEdge */
+
+static void gedge_destroy (GtsObject * object)
+{
+  GtsGEdge * ge = GTS_GEDGE (object);
+
+  if (ge->n1)
+    gts_container_remove (GTS_CONTAINER (ge->n1), GTS_CONTAINEE (ge));
+  if (ge->n2)
+    gts_container_remove (GTS_CONTAINER (ge->n2), GTS_CONTAINEE (ge));
+
+  (* GTS_OBJECT_CLASS (gts_gedge_class ())->parent_class->destroy) (object);
+}
+
+static void gedge_remove_container (GtsContainee * i, GtsContainer * c)
+{
+  GtsGEdge * ge = GTS_GEDGE (i);
+  GtsGNode * n1 = ge->n1;
+  GtsGNode * n2 = ge->n2;
+
+  ge->n1 = ge->n2 = NULL;
+  if (n1 != NULL && n2 != NULL) {
+    if (GTS_CONTAINER (n1) == c) {
+      if (n2) gts_container_remove (GTS_CONTAINER (n2), i);
+    }
+    else if (GTS_CONTAINER (n2) == c) {
+      if (n1) gts_container_remove (GTS_CONTAINER (n1), i);
+    }
+    else
+      g_assert_not_reached ();
+    (* GTS_OBJECT_CLASS (gts_gedge_class ())->parent_class->destroy)
+      (GTS_OBJECT (i));
+  }
+}
+
+static gboolean gedge_is_contained (GtsContainee * i, GtsContainer * c)
+{
+  GtsGEdge * ge = GTS_GEDGE (i);
+
+  if (GTS_CONTAINER (ge->n1) == c || GTS_CONTAINER (ge->n2) == c)
+    return TRUE;
+  return FALSE;
+}
+
+static void gedge_class_init (GtsGEdgeClass * klass)
+{
+  klass->weight = NULL;
+
+  GTS_CONTAINEE_CLASS (klass)->remove_container = gedge_remove_container;
+  GTS_CONTAINEE_CLASS (klass)->is_contained = gedge_is_contained;
+
+  GTS_OBJECT_CLASS (klass)->destroy = gedge_destroy;
+}
+
+static void gedge_init (GtsGEdge * object)
+{
+  object->n1 = object->n2 = NULL;
+}
+
+/**
+ * gts_gedge_class:
+ *
+ * Returns: the #GtsGEdgeClass.
+ */
+GtsGEdgeClass * gts_gedge_class (void)
+{
+  static GtsGEdgeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo gedge_info = {
+      "GtsGEdge",
+      sizeof (GtsGEdge),
+      sizeof (GtsGEdgeClass),
+      (GtsObjectClassInitFunc) gedge_class_init,
+      (GtsObjectInitFunc) gedge_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_containee_class ()),
+				  &gedge_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_gedge_new:
+ * @klass: a #GtsGEdgeClass.
+ * @n1: a #GtsGNode.
+ * @n2: another #GtsGNode.
+ *
+ * Returns: a new #GtsGEdge linking @n1 and @n2.
+ */
+GtsGEdge * gts_gedge_new (GtsGEdgeClass * klass, GtsGNode * n1, GtsGNode * n2)
+{
+  GtsGEdge * object;
+
+  g_return_val_if_fail (n1 != NULL, NULL);
+  g_return_val_if_fail (n2 != NULL, NULL);
+  g_return_val_if_fail (n1 != n2, NULL);
+
+  object = GTS_GEDGE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  object->n1 = n1;
+  gts_container_add (GTS_CONTAINER (n1), GTS_CONTAINEE (object));
+  object->n2 = n2;
+  gts_container_add (GTS_CONTAINER (n2), GTS_CONTAINEE (object));
+
+  return object;
+}
+
+/**
+ * gts_gedge_weight:
+ * @e: a #GtsGEdge.
+ *
+ * Returns: the weight of edge @e as defined by the weight() method of
+ * #GtsGEdgeClass.  
+ */
+gfloat gts_gedge_weight (GtsGEdge * e)
+{
+  g_return_val_if_fail (e != NULL, 0.);
+
+  if (GTS_GEDGE_CLASS (GTS_OBJECT (e)->klass)->weight)
+    return (* GTS_GEDGE_CLASS (GTS_OBJECT (e)->klass)->weight) (e);
+  return 1.;
+}
+
+/* GtsWGEdge */
+
+static gfloat wgedge_weight (GtsGEdge * e)
+{
+  return GTS_WGEDGE (e)->weight;
+}
+
+static void wgedge_class_init (GtsWGEdgeClass * klass)
+{
+  GTS_GEDGE_CLASS (klass)->weight = wgedge_weight;
+}
+
+static void wgedge_init (GtsWGEdge * e)
+{
+  e->weight = 1.;
+}
+
+/**
+ * gts_wgedge_class:
+ * 
+ * Returns: the #GtsWGEdgeClass.
+ */
+GtsWGEdgeClass * gts_wgedge_class (void)
+{
+  static GtsWGEdgeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo wgedge_info = {
+      "GtsWGEdge",
+      sizeof (GtsWGEdge),
+      sizeof (GtsWGEdgeClass),
+      (GtsObjectClassInitFunc) wgedge_class_init,
+      (GtsObjectInitFunc) wgedge_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_gedge_class ()),
+				  &wgedge_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_wgedge_new:
+ * @klass: a #GtsWGEdgeClass.
+ * @n1: a #GtsGNode.
+ * @n2: another #GtsGNode.
+ * @weight: the weight of the new edge.
+ *
+ * Returns: a new #GtsWGEdge of weight @weight linking @n1 and @n2.
+ */ 
+GtsWGEdge * gts_wgedge_new (GtsWGEdgeClass * klass,
+			    GtsGNode * g1,
+			    GtsGNode * g2,
+			    gfloat weight)
+{
+  GtsWGEdge * we;
+
+  we = GTS_WGEDGE (gts_gedge_new (GTS_GEDGE_CLASS (klass), g1, g2));
+  we->weight = weight;
+
+  return we;
+}
+
+/* GtsGraph */
+
+static void graph_init (GtsGraph * g)
+{
+  g->node_class = gts_gnode_class ();
+  g->edge_class = gts_gedge_class ();
+}
+
+static void graph_class_init (GtsGraphClass * klass)
+{
+  klass->weight = NULL;
+}
+
+/**
+ * gts_graph_class:
+ *
+ * Returns: the #GtsGraphClass.
+ */
+GtsGraphClass * gts_graph_class (void)
+{
+  static GtsGraphClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo graph_info = {
+      "GtsGraph",
+      sizeof (GtsGraph),
+      sizeof (GtsGraphClass),
+      (GtsObjectClassInitFunc) graph_class_init,
+      (GtsObjectInitFunc) graph_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_hash_container_class ()),
+				  &graph_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_graph_new:
+ * @klass: a #GtsGraphClass.
+ * @node_class: a #GtsGNodeClass.
+ * @edge_class: a #GtsGEdgeClass.
+ *
+ * Returns: a new #GtsGraph using @node_class and @edge_class as node types.
+ */
+GtsGraph * gts_graph_new (GtsGraphClass * klass,
+			  GtsGNodeClass * node_class,
+			  GtsGEdgeClass * edge_class)
+{
+  GtsGraph * g;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (node_class != NULL, NULL);
+  g_return_val_if_fail (edge_class != NULL, NULL);
+
+  g = GTS_GRAPH (gts_object_new (GTS_OBJECT_CLASS (klass)));
+
+  return g;
+}
+
+static void compute_degree (GtsGNode * n, gpointer * data)
+{
+  GtsGraph * g = data[0];
+  GtsRange * degree = data[1];
+
+  gts_range_add_value (degree, gts_gnode_degree (n, g));
+}
+
+/**
+ * gts_graph_print_stats:
+ * @g: a #GtsGraph.
+ * @fp: a file pointer.
+ *
+ * Writes to @fp a summary of the properties of @g.
+ */
+void gts_graph_print_stats (GtsGraph * g, FILE * fp)
+{
+  GtsRange degree;
+  gpointer data[2];
+
+  g_return_if_fail (g != NULL);
+  g_return_if_fail (fp != NULL);
+
+  fprintf (fp, "# nodes: %d weight: %g\n", 
+	   gts_container_size (GTS_CONTAINER (g)),
+	   gts_graph_weight (g));
+  fprintf (fp, "#   degree: ");
+  gts_range_init (&degree);
+  data[0] = g;
+  data[1] = °ree;
+  gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) compute_degree, data);
+  gts_range_update (&degree);
+  gts_range_print (&degree, fp);
+  fprintf (fp, "\n");
+  fprintf (fp, "#   edges cut: %d edges cut weight: %g\n", 
+	   gts_graph_edges_cut (g),
+	   gts_graph_edges_cut_weight (g));
+}
+
+struct _GtsGraphTraverse {
+  GtsFifo * q;
+  GtsGraph * g;
+};
+
+static void reset_level (GtsGNode * n)
+{
+  n->level = 0;
+}
+
+/**
+ * gts_graph_traverse_new:
+ * @g: a #GtsGraph.
+ * @n: a #GtsGNode belonging to @g.
+ * @type: the type of traversal.
+ * @reinit: if %TRUE, the traversal is reinitialized.
+ *
+ * Returns: a new #GtsGraphTraverse initialized for the traversal of
+ * @g of type @type, starting from @n.  
+ */
+GtsGraphTraverse * gts_graph_traverse_new (GtsGraph * g, 
+					   GtsGNode * n,
+					   GtsTraverseType type,
+					   gboolean reinit)
+{
+  GtsGraphTraverse * t;
+
+  g_return_val_if_fail (g != NULL, NULL);
+  g_return_val_if_fail (n != NULL, NULL);
+  g_return_val_if_fail (gts_containee_is_contained (GTS_CONTAINEE (n), 
+						    GTS_CONTAINER (g)), 
+			NULL);
+
+  if (reinit)
+    gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) reset_level, NULL);
+
+  t = g_malloc (sizeof (GtsGraphTraverse));
+  t->q = gts_fifo_new ();
+  t->g = g;
+  n->level = 1;
+  gts_fifo_push (t->q, n);
+
+  return t;
+}
+
+static void push_neighbor (GtsGNode * n, gpointer * data)
+{
+  GtsFifo * q = data[0];
+  GtsGNode * u = data[1];
+
+  if (n->level == 0) {
+    n->level = u->level + 1;
+    gts_fifo_push (q, n);
+  }
+}
+
+/**
+ * gts_graph_traverse_next:
+ * @t: a #GtsGraphTraverse.
+ *
+ * Returns: the next #GtsGNode of the traversal defined by @t or %NULL
+ * if the traversal is complete.
+ */
+GtsGNode * gts_graph_traverse_next (GtsGraphTraverse * t) 
+{ 
+  GtsGNode * u;
+
+  g_return_val_if_fail (t != NULL, NULL);
+
+  u = gts_fifo_pop (t->q);
+  if (u) {
+    gpointer data[2];
+
+    data[0] = t->q;
+    data[1] = u;
+    gts_gnode_foreach_neighbor (u, t->g, (GtsFunc) push_neighbor, data);
+  }
+  
+  return u;
+}
+
+/**
+ * gts_graph_traverse_what_next:
+ * @t: a #GtsGraphTraverse.
+ *
+ * Returns: the next #GtsGNode of the traversal defined by @t or %NULL
+ * if the traversal is complete but without advancing the traversal.
+ */
+GtsGNode * gts_graph_traverse_what_next (GtsGraphTraverse * t)
+{
+  g_return_val_if_fail (t != NULL, NULL);
+
+  return gts_fifo_top (t->q);
+}
+
+/**
+ * gts_graph_traverse_destroy:
+ * @t: a #GtsGraphTraverse.
+ *
+ * Frees all the memory allocated for @t.
+ */
+void gts_graph_traverse_destroy (GtsGraphTraverse * t)
+{
+  g_return_if_fail (t != NULL);
+
+  gts_fifo_destroy (t->q);
+  g_free (t);
+}
+
+static void edge_foreach_node (GtsGNode * n, gpointer * info)
+{
+  GtsFunc func = info[0];
+  gpointer data = info[1];
+  GHashTable * hash = info[2];
+  GSList * i = GTS_SLIST_CONTAINER (n)->items;
+
+  while (i) {
+    GtsGEdge * e = i->data;
+    if (!g_hash_table_lookup (hash, e)) {
+      (* func) (e, data);
+      g_hash_table_insert (hash, e, e);
+    }
+    i = i->next;
+  }  
+}
+
+/**
+ * gts_graph_foreach_edge:
+ * @g: a #GtsGraph.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func for each #GtsEdge of @g.
+ */
+void gts_graph_foreach_edge (GtsGraph * g, GtsFunc func, gpointer data)
+{
+  gpointer info[3];
+  GHashTable * hash;
+
+  g_return_if_fail (g != NULL);
+  g_return_if_fail (func != NULL);
+
+  info[0] = func;
+  info[1] = data;
+  info[2] = hash = g_hash_table_new (NULL, NULL);
+  gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) edge_foreach_node, info);
+  g_hash_table_destroy (hash);
+}
+
+/**
+ * gts_graph_weight:
+ * @g: a #GtsGraph.
+ *
+ * Returns: the weight of graph @g as defined by the weight() method
+ * of #GtsGraphClass. 
+ */
+gfloat gts_graph_weight (GtsGraph * g)
+{
+  g_return_val_if_fail (g != NULL, 0.);
+
+  if (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass)->weight)
+    return (* GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass)->weight) (g);
+  return gts_container_size (GTS_CONTAINER (g));
+}
+
+/**
+ * gts_graph_distance_sum:
+ * @g: a #GtsGraph.
+ * @center: a #GtsGNode of @g.
+ *
+ * Returns: the sum of the distances between all the other #GtsGNode
+ * of @g and @center.  
+ */
+guint gts_graph_distance_sum (GtsGraph * g, GtsGNode * center)
+{
+  GtsGraphTraverse * t;
+  GtsGNode * n;
+  guint sum = 0;
+
+  g_return_val_if_fail (g != NULL, 0);
+  g_return_val_if_fail (center != NULL, 0);
+
+  t = gts_graph_traverse_new (g, center, GTS_BREADTH_FIRST, TRUE);
+  while ((n = gts_graph_traverse_next (t)))
+    sum += n->level - 1;
+  gts_graph_traverse_destroy (t);
+
+  return sum;
+}
+
+/**
+ * gts_graph_farthest:
+ * @g: a #GtsGraph.
+ * @gnodes: a list of #GtsGNode belonging to @g.
+ *
+ * Returns: the #GtsGNode belonging to @g and farthest from all the nodes in
+ * @gnodes (hmmm, definition of "farthest"?).
+ */
+GtsGNode * gts_graph_farthest (GtsGraph * g, GSList * gnodes)
+{
+  GtsGNode * farthest = NULL;
+  GSList * i;
+  gboolean reinit = TRUE, changed = TRUE;
+  guint level = 1;
+
+  g_return_val_if_fail (g != NULL, NULL);
+
+  /* initialize traversals */
+  i = gnodes;
+  while (i) {
+    GTS_OBJECT (i->data)->reserved = 
+      gts_graph_traverse_new (g, i->data, GTS_BREADTH_FIRST, reinit);
+    reinit = FALSE;
+    i = i->next;
+  }
+
+  while (changed) {
+    changed = FALSE;
+    i = gnodes;
+    while (i) {
+      GtsGraphTraverse * t = GTS_OBJECT (i->data)->reserved;
+      GtsGNode * n;
+      while ((n = gts_graph_traverse_what_next (t)) && n->level == level) {
+	changed = TRUE;
+	farthest = n;
+	gts_graph_traverse_next (t);
+      }
+      i = i->next;
+    }
+    level++;
+  }
+
+  /* destroy traversals */
+  i = gnodes;
+  while (i) {
+    gts_graph_traverse_destroy (GTS_OBJECT (i->data)->reserved);
+    GTS_OBJECT (i->data)->reserved = NULL;
+    i = i->next;
+  }
+  return farthest;
+}
+
+static void neighbor_count (GtsGNode * n, gpointer * data)
+{
+  guint * cuts = data[0];
+  GtsGraph * g = data[1];
+  
+  if (!gts_containee_is_contained (GTS_CONTAINEE (n), GTS_CONTAINER (g)))
+    (*cuts)++;
+}
+
+static void count_edge_cuts (GtsGNode * n, gpointer * data)
+{
+  gts_gnode_foreach_neighbor (n, NULL, (GtsFunc) neighbor_count, data);
+}
+
+/**
+ * gts_graph_edges_cut:
+ * @g: a #GtsGraph.
+ *
+ * Returns: the number of edges of @g connecting nodes belonging to @g
+ * to nodes not belonging to @g.  
+ */
+guint gts_graph_edges_cut (GtsGraph * g)
+{
+  guint cuts = 0;
+  gpointer data[2];
+
+  g_return_val_if_fail (g != NULL, 0);
+
+  data[0] = &cuts;
+  data[1] = g;
+  gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) count_edge_cuts, data);
+
+  return cuts;
+}
+
+static void sum_edge_cuts_weight (GtsGNode * n, gpointer * data)
+{
+  gfloat * weight = data[0];
+  GtsGraph * g = data[1];
+  GSList * i = GTS_SLIST_CONTAINER (n)->items;
+
+  while (i) {
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+    if (!gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g)))
+      *weight += gts_gedge_weight (i->data);
+    i = i->next;
+  }
+}
+
+/**
+ * gts_graph_edges_cut_weight:
+ * @g: a #GtsGraph.
+ *
+ * Returns: the sum of the weights of the edges of @g connecting nodes
+ * belonging to @g to nodes not belonging to @g.
+ */
+gfloat gts_graph_edges_cut_weight (GtsGraph * g)
+{
+  gfloat weight = 0.;
+  gpointer data[2];
+
+  g_return_val_if_fail (g != NULL, 0);
+
+  data[0] = &weight;
+  data[1] = g;
+  gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) sum_edge_cuts_weight, 
+			 data);
+
+  return weight;
+}
+
+/**
+ * gts_graph_read:
+ * @g: a #GtsGraph.
+ * @fp: a file pointer.
+ *
+ * Adds to @g the nodes and edges defined in the file pointed to by
+ * @fp. This file must use the Jostle "graph" ASCII format.  
+ * The nodes created are of type #GtsNGNode and their identities are the
+ * line number at which they appear in @fp.
+ *
+ * Returns: 0 if the lecture was successful, the line number at which
+ * an error occured otherwise.  
+ */
+guint gts_graph_read (GtsGraph * g, FILE * fp)
+{
+  guint nn, ne, line_number = 1, n;
+  GString * buf;
+  gint delim;
+  GtsGNode ** nodes;
+  gboolean syntax_error = FALSE;
+
+  g_return_val_if_fail (g != NULL, 1);
+  g_return_val_if_fail (fp != NULL, 1);
+
+  buf = g_string_new ("");
+
+  delim = gts_get_token (fp, buf, " \t\n", "");
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return 1;
+  }
+  nn = atoi (buf->str);
+  delim = gts_get_token (fp, buf, " \t\n", "");
+  if (delim == EOF) {
+    g_string_free (buf, TRUE);
+    return 1;
+  }
+  ne = atoi (buf->str);
+  if (delim != '\n')
+    gts_get_newline (fp);
+  nodes = g_malloc (sizeof (GtsGNode *)*(nn + 1));
+
+  n = 0;
+  while (n < nn && !syntax_error) {
+    GtsNGNode * node = gts_ngnode_new (gts_ngnode_class (), line_number);
+    
+    nodes[n++] = GTS_GNODE (node);
+    gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (node));
+    line_number++;
+    do {
+      delim = gts_get_token (fp, buf, " \t\n", "");
+      if (delim == EOF)
+	syntax_error = TRUE;
+      else {
+	guint in = atoi (buf->str);
+	if (in > nn || in == n || in == 0)
+	  syntax_error = TRUE;
+	else if (in < n) {
+	  gts_gedge_new (g->edge_class, GTS_GNODE (node), nodes[in - 1]);
+	  ne--;
+	}
+      }
+    } while (delim != EOF && delim != '\n' && !syntax_error);
+  }
+  g_free (nodes);
+  g_string_free (buf, TRUE);
+
+  if (n != nn || ne > 0 || syntax_error)
+    return line_number;  
+
+  return 0;
+}
+
+/* GtsWGraph */
+
+static gfloat wgraph_weight (GtsGraph * g)
+{
+  return GTS_WGRAPH (g)->weight;
+}
+
+static void wgraph_add (GtsContainer * g, GtsContainee * n)
+{
+  GtsWGraph * wg = GTS_WGRAPH (g);
+  gfloat w = gts_gnode_weight (GTS_GNODE (n));
+
+  wg->weight += w;
+  
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_wgraph_class ())->parent_class)->add) (g, n);
+}
+
+static void wgraph_remove (GtsContainer * g, GtsContainee * n)
+{
+  GTS_WGRAPH (g)->weight -= gts_gnode_weight (GTS_GNODE (n));
+  
+  (* GTS_CONTAINER_CLASS (GTS_OBJECT_CLASS (gts_wgraph_class ())->parent_class)->remove) (g, n);
+}
+
+static void wgraph_class_init (GtsWGraphClass * klass)
+{
+  GTS_GRAPH_CLASS (klass)->weight = wgraph_weight;
+
+  GTS_CONTAINER_CLASS (klass)->add = wgraph_add;
+  GTS_CONTAINER_CLASS (klass)->remove = wgraph_remove;
+}
+
+static void wgraph_init (GtsWGraph * g)
+{
+  g->weight = 0.;
+}
+
+/**
+ * gts_wgraph_class:
+ *
+ * Returns: the #GtsWGraphClass.
+ */
+GtsWGraphClass * gts_wgraph_class (void)
+{
+  static GtsWGraphClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo wgraph_info = {
+      "GtsWGraph",
+      sizeof (GtsWGraph),
+      sizeof (GtsWGraphClass),
+      (GtsObjectClassInitFunc) wgraph_class_init,
+      (GtsObjectInitFunc) wgraph_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_graph_class ()),
+				  &wgraph_info);
+  }
+
+  return klass;
+}
+
+static void weight_max (GtsGNode * n, gfloat * wmax)
+{
+  gfloat w = gts_gnode_weight (n);
+
+  if (w > *wmax)
+    *wmax = w;
+}
+
+/**
+ * gts_wgraph_weight_max:
+ * @wg: a #GtsWGraph.
+ *
+ * Returns: the maximum weight of any vertices belonging to @g.
+ */
+gfloat gts_wgraph_weight_max (GtsWGraph * wg)
+{
+  gfloat wmax = - G_MAXFLOAT;
+
+  g_return_val_if_fail (wg != NULL, 0.);
+
+  gts_container_foreach (GTS_CONTAINER (wg), (GtsFunc) weight_max, &wmax);
+
+  return wmax;
+}
+
+/* Surface graph */
+
+static void create_node (GtsFace * f, GtsGraph * graph)
+{
+  GtsFNode * fn = gts_fnode_new (gts_fnode_class (), f);
+
+  gts_container_add (GTS_CONTAINER (graph), GTS_CONTAINEE (fn));
+  GTS_OBJECT (f)->reserved = fn;
+}
+
+static void create_edge (GtsEdge * e, GtsSurface * s)
+{
+  GSList * i = e->triangles;
+  
+  while (i) {
+    GtsFace * f = i->data;
+    if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, s)) {
+      GSList * j = i->next;
+      while (j) {
+	GtsFace * f1 = j->data;
+	if (GTS_IS_FACE (f1) && gts_face_has_parent_surface (f1, s))
+	  gts_gedge_new (gts_gedge_class (), 
+			 GTS_OBJECT (f)->reserved,
+			 GTS_OBJECT (f1)->reserved);
+	j = j->next;
+      }
+    }
+    i = i->next;
+  }
+}
+
+/**
+ * gts_surface_graph_new:
+ * @klass: a #GtsGraphClass.
+ * @s: a #GtsSurface.
+ *
+ * Returns: a new #GtsGraph representing the connectivity of the faces
+ * of @s. This graph uses #GtsFGNode as nodes which allows to store
+ * the dependencies between nodes and faces of @s.  
+ */
+GtsGraph * gts_surface_graph_new (GtsGraphClass * klass,
+				  GtsSurface * s)
+{
+  GtsGraph * graph;
+  
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (s != NULL, NULL);
+
+  graph = GTS_GRAPH (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  gts_surface_foreach_face (s, (GtsFunc) create_node, graph);
+  gts_surface_foreach_edge (s, (GtsFunc) create_edge, s);
+  gts_surface_foreach_face (s, (GtsFunc) gts_object_reset_reserved, NULL);
+
+  return graph;
+}
+
+static void add_to_surface (GtsGNode * n, GtsSurface * s)
+{
+  if (GTS_IS_FNODE (n))
+    gts_surface_add_face (s, GTS_FNODE (n)->f);
+}
+
+/**
+ * gts_surface_graph_surface:
+ * @surface_graph: a #GtsGraph using #GtsFGNode as nodes.
+ * @s: a #GtsSurface.
+ *
+ * Returns: a new #GtsSurface using the same classes as @s and
+ * composed of the faces defined by @surface_graph.
+ */
+GtsSurface * gts_surface_graph_surface (GtsGraph * surface_graph,
+					GtsSurface * s)
+{
+  GtsSurface * s1;
+
+  g_return_val_if_fail (surface_graph != NULL, NULL);
+  g_return_val_if_fail (s != NULL, NULL);
+  
+  s1 = gts_surface_new (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass),
+			s->face_class,
+			s->edge_class,
+			s->vertex_class);
+  gts_container_foreach (GTS_CONTAINER (surface_graph), 
+			 (GtsFunc) add_to_surface, s1);
+  return s1;
+}
+
diff --git a/src/gts-config.in b/src/gts-config.in
new file mode 100644
index 0000000..184a304
--- /dev/null
+++ b/src/gts-config.in
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+glib_libs="@glib_libs@"
+glib_cflags="@glib_cflags@"
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage()
+{
+	cat <<EOF
+Usage: gts-config [OPTIONS]
+Options:
+	[--prefix[=DIR]]
+	[--exec-prefix[=DIR]]
+	[--version]
+	[--libs]
+	[--cflags]
+	[--check]
+EOF
+	exit $1
+}
+
+if test $# -eq 0; then
+	usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      if test $exec_prefix_set = no ; then
+        exec_prefix=$optarg
+      fi
+      ;;
+    --prefix)
+      echo_prefix=yes
+      ;;
+    --exec-prefix=*)
+      exec_prefix=$optarg
+      exec_prefix_set=yes
+      ;;
+    --exec-prefix)
+      echo_exec_prefix=yes
+      ;;
+    --version)
+      echo @GTS_VERSION@
+      exit 0
+      ;;
+    --cflags)
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    --check)
+      echo_check=yes
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+if test "$echo_prefix" = "yes"; then
+	echo $prefix
+fi
+if test "$echo_exec_prefix" = "yes"; then
+	echo $exec_prefix
+fi
+if test "$echo_cflags" = "yes"; then
+	if test ${prefix}/include != /usr/include ; then
+	    includes=-I${prefix}/include
+	    for i in $glib_cflags ; do
+		if test $i = -I${prefix}/include ; then
+		    includes=""
+		fi
+	    done
+	fi
+        if test "$echo_check" = "yes"; then
+	    echo -DGTS_CHECK_CASTS $includes $glib_cflags
+        else
+	    echo $includes $glib_cflags
+	fi
+fi
+if test "$echo_libs" = "yes"; then
+	my_glib_libs=
+	libdirs=-L${exec_prefix}/lib
+	for i in $glib_libs ; do
+	    if test $i != -L${exec_prefix}/lib ; then
+		if test -z "$my_glib_libs" ; then
+		    my_glib_libs="$i"
+		else
+		    my_glib_libs="$my_glib_libs $i"
+		fi
+	    fi
+	done
+
+	echo $libdirs -lgts $my_glib_libs -lm
+fi
diff --git a/src/gts-private.h b/src/gts-private.h
new file mode 100644
index 0000000..2a411af
--- /dev/null
+++ b/src/gts-private.h
@@ -0,0 +1,39 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GTS_PRIVATE_H__
+#define __GTS_PRIVATE_H__
+
+#define USE_ROBUST_PREDICATES
+
+/* Debugging flags */
+  
+/* #define DEBUG_FUNCTIONS */
+
+#ifdef DEBUG_FUNCTIONS
+/* #define DEBUG_LEAKS */
+#define DEBUG_IDENTITY
+guint id (gpointer p);
+void id_insert (gpointer p);
+void id_remove (gpointer p);
+void gts_write_triangle (GtsTriangle * t, GtsPoint * o, FILE * fptr);
+void gts_write_segment (GtsSegment * s, GtsPoint * o, FILE * fptr);
+#endif /* DEBUG_FUNCTIONS */
+
+#endif /* __GTS_PRIVATE_H__ */
diff --git a/src/gts.def b/src/gts.def
new file mode 100644
index 0000000..48274cc
--- /dev/null
+++ b/src/gts.def
@@ -0,0 +1,361 @@
+EXPORTS
+    gts_object_attributes
+    gts_object_check_cast
+    gts_object_class
+    gts_object_class_check_cast
+    gts_object_class_from_name
+    gts_object_class_new
+    gts_object_clone
+    gts_object_destroy
+    gts_object_init
+    gts_object_new
+    gts_object_reset_reserved
+    gts_point_class
+    gts_point_distance
+    gts_point_distance2
+    gts_point_in_circle
+    gts_point_in_triangle_circle
+    gts_point_is_in_triangle
+    gts_point_is_inside_surface
+    gts_point_new
+    gts_point_orientation
+    gts_point_orientation_3d
+    gts_point_segment_closest
+    gts_point_segment_distance
+    gts_point_segment_distance2
+    gts_point_set
+    gts_point_transform
+    gts_point_triangle_closest
+    gts_point_triangle_distance
+    gts_point_triangle_distance2
+    gts_segment_triangle_intersection
+    gts_vertex_class
+    gts_vertex_faces
+    gts_vertex_fan_oriented
+    gts_vertex_is_boundary
+    gts_vertex_is_contact
+    gts_vertex_is_unattached
+    gts_vertex_neighbors
+    gts_vertex_new
+    gts_vertex_replace
+    gts_vertex_triangles
+    gts_vertices_are_connected
+    gts_vertices_from_segments
+    gts_vertices_merge
+    gts_segment_class
+    gts_segment_is_duplicate
+    gts_segment_is_ok
+    gts_segment_midvertex
+    gts_segment_new
+    gts_segments_are_intersecting
+    gts_segments_from_vertices
+    gts_edge_belongs_to_tetrahedron
+    gts_edge_class
+    gts_edge_face_number
+    gts_edge_has_any_parent_surface
+    gts_edge_has_parent_surface
+    gts_edge_is_boundary
+    gts_edge_is_contact
+    gts_edge_is_duplicate
+    gts_edge_new
+    gts_edge_replace
+    gts_edges_from_vertices
+    gts_edges_merge
+    gts_triangle_area
+    gts_triangle_circumcircle_center
+    gts_triangle_class
+    gts_triangle_edge_opposite
+    gts_triangle_enclosing
+    gts_triangle_is_duplicate
+    gts_triangle_is_ok
+    gts_triangle_is_stabbed
+    gts_triangle_neighbor_number
+    gts_triangle_neighbors
+    gts_triangle_new
+    gts_triangle_normal
+    gts_triangle_orientation
+    gts_triangle_perimeter
+    gts_triangle_quality
+    gts_triangle_revert
+    gts_triangle_set
+    gts_triangle_use_edges
+    gts_triangle_vertex_opposite
+    gts_triangle_vertices
+    gts_triangle_vertices_edges
+    gts_triangles_angle
+    gts_triangles_are_compatible
+    gts_triangles_are_folded
+    gts_triangles_common_edge
+    gts_triangles_from_edges
+    gts_face_class
+    gts_face_foreach_neighbor
+    gts_face_has_parent_surface
+    gts_face_neighbor_number
+    gts_face_neighbors
+    gts_face_new
+    gts_faces_from_edges
+    gts_kdtree_new
+    gts_kdtree_range
+    gts_bb_tree_destroy
+    gts_bb_tree_draw
+    gts_bb_tree_is_overlapping
+    gts_bb_tree_new
+    gts_bb_tree_overlap
+    gts_bb_tree_point_closest
+    gts_bb_tree_point_closest_bboxes
+    gts_bb_tree_point_distance
+    gts_bb_tree_segment_distance
+    gts_bb_tree_stabbed
+    gts_bb_tree_surface
+    gts_bb_tree_surface_boundary_distance
+    gts_bb_tree_surface_distance
+    gts_bb_tree_traverse_overlapping
+    gts_bb_tree_triangle_distance
+    gts_bbox_bboxes
+    gts_bbox_class
+    gts_bbox_diagonal2
+    gts_bbox_draw
+    gts_bbox_is_stabbed
+    gts_bbox_new
+    gts_bbox_point_distance2
+    gts_bbox_points
+    gts_bbox_segment
+    gts_bbox_set
+    gts_bbox_surface
+    gts_bbox_triangle
+    gts_bboxes_are_overlapping
+    gts_get_newline
+    gts_get_token
+    incircle
+    insphere
+    orient2d
+    orient3d
+    gts_heap_destroy
+    gts_heap_foreach
+    gts_heap_freeze
+    gts_heap_insert
+    gts_heap_new
+    gts_heap_remove_top
+    gts_heap_size
+    gts_heap_thaw
+    gts_heap_top
+    gts_eheap_decrease_key
+    gts_eheap_destroy
+    gts_eheap_foreach
+    gts_eheap_freeze
+    gts_eheap_insert
+    gts_eheap_insert_with_key
+    gts_eheap_key
+    gts_eheap_new
+    gts_eheap_randomized
+    gts_eheap_remove
+    gts_eheap_remove_top
+    gts_eheap_size
+    gts_eheap_thaw
+    gts_eheap_top
+    gts_eheap_update
+    gts_fifo_destroy
+    gts_fifo_foreach
+    gts_fifo_is_empty
+    gts_fifo_new
+    gts_fifo_pop
+    gts_fifo_push
+    gts_fifo_size
+    gts_fifo_top
+    gts_fifo_write
+    gts_matrix_assign
+    gts_matrix_compatible_row
+    gts_matrix_destroy
+    gts_matrix_determinant
+    gts_matrix_inverse
+    gts_matrix_new
+    gts_matrix_print
+    gts_matrix_product
+    gts_matrix_projection
+    gts_matrix_quadratic_optimization
+    gts_matrix_transpose
+    gts_vector_print
+    gts_coarsen_stop_cost
+    gts_coarsen_stop_number
+    gts_edge_collapse_creates_fold
+    gts_edge_collapse_is_valid
+    gts_range_add_value
+    gts_range_init
+    gts_range_print
+    gts_range_reset
+    gts_range_update
+    gts_surface_add_face
+    gts_surface_area
+    gts_surface_boundary
+    gts_surface_class
+    gts_surface_coarsen
+    gts_surface_copy
+    gts_surface_distance
+    gts_surface_edge_number
+    gts_surface_face_number
+    gts_surface_foreach_edge
+    gts_surface_foreach_face
+    gts_surface_foreach_face_remove
+    gts_surface_foreach_vertex
+    gts_surface_is_closed
+    gts_surface_is_manifold
+    gts_surface_is_orientable
+    gts_surface_merge
+    gts_surface_new
+    gts_surface_print_stats
+    gts_surface_quality_stats
+    gts_surface_read
+    gts_surface_refine
+    gts_surface_remove_face
+    gts_surface_stats
+    gts_surface_traverse_destroy
+    gts_surface_traverse_new
+    gts_surface_traverse_next
+    gts_surface_vertex_number
+    gts_surface_volume
+    gts_surface_write
+    gts_surface_write_oogl
+    gts_surface_write_oogl_boundary
+    gts_surface_strip
+    gts_volume_optimized_cost
+    gts_volume_optimized_vertex
+    gts_delaunay_conform
+    gts_delaunay_refine
+    gts_edge_is_encroached
+    gts_vertex_encroaches_edge
+    gts_grid_plane_destroy
+    gts_grid_plane_new
+    gts_iso_slice_destroy
+    gts_iso_slice_fill
+    gts_iso_slice_fill_cartesian
+    gts_iso_slice_new
+    gts_isosurface_cartesian
+    gts_isosurface_slice
+    gts_hsplit_force_expand
+    gts_psurface_close
+    gts_psurface_open
+    gts_psurface_read_vertex
+    gts_psurface_write
+    gts_split_class
+    gts_split_collapse
+    gts_split_expand
+    gts_split_height
+    gts_split_new
+    gts_split_traverse
+    gts_psurface_add_vertex
+    gts_psurface_class
+    gts_psurface_foreach_vertex
+    gts_psurface_get_vertex_number
+    gts_psurface_max_vertex_number
+    gts_psurface_min_vertex_number
+    gts_psurface_new
+    gts_psurface_remove_vertex
+    gts_psurface_set_vertex_number
+    gts_hsplit_class
+    gts_hsplit_collapse
+    gts_hsplit_expand
+    gts_hsplit_new
+    gts_hsurface_class
+    gts_hsurface_foreach
+    gts_hsurface_height
+    gts_hsurface_new
+    gts_hsurface_traverse
+    gts_constraint_class
+    gts_delaunay_add_constraint
+    gts_delaunay_add_vertex
+    gts_delaunay_add_vertex_to_face
+    gts_delaunay_check
+    gts_delaunay_remove_hull
+    gts_delaunay_remove_vertex
+    gts_point_locate
+    gts_surface_inter_boolean
+    gts_surface_inter_check
+    gts_surface_inter_class
+    gts_surface_inter_new
+    gts_nedge_class
+    gts_nface_class
+    gts_nvertex_class
+    gts_cluster_add
+    gts_cluster_class
+    gts_cluster_grid_add_triangle
+    gts_cluster_grid_class
+    gts_cluster_grid_new
+    gts_cluster_grid_update
+    gts_cluster_new
+    gts_cluster_update
+    gts_containee_class
+    gts_containee_is_contained
+    gts_containee_new
+    gts_container_add
+    gts_container_class
+    gts_container_foreach
+    gts_container_new
+    gts_container_remove
+    gts_container_size
+    gts_hash_container_class
+    gts_slist_containee_class
+    gts_slist_container_class
+    gts_fnode_class
+    gts_fnode_new
+    gts_gedge_class
+    gts_gedge_new
+    gts_gedge_weight
+    gts_gnode_class
+    gts_gnode_degree
+    gts_gnode_foreach_edge
+    gts_gnode_foreach_neighbor
+    gts_gnode_move_cost
+    gts_gnode_new
+    gts_gnode_weight
+    gts_graph_class
+    gts_graph_distance_sum
+    gts_graph_edges_cut
+    gts_graph_edges_cut_weight
+    gts_graph_farthest
+    gts_graph_foreach_edge
+    gts_graph_new
+    gts_graph_print_stats
+    gts_graph_read
+    gts_graph_traverse_destroy
+    gts_graph_traverse_new
+    gts_graph_traverse_next
+    gts_graph_traverse_what_next
+    gts_graph_weight
+    gts_ngnode_class
+    gts_ngnode_new
+    gts_surface_graph_new
+    gts_surface_graph_surface
+    gts_wgedge_class
+    gts_wgedge_new
+    gts_wgnode_class
+    gts_wgnode_new
+    gts_wgraph_class
+    gts_wgraph_weight_max
+    gts_gnode_split_class
+    gts_gnode_split_collapse
+    gts_gnode_split_expand
+    gts_gnode_split_new
+    gts_pgraph_add_node
+    gts_pgraph_class
+    gts_pgraph_down
+    gts_pgraph_get_node_number
+    gts_pgraph_max_node_number
+    gts_pgraph_min_node_number
+    gts_pgraph_new
+    gts_pgraph_remove_node
+    gts_pgraph_set_node_number
+    gts_graph_bfgg_bisection
+    gts_graph_bisection_bkl_refine
+    gts_graph_bisection_check
+    gts_graph_bisection_destroy
+    gts_graph_bisection_kl_refine
+    gts_graph_bisection_new
+    gts_graph_bubble_partition
+    gts_graph_ggg_bisection
+    gts_graph_partition_balance
+    gts_graph_partition_clone
+    gts_graph_partition_destroy
+    gts_graph_partition_edges_cut
+    gts_graph_partition_edges_cut_weight
+    gts_graph_partition_print_stats
+    gts_graph_recursive_bisection
diff --git a/src/gts.h b/src/gts.h
new file mode 100644
index 0000000..8ffdc5a
--- /dev/null
+++ b/src/gts.h
@@ -0,0 +1,2108 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GTS_H__
+#define __GTS_H__
+
+#include <stdio.h>
+#include <glib.h>
+#include <gtsconfig.h>
+#ifdef GTS_COMPILATION
+# include "config.h"
+#endif /* not GTS_COMPILATION */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* Added based on glib.h by M J Loehr 01/01/01 */
+/* GTS version.
+ * we prefix variable declarations so they can
+ * properly get exported in windows dlls.
+ */
+#ifdef NATIVE_WIN32
+#  ifdef GTS_COMPILATION
+#    define GTS_C_VAR __declspec(dllexport)
+#  else /* not GTS_COMPILATION */
+#    define GTS_C_VAR extern __declspec(dllimport)
+#  endif /* not GTS_COMPILATION */
+#else /* not NATIVE_WIN32 */
+#  define GTS_C_VAR extern
+#endif /* not NATIVE_WIN32 */
+
+GTS_C_VAR const guint gts_major_version;
+GTS_C_VAR const guint gts_minor_version;
+GTS_C_VAR const guint gts_micro_version;
+GTS_C_VAR const guint gts_interface_age;
+GTS_C_VAR const guint gts_binary_age;
+
+#define GTS_CHECK_VERSION(major,minor,micro)    \
+    (gts_major_version > (major) || \
+    (gts_major_version == (major) && gts_minor_version > (minor)) || \
+    (gts_major_version == (major) && gts_minor_version == (minor) && \
+     gts_micro_version >= (micro)))
+
+#define GTS_COMMENTS  "#%!"
+#define GTS_MAINTAINER "popinet at users.sourceforge.net"
+
+/* Class declarations for base types */
+
+typedef struct _GtsObjectClassInfo     GtsObjectClassInfo;
+typedef struct _GtsObject        GtsObject;
+typedef struct _GtsObjectClass   GtsObjectClass;
+typedef struct _GtsPoint         GtsPoint;
+typedef struct _GtsPointClass    GtsPointClass;
+typedef struct _GtsVertex        GtsVertex;
+typedef struct _GtsVertexClass   GtsVertexClass;
+typedef struct _GtsSegment       GtsSegment;
+typedef struct _GtsSegmentClass  GtsSegmentClass;
+typedef struct _GtsEdge          GtsEdge;
+typedef struct _GtsEdgeClass     GtsEdgeClass;
+typedef struct _GtsTriangle      GtsTriangle;
+typedef struct _GtsTriangleClass GtsTriangleClass;
+typedef struct _GtsFace          GtsFace;
+typedef struct _GtsFaceClass     GtsFaceClass;
+typedef struct _GtsBBox          GtsBBox;
+typedef struct _GtsBBoxClass     GtsBBoxClass;
+typedef struct _GtsSurface       GtsSurface;
+typedef struct _GtsSurfaceClass  GtsSurfaceClass;
+
+typedef void         (*GtsObjectClassInitFunc) (GtsObjectClass * objclass);
+typedef void         (*GtsObjectInitFunc)      (GtsObject * obj);
+typedef void         (*GtsArgSetFunc)          (GtsObject * obj);
+typedef void         (*GtsArgGetFunc)          (GtsObject * obj);
+
+typedef gdouble                  GtsVector[3];
+typedef GtsVector                GtsMatrix;
+typedef gdouble                  (*GtsKeyFunc)    (gpointer item,
+						   gpointer data);
+typedef enum 
+{ 
+  GTS_OUT = -1,
+  GTS_ON = 0,
+  GTS_IN = 1
+} GtsIntersect;
+
+typedef struct _GtsColor         GtsColor;
+
+struct _GtsColor {
+  gfloat r, g, b;
+};
+
+typedef gint   (*GtsFunc)              (gpointer item,
+					gpointer data);
+
+/* misc.c */
+
+gint gts_get_token               (FILE * fptr, 
+				  GString * buf, 
+				  const char * delimiters,
+				  const char * comments);
+void gts_get_newline             (FILE * fptr);
+
+/* Objects: object.c */
+
+#ifdef GTS_CHECK_CASTS
+#  define GTS_OBJECT_CAST(obj, type, klass) ((type *) gts_object_check_cast (obj, klass))
+#  define GTS_OBJECT_CLASS_CAST(objklass, type, klass) ((type *) gts_object_class_check_cast (objklass, klass))
+#else  /* not GTS_CHECK_CASTS */
+#  define GTS_OBJECT_CAST(obj, type, klass)             ((type *) (obj))
+#  define GTS_OBJECT_CLASS_CAST(objklass, type, klass)  ((type *) (objklass))
+#endif /* not GTS_CHECK_CASTS */
+
+#define GTS_CLASS_NAME_LENGTH 40
+#define GTS_OBJECT(obj)          GTS_OBJECT_CAST (obj,\
+						  GtsObject,\
+						  gts_object_class ())
+#define GTS_OBJECT_CLASS(klass)  GTS_OBJECT_CLASS_CAST (klass,\
+							GtsObjectClass,\
+							gts_object_class())
+#define GTS_IS_OBJECT(obj) (gts_object_is_from_class (obj,\
+						      gts_object_class ()))
+
+typedef enum
+{
+  GTS_DESTROYED         = 1 << 0
+} GtsObjectFlags;
+
+#define GTS_OBJECT_FLAGS(obj)             (GTS_OBJECT (obj)->flags)
+#define GTS_OBJECT_DESTROYED(obj)         ((GTS_OBJECT_FLAGS (obj) & GTS_DESTROYED) != 0)
+#define GTS_OBJECT_SET_FLAGS(obj,flag)	  G_STMT_START{ (GTS_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END
+#define GTS_OBJECT_UNSET_FLAGS(obj,flag)  G_STMT_START{ (GTS_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END
+
+struct _GtsObjectClassInfo {
+  gchar name[GTS_CLASS_NAME_LENGTH];
+  guint object_size;
+  guint class_size;
+  GtsObjectClassInitFunc class_init_func;
+  GtsObjectInitFunc object_init_func;
+  GtsArgSetFunc arg_set_func;
+  GtsArgGetFunc arg_get_func;
+};
+
+struct _GtsObject {
+  GtsObjectClass * klass;
+
+  gpointer reserved;
+  guint32 flags;
+};
+
+struct _GtsObjectClass {
+  GtsObjectClassInfo info;
+  GtsObjectClass * parent_class;
+
+  void        (* clone)      (GtsObject *, GtsObject *);
+  void        (* destroy)    (GtsObject *);
+  gint        (* read)       (GtsObject **, FILE *);
+  void        (* write)      (GtsObject *, FILE *);
+  GtsColor    (* color)      (GtsObject *);
+  void        (* attributes) (GtsObject *, GtsObject *);
+};
+
+gpointer         gts_object_class_new      (GtsObjectClass * parent_class,
+					    GtsObjectClassInfo * info);
+GtsObjectClass * gts_object_class          (void);
+gpointer         gts_object_check_cast     (gpointer object, 
+					    gpointer klass);
+gpointer         gts_object_class_check_cast (gpointer klass, 
+					      gpointer from);
+G_INLINE_FUNC
+gpointer         gts_object_is_from_class  (gpointer object,
+					    gpointer klass);
+G_INLINE_FUNC
+gpointer         gts_object_class_is_from_class (gpointer klass,
+						 gpointer from);
+
+#ifdef	G_CAN_INLINE
+G_INLINE_FUNC
+gpointer gts_object_is_from_class (gpointer object,
+				   gpointer klass)
+{
+  GtsObjectClass * c;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  if (object == NULL)
+    return NULL;
+
+  c = ((GtsObject *) object)->klass;
+
+  g_return_val_if_fail (c != NULL, NULL);
+
+  while (c) {
+    if (c == klass)
+      return object;
+    c = c->parent_class;
+  }
+
+  return NULL;
+}
+
+G_INLINE_FUNC
+gpointer gts_object_class_is_from_class (gpointer klass,
+					 gpointer from)
+{
+  GtsObjectClass * c;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (from != NULL, NULL);
+
+  c = (GtsObjectClass *) klass;
+  while (c) {
+    if (c == from)
+      return klass;
+    c = c->parent_class;
+  }
+
+  return NULL;
+}
+#endif /* G_CAN_INLINE */
+
+GtsObjectClass * gts_object_class_from_name     (gchar * name);
+
+GtsObject *      gts_object_new                 (GtsObjectClass * klass);
+GtsObject *      gts_object_clone               (GtsObject * object);
+void             gts_object_attributes          (GtsObject * object, 
+						 GtsObject * from);
+void             gts_object_init                (GtsObject * object, 
+						 GtsObjectClass * klass);
+void             gts_object_reset_reserved      (GtsObject * object);
+void             gts_object_destroy             (GtsObject * object);
+
+/* Ranges: surface.c */
+typedef struct _GtsRange               GtsRange;
+
+struct _GtsRange {
+  gdouble min, max, mean, stddev;
+  guint n;
+};
+
+void gts_range_init         (GtsRange * r);
+void gts_range_reset        (GtsRange * r);
+void gts_range_add_value    (GtsRange * r, 
+			     gdouble val);
+void gts_range_update       (GtsRange * r);
+void gts_range_print        (GtsRange * r, 
+			     FILE * fptr);
+
+/* Points: point.c */
+
+#define GTS_IS_POINT(obj) (gts_object_is_from_class (obj,\
+						     gts_point_class ()))
+#define GTS_POINT(obj)              GTS_OBJECT_CAST (obj,\
+						     GtsPoint,\
+						     gts_point_class ())
+#define GTS_POINT_CLASS(klass)      GTS_OBJECT_CLASS_CAST (klass,\
+							   GtsPointClass,\
+							   gts_point_class ())
+
+struct _GtsPoint {
+  GtsObject object;
+
+  gdouble x, y, z; /* must be contiguous (cast to robust functions) */
+};
+
+struct _GtsPointClass {
+  GtsObjectClass parent_class;
+};
+
+GtsPointClass * gts_point_class                      (void);
+GtsPoint *    gts_point_new                          (GtsPointClass * klass,
+						      gdouble x, 
+						      gdouble y, 
+						      gdouble z);
+void          gts_point_set                          (GtsPoint * p, 
+						      gdouble x, 
+						      gdouble y, 
+						      gdouble z);
+#define       gts_point_is_in_rectangle(p, p1, p2)   ((p)->x >= (p1)->x &&\
+						      (p)->x <= (p2)->x &&\
+						      (p)->y >= (p1)->y &&\
+						      (p)->y <= (p2)->y &&\
+						      (p)->z >= (p1)->z &&\
+						      (p)->z <= (p2)->z)
+GtsPoint *    gts_segment_triangle_intersection      (GtsSegment * s,
+						      GtsTriangle * t,
+						      gboolean boundary,
+						      GtsPointClass * klass);
+void          gts_point_transform                    (GtsPoint * p, 
+						      GtsMatrix * m);
+gdouble       gts_point_distance                     (GtsPoint * p1,
+						      GtsPoint * p2);
+gdouble       gts_point_distance2                    (GtsPoint * p1,
+						      GtsPoint * p2);
+gdouble       gts_point_orientation_3d               (GtsPoint * p1,
+						      GtsPoint * p2,
+						      GtsPoint * p3,
+						      GtsPoint * p4);
+GtsIntersect  gts_point_is_in_triangle               (GtsPoint * p,
+						      GtsTriangle * t);
+gdouble       gts_point_in_circle                    (GtsPoint * p, 
+						      GtsPoint * p1,
+						      GtsPoint * p2,
+						      GtsPoint * p3);
+gdouble       gts_point_in_triangle_circle           (GtsPoint * p, 
+						      GtsTriangle * t);
+gdouble       gts_point_orientation                  (GtsPoint * p1,
+						      GtsPoint * p2,
+						      GtsPoint * p3);
+gdouble       gts_point_segment_distance2            (GtsPoint * p, 
+						      GtsSegment * s);
+gdouble       gts_point_segment_distance             (GtsPoint * p, 
+						      GtsSegment * s);
+void          gts_point_segment_closest              (GtsPoint * p, 
+						      GtsSegment * s,
+						      GtsPoint * closest);
+gdouble       gts_point_triangle_distance2           (GtsPoint * p, 
+						      GtsTriangle * t);
+gdouble       gts_point_triangle_distance            (GtsPoint * p, 
+						      GtsTriangle * t);
+void          gts_point_triangle_closest             (GtsPoint * p,
+						      GtsTriangle * t,
+						      GtsPoint * closest);
+gboolean      gts_point_is_inside_surface            (GtsPoint * p, 
+						      GNode * tree,
+						      gboolean is_open);
+
+/* Vertices: vertex.c */
+
+#define GTS_IS_VERTEX(obj)   (gts_object_is_from_class (obj,\
+							gts_vertex_class ()))
+#define GTS_VERTEX(obj)             GTS_OBJECT_CAST (obj,\
+						     GtsVertex,\
+						     gts_vertex_class ())
+#define GTS_VERTEX_CLASS(klass)     GTS_OBJECT_CLASS_CAST (klass,\
+							   GtsVertexClass,\
+							   gts_vertex_class ())
+struct _GtsVertex {
+  GtsPoint p;
+  
+  GSList * segments;
+};
+
+struct _GtsVertexClass {
+  GtsPointClass parent_class;
+};
+
+GTS_C_VAR 
+gboolean      gts_allow_floating_vertices;
+
+GtsVertexClass * gts_vertex_class          (void);
+GtsVertex *   gts_vertex_new               (GtsVertexClass * klass,
+					    gdouble x,
+					    gdouble y,
+					    gdouble z);
+void          gts_vertex_replace           (GtsVertex * v, 
+					    GtsVertex * with);
+gboolean      gts_vertex_is_unattached     (GtsVertex * v);
+GtsSegment *  gts_vertices_are_connected   (GtsVertex * v1,
+					    GtsVertex * v2);
+GSList *      gts_vertex_triangles         (GtsVertex * v,
+					    GSList * list);
+GSList *      gts_vertex_faces             (GtsVertex * v,
+					    GtsSurface * surface,
+					    GSList * list);
+GSList *      gts_vertex_neighbors         (GtsVertex * v, 
+					    GSList * list,
+					    GtsSurface * surface);
+GSList *      gts_vertices_from_segments   (GSList * segments);
+gboolean      gts_vertex_is_boundary       (GtsVertex * v, 
+					    GtsSurface * surface);
+GList *       gts_vertices_merge           (GList * vertices, 
+					    gdouble epsilon);
+GSList *      gts_vertex_fan_oriented      (GtsVertex * v, 
+					    GtsSurface * surface);
+guint         gts_vertex_is_contact        (GtsVertex * v, gboolean sever);
+
+/* Segments: segment.c */
+
+#define GTS_IS_SEGMENT(obj) (gts_object_is_from_class (obj,\
+						       gts_segment_class ()))
+#define GTS_SEGMENT(obj)          GTS_OBJECT_CAST (obj,\
+						   GtsSegment,\
+						   gts_segment_class ())
+#define GTS_SEGMENT_CLASS(klass)  GTS_OBJECT_CLASS_CAST (klass,\
+							 GtsSegmentClass,\
+							 gts_segment_class ())
+
+struct _GtsSegment {
+  GtsObject object;
+
+  GtsVertex * v1;
+  GtsVertex * v2;
+};
+
+struct _GtsSegmentClass {
+  GtsObjectClass parent_class;
+};
+
+GtsSegmentClass * gts_segment_class                  (void);
+GtsSegment *  gts_segment_new                        (GtsSegmentClass * klass,
+						      GtsVertex * v1, 
+						      GtsVertex * v2);
+#define       gts_segment_connect(s, e1, e2)         (((s)->v1 == e1 &&\
+                                                       (s)->v2 == e2) || \
+                                                      ((s)->v1 == e2 &&\
+                                                       (s)->v2 == e1))
+#define       gts_segments_are_identical(s1, s2)     (((s1)->v1 == (s2)->v1 &&\
+						       (s1)->v2 == (s2)->v2)\
+						      ||\
+						      ((s1)->v1 == (s2)->v2 &&\
+						       (s1)->v2 == (s2)->v1))
+#define       gts_segments_touch(s1, s2)             ((s1)->v1 == (s2)->v1 ||\
+						      (s1)->v1 == (s2)->v2 ||\
+						      (s1)->v2 == (s2)->v1 ||\
+						      (s1)->v2 == (s2)->v2)
+GtsIntersect  gts_segments_are_intersecting          (GtsSegment * s1,
+						      GtsSegment * s2);
+GtsSegment *  gts_segment_is_duplicate               (GtsSegment * s);
+GtsVertex *   gts_segment_midvertex                  (GtsSegment * s,
+						      GtsVertexClass * klass);
+GSList *      gts_segments_from_vertices             (GSList * vertices);
+gboolean      gts_segment_is_ok                      (GtsSegment * s);
+
+/* Edges: edge.c */
+
+#define GTS_IS_EDGE(obj)  (gts_object_is_from_class (obj,\
+						     gts_edge_class ()))
+#define GTS_EDGE(obj)            GTS_OBJECT_CAST (obj,\
+						  GtsEdge,\
+						  gts_edge_class ())
+#define GTS_EDGE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+							GtsEdgeClass,\
+							gts_edge_class ())
+
+struct _GtsEdge {
+  GtsSegment segment;
+
+  GSList * triangles;
+};
+
+struct _GtsEdgeClass {
+  GtsSegmentClass parent_class;
+};
+
+GTS_C_VAR 
+gboolean      gts_allow_floating_edges;
+
+GtsEdgeClass * gts_edge_class                     (void);
+GtsEdge *     gts_edge_new                        (GtsEdgeClass * klass,
+						   GtsVertex * v1,
+						   GtsVertex * v2);
+#define       gts_edge_is_unattached(s) ((s)->triangles == NULL ? TRUE : FALSE)
+GtsFace *     gts_edge_has_parent_surface         (GtsEdge * e, 
+						   GtsSurface * surface);
+GtsFace *     gts_edge_has_any_parent_surface     (GtsEdge * e);
+GtsFace *     gts_edge_is_boundary                (GtsEdge * e, 
+						   GtsSurface * surface);
+void          gts_edge_replace                    (GtsEdge * e,
+						   GtsEdge * with);
+GSList *      gts_edges_from_vertices             (GSList * vertices,
+						   GtsSurface * parent);
+guint         gts_edge_face_number                (GtsEdge * e,
+						   GtsSurface * s);
+gboolean      gts_edge_collapse_is_valid          (GtsEdge * e);
+gboolean      gts_edge_collapse_creates_fold      (GtsEdge * e, 
+						   GtsVertex * v,
+						   gdouble max);
+GtsEdge *     gts_edge_is_duplicate               (GtsEdge * e);
+GList *       gts_edges_merge                     (GList * edges);
+gboolean      gts_edge_belongs_to_tetrahedron     (GtsEdge * e);
+guint         gts_edge_is_contact                 (GtsEdge * e);
+
+/* Triangles: triangle.c */
+
+#define GTS_IS_TRIANGLE(obj) (gts_object_is_from_class (obj,\
+							gts_triangle_class ()))
+#define GTS_TRIANGLE(obj)         GTS_OBJECT_CAST (obj,\
+						   GtsTriangle,\
+						   gts_triangle_class ())
+#define GTS_TRIANGLE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\
+							 GtsTriangleClass,\
+							 gts_triangle_class ())
+
+struct _GtsTriangle {
+  GtsObject object;
+
+  GtsEdge * e1;
+  GtsEdge * e2;
+  GtsEdge * e3;
+};
+
+struct _GtsTriangleClass {
+  GtsObjectClass parent_class;
+};
+
+GtsTriangleClass * gts_triangle_class        (void);
+void        gts_triangle_set                 (GtsTriangle * triangle, 
+					      GtsEdge * e1, 
+					      GtsEdge * e2,
+					      GtsEdge * e3);
+GtsTriangle * gts_triangle_new               (GtsTriangleClass * klass, 
+					      GtsEdge * e1, 
+					      GtsEdge * e2,
+					      GtsEdge * e3);
+#define     gts_triangle_vertex(t) (GTS_SEGMENT (GTS_TRIANGLE (t)->e1)->v1 ==\
+                                    GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1 || \
+                                    GTS_SEGMENT (GTS_TRIANGLE (t)->e1)->v2 ==\
+                                    GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1 ? \
+                                    GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v2 :\
+                                    GTS_SEGMENT (GTS_TRIANGLE (t)->e2)->v1)
+GtsVertex *   gts_triangle_vertex_opposite  (GtsTriangle * t, 
+					     GtsEdge * e);
+GtsEdge *     gts_triangle_edge_opposite    (GtsTriangle * t, 
+					     GtsVertex * v);
+gdouble       gts_triangles_angle           (GtsTriangle * t1,
+					     GtsTriangle * t2);
+gboolean      gts_triangles_are_compatible  (GtsTriangle * t1, 
+					     GtsTriangle * t2,
+					     GtsEdge * e);
+gdouble       gts_triangle_area             (GtsTriangle * t);
+gdouble       gts_triangle_perimeter        (GtsTriangle * t);
+gdouble       gts_triangle_quality          (GtsTriangle * t);
+void          gts_triangle_normal           (GtsTriangle * t, 
+					     gdouble * x, 
+					     gdouble * y, 
+					     gdouble * z);
+gdouble       gts_triangle_orientation      (GtsTriangle * t);
+void          gts_triangle_revert           (GtsTriangle * t);
+GSList *      gts_triangles_from_edges      (GSList * edges);
+void          gts_triangle_vertices_edges   (GtsTriangle * t, 
+					     GtsEdge * e,
+					     GtsVertex ** v1, 
+					     GtsVertex ** v2, 
+					     GtsVertex ** v3,
+					     GtsEdge ** e1,
+					     GtsEdge ** e2,
+					     GtsEdge ** e3);
+GtsTriangle * gts_triangle_enclosing        (GtsTriangleClass * klass,
+					     GSList * points, 
+					     gdouble scale);
+guint         gts_triangle_neighbor_number  (GtsTriangle * t);
+GSList *      gts_triangle_neighbors        (GtsTriangle * t);
+GtsEdge *     gts_triangles_common_edge     (GtsTriangle * t1,
+					     GtsTriangle * t2);
+GtsTriangle * gts_triangle_is_duplicate     (GtsTriangle * t);
+GtsTriangle * gts_triangle_use_edges        (GtsEdge * e1,
+					     GtsEdge * e2,
+					     GtsEdge * e3);
+gboolean      gts_triangle_is_ok            (GtsTriangle * t);
+void          gts_triangle_vertices         (GtsTriangle * t,
+					     GtsVertex ** v1,
+					     GtsVertex ** v2,
+					     GtsVertex ** v3);
+GtsPoint *    gts_triangle_circumcircle_center (GtsTriangle * t,
+						GtsPointClass * point_class);
+gboolean      gts_triangles_are_folded      (GSList * triangles,
+					     GtsVertex * A, GtsVertex * B,
+					     gdouble max);
+GtsObject *   gts_triangle_is_stabbed       (GtsTriangle * t,
+					     GtsPoint * p,
+					     gdouble * orientation);
+
+/* Faces: face.c */
+
+#define GTS_IS_FACE(obj) (gts_object_is_from_class (obj,\
+						    gts_face_class ()))
+#define GTS_FACE(obj)          GTS_OBJECT_CAST (obj,\
+						GtsFace,\
+						gts_face_class ())
+#define GTS_FACE_CLASS(klass)  GTS_OBJECT_CLASS_CAST (klass,\
+						      GtsFaceClass,\
+						      gts_face_class ())
+
+struct _GtsFace {
+  GtsTriangle triangle;
+
+  GSList * surfaces;
+};
+
+struct _GtsFaceClass {
+  GtsTriangleClass parent_class;
+};
+
+GTS_C_VAR 
+gboolean      gts_allow_floating_faces;
+
+GtsFaceClass * gts_face_class                       (void);
+GtsFace *     gts_face_new                          (GtsFaceClass * klass,
+						     GtsEdge * e1,
+						     GtsEdge * e2,
+						     GtsEdge * e3);
+gboolean      gts_face_has_parent_surface           (GtsFace * f,
+						     GtsSurface * s);
+GSList *      gts_faces_from_edges                  (GSList * edges, 
+						     GtsSurface * s);
+guint         gts_face_neighbor_number              (GtsFace * f, 
+						     GtsSurface * s);
+GSList *      gts_face_neighbors                    (GtsFace * f, 
+						     GtsSurface * s);
+void          gts_face_foreach_neighbor             (GtsFace * f, 
+						     GtsSurface * s, 
+						     GtsFunc func,
+						     gpointer data);
+
+/* Matrices: matrix.c */
+
+#define       gts_vector_cross(C,A,B) ((C)[0] = (A)[1]*(B)[2] - (A)[2]*(B)[1],\
+			               (C)[1] = (A)[2]*(B)[0] - (A)[0]*(B)[2],\
+			               (C)[2] = (A)[0]*(B)[1] - (A)[1]*(B)[0])
+
+#define       gts_vector_init(v, p1, p2)   ((v)[0] = (p2)->x - (p1)->x,\
+					    (v)[1] = (p2)->y - (p1)->y,\
+					    (v)[2] = (p2)->z - (p1)->z)
+#define       gts_vector_scalar(v1, v2)    ((v1)[0]*(v2)[0] +\
+					    (v1)[1]*(v2)[1] +\
+					    (v1)[2]*(v2)[2])
+GtsMatrix *   gts_matrix_new          (gdouble a00, gdouble a01, gdouble a02,
+				       gdouble a10, gdouble a11, gdouble a12,
+				       gdouble a20, gdouble a21, gdouble a22);
+void          gts_matrix_assign       (GtsMatrix * m,
+				       gdouble a00, gdouble a01, gdouble a02,
+				       gdouble a10, gdouble a11, gdouble a12,
+				       gdouble a20, gdouble a21, gdouble a22);
+GtsMatrix *   gts_matrix_projection                  (GtsTriangle * t);
+GtsMatrix *   gts_matrix_transpose                   (GtsMatrix * m);
+gdouble       gts_matrix_determinant                 (GtsMatrix * m);
+GtsMatrix *   gts_matrix_inverse                     (GtsMatrix * m);
+void          gts_matrix_print                       (GtsMatrix * m, 
+						      FILE * fptr);
+guint         gts_matrix_compatible_row              (GtsMatrix * A,
+						      GtsVector b,
+						      guint n,
+						      GtsVector A1,
+						      gdouble b1);
+guint         gts_matrix_quadratic_optimization      (GtsMatrix * A,
+						      GtsVector b,
+						      guint n,
+						      GtsMatrix * H,
+						      GtsVector c);
+GtsMatrix *   gts_matrix_product                     (GtsMatrix * m1, 
+						      GtsMatrix * m2);
+void          gts_matrix_destroy                     (GtsMatrix * m);
+void          gts_vector_print                       (GtsVector v,
+						      FILE * fptr);
+
+/* Kdtrees: kdtree.c */
+
+#define       gts_kdtree_destroy(tree)               g_node_destroy(tree)
+
+GNode *       gts_kdtree_new                         (GPtrArray * points,
+						      int (*compare)
+						      (const void *, 
+						       const void *));
+GSList *      gts_kdtree_range                       (GNode * tree,
+						      GtsBBox * bbox,
+						      int (*compare)
+						      (const void *, 
+						      const void *));
+
+/* Bboxtrees: bbtree.c */
+
+typedef void   (*GtsBBTreeTraverseFunc)          (GtsBBox * bb1,
+						  GtsBBox * bb2,
+						  gpointer data);
+typedef gdouble (*GtsBBoxDistFunc)               (GtsPoint * p,
+						  gpointer bounded);
+typedef GtsPoint * (*GtsBBoxClosestFunc)         (GtsPoint * p,
+						  gpointer bounded);
+
+#define GTS_IS_BBOX(obj)  (gts_object_is_from_class (obj,\
+						     gts_bbox_class ()))
+#define GTS_BBOX(obj)         GTS_OBJECT_CAST (obj,\
+					       GtsBBox,\
+					       gts_bbox_class ())
+#define GTS_BBOX_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\
+						     GtsBBoxClass,\
+						     gts_bbox_class ())
+
+struct _GtsBBox {
+  GtsObject object;
+  gpointer bounded;
+  gdouble x1, y1, z1;
+  gdouble x2, y2, z2;
+};
+
+struct _GtsBBoxClass {
+  GtsObjectClass parent_class;
+};
+
+GtsBBoxClass * gts_bbox_class                (void);
+GtsBBox *  gts_bbox_new                      (GtsBBoxClass * klass,
+					      gpointer bounded,
+					      gdouble x1, 
+					      gdouble y1, 
+					      gdouble z1,
+					      gdouble x2, 
+					      gdouble y2, 
+					      gdouble z2);
+void       gts_bbox_set                      (GtsBBox * bbox,
+					      gpointer bounded,
+					      gdouble x1, 
+					      gdouble y1, 
+					      gdouble z1,
+					      gdouble x2, 
+					      gdouble y2, 
+					      gdouble z2);
+GtsBBox *  gts_bbox_segment                  (GtsBBoxClass * klass,
+					      GtsSegment * s);
+GtsBBox *  gts_bbox_triangle                 (GtsBBoxClass * klass,
+					      GtsTriangle * t);
+GtsBBox *  gts_bbox_surface                  (GtsBBoxClass * klass, 
+					      GtsSurface * surface);
+GtsBBox *  gts_bbox_bboxes                   (GtsBBoxClass * klass,
+					      GSList * bboxes);
+GtsBBox *  gts_bbox_points                   (GtsBBoxClass * klass,
+					      GSList * points);
+#define    gts_bbox_point_is_inside(bbox, p) ((p)->x >= (bbox)->x1 &&\
+					     (p)->y >= (bbox)->y1 &&\
+                                             (p)->z >= (bbox)->z1 &&\
+                                             (p)->x <= (bbox)->x2 &&\
+					     (p)->y <= (bbox)->y2 &&\
+                                             (p)->z <= (bbox)->z2)
+gboolean   gts_bboxes_are_overlapping        (GtsBBox * bb1, 
+					      GtsBBox * bb2);
+void       gts_bbox_draw                     (GtsBBox * bb, 
+					      FILE * fptr);
+gdouble    gts_bbox_diagonal2                (GtsBBox * bb);
+void       gts_bbox_point_distance2          (GtsBBox * bb, 
+					      GtsPoint * p,
+					      gdouble * min,
+					      gdouble * max);
+gboolean   gts_bbox_is_stabbed               (GtsBBox * bb, 
+					      GtsPoint * p);
+
+GNode *    gts_bb_tree_new                   (GSList * bboxes);
+GNode *    gts_bb_tree_surface               (GtsSurface * s);
+GSList *   gts_bb_tree_stabbed               (GNode * tree, 
+					      GtsPoint * p);
+GSList *   gts_bb_tree_overlap               (GNode * tree, 
+					      GtsBBox * bbox);
+gboolean   gts_bb_tree_is_overlapping        (GNode * tree, 
+					      GtsBBox * bbox);
+void       gts_bb_tree_traverse_overlapping  (GNode * tree1, 
+					      GNode * tree2,
+					      GtsBBTreeTraverseFunc func,
+					      gpointer data);
+void       gts_bb_tree_draw                  (GNode * tree, 
+					      guint depth, 
+					      FILE * fptr);
+GSList *   gts_bb_tree_point_closest_bboxes  (GNode * tree, 
+					      GtsPoint * p);
+gdouble    gts_bb_tree_point_distance        (GNode * tree, 
+					      GtsPoint * p,
+					      GtsBBoxDistFunc distance,
+					      GtsBBox ** bbox);
+GtsPoint * gts_bb_tree_point_closest         (GNode * tree, 
+					      GtsPoint * p,
+					      GtsBBoxClosestFunc closest,
+					      gdouble * distance);
+void       gts_bb_tree_segment_distance      (GNode * tree, 
+					      GtsSegment * s,
+					      GtsBBoxDistFunc distance,
+					      gdouble delta,
+					      GtsRange * range);
+void       gts_bb_tree_triangle_distance     (GNode * tree, 
+					      GtsTriangle * t,
+					      GtsBBoxDistFunc distance,
+					      gdouble delta,
+					      GtsRange * range);
+void       gts_bb_tree_surface_distance      (GNode * tree,
+					      GtsSurface * s,
+					      GtsBBoxDistFunc distance,
+					      gdouble delta,
+					      GtsRange * range);
+void       gts_bb_tree_surface_boundary_distance 
+                                             (GNode * tree,
+					      GtsSurface * s,
+					      GtsBBoxDistFunc distance,
+					      gdouble delta,
+					      GtsRange * range);
+void       gts_bb_tree_destroy               (GNode * tree, 
+					      gboolean free_leaves);
+
+/* Surfaces: surface.c */
+
+typedef struct _GtsSurfaceStats        GtsSurfaceStats;
+typedef struct _GtsSurfaceQualityStats GtsSurfaceQualityStats;
+typedef GtsVertex * (*GtsCoarsenFunc)  (GtsEdge * e,
+					GtsVertexClass * klass,
+					gpointer data);
+typedef gboolean    (*GtsStopFunc)     (gdouble cost,
+					guint nedge,
+					gpointer data);
+
+struct _GtsSurfaceStats {
+  guint n_faces;
+  guint n_incompatible_faces;
+  guint n_duplicate_faces;
+  guint n_duplicate_edges;
+  guint n_boundary_edges;
+  guint n_non_manifold_edges;
+  GtsRange edges_per_vertex, faces_per_edge;
+  GtsSurface * parent;
+};
+
+struct _GtsSurfaceQualityStats {
+  GtsRange face_quality;
+  GtsRange face_area;
+  GtsRange edge_length;
+  GtsRange edge_angle;
+  GtsSurface * parent;
+};
+
+struct _GtsSurface {
+  GtsObject object;
+
+  GHashTable * faces;
+  GtsFaceClass * face_class;
+  GtsEdgeClass * edge_class;
+  GtsVertexClass * vertex_class;
+  gboolean keep_faces;
+};
+
+struct _GtsSurfaceClass {
+  GtsObjectClass parent_class;
+
+  void (* add_face)    (GtsSurface *, GtsFace *);
+  void (* remove_face) (GtsSurface *, GtsFace *);
+};
+
+#define GTS_IS_SURFACE(obj) (gts_object_is_from_class (obj,\
+						       gts_surface_class ()))
+#define GTS_SURFACE(obj)         GTS_OBJECT_CAST (obj,\
+						  GtsSurface,\
+						  gts_surface_class ())
+#define GTS_SURFACE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\
+							GtsSurfaceClass,\
+							gts_surface_class ())
+
+GtsSurfaceClass * gts_surface_class        (void);
+GtsSurface * gts_surface_new               (GtsSurfaceClass * klass,
+					    GtsFaceClass * face_class,
+					    GtsEdgeClass * edge_class,
+					    GtsVertexClass * vertex_class);
+void         gts_surface_add_face          (GtsSurface * s, 
+					    GtsFace * f);
+void         gts_surface_remove_face       (GtsSurface * s, 
+					    GtsFace * f);
+guint        gts_surface_read              (GtsSurface * surface,
+					    FILE * fptr);
+gdouble      gts_surface_area              (GtsSurface * s);
+void         gts_surface_stats             (GtsSurface * s, 
+					    GtsSurfaceStats * stats);
+void         gts_surface_quality_stats     (GtsSurface * s, 
+					    GtsSurfaceQualityStats * stats);
+void         gts_surface_print_stats       (GtsSurface * s, 
+					    FILE * fptr);
+void         gts_surface_write             (GtsSurface * s, 
+					    FILE * fptr);
+void         gts_surface_write_oogl        (GtsSurface * s, 
+					    FILE * fptr);
+void         gts_surface_write_oogl_boundary (GtsSurface * s, 
+					      FILE * fptr);
+void         gts_surface_foreach_vertex    (GtsSurface * s, 
+					    GtsFunc func, 
+					    gpointer data);
+void         gts_surface_foreach_edge      (GtsSurface * s, 
+					    GtsFunc func, 
+					    gpointer data);
+void         gts_surface_foreach_face      (GtsSurface * s,
+					    GtsFunc func, 
+					    gpointer data);
+guint        gts_surface_foreach_face_remove (GtsSurface * s,
+					      GtsFunc func, 
+					      gpointer data);
+typedef struct _GtsSurfaceTraverse GtsSurfaceTraverse;
+GtsSurfaceTraverse * gts_surface_traverse_new (GtsSurface * s,
+					       GtsFace * f);
+GtsFace *    gts_surface_traverse_next     (GtsSurfaceTraverse * t,
+					    guint * level);
+void         gts_surface_traverse_destroy  (GtsSurfaceTraverse * t);
+void         gts_surface_refine            (GtsSurface * surface,
+					    GCompareFunc compare_func,
+					    GtsStopFunc stop_func,
+					    gpointer data);
+gboolean     gts_edge_collapse_is_valid    (GtsEdge * e);
+void         gts_surface_coarsen           (GtsSurface * surface,
+					    GtsKeyFunc cost_func,
+					    gpointer cost_data,
+					    GtsCoarsenFunc coarsen_func,
+					    gpointer coarsen_data,
+					    GtsStopFunc stop_func,
+					    gpointer stop_data,
+					    gdouble minangle);
+gboolean     gts_coarsen_stop_number       (gdouble cost, 
+					    guint nedge, 
+					    guint * min_number);
+gboolean     gts_coarsen_stop_cost         (gdouble cost, 
+					    guint nedge, 
+					    gdouble * max_cost);
+GtsSurface * gts_surface_copy              (GtsSurface * s1,
+					    GtsSurface * s2);
+void         gts_surface_merge             (GtsSurface * s, 
+					    GtsSurface * with);
+gboolean     gts_surface_is_manifold       (GtsSurface * s);
+gboolean     gts_surface_is_closed         (GtsSurface * s);
+gboolean     gts_surface_is_orientable     (GtsSurface * s);
+gdouble      gts_surface_volume            (GtsSurface * s);
+guint        gts_surface_vertex_number     (GtsSurface * s);
+guint        gts_surface_edge_number       (GtsSurface * s);
+guint        gts_surface_face_number       (GtsSurface * s);
+void         gts_surface_distance          (GtsSurface * s1, 
+					    GtsSurface * s2, 
+					    gdouble delta,
+					    GtsRange * face_range, 
+					    GtsRange * boundary_range);
+GSList *     gts_surface_boundary          (GtsSurface * surface);
+
+/* Volume optimization: vopt.c */
+typedef struct _GtsVolumeOptimizedParams   GtsVolumeOptimizedParams;
+
+struct _GtsVolumeOptimizedParams {
+  gdouble volume_weight;
+  gdouble boundary_weight;
+  gdouble shape_weight;
+};
+
+GtsVertex *  gts_volume_optimized_vertex   (GtsEdge * edge,
+					    GtsVertexClass * klass,
+					    GtsVolumeOptimizedParams * params);
+gdouble      gts_volume_optimized_cost     (GtsEdge * e,
+					    GtsVolumeOptimizedParams * params);
+
+/* Boolean operations: boolean.c */
+
+typedef struct _GtsSurfaceInter         GtsSurfaceInter;
+typedef struct _GtsSurfaceInterClass    GtsSurfaceInterClass;
+typedef enum { GTS_1_OUT_2, 
+	       GTS_1_IN_2, 
+	       GTS_2_OUT_1, 
+	       GTS_2_IN_1 }             GtsBooleanOperation;
+
+#define GTS_IS_SURFACE_INTER(obj) (gts_object_is_from_class (obj,\
+					      gts_surface_inter_class ()))
+#define GTS_SURFACE_INTER(obj)         GTS_OBJECT_CAST (obj,\
+						  GtsSurfaceInter,\
+						  gts_surface_inter_class ())
+#define GTS_SURFACE_INTER_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\
+						 GtsSurfaceInterClass,\
+						 gts_surface_inter_class ())
+
+struct _GtsSurfaceInter {
+  GtsObject object;
+
+  GtsSurface * s1;
+  GtsSurface * s2;
+  GSList * edges;
+};
+
+struct _GtsSurfaceInterClass {
+  GtsObjectClass parent_class;
+};
+
+GtsSurfaceInterClass *
+gts_surface_inter_class          (void);
+GtsSurfaceInter *
+gts_surface_inter_new            (GtsSurfaceInterClass * klass,
+				  GtsSurface * s1,
+				  GtsSurface * s2,
+				  GNode * faces_tree1,
+				  GNode * faces_tree2);
+gboolean 
+gts_surface_inter_check          (GtsSurfaceInter * si);
+void 
+gts_surface_inter_boolean        (GtsSurfaceInter * si, 
+				  GtsSurface * surface,
+				  GtsBooleanOperation op);
+
+/* Binary Heap: heap.c */
+
+typedef struct _GtsHeap         GtsHeap;
+
+GtsHeap *    gts_heap_new          (GCompareFunc compare_func);
+void         gts_heap_insert       (GtsHeap * heap, gpointer p);
+gpointer     gts_heap_remove_top   (GtsHeap * heap);
+gpointer     gts_heap_top          (GtsHeap * heap);
+void         gts_heap_thaw         (GtsHeap * heap);
+void         gts_heap_foreach      (GtsHeap * heap, 
+				    GFunc func,
+				    gpointer user_data);
+void         gts_heap_freeze       (GtsHeap * heap);
+guint        gts_heap_size         (GtsHeap * heap);
+void         gts_heap_destroy      (GtsHeap * heap);
+
+/* Extended Binary Heap: eheap.c */
+
+typedef struct _GtsEHeap         GtsEHeap;
+typedef struct _GtsEHeapPair     GtsEHeapPair;
+
+struct _GtsEHeapPair {
+  gpointer data;
+  gdouble key;
+  guint pos;
+};
+
+GtsEHeap *     gts_eheap_new          (GtsKeyFunc key_func,
+				       gpointer data);
+GtsEHeapPair * gts_eheap_insert       (GtsEHeap * heap, 
+				       gpointer p);
+GtsEHeapPair * gts_eheap_insert_with_key (GtsEHeap * heap, 
+					  gpointer p, 
+					  gdouble key);
+gpointer       gts_eheap_remove_top   (GtsEHeap * heap,
+				       gdouble * key);
+gpointer       gts_eheap_top          (GtsEHeap * heap, 
+				       gdouble * key);
+void           gts_eheap_thaw         (GtsEHeap * heap);
+void           gts_eheap_foreach      (GtsEHeap * heap, 
+				       GFunc func,
+				       gpointer data);
+gpointer       gts_eheap_remove       (GtsEHeap * heap, 
+				       GtsEHeapPair * p);
+void           gts_eheap_decrease_key (GtsEHeap * heap,
+				       GtsEHeapPair * p,
+				       gdouble new_key);
+void           gts_eheap_freeze       (GtsEHeap * heap);
+guint          gts_eheap_size         (GtsEHeap * heap);
+void           gts_eheap_update       (GtsEHeap * heap);
+gdouble        gts_eheap_key          (GtsEHeap * heap,
+				       gpointer p);
+void           gts_eheap_randomized   (GtsEHeap * heap, 
+				       gboolean randomized);
+void           gts_eheap_destroy      (GtsEHeap * heap);
+
+/* FIFO queues: fifo.c */
+
+typedef struct _GtsFifo GtsFifo;
+
+GtsFifo *      gts_fifo_new           (void);
+void           gts_fifo_write         (GtsFifo * fifo, 
+				       FILE * fp);
+void           gts_fifo_push          (GtsFifo * fifo, 
+				       gpointer data);
+gpointer       gts_fifo_pop           (GtsFifo * fifo);
+gpointer       gts_fifo_top           (GtsFifo * fifo);
+guint          gts_fifo_size          (GtsFifo * fifo);
+gboolean       gts_fifo_is_empty      (GtsFifo * fifo);
+void           gts_fifo_foreach       (GtsFifo * fifo, 
+				       GtsFunc func, 
+				       gpointer data);
+void           gts_fifo_destroy       (GtsFifo * fifo);
+
+/* Progressive surfaces */
+
+/* split.c */
+
+typedef struct _GtsSplit      GtsSplit;
+typedef struct _GtsSplitClass GtsSplitClass;
+typedef struct _GtsSplitCFace GtsSplitCFace;
+
+struct _GtsSplit {
+  GtsObject object;
+
+  GtsVertex * v;
+  GtsObject * v1;
+  GtsObject * v2;
+  GtsSplitCFace * cfaces;
+  guint ncf;
+};
+
+struct _GtsSplitClass {
+  GtsObjectClass parent_class;
+};
+
+#define GTS_IS_SPLIT(obj)    (gts_object_is_from_class (obj,\
+							gts_split_class ()))
+#define GTS_SPLIT(obj)              GTS_OBJECT_CAST (obj,\
+						     GtsSplit,\
+						     gts_split_class ())
+#define GTS_SPLIT_CLASS(klass)      GTS_OBJECT_CLASS_CAST (klass,\
+						     GtsSplitClass,\
+						     gts_split_class ())
+#define GTS_SPLIT_V1(vs)            (GTS_IS_SPLIT ((vs)->v1) ?\
+				     GTS_SPLIT ((vs)->v1)->v :\
+				     GTS_VERTEX ((vs)->v1))
+#define GTS_SPLIT_V2(vs)            (GTS_IS_SPLIT ((vs)->v2) ?\
+				     GTS_SPLIT ((vs)->v2)->v :\
+				     GTS_VERTEX ((vs)->v2))
+
+GtsSplitClass *  gts_split_class          (void);
+GtsSplit *       gts_split_new            (GtsSplitClass * klass,
+					   GtsVertex * v,
+					   GtsObject * o1,
+					   GtsObject * o2);
+void             gts_split_collapse       (GtsSplit * vs,
+					   GtsEdgeClass * klass,
+					   GtsEHeap * heap);
+void             gts_split_expand         (GtsSplit * vs, 
+					   GtsSurface * s,
+					   GtsEdgeClass * klass);
+typedef gboolean (*GtsSplitTraverseFunc)  (GtsSplit * vs,
+					   gpointer data);
+void             gts_split_traverse       (GtsSplit * root,
+					   GTraverseType        order,
+					   gint                 depth,
+					   GtsSplitTraverseFunc func,
+					   gpointer             data);
+guint            gts_split_height         (GtsSplit * root);
+
+/* psurface.c */
+
+typedef struct _GtsPSurface         GtsPSurface;
+typedef struct _GtsPSurfaceClass    GtsPSurfaceClass;
+
+struct _GtsPSurface {
+  GtsObject object;
+
+  GtsSurface * s;
+  GPtrArray * split;
+  GtsSplitClass * split_class;
+  guint pos, min;
+
+  GPtrArray * vertices;
+  GPtrArray * faces;
+};
+
+struct _GtsPSurfaceClass {
+  GtsObjectClass parent_class;
+};
+
+#define GTS_IS_PSURFACE(obj) (gts_object_is_from_class (obj,\
+							gts_psurface_class ()))
+#define GTS_PSURFACE(obj)           GTS_OBJECT_CAST (obj,\
+						     GtsPSurface,\
+						     gts_psurface_class ())
+#define GTS_PSURFACE_CLASS(klass)     GTS_OBJECT_CLASS_CAST (klass,\
+						     GtsPSurfaceClass,\
+						     gts_psurface_class ())
+#define GTS_PSURFACE_IS_CLOSED(ps)  (!(ps)->vertices)
+
+GtsPSurfaceClass * gts_psurface_class         (void);
+GtsPSurface * gts_psurface_new                (GtsPSurfaceClass * klass,
+					       GtsSurface * surface,
+					       GtsSplitClass * split_class,
+					       GtsKeyFunc cost_func,
+					       gpointer cost_data,
+					       GtsCoarsenFunc coarsen_func,
+					       gpointer coarsen_data,
+					       GtsStopFunc stop_func,
+					       gpointer stop_data,
+					       gdouble minangle);
+GtsSplit *    gts_psurface_add_vertex         (GtsPSurface * ps);
+GtsSplit *    gts_psurface_remove_vertex      (GtsPSurface * ps);
+guint         gts_psurface_max_vertex_number  (GtsPSurface * ps);
+guint         gts_psurface_min_vertex_number  (GtsPSurface * ps);
+void          gts_psurface_set_vertex_number  (GtsPSurface * ps, 
+					       guint n);
+guint         gts_psurface_get_vertex_number  (GtsPSurface * ps);
+void          gts_psurface_write              (GtsPSurface * ps,
+					       FILE * fptr);
+GtsPSurface * gts_psurface_open               (GtsPSurfaceClass * klass,
+					       GtsSurface * s,
+					       GtsSplitClass * split_class,
+					       FILE * fptr,
+					       guint * line);
+GtsSplit *    gts_psurface_read_vertex        (GtsPSurface * ps, 
+					       FILE * fptr);
+void          gts_psurface_close              (GtsPSurface * ps);
+void          gts_psurface_foreach_vertex     (GtsPSurface * ps, 
+					       GtsFunc func, 
+					       gpointer data);
+
+/* hsurface.c */
+
+typedef struct _GtsHSplit        GtsHSplit;
+typedef struct _GtsHSplitClass   GtsHSplitClass;
+typedef struct _GtsHSurface      GtsHSurface;
+typedef struct _GtsHSurfaceClass GtsHSurfaceClass;
+
+struct _GtsHSplit {
+  GtsSplit split;
+
+  GtsEHeapPair * index;
+  GtsHSplit * parent;
+  guint nchild;
+};
+
+struct _GtsHSplitClass {
+  GtsSplitClass parent_class;
+};
+
+#define GTS_IS_HSPLIT(obj) (gts_object_is_from_class (obj,\
+						      gts_hsplit_class ()))
+#define GTS_HSPLIT(obj)           GTS_OBJECT_CAST (obj,\
+						   GtsHSplit,\
+						   gts_hsplit_class ())
+#define GTS_HSPLIT_CLASS(klass)     GTS_OBJECT_CLASS_CAST (klass,\
+						   GtsHSplitClass,\
+						   gts_hsplit_class ())
+
+GtsHSplitClass * gts_hsplit_class             (void);
+GtsHSplit *   gts_hsplit_new                  (GtsHSplitClass * klass, 
+					       GtsSplit * vs);
+void          gts_hsplit_collapse             (GtsHSplit * hs,
+					       GtsHSurface * hsurface);
+void          gts_hsplit_expand               (GtsHSplit * hs,
+					       GtsHSurface * hsurface);
+void          gts_hsplit_force_expand         (GtsHSplit * hs,
+					       GtsHSurface * hsurface);
+
+struct _GtsHSurface {
+  GtsObject object;
+
+  GtsSurface * s;
+  GSList * roots;
+  GtsEHeap * expandable;
+  GtsEHeap * collapsable;
+  GPtrArray * split;
+  guint nvertex;
+};
+
+struct _GtsHSurfaceClass {
+  GtsObjectClass parent_class;
+};
+
+#define GTS_IS_HSURFACE(obj) (gts_object_is_from_class (obj,\
+							gts_hsurface_class ()))
+#define GTS_HSURFACE(obj)           GTS_OBJECT_CAST (obj,\
+						     GtsHSurface,\
+						     gts_hsurface_class ())
+#define GTS_HSURFACE_CLASS(klass)   GTS_OBJECT_CLASS_CAST (klass,\
+						     GtsHSurfaceClass,\
+						     gts_hsurface_class ())
+
+GtsHSurfaceClass * gts_hsurface_class    (void);
+GtsHSurface * gts_hsurface_new           (GtsHSurfaceClass * klass,
+					  GtsHSplitClass *   hsplit_class,
+					  GtsPSurface *      psurface,
+					  GtsKeyFunc         expand_key,
+					  gpointer           expand_data,
+					  GtsKeyFunc         collapse_key,
+					  gpointer           collapse_data);
+void          gts_hsurface_traverse      (GtsHSurface *        hsurface,
+					  GTraverseType        order,
+					  gint                 depth,
+					  GtsSplitTraverseFunc func,
+					  gpointer             data);
+void          gts_hsurface_foreach       (GtsHSurface *        hsurface,
+					  GTraverseType        order,
+					  GtsFunc              func,
+					  gpointer             data);
+guint         gts_hsurface_height        (GtsHSurface *        hsurface);
+
+/* Constrained Delaunay triangulation: cdt.c */
+
+#define GTS_IS_CONSTRAINT(obj)      (gts_object_is_from_class (obj,\
+						    gts_constraint_class ()))
+#define GTS_CONSTRAINT(obj)          GTS_OBJECT_CAST (obj,\
+						  GtsConstraint,\
+						  gts_constraint_class ())
+#define GTS_CONSTRAINT_CLASS(klass)  GTS_OBJECT_CLASS_CAST (klass,\
+						  GtsConstraintClass,\
+						  gts_constraint_class ())
+
+typedef struct _GtsConstraint        GtsConstraint;
+typedef struct _GtsConstraintClass   GtsConstraintClass;
+
+GtsConstraintClass * gts_constraint_class        (void);
+
+GtsFace *            gts_point_locate            (GtsPoint * p, 
+						  GtsSurface * surface,
+						  GtsFace * guess);
+GtsVertex *          gts_delaunay_add_vertex_to_face (GtsSurface * surface, 
+						      GtsVertex * v,
+						      GtsFace * f);
+GtsVertex *          gts_delaunay_add_vertex     (GtsSurface * surface, 
+						  GtsVertex * v,
+						  GtsFace * guess);
+void                 gts_delaunay_remove_vertex  (GtsSurface * surface, 
+						  GtsVertex * v);
+GtsFace *            gts_delaunay_check          (GtsSurface * surface);
+GSList *             gts_delaunay_add_constraint (GtsSurface * surface,
+						  GtsConstraint * c);
+void                 gts_delaunay_remove_hull    (GtsSurface * surface);
+
+/* Constrained Delaunay refinement: refine.c */
+
+typedef gboolean   (* GtsEncroachFunc)           (GtsVertex * v,
+						  GtsEdge * e,
+						  GtsSurface * s,
+						  gpointer data);
+
+gboolean             gts_vertex_encroaches_edge  (GtsVertex * v, 
+						  GtsEdge * e);
+GtsVertex *          gts_edge_is_encroached      (GtsEdge * e,
+						  GtsSurface * s,
+						  GtsEncroachFunc encroaches,
+						  gpointer data);
+guint                gts_delaunay_conform        (GtsSurface * surface,
+						  gint steiner_max,
+						  GtsEncroachFunc encroaches,
+						  gpointer data);
+guint                gts_delaunay_refine         (GtsSurface * surface,
+						  gint steiner_max,
+						  GtsEncroachFunc encroaches,
+						  gpointer encroach_data,
+						  GtsKeyFunc cost,
+						  gpointer cost_data);
+
+/* Isosurfaces: iso.c */
+
+typedef struct _GtsGridPlane     GtsGridPlane;
+typedef struct _GtsIsoSlice      GtsIsoSlice;
+typedef struct _GtsCartesianGrid GtsCartesianGrid;
+
+struct _GtsGridPlane {
+  GtsPoint ** p;
+  guint nx, ny;
+};
+
+struct _GtsCartesianGrid {
+  guint nx, ny, nz;
+  gdouble x, dx, y, dy, z, dz;
+};
+
+typedef void (*GtsIsoCartesianFunc)         (gdouble ** a,
+					     GtsCartesianGrid g,
+					     guint i,
+					     gpointer data);
+
+GtsGridPlane * gts_grid_plane_new           (guint nx, 
+					     guint ny);
+void           gts_grid_plane_destroy       (GtsGridPlane * g);
+GtsIsoSlice *  gts_iso_slice_new            (guint nx, guint ny);
+void           gts_iso_slice_fill           (GtsIsoSlice * slice,
+					     GtsGridPlane * plane1,
+					     GtsGridPlane * plane2,
+					     gdouble ** f1,
+					     gdouble ** f2,
+					     gdouble iso,
+					     GtsVertexClass * klass);
+void           gts_iso_slice_fill_cartesian (GtsIsoSlice * slice,
+					     GtsCartesianGrid g,
+					     gdouble ** f1,
+					     gdouble ** f2,
+					     gdouble iso,
+					     GtsVertexClass * klass);
+void           gts_iso_slice_destroy        (GtsIsoSlice * slice);
+void           gts_isosurface_slice         (GtsIsoSlice * slice1,
+					     GtsIsoSlice * slice2,
+					     GtsSurface * surface);
+void           gts_isosurface_cartesian     (GtsSurface * surface,
+					     GtsCartesianGrid g,
+					     GtsIsoCartesianFunc f,
+					     gpointer data,
+					     gdouble iso);
+
+/* Named vertices, edges and triangles: named.c */
+
+#define GTS_NAME_LENGTH             40
+
+#define GTS_NVERTEX(obj)            GTS_OBJECT_CAST (obj,\
+						     GtsNVertex,\
+						     gts_nvertex_class ())
+#define GTS_NVERTEX_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+							   GtsNVertexClass,\
+							   gts_nvertex_class())
+#define GTS_IS_NVERTEX(obj)         (gts_object_is_from_class (obj,\
+				       gts_nvertex_class ()))
+
+typedef struct _GtsNVertex          GtsNVertex;
+typedef struct _GtsNVertexClass     GtsNVertexClass;
+
+struct _GtsNVertex {
+  GtsVertex parent;
+  char name[GTS_NAME_LENGTH];
+};
+
+struct _GtsNVertexClass {
+  GtsVertexClass parent_class;
+};
+
+GtsNVertexClass * gts_nvertex_class        (void);
+
+#define GTS_NEDGE(obj)            GTS_OBJECT_CAST (obj,\
+						   GtsNEdge,\
+						   gts_nedge_class ())
+#define GTS_NEDGE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+							 GtsNEdgeClass,\
+							 gts_nedge_class())
+#define GTS_IS_NEDGE(obj)         (gts_object_is_from_class (obj,\
+				       gts_nedge_class ()))
+
+typedef struct _GtsNEdge          GtsNEdge;
+typedef struct _GtsNEdgeClass     GtsNEdgeClass;
+
+struct _GtsNEdge {
+  GtsEdge parent;
+  char name[GTS_NAME_LENGTH];
+};
+
+struct _GtsNEdgeClass {
+  GtsEdgeClass parent_class;
+};
+
+GtsNEdgeClass *   gts_nedge_class        (void);
+
+#define GTS_NFACE(obj)            GTS_OBJECT_CAST (obj,\
+						   GtsNFace,\
+						   gts_nface_class ())
+#define GTS_NFACE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+							 GtsNFaceClass,\
+							 gts_nface_class())
+#define GTS_IS_NFACE(obj)         (gts_object_is_from_class (obj,\
+				       gts_nface_class ()))
+
+typedef struct _GtsNFace          GtsNFace;
+typedef struct _GtsNFaceClass     GtsNFaceClass;
+
+struct _GtsNFace {
+  GtsFace parent;
+  char name[GTS_NAME_LENGTH];
+};
+
+struct _GtsNFaceClass {
+  GtsFaceClass parent_class;
+};
+
+GtsNFaceClass *       gts_nface_class        (void);
+
+/* Cluster object for out-of-core simplification: oocs.c */
+
+#define GTS_CLUSTER(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsCluster,\
+					           gts_cluster_class ())
+#define GTS_CLUSTER_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsClusterClass,\
+						         gts_cluster_class())
+#define GTS_IS_CLUSTER(obj)         (gts_object_is_from_class (obj,\
+						   gts_cluster_class ()))
+     
+typedef struct _GtsCluster         GtsCluster;
+typedef struct _GtsClusterClass    GtsClusterClass;
+typedef struct _GtsClusterId       GtsClusterId;
+
+struct _GtsClusterId {
+  guint x, y, z;
+};
+
+struct _GtsCluster {
+  GtsObject parent;
+
+  GtsClusterId id;
+  GtsVertex * v;
+  guint n;
+};
+
+struct _GtsClusterClass {
+  GtsObjectClass parent_class;
+
+  void (* add) (GtsCluster * c, GtsPoint * p, gpointer data);
+  void (* update) (GtsCluster * c);
+};
+
+GtsClusterClass * gts_cluster_class                (void);
+GtsCluster *      gts_cluster_new                  (GtsClusterClass * klass,
+						    GtsClusterId id,
+						    GtsVertexClass * vklass);
+void              gts_cluster_add                  (GtsCluster * c, 
+						    GtsPoint * p,
+						    gpointer data);
+void              gts_cluster_update               (GtsCluster * c);
+
+/* Cluster group object for out-of-core simplification: oocs.c */
+
+#define GTS_CLUSTER_GRID(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsClusterGrid,\
+					           gts_cluster_grid_class ())
+#define GTS_CLUSTER_GRID_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						   GtsClusterGridClass,\
+						   gts_cluster_grid_class())
+#define GTS_IS_CLUSTER_GRID(obj)         (gts_object_is_from_class (obj,\
+						   gts_cluster_grid_class ()))
+     
+typedef struct _GtsClusterGrid         GtsClusterGrid;
+typedef struct _GtsClusterGridClass    GtsClusterGridClass;
+
+struct _GtsClusterGrid {
+  GtsObject parent;
+
+  GtsSurface * surface;
+  GtsBBox * bbox;
+  GtsVector size;
+
+  GtsClusterClass * cluster_class;
+  GHashTable * clusters;
+};
+
+struct _GtsClusterGridClass {
+  GtsObjectClass parent_class;
+};
+
+GtsClusterGridClass * gts_cluster_grid_class (void);
+GtsClusterGrid *      gts_cluster_grid_new   (GtsClusterGridClass * klass,
+					      GtsClusterClass * cluster_class,
+					      GtsSurface * s,
+					      GtsBBox * bbox,
+					      gdouble delta);
+void           gts_cluster_grid_add_triangle (GtsClusterGrid * cluster_grid,
+					      GtsPoint * p1,
+					      GtsPoint * p2,
+					      GtsPoint * p3,
+					      gpointer data);
+GtsRange       gts_cluster_grid_update       (GtsClusterGrid * cluster_grid);
+
+/* Triangle strip generation: stripe.c */
+GSList *       gts_surface_strip             (GtsSurface * s);
+
+/* GtsContainee: container.c */
+
+typedef struct _GtsContainee         GtsContainee;
+typedef struct _GtsContaineeClass    GtsContaineeClass;
+typedef struct _GtsContainer         GtsContainer;
+typedef struct _GtsContainerClass    GtsContainerClass;
+
+struct _GtsContainee {
+  GtsObject object;
+};
+
+struct _GtsContaineeClass {
+  GtsObjectClass parent_class;
+
+  void     (* add_container)    (GtsContainee *, GtsContainer *);
+  void     (* remove_container) (GtsContainee *, GtsContainer *);
+  gboolean (* is_contained)     (GtsContainee *, GtsContainer *);
+};
+
+#define GTS_CONTAINEE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsContainee,\
+					           gts_containee_class ())
+#define GTS_CONTAINEE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsContaineeClass,\
+						         gts_containee_class())
+#define GTS_IS_CONTAINEE(obj)         (gts_object_is_from_class (obj,\
+						   gts_containee_class ()))
+     
+GtsContaineeClass * gts_containee_class        (void);
+GtsContainee *      gts_containee_new          (GtsContaineeClass * klass);
+gboolean            gts_containee_is_contained (GtsContainee * item, 
+						GtsContainer * c);
+
+/* GtsSListContainee: container.c */
+
+typedef struct _GtsSListContainee         GtsSListContainee;
+typedef struct _GtsSListContaineeClass    GtsSListContaineeClass;
+
+struct _GtsSListContainee {
+  GtsContainee containee;
+
+  GSList * containers;
+};
+
+struct _GtsSListContaineeClass {
+  GtsContaineeClass parent_class;
+};
+
+#define GTS_SLIST_CONTAINEE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsSListContainee,\
+					           gts_slist_containee_class ())
+#define GTS_SLIST_CONTAINEE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsSListContaineeClass,\
+						         gts_slist_containee_class())
+#define GTS_IS_SLIST_CONTAINEE(obj)         (gts_object_is_from_class (obj,\
+						   gts_slist_containee_class ()))
+     
+GtsSListContaineeClass * gts_slist_containee_class   (void);
+
+/* GtsContainer: container.c */
+
+struct _GtsContainer {
+  GtsSListContainee object;
+};
+
+struct _GtsContainerClass {
+  GtsSListContaineeClass parent_class;
+
+  void  (* add)     (GtsContainer *, GtsContainee *);
+  void  (* remove)  (GtsContainer *, GtsContainee *);
+  void  (* foreach) (GtsContainer *, GtsFunc, gpointer);
+  guint (* size)    (GtsContainer *);
+};
+
+#define GTS_CONTAINER(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsContainer,\
+					           gts_container_class ())
+#define GTS_CONTAINER_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsContainerClass,\
+						         gts_container_class())
+#define GTS_IS_CONTAINER(obj)         (gts_object_is_from_class (obj,\
+						   gts_container_class ()))
+     
+GtsContainerClass * gts_container_class     (void);
+GtsContainer *      gts_container_new       (GtsContainerClass * klass);
+void                gts_container_add       (GtsContainer * c,
+					     GtsContainee * item);
+void                gts_container_remove    (GtsContainer * c,
+					     GtsContainee * item);
+void                gts_container_foreach   (GtsContainer * c,
+					     GtsFunc func,
+					     gpointer data);
+guint               gts_container_size      (GtsContainer * c);
+
+/* GtsHashContainer: container.c */
+
+typedef struct _GtsHashContainer         GtsHashContainer;
+typedef struct _GtsHashContainerClass    GtsHashContainerClass;
+
+struct _GtsHashContainer {
+  GtsContainer c;
+
+  GHashTable * items;
+  gboolean frozen;
+};
+
+struct _GtsHashContainerClass {
+  GtsContainerClass parent_class;
+};
+
+#define GTS_HASH_CONTAINER(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsHashContainer,\
+					           gts_hash_container_class ())
+#define GTS_HASH_CONTAINER_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsHashContainerClass,\
+						         gts_hash_container_class())
+#define GTS_IS_HASH_CONTAINER(obj)         (gts_object_is_from_class (obj,\
+						   gts_hash_container_class ()))
+     
+GtsHashContainerClass * gts_hash_container_class (void);
+
+/* GtsSListContainer: container.c */
+
+typedef struct _GtsSListContainer         GtsSListContainer;
+typedef struct _GtsSListContainerClass    GtsSListContainerClass;
+
+struct _GtsSListContainer {
+  GtsContainer c;
+
+  GSList * items;
+  gboolean frozen;
+};
+
+struct _GtsSListContainerClass {
+  GtsContainerClass parent_class;
+};
+
+#define GTS_SLIST_CONTAINER(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsSListContainer,\
+					           gts_slist_container_class ())
+#define GTS_SLIST_CONTAINER_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsSListContainerClass,\
+						         gts_slist_container_class())
+#define GTS_IS_SLIST_CONTAINER(obj)         (gts_object_is_from_class (obj,\
+						   gts_slist_container_class ()))
+     
+GtsSListContainerClass * gts_slist_container_class (void);
+
+/* GtsGNode: graph.c */
+
+typedef struct _GtsGNode         GtsGNode;
+typedef struct _GtsGNodeClass    GtsGNodeClass;
+typedef struct _GtsGraph         GtsGraph;
+typedef struct _GtsGraphClass    GtsGraphClass;
+
+struct _GtsGNode {
+  GtsSListContainer container;
+
+  guint level;
+};
+
+struct _GtsGNodeClass {
+  GtsSListContainerClass parent_class;
+
+  gfloat (* weight) (GtsGNode *);
+};
+
+#define GTS_GNODE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsGNode,\
+					           gts_gnode_class ())
+#define GTS_GNODE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsGNodeClass,\
+						         gts_gnode_class())
+#define GTS_IS_GNODE(obj)         (gts_object_is_from_class (obj,\
+						   gts_gnode_class ()))
+#define GTS_GNODE_NEIGHBOR(n,e)   (GTS_GEDGE (e)->n1 == n ? GTS_GEDGE (e)->n2 : GTS_GEDGE (e)->n2 == n ? GTS_GEDGE (e)->n1 : NULL)
+     
+GtsGNodeClass * gts_gnode_class                (void);
+GtsGNode *      gts_gnode_new                  (GtsGNodeClass * klass);
+void            gts_gnode_foreach_neighbor     (GtsGNode * n, 
+						GtsGraph * g,
+						GtsFunc func,
+						gpointer data);
+void            gts_gnode_foreach_edge         (GtsGNode * n,
+						GtsGraph * g,
+						GtsFunc func,
+						gpointer data);
+guint           gts_gnode_degree               (GtsGNode * n,
+						GtsGraph * g);
+gfloat          gts_gnode_move_cost            (GtsGNode * n,
+						GtsGraph * src,
+						GtsGraph * dst);
+gfloat          gts_gnode_weight               (GtsGNode * n);
+
+GTS_C_VAR
+gboolean        gts_allow_floating_gnodes;
+
+/* GtsNGNode: graph.c */
+
+typedef struct _GtsNGNode         GtsNGNode;
+typedef struct _GtsNGNodeClass    GtsNGNodeClass;
+
+struct _GtsNGNode {
+  GtsGNode node;
+
+  guint id;
+};
+
+struct _GtsNGNodeClass {
+  GtsGNodeClass parent_class;
+};
+
+#define GTS_NGNODE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsNGNode,\
+					           gts_ngnode_class ())
+#define GTS_NGNODE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsNGNodeClass,\
+						         gts_ngnode_class())
+#define GTS_IS_NGNODE(obj)         (gts_object_is_from_class (obj,\
+						   gts_ngnode_class ()))
+     
+GtsNGNodeClass * gts_ngnode_class                (void);
+GtsNGNode *      gts_ngnode_new                  (GtsNGNodeClass * klass,
+						  guint id);
+
+/* GtsWGNode: graph.c */
+
+typedef struct _GtsWGNode         GtsWGNode;
+typedef struct _GtsWGNodeClass    GtsWGNodeClass;
+
+struct _GtsWGNode {
+  GtsGNode node;
+  
+  gfloat weight;
+};
+
+struct _GtsWGNodeClass {
+  GtsGNodeClass parent_class;
+};
+
+#define GTS_WGNODE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsWGNode,\
+					           gts_wgnode_class ())
+#define GTS_WGNODE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsWGNodeClass,\
+						         gts_wgnode_class())
+#define GTS_IS_WGNODE(obj)         (gts_object_is_from_class (obj,\
+						   gts_wgnode_class ()))
+     
+GtsWGNodeClass * gts_wgnode_class                (void);
+GtsWGNode *      gts_wgnode_new                  (GtsWGNodeClass * klass,
+						  gfloat weight);
+
+/* GtsFNode */
+
+typedef struct _GtsFNode         GtsFNode;
+typedef struct _GtsFNodeClass    GtsFNodeClass;
+
+struct _GtsFNode {
+  GtsGNode node;
+
+  GtsFace * f;
+};
+
+struct _GtsFNodeClass {
+  GtsGNodeClass parent_class;
+};
+
+#define GTS_FNODE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsFNode,\
+					           gts_fnode_class ())
+#define GTS_FNODE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsFNodeClass,\
+						         gts_fnode_class())
+#define GTS_IS_FNODE(obj)         (gts_object_is_from_class (obj,\
+						   gts_fnode_class ()))
+     
+GtsFNodeClass * gts_fnode_class                (void);
+GtsFNode *      gts_fnode_new                  (GtsFNodeClass * klass,
+						GtsFace * f);
+
+/* GtsGEdge: graph.c */
+
+typedef struct _GtsGEdge         GtsGEdge;
+typedef struct _GtsGEdgeClass    GtsGEdgeClass;
+
+struct _GtsGEdge {
+  GtsContainee containee;
+
+  GtsGNode * n1;
+  GtsGNode * n2;
+};
+
+struct _GtsGEdgeClass {
+  GtsContaineeClass parent_class;
+
+  gfloat (* weight) (GtsGEdge *);
+};
+
+#define GTS_GEDGE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsGEdge,\
+					           gts_gedge_class ())
+#define GTS_GEDGE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsGEdgeClass,\
+						         gts_gedge_class())
+#define GTS_IS_GEDGE(obj)         (gts_object_is_from_class (obj,\
+						   gts_gedge_class ()))
+     
+GtsGEdgeClass * gts_gedge_class                (void);
+GtsGEdge *      gts_gedge_new                  (GtsGEdgeClass * klass,
+						GtsGNode * n1,
+						GtsGNode * n2);
+gfloat          gts_gedge_weight               (GtsGEdge * e);
+#define         gts_gedge_connects(e, a1, a2)\
+   (((e)->n1 == a1 && (e)->n2 == a2) || ((e)->n1 == a2 && (e)->n2 == a1)) 
+
+/* GtsWGEdge: graph.c */
+
+typedef struct _GtsWGEdge         GtsWGEdge;
+typedef struct _GtsWGEdgeClass    GtsWGEdgeClass;
+
+struct _GtsWGEdge {
+  GtsGEdge gedge;
+
+  gfloat weight;
+};
+
+struct _GtsWGEdgeClass {
+  GtsGEdgeClass parent_class;
+};
+
+#define GTS_WGEDGE(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsWGEdge,\
+					           gts_wgedge_class ())
+#define GTS_WGEDGE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsWGEdgeClass,\
+						         gts_wgedge_class())
+#define GTS_IS_WGEDGE(obj)         (gts_object_is_from_class (obj,\
+						   gts_wgedge_class ()))
+     
+GtsWGEdgeClass * gts_wgedge_class                (void);
+GtsWGEdge *      gts_wgedge_new                  (GtsWGEdgeClass * klass,
+						  GtsGNode * n1,
+						  GtsGNode * n2,
+						  gfloat weight);
+
+/* GtsGraph: graph.c */
+
+struct _GtsGraph {
+  GtsHashContainer object;
+
+  GtsGNodeClass * node_class;
+  GtsGEdgeClass * edge_class;
+};
+
+struct _GtsGraphClass {
+  GtsHashContainerClass parent_class;
+
+  gfloat (* weight) (GtsGraph *);
+};
+
+#define GTS_GRAPH(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsGraph,\
+					           gts_graph_class ())
+#define GTS_GRAPH_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsGraphClass,\
+						         gts_graph_class())
+#define GTS_IS_GRAPH(obj)         (gts_object_is_from_class (obj,\
+						   gts_graph_class ()))
+     
+GtsGraphClass * gts_graph_class                  (void);
+GtsGraph *      gts_graph_new                    (GtsGraphClass * klass,
+						  GtsGNodeClass * node_class,
+						  GtsGEdgeClass * edge_class);
+void            gts_graph_print_stats            (GtsGraph * g,
+						  FILE * fp);
+typedef struct _GtsGraphTraverse GtsGraphTraverse;
+typedef enum   { GTS_BREADTH_FIRST
+               }   GtsTraverseType;
+GtsGraphTraverse * gts_graph_traverse_new        (GtsGraph * g, 
+						  GtsGNode * n,
+						  GtsTraverseType type,
+						  gboolean reinit);
+GtsGNode *         gts_graph_traverse_next       (GtsGraphTraverse * t);
+GtsGNode *         gts_graph_traverse_what_next  (GtsGraphTraverse * t);
+void               gts_graph_traverse_destroy    (GtsGraphTraverse * t);
+void               gts_graph_foreach_edge        (GtsGraph * g,
+						  GtsFunc func,
+						  gpointer data);
+gfloat             gts_graph_weight              (GtsGraph * g);
+guint              gts_graph_distance_sum        (GtsGraph * g, 
+						  GtsGNode * center);
+GtsGNode *         gts_graph_farthest            (GtsGraph * g, 
+						  GSList * gnodes);
+guint              gts_graph_edges_cut           (GtsGraph * g);
+gfloat             gts_graph_edges_cut_weight    (GtsGraph * g);
+guint              gts_graph_read                (GtsGraph * g, 
+						  FILE * fp);
+
+/* GtsWGraph: graph.c */
+
+typedef struct _GtsWGraph      GtsWGraph;
+typedef struct _GtsWGraphClass GtsWGraphClass;
+
+struct _GtsWGraph {
+  GtsGraph graph;
+
+  gfloat weight;
+};
+
+struct _GtsWGraphClass {
+  GtsGraphClass parent_class;
+};
+
+#define GTS_WGRAPH(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsWGraph,\
+					           gts_wgraph_class ())
+#define GTS_WGRAPH_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsWGraphClass,\
+						         gts_wgraph_class())
+#define GTS_IS_WGRAPH(obj)         (gts_object_is_from_class (obj,\
+						   gts_wgraph_class ()))
+     
+GtsWGraphClass * gts_wgraph_class                (void);
+gfloat           gts_wgraph_weight_max           (GtsWGraph * wg);
+
+/* Surface graph: graph.c */
+
+GtsGraph *       gts_surface_graph_new           (GtsGraphClass * klass,
+						  GtsSurface * s);
+GtsSurface *     gts_surface_graph_surface       (GtsGraph * surface_graph,
+						  GtsSurface * s);
+
+/* GtsGNodeSplit: pgraph.c */
+
+typedef struct _GtsGNodeSplit         GtsGNodeSplit;
+typedef struct _GtsGNodeSplitClass    GtsGNodeSplitClass;
+
+struct _GtsGNodeSplit {
+  GtsObject object;
+
+  GtsGNode * n;
+  GtsObject * n1;
+  GtsObject * n2;
+};
+
+struct _GtsGNodeSplitClass {
+  GtsObjectClass parent_class;
+};
+
+#define GTS_GNODE_SPLIT(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsGNodeSplit,\
+					           gts_gnode_split_class ())
+#define GTS_GNODE_SPLIT_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsGNodeSplitClass,\
+						         gts_gnode_split_class())
+#define GTS_IS_GNODE_SPLIT(obj)         (gts_object_is_from_class (obj,\
+						   gts_gnode_split_class ()))
+#define GTS_GNODE_SPLIT_N1(ns) (GTS_IS_GNODE_SPLIT ((ns)->n1) ? GTS_GNODE_SPLIT ((ns)->n1)->n : GTS_GNODE ((ns)->n1))
+#define GTS_GNODE_SPLIT_N2(ns) (GTS_IS_GNODE_SPLIT ((ns)->n2) ? GTS_GNODE_SPLIT ((ns)->n2)->n : GTS_GNODE ((ns)->n2))
+     
+GtsGNodeSplitClass * gts_gnode_split_class    (void);
+GtsGNodeSplit *      gts_gnode_split_new      (GtsGNodeSplitClass * klass,
+					       GtsGNode * n,
+					       GtsObject * n1,
+					       GtsObject * n2);
+void                 gts_gnode_split_collapse (GtsGNodeSplit * ns,
+					       GtsGraph * g,
+					       GtsWGEdgeClass * klass);
+void                 gts_gnode_split_expand   (GtsGNodeSplit * ns,
+					       GtsGraph * g);
+
+/* GtsPGraph: pgraph.c */
+
+typedef struct _GtsPGraph         GtsPGraph;
+typedef struct _GtsPGraphClass    GtsPGraphClass;
+
+struct _GtsPGraph {
+  GtsObject object;
+
+  GtsGraph * g;
+  GPtrArray * split;
+  GArray * levels;
+  GtsGNodeSplitClass * split_class;
+  GtsWGEdgeClass * edge_class;
+  guint pos, min, level;
+};
+
+struct _GtsPGraphClass {
+  GtsObjectClass parent_class;
+};
+
+#define GTS_PGRAPH(obj)            GTS_OBJECT_CAST (obj,\
+					           GtsPGraph,\
+					           gts_pgraph_class ())
+#define GTS_PGRAPH_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
+						         GtsPGraphClass,\
+						         gts_pgraph_class())
+#define GTS_IS_PGRAPH(obj)         (gts_object_is_from_class (obj,\
+						   gts_pgraph_class ()))
+     
+GtsPGraphClass * gts_pgraph_class            (void);
+GtsPGraph *      gts_pgraph_new              (GtsPGraphClass * klass,
+					      GtsGraph * g,
+					      GtsGNodeSplitClass * split_class,
+					      GtsWGNodeClass * node_class,
+					      GtsWGEdgeClass * edge_class,
+					      guint min);
+GtsGNodeSplit *  gts_pgraph_add_node         (GtsPGraph * pg);
+GtsGNodeSplit *  gts_pgraph_remove_node      (GtsPGraph * pg);
+void             gts_pgraph_set_node_number  (GtsPGraph *pg,
+					      guint n);
+guint            gts_pgraph_get_node_number  (GtsPGraph *pg);
+guint            gts_pgraph_min_node_number  (GtsPGraph *pg);
+guint            gts_pgraph_max_node_number  (GtsPGraph *pg);
+void             gts_pgraph_foreach_node     (GtsPGraph *pg,
+					      GtsFunc func,
+					      gpointer data);
+gboolean         gts_pgraph_down             (GtsPGraph * pg,
+					      GtsFunc func,
+					      gpointer data);
+/* Graph partition: partition.c */
+
+GSList *         gts_graph_bubble_partition           (GtsGraph * g, 
+						       guint np, 
+						       guint niter,
+						       GtsFunc step_info,
+						       gpointer data);
+guint            gts_graph_partition_edges_cut        (GSList * partition);
+gfloat           gts_graph_partition_edges_cut_weight (GSList * partition);
+void             gts_graph_partition_print_stats      (GSList * partition,
+						       FILE * fp);
+gfloat           gts_graph_partition_balance          (GSList * partition);
+GSList *         gts_graph_partition_clone            (GSList * partition);
+GSList *         gts_graph_recursive_bisection        (GtsWGraph * wg,
+						       guint n,
+						       guint ntry,
+						       guint mmax,
+						       guint nmin);
+void             gts_graph_partition_destroy          (GSList * partition);
+
+/* Graph bisection: partition.c */
+
+typedef struct _GtsGraphBisection GtsGraphBisection;
+
+struct _GtsGraphBisection {
+  GtsGraph * g;
+  GtsGraph * g1;
+  GtsGraph * g2;
+  GHashTable * bg1;
+  GHashTable * bg2;
+};
+
+gboolean            gts_graph_bisection_check      (GtsGraphBisection * bg);
+GtsGraphBisection * gts_graph_ggg_bisection        (GtsGraph * g, 
+						    guint ntry);
+GtsGraphBisection * gts_graph_bfgg_bisection       (GtsGraph * g, 
+						    guint ntry);
+gdouble             gts_graph_bisection_kl_refine  (GtsGraphBisection * bg,
+						    guint mmax);
+gdouble             gts_graph_bisection_bkl_refine (GtsGraphBisection * bg,
+						    guint mmax);
+GtsGraphBisection * gts_graph_bisection_new        (GtsWGraph * wg,
+						    guint ntry,
+						    guint mmax,
+						    guint nmin);
+void                gts_graph_bisection_destroy    (GtsGraphBisection * bg,
+						    gboolean destroy_graphs);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __GTS_H__ */
diff --git a/src/gts.m4 b/src/gts.m4
new file mode 100644
index 0000000..9d11564
--- /dev/null
+++ b/src/gts.m4
@@ -0,0 +1,194 @@
+# Configure paths for GTS
+# St�phane Popinet  2001-10-4
+#       adapted from
+# Configure paths for GLIB
+# Owen Taylor       97-11-3
+
+dnl AM_PATH_GTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for GTS, and define GTS_CFLAGS and GTS_LIBS
+dnl
+AC_DEFUN(AM_PATH_GTS,
+[dnl 
+dnl Get the cflags and libraries from the gts-config script
+dnl
+AC_ARG_WITH(gts-prefix,[  --with-gts-prefix=PFX   Prefix where GTS is installed (optional)],
+            gts_config_prefix="$withval", gts_config_prefix="")
+AC_ARG_WITH(gts-exec-prefix,[  --with-gts-exec-prefix=PFX Exec prefix where GTS is installed (optional)],
+            gts_config_exec_prefix="$withval", gts_config_exec_prefix="")
+AC_ARG_ENABLE(gtstest, [  --disable-gtstest       Do not try to compile and run a test GTS program],
+		    , enable_gtstest=yes)
+
+  if test x$gts_config_exec_prefix != x ; then
+     gts_config_args="$gts_config_args --exec-prefix=$gts_config_exec_prefix"
+     if test x${GTS_CONFIG+set} != xset ; then
+        GTS_CONFIG=$gts_config_exec_prefix/bin/gts-config
+     fi
+  fi
+  if test x$gts_config_prefix != x ; then
+     gts_config_args="$gts_config_args --prefix=$gts_config_prefix"
+     if test x${GTS_CONFIG+set} != xset ; then
+        GTS_CONFIG=$gts_config_prefix/bin/gts-config
+     fi
+  fi
+
+  for module in . $4
+  do
+      case "$module" in
+         gmodule) 
+             gts_config_args="$gts_config_args gmodule"
+         ;;
+         gthread) 
+             gts_config_args="$gts_config_args gthread"
+         ;;
+      esac
+  done
+
+  AC_PATH_PROG(GTS_CONFIG, gts-config, no)
+  min_gts_version=ifelse([$1], ,0.99.7,$1)
+  AC_MSG_CHECKING(for GTS - version >= $min_gts_version)
+  no_gts=""
+  if test "$GTS_CONFIG" = "no" ; then
+    no_gts=yes
+  else
+    GTS_CFLAGS=`$GTS_CONFIG $gts_config_args --cflags`
+    GTS_LIBS=`$GTS_CONFIG $gts_config_args --libs`
+    gts_config_major_version=`$GTS_CONFIG $gts_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    gts_config_minor_version=`$GTS_CONFIG $gts_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    gts_config_micro_version=`$GTS_CONFIG $gts_config_args --version | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x$enable_gtstest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $GTS_CFLAGS"
+      LIBS="$GTS_LIBS $LIBS"
+dnl
+dnl Now check if the installed GTS is sufficiently new. (Also sanity
+dnl checks the results of gts-config to some extent
+dnl
+      rm -f conf.gtstest
+      AC_TRY_RUN([
+#include <gts.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int 
+main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.gtstest");
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_gts_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_gts_version");
+     exit(1);
+   }
+
+  if ((gts_major_version != $gts_config_major_version) ||
+      (gts_minor_version != $gts_config_minor_version) ||
+      (gts_micro_version != $gts_config_micro_version))
+    {
+      printf("\n*** 'gts-config --version' returned %d.%d.%d, but GTS (%d.%d.%d)\n", 
+             $gts_config_major_version, $gts_config_minor_version, $gts_config_micro_version,
+             gts_major_version, gts_minor_version, gts_micro_version);
+      printf ("*** was found! If gts-config was correct, then it is best\n");
+      printf ("*** to remove the old version of GTS. You may also be able to fix the error\n");
+      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+      printf("*** required on your system.\n");
+      printf("*** If gts-config was wrong, set the environment variable GTS_CONFIG\n");
+      printf("*** to point to the correct copy of gts-config, and remove the file config.cache\n");
+      printf("*** before re-running configure\n");
+    } 
+  else if ((gts_major_version != GTS_MAJOR_VERSION) ||
+	   (gts_minor_version != GTS_MINOR_VERSION) ||
+           (gts_micro_version != GTS_MICRO_VERSION))
+    {
+      printf("*** GTS header files (version %d.%d.%d) do not match\n",
+	     GTS_MAJOR_VERSION, GTS_MINOR_VERSION, GTS_MICRO_VERSION);
+      printf("*** library (version %d.%d.%d)\n",
+	     gts_major_version, gts_minor_version, gts_micro_version);
+    }
+  else
+    {
+      if ((gts_major_version > major) ||
+        ((gts_major_version == major) && (gts_minor_version > minor)) ||
+        ((gts_major_version == major) && (gts_minor_version == minor) && (gts_micro_version >= micro)))
+      {
+        return 0;
+       }
+     else
+      {
+        printf("\n*** An old version of GTS (%d.%d.%d) was found.\n",
+               gts_major_version, gts_minor_version, gts_micro_version);
+        printf("*** You need a version of GTS newer than %d.%d.%d. The latest version of\n",
+	       major, minor, micro);
+        printf("*** GTS is always available from http://gts.sourceforge.net.\n");
+        printf("***\n");
+        printf("*** If you have already installed a sufficiently new version, this error\n");
+        printf("*** probably means that the wrong copy of the gts-config shell script is\n");
+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
+        printf("*** of GTS, but you can also set the GTS_CONFIG environment to point to the\n");
+        printf("*** correct copy of gts-config. (In this case, you will have to\n");
+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** so that the correct libraries are found at run-time))\n");
+      }
+    }
+  return 1;
+}
+],, no_gts=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_gts" = x ; then
+     AC_MSG_RESULT(yes)
+     ifelse([$2], , :, [$2])     
+  else
+     AC_MSG_RESULT(no)
+     if test "$GTS_CONFIG" = "no" ; then
+       echo "*** The gts-config script installed by GTS could not be found"
+       echo "*** If GTS was installed in PREFIX, make sure PREFIX/bin is in"
+       echo "*** your path, or set the GTS_CONFIG environment variable to the"
+       echo "*** full path to gts-config."
+     else
+       if test -f conf.gtstest ; then
+        :
+       else
+          echo "*** Could not run GTS test program, checking why..."
+          CFLAGS="$CFLAGS $GTS_CFLAGS"
+          LIBS="$LIBS $GTS_LIBS"
+          AC_TRY_LINK([
+#include <gts.h>
+#include <stdio.h>
+],      [ return ((gts_major_version) || (gts_minor_version) || (gts_micro_version)); ],
+        [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding GTS or finding the wrong"
+          echo "*** version of GTS. If it is not finding GTS, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+          echo "***"],
+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means GTS was incorrectly installed"
+          echo "*** or that you have moved GTS since it was installed. In the latter case, you"
+          echo "*** may want to edit the gts-config script: $GTS_CONFIG" ])
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GTS_CFLAGS=""
+     GTS_LIBS=""
+     ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(GTS_CFLAGS)
+  AC_SUBST(GTS_LIBS)
+  rm -f conf.gtstest
+])
diff --git a/src/gtsconfig.h b/src/gtsconfig.h
new file mode 100644
index 0000000..3e31b54
--- /dev/null
+++ b/src/gtsconfig.h
@@ -0,0 +1,13 @@
+/* gtsconfig.h
+ * 
+ * This is a generated file.  Please modify `configure.in'
+ */
+
+#ifndef GTSCONFIG_H
+#define GTSCONFIG_H
+
+#define GTS_MAJOR_VERSION 0
+#define GTS_MINOR_VERSION 5
+#define GTS_MICRO_VERSION 1
+
+#endif /* GTSCONFIG_H */
diff --git a/src/heap.c b/src/heap.c
new file mode 100644
index 0000000..4a37e58
--- /dev/null
+++ b/src/heap.c
@@ -0,0 +1,258 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "gts.h"
+
+#define PARENT(i) ((i) >= 2 ? (i)/2 : 0)
+#define LEFT_CHILD(i) (2*(i))
+#define RIGHT_CHILD(i) (2*(i) + 1)
+
+struct _GtsHeap {
+  GPtrArray * elts;
+  GCompareFunc func;
+  gboolean frozen;
+};
+
+/**
+ * gts_heap_new:
+ * @compare_func: a GCompareFunc.
+ *
+ * Returns: a new #GtsHeap using @compare_func as a sorting function.
+ */
+GtsHeap * gts_heap_new (GCompareFunc compare_func)
+{
+  GtsHeap * heap;
+
+  g_return_val_if_fail (compare_func != NULL, NULL);
+  
+  heap = g_malloc (sizeof(GtsHeap));
+  heap->elts = g_ptr_array_new ();
+  heap->func = compare_func;
+  heap->frozen = FALSE;
+  return heap;
+}
+
+static void sift_up (GtsHeap * heap, guint i)
+{
+  gpointer parent, child;
+  guint p;
+  gpointer * pdata = heap->elts->pdata;
+  GCompareFunc func = heap->func;
+
+  child = pdata[i - 1];
+  while ((p = PARENT (i))) {
+    parent = pdata[p - 1];
+    if ((*func) (parent, child) > 0) {
+      pdata[p - 1] = child;
+      pdata[i - 1] = parent;
+      i = p;
+    }
+    else
+      i = 0;
+  }
+}
+
+/**
+ * gts_heap_insert:
+ * @heap: a #GtsHeap.
+ * @p: a pointer to add to the heap.
+ *
+ * Inserts a new element @p in the heap.
+ */
+void gts_heap_insert (GtsHeap * heap, gpointer p)
+{
+  g_return_if_fail (heap != NULL);
+
+  g_ptr_array_add (heap->elts, p);
+  if (!heap->frozen)
+    sift_up (heap, heap->elts->len);
+}
+
+static void sift_down (GtsHeap * heap, guint i)
+{
+  gpointer left_child, right_child, child, parent;
+  guint lc, rc, c;
+  gpointer * pdata = heap->elts->pdata;
+  guint len = heap->elts->len;
+  GCompareFunc func = heap->func;
+
+  lc = LEFT_CHILD (i);
+  rc = RIGHT_CHILD (i);
+  left_child = lc <= len ? pdata[lc - 1] : NULL;
+  right_child = rc <= len ? pdata[rc - 1] : NULL;
+
+  parent = pdata[i - 1];
+  while (left_child != NULL) {
+    if (right_child == NULL ||
+	(*func) (left_child, right_child) < 0) {
+      child = left_child;
+      c = lc;
+    }
+    else {
+      child = right_child;
+      c = rc;
+    }
+    if ((*func) (parent, child) > 0) {
+      pdata[i - 1] = child;
+      pdata[c - 1] = parent;
+      i = c;
+      lc = LEFT_CHILD (i);
+      rc = RIGHT_CHILD (i);
+      left_child = lc <= len ? pdata[lc - 1] : NULL;
+      right_child = rc <= len ? pdata[rc - 1] : NULL;      
+    }
+    else
+      left_child = NULL;
+  }
+}
+
+/**
+ * gts_heap_remove_top:
+ * @heap: a #GtsHeap.
+ *
+ * Removes the element at the top of the heap.
+ *
+ * Returns: the element at the top of the heap.
+ */
+gpointer gts_heap_remove_top (GtsHeap * heap)
+{
+  gpointer root;
+  GPtrArray * elts;
+  guint len;
+
+  g_return_val_if_fail (heap != NULL, NULL);
+
+  elts = heap->elts; len = elts->len;
+
+  if (len == 0)
+    return NULL;
+  if (len == 1)
+    return g_ptr_array_remove_index (elts, 0);
+
+  root = elts->pdata[0];
+  elts->pdata[0] = g_ptr_array_remove_index (elts, len - 1);
+  sift_down (heap, 1);
+  return root;
+}
+
+/**
+ * gts_heap_top:
+ * @heap: a #GtsHeap.
+ *
+ * Returns: the element at the top of the heap.
+ */
+gpointer gts_heap_top (GtsHeap * heap)
+{
+  GPtrArray * elts;
+  guint len;
+
+  g_return_val_if_fail (heap != NULL, NULL);
+
+  elts = heap->elts; 
+  len = elts->len;
+  if (len == 0)
+    return NULL;
+  return elts->pdata[0];
+}
+
+/**
+ * gts_heap_destroy:
+ * @heap: a #GtsHeap.
+ * 
+ * Free all the memory allocated for @heap.
+ */
+void gts_heap_destroy (GtsHeap * heap)
+{
+  g_return_if_fail (heap != NULL);
+
+  g_ptr_array_free (heap->elts, TRUE);
+  g_free (heap);
+}
+
+/**
+ * gts_heap_thaw:
+ * @heap: a #GtsHeap.
+ *
+ * If @heap has been frozen previously using gts_heap_freeze(), reorder it
+ * in O(n) time and unfreeze it.
+ */
+void gts_heap_thaw (GtsHeap * heap)
+{
+  guint i;
+  
+  g_return_if_fail (heap != NULL);
+
+  if (!heap->frozen)
+    return;
+
+  for (i = heap->elts->len/2; i > 0; i--)
+    sift_down (heap, i);
+
+  heap->frozen = FALSE;
+}
+
+/**
+ * gts_heap_foreach:
+ * @heap: a #GtsHeap.
+ * @func: the function to call for each element in the heap.
+ * @user_data: to pass to @func.
+ */
+void gts_heap_foreach (GtsHeap * heap, 
+		       GFunc func,
+		       gpointer user_data)
+{
+  guint i;
+  GPtrArray * elts;
+  
+  g_return_if_fail (heap != NULL);
+  g_return_if_fail (func != NULL);
+
+  elts = heap->elts;
+  for (i = 0; i < elts->len; i++)
+    (*func) (elts->pdata[i], user_data);
+}
+
+/**
+ * gts_heap_freeze:
+ * @heap: a #GtsHeap.
+ *
+ * Freezes the heap. Any subsequent operation will not preserve the heap
+ * property. Used in conjunction with gts_heap_insert() and gts_heap_thaw()
+ * to create a heap in O(n) time.
+ */
+void gts_heap_freeze (GtsHeap * heap)
+{
+  g_return_if_fail (heap != NULL);
+
+  heap->frozen = TRUE;
+}
+
+/**
+ * gts_heap_size:
+ * @heap: a #GtsHeap.
+ *
+ * Returns: the number of items in @heap.
+ */
+guint gts_heap_size (GtsHeap * heap)
+{
+  g_return_val_if_fail (heap != NULL, 0);
+
+  return heap->elts->len;
+}
diff --git a/src/hsurface.c b/src/hsurface.c
new file mode 100644
index 0000000..80ac66a
--- /dev/null
+++ b/src/hsurface.c
@@ -0,0 +1,405 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "gts.h"
+
+#define HEAP_INSERT_HSPLIT(h, e) ((e)->index = gts_eheap_insert (h, e))
+#define HEAP_REMOVE_HSPLIT(h, e) (gts_eheap_remove (h, (e)->index),\
+				  (e)->index = NULL)
+
+static void hsplit_init (GtsHSplit * hsplit)
+{
+  hsplit->index = NULL;
+  hsplit->parent = NULL;
+  hsplit->nchild = 0;
+}
+
+/**
+ * gts_hsplit_class:
+ *
+ * Returns: the #GtsHSplitClass.
+ */
+GtsHSplitClass * gts_hsplit_class (void)
+{
+  static GtsHSplitClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo hsplit_info = {
+      "GtsHSplit",
+      sizeof (GtsHSplit),
+      sizeof (GtsHSplitClass),
+      (GtsObjectClassInitFunc) NULL,
+      (GtsObjectInitFunc) hsplit_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_split_class ()), 
+				  &hsplit_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_hsplit_new:
+ * @klass: a #GtsHSplitClass.
+ * @vs: a #GtsSplit.
+ *
+ * Returns: a new #GtsHSplit, hierarchical extension of @vs.
+ */
+GtsHSplit * gts_hsplit_new (GtsHSplitClass * klass, GtsSplit * vs)
+{
+  GtsHSplit * hs;
+
+  g_return_val_if_fail (vs != NULL, NULL);
+
+  hs = GTS_HSPLIT (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  memcpy (hs, vs, sizeof (GtsSplit));
+  GTS_OBJECT (hs)->reserved = NULL;
+
+  return hs;
+}
+
+/**
+ * gts_hsplit_collapse:
+ * @hs: a #GtsHSplit.
+ * @hsurface: a #GtsHSurface.
+ *
+ * Collapses the #GtsSplit defined by @hs, updates the expandable and
+ * collapsable priority heaps of @hsurface.  
+ */
+void gts_hsplit_collapse (GtsHSplit * hs,
+			  GtsHSurface * hsurface)
+{
+  GtsHSplit * parent;
+  GtsSplit * vs;
+
+  g_return_if_fail (hs != NULL);
+  g_return_if_fail (hs->nchild == 2);
+  g_return_if_fail (hsurface != NULL);
+
+  gts_split_collapse (GTS_SPLIT (hs), hsurface->s->edge_class, NULL);
+
+  hsurface->nvertex--;
+  hs->nchild = 0;
+  HEAP_REMOVE_HSPLIT (hsurface->collapsable, hs);
+  HEAP_INSERT_HSPLIT (hsurface->expandable, hs);
+
+  vs = GTS_SPLIT (hs);
+  if (GTS_IS_HSPLIT (vs->v1))
+    HEAP_REMOVE_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v1));
+  if (GTS_IS_HSPLIT (vs->v2))
+    HEAP_REMOVE_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v2));
+
+  parent = hs->parent;
+  if (parent && ++parent->nchild == 2)
+    HEAP_INSERT_HSPLIT (hsurface->collapsable, parent);
+}
+
+/**
+ * gts_hsplit_expand:
+ * @hs: a #GtsHSplit.
+ * @hsurface: a #GtsHSurface.
+ *
+ * Expands the #GtsSplit defined by @hs (which must be expandable)
+ * and updates the priority heaps of @hsurface.
+ */
+void gts_hsplit_expand (GtsHSplit * hs,
+			GtsHSurface * hsurface)
+{
+  GtsHSplit * parent;
+  GtsSplit * vs;
+
+  g_return_if_fail (hs != NULL);
+  g_return_if_fail (hsurface != NULL);
+  g_return_if_fail (hs->nchild == 0);
+
+  gts_split_expand (GTS_SPLIT (hs), hsurface->s, hsurface->s->edge_class);
+  hsurface->nvertex++;
+  hs->nchild = 2;
+  HEAP_REMOVE_HSPLIT (hsurface->expandable, hs);
+  HEAP_INSERT_HSPLIT (hsurface->collapsable, hs);
+
+  vs = GTS_SPLIT (hs);
+  if (GTS_IS_HSPLIT (vs->v1))
+    HEAP_INSERT_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v1));
+  if (GTS_IS_HSPLIT (vs->v2))
+    HEAP_INSERT_HSPLIT (hsurface->expandable, GTS_HSPLIT (vs->v2));
+
+  parent = hs->parent;
+  if (parent && parent->nchild-- == 2)
+    HEAP_REMOVE_HSPLIT (hsurface->collapsable, parent);
+}
+
+static void hsurface_destroy (GtsObject * object)
+{
+  GtsHSurface * hs = GTS_HSURFACE (object);
+
+  gts_hsurface_traverse (hs, G_POST_ORDER, -1,
+			 (GtsSplitTraverseFunc) gts_object_destroy, 
+			 NULL);
+  g_slist_free (hs->roots);
+  if (hs->expandable)
+    gts_eheap_destroy (hs->expandable);
+  if (hs->collapsable)
+    gts_eheap_destroy (hs->collapsable);
+  g_ptr_array_free (hs->split, TRUE);
+
+  (* GTS_OBJECT_CLASS (gts_hsurface_class ())->parent_class->destroy) (object);
+}
+
+static void hsurface_class_init (GtsObjectClass * klass)
+{
+  klass->destroy = hsurface_destroy;
+}
+
+static void hsurface_init (GtsHSurface * hsurface)
+{
+  hsurface->s = NULL;
+  hsurface->roots = NULL;
+  hsurface->expandable = hsurface->collapsable = NULL;
+  hsurface->split = g_ptr_array_new ();
+  hsurface->nvertex = 0;
+}
+
+/**
+ * gts_hsurface_class:
+ *
+ * Returns: the #GtsHSurfaceClass.
+ */
+GtsHSurfaceClass * gts_hsurface_class (void)
+{
+  static GtsHSurfaceClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo hsurface_info = {
+      "GtsHSurface",
+      sizeof (GtsHSurface),
+      sizeof (GtsHSurfaceClass),
+      (GtsObjectClassInitFunc) hsurface_class_init,
+      (GtsObjectInitFunc) hsurface_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), 
+				  &hsurface_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_hsurface_new:
+ * @klass: a #GtsHSurfaceClass.
+ * @hsplit_class: a #GtsHSplitClass.
+ * @psurface: a #GtsPSurface.
+ * @expand_key: a #GtsKeyFunc used to order the priority heap of expandable 
+ * #GtsHSplit.
+ * @expand_data: data to be passed to @expand_key.
+ * @collapse_key: a #GtsKeyFunc used to order the priority heap of collapsable
+ * #GtsHSplit.
+ * @collapse_data: data to be passed to @collapsed_key.
+ *
+ * Returns: a new #GtsHSurface, hierarchical extension of @psurface
+ * and using #GtsHSplit of class @hsplit_class. Note that @psurface is
+ * destroyed in the process.
+ */
+GtsHSurface * gts_hsurface_new (GtsHSurfaceClass * klass,
+				GtsHSplitClass * hsplit_class,
+				GtsPSurface * psurface,
+				GtsKeyFunc expand_key,
+				gpointer expand_data,
+				GtsKeyFunc collapse_key,
+				gpointer collapse_data)
+{
+  GtsHSurface * hsurface;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (hsplit_class != NULL, NULL);
+  g_return_val_if_fail (psurface != NULL, NULL);
+  g_return_val_if_fail (expand_key != NULL, NULL);
+  g_return_val_if_fail (collapse_key != NULL, NULL);
+
+  hsurface = GTS_HSURFACE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  hsurface->s = psurface->s;
+  hsurface->expandable = gts_eheap_new (expand_key, expand_data);
+  hsurface->collapsable = gts_eheap_new (collapse_key, collapse_data);
+  g_ptr_array_set_size (hsurface->split, psurface->split->len);
+
+  while (gts_psurface_remove_vertex (psurface))
+    ;
+  while (psurface->pos) {
+    GtsSplit * vs = g_ptr_array_index (psurface->split, psurface->pos - 1);
+    GtsHSplit * hs = gts_hsplit_new (hsplit_class, vs);
+
+    g_ptr_array_index (hsurface->split, psurface->pos - 1) = hs;
+    psurface->pos--;
+
+    hs->parent = GTS_OBJECT (vs)->reserved;
+    if (hs->parent) {
+      GtsSplit * vsp = GTS_SPLIT (hs->parent);
+
+      if (vsp->v1 == GTS_OBJECT (vs)) {
+	g_assert (vsp->v2 != GTS_OBJECT (vs));
+	vsp->v1 = GTS_OBJECT (hs);
+      }
+      else {
+	g_assert (vsp->v2 == GTS_OBJECT (vs));
+	vsp->v2 = GTS_OBJECT (hs);
+      }
+    }
+    else
+      hsurface->roots = g_slist_prepend (hsurface->roots, hs);
+
+    hs->nchild = 0;
+    if (GTS_IS_SPLIT (vs->v1))
+      GTS_OBJECT (vs->v1)->reserved = hs;
+    else
+      hs->nchild++;
+    if (GTS_IS_SPLIT (vs->v2))
+      GTS_OBJECT (vs->v2)->reserved = hs;
+    else
+      hs->nchild++;
+    
+    gts_split_expand (vs, psurface->s, psurface->s->edge_class);
+
+    if (hs->nchild == 2)
+      HEAP_INSERT_HSPLIT (hsurface->collapsable, hs);
+  }
+
+  hsurface->nvertex = gts_surface_vertex_number (hsurface->s);
+  gts_object_destroy (GTS_OBJECT (psurface));
+
+  return hsurface;
+}
+
+/**
+ * gts_hsurface_traverse:
+ * @hsurface: a #GtsHSurface.
+ * @order: the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER.
+ * @depth: the maximum depth of the traversal. Nodes below this depth
+ * will not be visited. If max_depth is -1 all nodes in the tree are
+ * visited. If depth is 1, only the root is visited. If depth is 2,
+ * the root and its children are visited. And so on.
+ * @func: the function to call for each visited #GtsHSplit.
+ * @data: user data to pass to the function.
+ *
+ * Traverses a hierarchical surface starting from its roots. It calls
+ * the given function for each #GtsHSplit visited. 
+ * See also gts_split_traverse().
+ */
+void gts_hsurface_traverse (GtsHSurface *    hsurface,
+			    GTraverseType    order,
+			    gint             depth,
+			    GtsSplitTraverseFunc func,
+			    gpointer         data)
+{
+  GSList * i;
+
+  g_return_if_fail (hsurface != NULL);
+  g_return_if_fail (func != NULL);
+  g_return_if_fail (order < G_LEVEL_ORDER);
+  g_return_if_fail (depth == -1 || depth > 0);
+
+  i = hsurface->roots;
+  while (i) {
+    gts_split_traverse (i->data, order, depth, func, data);
+    i = i->next;
+  }
+}
+
+/**
+ * gts_hsurface_foreach:
+ * @hsurface: a #GtsHSurface.
+ * @order: the order in which #GtsHSplit are visited - G_PRE_ORDER or 
+ * G_POST_ORDER.
+ * @func: the function to call for each visited #GtsHSplit.
+ * @data: user data to pass to the function.
+ *
+ * Starts by expanding all the #GtsHSplit of @hsurface. If @order is
+ * G_PRE_ORDER, calls @func for each #GtsHSplit and collapses it. If
+ * order is G_POST_ORDER, collapses each #GtsHSplit first and then
+ * calls @func. The traversal can be halted at any point by returning
+ * TRUE from func.  
+ */
+void gts_hsurface_foreach (GtsHSurface * hsurface,
+			   GTraverseType order,
+			   GtsFunc       func,
+			   gpointer      data)
+{
+  GtsHSplit * hs;
+  guint i = 0, len;
+  gboolean stop = FALSE;
+
+  g_return_if_fail (hsurface != NULL);
+  g_return_if_fail (func != NULL);
+  g_return_if_fail (order == G_PRE_ORDER || order == G_POST_ORDER);
+
+  while ((hs = gts_eheap_top (hsurface->expandable, NULL))) 
+    gts_hsplit_expand (hs, hsurface);
+
+  len = hsurface->split->len;
+  switch (order) {
+  case G_PRE_ORDER:
+    while (i < len && !stop) {
+      GtsHSplit * hs = g_ptr_array_index (hsurface->split, i);
+      stop = (*func) (hs, data);
+      if (!stop)
+	gts_hsplit_collapse (hs, hsurface);
+      i++;
+    }
+    break;
+  case G_POST_ORDER:
+    while (i < len && !stop) {
+      GtsHSplit * hs = g_ptr_array_index (hsurface->split, i);
+      gts_hsplit_collapse (hs, hsurface);
+      stop = (*func) (hs, data);
+      i++;
+    }
+    break;
+  default:
+    g_assert_not_reached ();
+  }
+}
+
+/**
+ * gts_hsurface_height:
+ * @hsurface: a #GtsHSurface.
+ *
+ * Returns: the maximum height of the tree described by @hsurface.
+ */
+guint gts_hsurface_height (GtsHSurface * hsurface)
+{
+  GSList * i;
+  guint height = 0;
+
+  g_return_val_if_fail (hsurface != NULL, 0);
+
+  i = hsurface->roots;
+  while (i) {
+    guint tmp_height = gts_split_height (i->data);
+    if (tmp_height > height)
+      height = tmp_height;
+    i = i->next;
+  }
+
+  return height;
+}
diff --git a/src/iso.c b/src/iso.c
new file mode 100644
index 0000000..7dd3280
--- /dev/null
+++ b/src/iso.c
@@ -0,0 +1,455 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+typedef enum { LEFT = 0, RIGHT = 1 } Orientation;
+
+typedef struct {
+  GtsVertex * v;
+  Orientation orientation;
+} OrientedVertex;
+
+struct _GtsIsoSlice {
+  OrientedVertex *** vertices;
+  guint nx, ny;
+};
+
+/* coordinates of the edges of the cube */
+static guint c[12][4] = {
+  {0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 1}, {0, 0, 1, 0},
+  {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 1, 0, 1}, {1, 1, 0, 0},
+  {2, 0, 0, 0}, {2, 1, 0, 0}, {2, 1, 1, 0}, {2, 0, 1, 0}};
+
+/* first index is the edge number, second index is the edge orientation 
+   (RIGHT or LEFT), third index are the edges which this edge may connect to
+   in order */
+static guint edge[12][2][3] = {
+  {{9, 1, 8}, {4, 3, 7}},   /* 0 */
+  {{6, 2, 5}, {8, 0, 9}},   /* 1 */
+  {{10, 3, 11}, {5, 1, 6}}, /* 2 */
+  {{7, 0, 4}, {11, 2, 10}}, /* 3 */
+  {{3, 7, 0}, {8, 5, 11}},  /* 4 */
+  {{11, 4, 8}, {1, 6, 2}},  /* 5 */
+  {{2, 5, 1}, {9, 7, 10}},  /* 6 */
+  {{10, 6, 9}, {0, 4, 3}},  /* 7 */
+  {{5, 11, 4}, {0, 9, 1}},  /* 8 */
+  {{1, 8, 0}, {7, 10, 6}},  /* 9 */
+  {{6, 9, 7}, {3, 11, 2}},  /* 10 */
+  {{2, 10, 3}, {4, 8, 5}}   /* 11 */
+};
+
+static void ** malloc2D (guint nx, guint ny, gulong size)
+{
+  void ** m = g_malloc (nx*sizeof (void *));
+  guint i;
+
+  for (i = 0; i < nx; i++)
+    m[i] = g_malloc0 (ny*size);
+
+  return m;
+}
+
+static void free2D (void ** m, guint nx)
+{
+  guint i;
+
+  g_return_if_fail (m != NULL);
+
+  for (i = 0; i < nx; i++)
+    g_free (m[i]);
+  g_free (m);
+}
+
+/**
+ * gts_grid_plane_new:
+ * @nx:
+ * @ny:
+ *
+ * Returns:
+ */
+GtsGridPlane * gts_grid_plane_new (guint nx, guint ny)
+{
+  GtsGridPlane * g = g_malloc (sizeof (GtsGridPlane));
+
+  g->p = (GtsPoint **) malloc2D (nx, ny, sizeof (GtsPoint));
+  g->nx = nx;
+  g->ny = ny;
+  
+  return g;
+}
+
+/**
+ * gts_grid_plane_destroy:
+ * @g:
+ *
+ */
+void gts_grid_plane_destroy (GtsGridPlane * g)
+{
+  g_return_if_fail (g != NULL);
+
+  free2D ((void **) g->p, g->nx);
+  g_free (g);
+}
+
+/**
+ * gts_iso_slice_new:
+ * @nx: number of vertices in the x direction.
+ * @ny: number of vertices in the y direction.
+ *
+ * Returns: a new #GtsIsoSlice.
+ */
+GtsIsoSlice * gts_iso_slice_new (guint nx, guint ny)
+{
+  GtsIsoSlice * slice;
+
+  g_return_val_if_fail (nx > 1, NULL);
+  g_return_val_if_fail (ny > 1, NULL);
+
+  slice = g_malloc (sizeof (GtsIsoSlice));
+
+  slice->vertices = g_malloc (3*sizeof (OrientedVertex **));
+  slice->vertices[0] = 
+    (OrientedVertex **) malloc2D (nx, ny, sizeof (OrientedVertex));
+  slice->vertices[1] = 
+    (OrientedVertex **) malloc2D (nx - 1, ny, sizeof (OrientedVertex));
+  slice->vertices[2] = 
+    (OrientedVertex **) malloc2D (nx, ny - 1, sizeof (OrientedVertex));
+  slice->nx = nx;
+  slice->ny = ny;
+
+  return slice;
+}
+
+/**
+ * gts_iso_slice_fill:
+ * @slice: a #GtsIsoSlice.
+ * @plane1: a #GtsGridPlane.
+ * @plane2: another #GtsGridPlane.
+ * @f1: values of the function corresponding to @plane1.
+ * @f2: values of the function corresponding to @plane2.
+ * @iso: isosurface value.
+ * @klass: a #GtsVertexClass or one of its descendant to be used for the 
+ * new vertices.
+ *
+ * Fill @slice with the coordinates of the vertices defined by 
+ * f1 (x,y,z) = @iso and f2 (x, y, z) = @iso.
+ */
+void gts_iso_slice_fill (GtsIsoSlice * slice,
+			 GtsGridPlane * plane1,
+			 GtsGridPlane * plane2,
+			 gdouble ** f1,
+			 gdouble ** f2,
+			 gdouble iso,
+			 GtsVertexClass * klass)
+{
+  OrientedVertex *** vertices;
+  GtsPoint ** p1, ** p2 = NULL;
+  guint i, j, nx, ny;
+
+  g_return_if_fail (slice != NULL);
+  g_return_if_fail (plane1 != NULL);
+  g_return_if_fail (f1 != NULL);
+  g_return_if_fail (f2 == NULL || plane2 != NULL);
+
+  p1 = plane1->p;
+  if (plane2) 
+    p2 = plane2->p;
+  vertices = slice->vertices;
+  nx = slice->nx;
+  ny = slice->ny;
+
+  if (f2)
+    for (i = 0; i < nx; i++)
+      for (j = 0; j < ny; j++) {
+	gdouble v1 = f1[i][j] - iso;
+	gdouble v2 = f2[i][j] - iso;
+	if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) {
+	  gdouble c2 = v1/(v1 - v2), c1 = 1. - c2;
+	  vertices[0][i][j].v = 
+	    gts_vertex_new (klass,
+			    c1*p1[i][j].x + c2*p2[i][j].x,
+			    c1*p1[i][j].y + c2*p2[i][j].y,
+			    c1*p1[i][j].z + c2*p2[i][j].z);
+	  vertices[0][i][j].orientation = v2 >= 0. ? RIGHT : LEFT;
+	}
+	else
+	  vertices[0][i][j].v = NULL;
+      }
+  for (i = 0; i < nx - 1; i++)
+    for (j = 0; j < ny; j++) {
+      gdouble v1 = f1[i][j] - iso;
+      gdouble v2 = f1[i+1][j] - iso;
+      if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) {
+	gdouble c2 = v1/(v1 - v2), c1 = 1. - c2;
+	vertices[1][i][j].v = 
+	  gts_vertex_new (klass,
+			  c1*p1[i][j].x + c2*p1[i+1][j].x,
+			  c1*p1[i][j].y + c2*p1[i+1][j].y,
+			  c1*p1[i][j].z + c2*p1[i+1][j].z);
+	vertices[1][i][j].orientation = v2 >= 0. ? RIGHT : LEFT;
+      }
+      else
+	vertices[1][i][j].v = NULL;
+    }
+  for (i = 0; i < nx; i++)
+    for (j = 0; j < ny - 1; j++) {
+      gdouble v1 = f1[i][j] - iso;
+      gdouble v2 = f1[i][j+1] - iso;
+      if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) {
+	gdouble c2 = v1/(v1 - v2), c1 = 1. - c2;
+	vertices[2][i][j].v = 
+	  gts_vertex_new (klass,
+			  c1*p1[i][j].x + c2*p1[i][j+1].x,
+			  c1*p1[i][j].y + c2*p1[i][j+1].y,
+			  c1*p1[i][j].z + c2*p1[i][j+1].z);
+	vertices[2][i][j].orientation = v2 >= 0. ? RIGHT : LEFT;
+      }
+      else
+	vertices[2][i][j].v = NULL;
+    }
+}
+ 
+/**
+ * gts_iso_slice_fill_cartesian:
+ * @slice: a #GtsIsoSlice.
+ * @g: a #GtsCartesianGrid.
+ * @f1: values of the function for plane z = @g.z.
+ * @f2: values of the function for plane z = @g.z + @g.dz.
+ * @iso: isosurface value.
+ * @klass: a #GtsVertexClass.
+ *
+ * Fill @slice with the coordinates of the vertices defined by 
+ * f1 (x,y,z) = @iso and f2 (x, y, z) = @iso.
+ */
+void gts_iso_slice_fill_cartesian (GtsIsoSlice * slice,
+				   GtsCartesianGrid g,
+				   gdouble ** f1,
+				   gdouble ** f2,
+				   gdouble iso,
+				   GtsVertexClass * klass)
+{
+  OrientedVertex *** vertices;
+  guint i, j;
+  gdouble x, y;
+
+  g_return_if_fail (slice != NULL);
+  g_return_if_fail (f1 != NULL);
+
+  vertices = slice->vertices;
+
+  if (f2)
+    for (i = 0, x = g.x; i < g.nx; i++, x += g.dx)
+      for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) {
+	gdouble v1 = f1[i][j] - iso;
+	gdouble v2 = f2[i][j] - iso;
+	if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) {
+	  vertices[0][i][j].v = 
+	    gts_vertex_new (klass,
+			    x, y, g.z + g.dz*v1/(v1 - v2));
+	  vertices[0][i][j].orientation = v2 >= 0. ? RIGHT : LEFT;
+	}
+	else
+	  vertices[0][i][j].v = NULL;
+      }
+  for (i = 0, x = g.x; i < g.nx - 1; i++, x += g.dx)
+    for (j = 0, y = g.y; j < g.ny; j++, y += g.dy) {
+      gdouble v1 = f1[i][j] - iso;
+      gdouble v2 = f1[i+1][j] - iso;
+      if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) {
+	vertices[1][i][j].v = 
+	  gts_vertex_new (klass, x + g.dx*v1/(v1 - v2), y, g.z);
+	vertices[1][i][j].orientation = v2 >= 0. ? RIGHT : LEFT;
+      }
+      else
+	vertices[1][i][j].v = NULL;
+    }
+  for (i = 0, x = g.x; i < g.nx; i++, x += g.dx)
+    for (j = 0, y = g.y; j < g.ny - 1; j++, y += g.dy) {
+      gdouble v1 = f1[i][j] - iso;
+      gdouble v2 = f1[i][j+1] - iso;
+      if ((v1 >= 0. && v2 < 0.) || (v1 < 0. && v2 >= 0.)) {
+	vertices[2][i][j].v = 
+	  gts_vertex_new (klass, x, y + g.dy*v1/(v1 - v2), g.z);
+	vertices[2][i][j].orientation = v2 >= 0. ? RIGHT : LEFT;
+      }
+      else
+	vertices[2][i][j].v = NULL;
+    }
+}
+
+/**
+ * gts_iso_slice_destroy:
+ * @slice: a #GtsIsoSlice.
+ *
+ * Free all memory allocated for @slice.
+ */
+void gts_iso_slice_destroy (GtsIsoSlice * slice)
+{
+  g_return_if_fail (slice != NULL);
+
+  free2D ((void **) slice->vertices[0], slice->nx);
+  free2D ((void **) slice->vertices[1], slice->nx - 1);
+  free2D ((void **) slice->vertices[2], slice->nx);  
+  g_free (slice->vertices);
+  g_free (slice);
+}
+
+/**
+ * gts_isosurface_slice:
+ * @slice1: a #GtsIsoSlice.
+ * @slice2: another #GtsIsoSlice.
+ * @surface: a #GtsSurface.
+ *
+ * Given two successive slices @slice1 and @slice2 link their vertices with
+ * segments and triangles which are added to @surface.
+ */
+void gts_isosurface_slice (GtsIsoSlice * slice1,
+			   GtsIsoSlice * slice2,
+			   GtsSurface * surface)
+{
+  guint j, k, l, nx, ny;
+  OrientedVertex *** vertices[2];
+  GtsVertex * va[12];
+
+  g_return_if_fail (slice1 != NULL);
+  g_return_if_fail (slice2 != NULL);
+  g_return_if_fail (surface != NULL);
+  g_return_if_fail (slice1->nx == slice2->nx && slice1->ny == slice2->ny);
+
+  vertices[0] = slice1->vertices;
+  vertices[1] = slice2->vertices;
+  nx = slice1->nx;
+  ny = slice1->ny;
+
+  /* link vertices with segments and triangles */
+  for (j = 0; j < nx - 1; j++)
+    for (k = 0; k < ny - 1; k++) {
+      gboolean cube_is_cut = FALSE;
+      for (l = 0; l < 12; l++) {
+	guint nv = 0, e = l;
+	OrientedVertex ov = 
+	  vertices[c[e][1]][c[e][0]][j + c[e][2]][k + c[e][3]];
+	while (ov.v && !GTS_OBJECT (ov.v)->reserved) {
+	  guint m = 0, * ne = edge[e][ov.orientation];
+	  va[nv++] = ov.v;
+	  GTS_OBJECT (ov.v)->reserved = surface;
+	  ov.v = NULL;
+	  while (m < 3 && !ov.v) {
+	    e = ne[m++];
+	    ov = vertices[c[e][1]][c[e][0]][j + c[e][2]][k + c[e][3]];
+	  }
+	}
+	/* create edges and faces */
+	if (nv > 2) {
+	  GtsEdge * e1, * e2, * e3;
+	  guint m;
+	  if (!(e1 = GTS_EDGE (gts_vertices_are_connected (va[0], va[1]))))
+	    e1 = gts_edge_new (surface->edge_class, va[0], va[1]);
+	  for (m = 1; m < nv - 1; m++) {
+	    if (!(e2 = GTS_EDGE (gts_vertices_are_connected (va[m], va[m+1]))))
+	      e2 = gts_edge_new (surface->edge_class, va[m], va[m+1]);
+	    if (!(e3 = GTS_EDGE (gts_vertices_are_connected (va[m+1], va[0]))))
+	      e3 = gts_edge_new (surface->edge_class, va[m+1], va[0]);
+	    gts_surface_add_face (surface, 
+				  gts_face_new (surface->face_class,
+						e1, e2, e3));
+	    e1 = e3;
+	  }
+	}
+	if (nv > 0)
+	  cube_is_cut = TRUE;
+      }
+      if (cube_is_cut)
+	for (l = 0; l < 12; l++) {
+	  GtsVertex * v = 
+	    vertices[c[l][1]][c[l][0]][j + c[l][2]][k + c[l][3]].v;
+	  if (v)
+	    GTS_OBJECT (v)->reserved = NULL;
+	}
+    }
+}
+
+#define SWAP(s1, s2, tmp) (tmp = s1, s1 = s2, s2 = tmp)
+
+/**
+ * gts_isosurface_cartesian:
+ * @surface: a #GtsSurface.
+ * @g: a #GtsCartesianGrid.
+ * @f: a #GtsIsoCartesianFunc.
+ * @data: user data to be passed to @f.
+ * @iso: isosurface value.
+ *
+ * Adds to @surface new faces defining the isosurface f(x,y,z) = @iso. By
+ * convention, the normals to the surface are pointing toward the positive
+ * values of f(x,y,z) - @iso.
+ *
+ * The user function @f is called successively for each value of the z 
+ * coordinate defined by @g. It must fill the corresponding (x,y) plane with
+ * the values of the function for which the isosurface is to be computed.
+ */
+void gts_isosurface_cartesian (GtsSurface * surface,
+			       GtsCartesianGrid g,
+			       GtsIsoCartesianFunc f,
+			       gpointer data,
+			       gdouble iso)
+{
+  void * tmp;
+  gdouble ** f1, ** f2;
+  GtsIsoSlice * slice1, * slice2;
+  guint i;
+
+  g_return_if_fail (surface != NULL);
+  g_return_if_fail (f != NULL);
+  g_return_if_fail (g.nx > 1);
+  g_return_if_fail (g.ny > 1);
+  g_return_if_fail (g.nz > 1);
+
+  slice1 = gts_iso_slice_new (g.nx, g.ny);
+  slice2 = gts_iso_slice_new (g.nx, g.ny);
+  f1 = (gdouble **) malloc2D (g.nx, g.ny, sizeof (gdouble));
+  f2 = (gdouble **) malloc2D (g.nx, g.ny, sizeof (gdouble));
+
+  (*f) (f1, g, 0, data);
+  g.z += g.dz;
+  (*f) (f2, g, 1, data);
+  g.z -= g.dz;
+  gts_iso_slice_fill_cartesian (slice1, g, f1, f2, iso, 
+				surface->vertex_class);
+  g.z += g.dz;
+  for (i = 2; i < g.nz; i++) {
+    g.z += g.dz;
+    (*f) (f1, g, i, data);
+    SWAP (f1, f2, tmp);
+    g.z -= g.dz;
+    gts_iso_slice_fill_cartesian (slice2, g, f1, f2, iso, 
+				  surface->vertex_class);
+    g.z += g.dz;
+    gts_isosurface_slice (slice1, slice2, surface);
+    SWAP (slice1, slice2, tmp);
+  }
+  gts_iso_slice_fill_cartesian (slice2, g, f2, NULL, iso,
+				surface->vertex_class);
+  gts_isosurface_slice (slice1, slice2, surface);
+
+  gts_iso_slice_destroy (slice1);
+  gts_iso_slice_destroy (slice2);
+  free2D ((void **) f1, g.nx);
+  free2D ((void **) f2, g.nx);
+}
diff --git a/src/kdtree.c b/src/kdtree.c
new file mode 100644
index 0000000..ec5d422
--- /dev/null
+++ b/src/kdtree.c
@@ -0,0 +1,152 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "gts.h"
+
+
+static int compare_x (const void * p1, const void * p2) {
+  GtsPoint 
+    * pp1 = *((gpointer *) p1),
+    * pp2 = *((gpointer *) p2);
+  if (pp1->x > pp2->x)
+    return 1;
+  return -1;
+}
+
+static int compare_y (const void * p1, const void * p2) {
+  GtsPoint
+    * pp1 = *((gpointer *) p1),
+    * pp2 = *((gpointer *) p2);
+  if (pp1->y > pp2->y)
+    return 1;
+  return -1;
+}
+
+static int compare_z (const void * p1, const void * p2) {
+  GtsPoint 
+    * pp1 = *((gpointer *) p1),
+    * pp2 = *((gpointer *) p2);
+  if (pp1->z > pp2->z)
+    return 1;
+  return -1;
+}
+
+/**
+ * gts_kdtree_new:
+ * @points: an array of #GtsPoint.
+ * @compare: always %NULL.
+ *
+ * Note that the order of the points in array @points is modified by this
+ * function.
+ * 
+ * Returns: a new 3D tree for @points.
+ */
+GNode * gts_kdtree_new (GPtrArray * points, 
+			int (*compare) (const void *, const void *))
+{
+  guint middle;
+  GPtrArray array;
+  GNode * node;
+  GtsPoint * point;
+
+  g_return_val_if_fail (points != NULL, NULL);
+  g_return_val_if_fail (points->len > 0, NULL);
+
+  /* sort the points */
+  if (compare == compare_x) compare = compare_y;
+  else if (compare == compare_y) compare = compare_z;
+  else compare = compare_x;
+  qsort (points->pdata, points->len, sizeof (gpointer), compare);
+
+  middle = (points->len - 1)/2;
+  point = points->pdata[middle];
+  node = g_node_new (point);
+
+  if (points->len > 1) {
+    array.len = middle;
+    if (array.len > 0) {
+      array.pdata = points->pdata;
+      g_node_prepend (node, gts_kdtree_new (&array, compare));
+    }
+    else
+      g_node_prepend (node, g_node_new (NULL));
+    
+    array.len = points->len - middle - 1;
+    if (array.len > 0) {
+      array.pdata = &(points->pdata[middle + 1]);
+      g_node_prepend (node, gts_kdtree_new (&array, compare));
+    }
+    else
+      g_node_prepend (node, g_node_new (NULL));
+  }
+
+  return node;
+}
+
+/**
+ * gts_kdtree_range:
+ * @tree: a 3D tree.
+ * @bbox: a #GtsBBox.
+ * @compare: always %NULL.
+ *
+ * Returns: a list of #GtsPoint belonging to @tree which are inside @bbox.
+ */
+GSList * gts_kdtree_range (GNode * tree_3d,
+			   GtsBBox * bbox,
+			   int (*compare) (const void *, const void *))
+{
+  GSList * list = NULL;
+  GtsPoint * p;
+  gdouble left, right, v;
+  GNode * node;
+
+  g_return_val_if_fail (tree_3d != NULL, NULL);
+  g_return_val_if_fail (bbox != NULL, NULL);
+
+  p = tree_3d->data;
+  if (p == NULL)
+    return NULL;
+
+  if (gts_bbox_point_is_inside (bbox, p))
+    list = g_slist_prepend (list, p);
+
+  if (compare == compare_x) {
+    left = bbox->y1; right = bbox->y2; v = p->y;
+    compare = compare_y;
+  }
+  else if (compare == compare_y) {
+    left = bbox->z1; right = bbox->z2; v = p->z;
+    compare = compare_z;
+  }
+  else {
+    left = bbox->x1; right = bbox->x2; v = p->x;
+    compare = compare_x;
+  }
+
+  if ((node = tree_3d->children)) {
+    if (right >= v)
+      list = g_slist_concat (list, gts_kdtree_range (node, bbox, compare));
+    node = node->next;
+    if (left <= v)
+      list = g_slist_concat (list, gts_kdtree_range (node, bbox, compare));
+  }
+  return list;
+}
+
diff --git a/src/makefile.msc b/src/makefile.msc
new file mode 100644
index 0000000..7a0def3
--- /dev/null
+++ b/src/makefile.msc
@@ -0,0 +1,94 @@
+## Makefile for building the gts dlls with Microsoft C
+## Modified by M J Loehr from GLIB makefile.msc
+## Use: nmake -f makefile.msc install
+
+# Change this to wherever you want to install the DLLs. This directory
+# should be in your PATH.
+BIN = C:\bin
+
+################################################################
+
+# Nothing much configurable below
+
+# No general LDFLAGS needed
+LDFLAGS = /link
+INSTALL = copy
+CP = copy
+RM = del
+CC = cl
+
+GTS_VER = 0.5
+
+CFLAGS = -I. -DHAVE_CONFIG_H -G5 -GF -Ox -W3 -MD -nologo
+
+all : \
+	config.h \
+	gts-$(GTS_VER).dll
+
+install : all
+	$(INSTALL) gts-$(GTS_VER).dll $(BIN)
+
+gts_OBJECTS = \
+	object.obj \
+	point.obj \
+	vertex.obj \
+	segment.obj \
+	edge.obj \
+	triangle.obj \
+	face.obj \
+	kdtree.obj \
+	bbtree.obj \
+	misc.obj \
+	predicates.obj \
+	heap.obj \
+	eheap.obj \
+	matrix.obj \
+	surface.obj \
+	stripe.obj \
+	vopt.obj \
+	iso.obj \
+	split.obj \
+	psurface.obj \
+	hsurface.obj \
+	cdt.obj \
+	boolean.obj \
+	named.obj \
+	oocs.obj \
+	container.obj \
+	graph.obj \
+	pgraph.obj \
+	partition.obj \
+	fifo.obj \
+	refine.obj
+
+gts-$(GTS_VER).dll : $(gts_OBJECTS) gts.def
+	$(CC) $(CFLAGS) -LD -Fegts-$(GTS_VER).dll $(gts_OBJECTS) glib-1.2.lib user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:gts.def
+
+config.h: config.h.win32
+	$(CP) config.h.win32 config.h
+
+predicates.obj: predicates.c predicates_init.h predicates.h
+	$(CC) $(CFLAGS) -GD -c -DGTS_COMPILATION -DG_LOG_DOMAIN=\"Gts\" predicates.c
+
+predicates_init.h: predicates_init
+	predicates_init > predicates_init.h
+
+predicates_init: predicates_init.c
+	$(CC) $(CFLAGS) predicates_init.c -o predicates_init
+
+.c.obj:
+	$(CC) $(CFLAGS) -GD -c -DGTS_COMPILATION -DG_LOG_DOMAIN=\"Gts\" $<
+
+clean:
+	$(RM) config.h
+	$(RM) *.obj
+	$(RM) *.dll
+	$(RM) *.lib
+	$(RM) *.err
+	$(RM) *.map
+	$(RM) *.sym
+	$(RM) *.exp
+	$(RM) *.lk1
+	$(RM) *.mk1
+	$(RM) *.pdb
+	$(RM) *.ilk
diff --git a/src/matrix.c b/src/matrix.c
new file mode 100644
index 0000000..f73ea16
--- /dev/null
+++ b/src/matrix.c
@@ -0,0 +1,405 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include "gts.h"
+
+/**
+ * gts_matrix_new:
+ * @a00: element [0][0].
+ * @a01: element [0][1].
+ * @a02: element [0][2].
+ * @a10: element [1][0].
+ * @a11: element [1][1].
+ * @a12: element [1][2].
+ * @a20: element [2][0].
+ * @a21: element [2][1].
+ * @a22: element [2][2].
+ *
+ * Allocates memory and initializes a new #GtsMatrix.
+ *
+ * Returns: a pointer to the newly created #GtsMatrix.
+ */
+GtsMatrix * gts_matrix_new (gdouble a00, gdouble a01, gdouble a02,
+			    gdouble a10, gdouble a11, gdouble a12,
+			    gdouble a20, gdouble a21, gdouble a22)
+{
+  GtsMatrix * m;
+
+  m = g_malloc (3*sizeof (GtsVector));
+
+  m[0][0] = a00; m[1][0] = a10; m[2][0] = a20;
+  m[0][1] = a01; m[1][1] = a11; m[2][1] = a21;
+  m[0][2] = a02; m[1][2] = a12; m[2][2] = a22;
+
+  return m;
+}
+
+/**
+ * gts_matrix_assign:
+ * @m: a #GtsMatrix.
+ * @a00: element [0][0].
+ * @a01: element [0][1].
+ * @a02: element [0][2].
+ * @a10: element [1][0].
+ * @a11: element [1][1].
+ * @a12: element [1][2].
+ * @a20: element [2][0].
+ * @a21: element [2][1].
+ * @a22: element [2][2].
+ *
+ * Set values of matrix elements.
+ */
+void gts_matrix_assign (GtsMatrix * m,
+			gdouble a00, gdouble a01, gdouble a02,
+			gdouble a10, gdouble a11, gdouble a12,
+			gdouble a20, gdouble a21, gdouble a22)
+{
+  g_return_if_fail (m != NULL);
+
+  m[0][0] = a00; m[1][0] = a10; m[2][0] = a20;
+  m[0][1] = a01; m[1][1] = a11; m[2][1] = a21;
+  m[0][2] = a02; m[1][2] = a12; m[2][2] = a22;
+}
+
+/**
+ * gts_matrix_projection:
+ * @t: a #GtsTriangle.
+ *
+ * Creates a new #GtsMatrix representing the projection onto a plane of normal
+ * given by @t.
+ *
+ * Returns: a pointer to the newly created #GtsMatrix.
+ */
+GtsMatrix * gts_matrix_projection (GtsTriangle * t)
+{
+  GtsVertex * v1, * v2, * v3;
+  GtsEdge * e1, * e2, * e3;
+  GtsMatrix * m;
+  gdouble x1, y1, z1, x2, y2, z2, x3, y3, z3, l;
+  
+  g_return_val_if_fail (t != NULL, NULL);
+
+  m = g_malloc (3*sizeof (GtsVector));
+  gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3);
+
+  x1 = GTS_POINT (v2)->x - GTS_POINT (v1)->x; 
+  y1 = GTS_POINT (v2)->y - GTS_POINT (v1)->y; 
+  z1 = GTS_POINT (v2)->z - GTS_POINT (v1)->z;
+  x2 = GTS_POINT (v3)->x - GTS_POINT (v1)->x; 
+  y2 = GTS_POINT (v3)->y - GTS_POINT (v1)->y; 
+  z2 = GTS_POINT (v3)->z - GTS_POINT (v1)->z;
+  x3 = y1*z2 - z1*y2; y3 = z1*x2 - x1*z2; z3 = x1*y2 - y1*x2;
+  x2 = y3*z1 - z3*y1; y2 = z3*x1 - x3*z1; z2 = x3*y1 - y3*x1;
+
+  g_assert ((l = sqrt (x1*x1 + y1*y1 + z1*z1)) > 0.0);
+  m[0][0] = x1/l; m[1][0] = y1/l; m[2][0] = z1/l;
+  g_assert ((l = sqrt (x2*x2 + y2*y2 + z2*z2)) > 0.0);
+  m[0][1] = x2/l; m[1][1] = y2/l; m[2][1] = z2/l;
+  g_assert ((l = sqrt (x3*x3 + y3*y3 + z3*z3)) > 0.0);
+  m[0][2] = x3/l; m[1][2] = y3/l; m[2][2] = z3/l;
+  return m;
+}
+
+/**
+ * gts_matrix_transpose:
+ * @m: a #GtsMatrix.
+ *
+ * Returns: a pointer to a newly created #GtsMatrix transposed of @m.
+ */
+GtsMatrix * gts_matrix_transpose (GtsMatrix * m)
+{
+  GtsMatrix * mi;
+
+  g_return_val_if_fail (m != NULL, NULL);
+
+  mi = g_malloc (3*sizeof (GtsVector));
+
+  mi[0][0] = m[0][0]; mi[1][0] = m[0][1]; mi[2][0] = m[0][2]; 
+  mi[0][1] = m[1][0]; mi[1][1] = m[1][1]; mi[2][1] = m[1][2]; 
+  mi[0][2] = m[2][0]; mi[1][2] = m[2][1]; mi[2][2] = m[2][2]; 
+
+  return mi;
+}
+
+/**
+ * gts_matrix_determinant:
+ * @m: a #GtsMatrix.
+ *
+ * Returns: the value of the det(@m).
+ */
+gdouble gts_matrix_determinant (GtsMatrix * m)
+{
+  g_return_val_if_fail (m != NULL, 0.0);
+
+  return (m[0][0]*(m[1][1]*m[2][2] - m[2][1]*m[1][2]) - 
+	  m[0][1]*(m[1][0]*m[2][2] - m[2][0]*m[1][2]) + 
+	  m[0][2]*(m[1][0]*m[2][1] - m[2][0]*m[1][1]));
+}
+
+/**
+ * gts_matrix_inverse:
+ * @m: a #GtsMatrix.
+ *
+ * Returns: a pointer to a newly created #GtsMatrix inverse of @m or %NULL
+ * if @m is not invertible.
+ */
+GtsMatrix * gts_matrix_inverse (GtsMatrix * m)
+{
+  GtsMatrix * mi;
+  gdouble det;
+
+  g_return_val_if_fail (m != NULL, NULL);
+  
+  det = gts_matrix_determinant (m);
+  if (det == 0.0)
+    return NULL;
+
+  mi = g_malloc (3*sizeof (GtsVector));
+
+  mi[0][0] = (m[1][1]*m[2][2] - m[1][2]*m[2][1])/det; 
+  mi[0][1] = (m[2][1]*m[0][2] - m[0][1]*m[2][2])/det;
+  mi[0][2] = (m[0][1]*m[1][2] - m[1][1]*m[0][2])/det; 
+  mi[1][0] = (m[1][2]*m[2][0] - m[1][0]*m[2][2])/det; 
+  mi[1][1] = (m[0][0]*m[2][2] - m[2][0]*m[0][2])/det; 
+  mi[1][2] = (m[1][0]*m[0][2] - m[0][0]*m[1][2])/det; 
+  mi[2][0] = (m[1][0]*m[2][1] - m[2][0]*m[1][1])/det; 
+  mi[2][1] = (m[2][0]*m[0][1] - m[0][0]*m[2][1])/det; 
+  mi[2][2] = (m[0][0]*m[1][1] - m[0][1]*m[1][0])/det; 
+
+  return mi;
+}
+
+/**
+ * gts_matrix_print:
+ * @m: a #GtsMatrix.
+ * @fptr: a file descriptor.
+ * 
+ * Print @m to file @fptr.
+ */
+void gts_matrix_print (GtsMatrix * m, FILE * fptr)
+{
+  g_return_if_fail (m != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  fprintf (fptr, 
+	   "[[%15.7g %15.7g %15.7g ]\n"
+	   " [%15.7g %15.7g %15.7g ]\n"
+	   " [%15.7g %15.7g %15.7g ]]\n",
+	   m[0][0], m[0][1], m[0][2],
+	   m[1][0], m[1][1], m[1][2],
+	   m[2][0], m[2][1], m[2][2]);
+}
+
+/**
+ * gts_vector_print:
+ * @v: a #GtsVector.
+ * @fptr: a file descriptor.
+ * 
+ * Print @s to file @fptr.
+ */
+void gts_vector_print (GtsVector v, FILE * fptr)
+{
+  g_return_if_fail (fptr != NULL);
+
+  fprintf (fptr, 
+	   "[%15.7g %15.7g %15.7g ]\n",
+	   v[0], v[1], v[2]);
+}
+
+/* [cos(alpha)]^2 */
+#define COSALPHA2 0.999695413509 /* alpha = 1 degree */
+/* [sin(alpha)]^2 */
+#define SINALPHA2 3.04586490453e-4 /* alpha = 1 degree */
+
+/**
+ * gts_matrix_compatible_row:
+ * @A: a #GtsMatrix.
+ * @b: a #GtsVector.
+ * @n: the number of previous constraints of @A.x=@b.
+ * @A1: a #GtsMatrix.
+ * @b1: a #GtsVector.
+ *
+ * Given a system of @n constraints @A.x=@b adds to it the compatible
+ * constraints defined by @A1.x=@b1. The compatibility is determined
+ * by insuring that the resulting system is well-conditioned (see
+ * Lindstrom and Turk (1998, 1999)).
+ *
+ * Returns: the number of constraints of the resulting system.  
+ */
+guint gts_matrix_compatible_row (GtsMatrix * A,
+				 GtsVector b,
+				 guint n,
+				 GtsVector A1,
+				 gdouble b1)
+{
+  gdouble na1;
+  
+  g_return_val_if_fail (A != NULL, 0);
+
+  na1 = gts_vector_scalar (A1, A1);
+  if (na1 == 0.0)
+    return n;
+
+  /* normalize row */
+  na1 = sqrt (na1);
+  A1[0] /= na1; A1[1] /= na1; A1[2] /= na1; b1 /= na1;
+
+  if (n == 1) {
+    gdouble a0a1 = gts_vector_scalar (A[0], A1);
+    if (a0a1*a0a1 >= COSALPHA2)
+      return 1;
+  }
+  else if (n == 2) {
+    GtsVector V;
+    gdouble s;
+    
+    gts_vector_cross (V, A[0], A[1]);
+    s = gts_vector_scalar (V, A1);
+    if (s*s <= gts_vector_scalar (V, V)*SINALPHA2)
+      return 2;
+  }
+
+  A[n][0] = A1[0]; A[n][1] = A1[1]; A[n][2] = A1[2]; b[n] = b1;
+  return n + 1;
+}
+
+/**
+ * gts_matrix_quadratic_optimization:
+ * @A: a #GtsMatrix.
+ * @b: a #GtsVector.
+ * @n: the number of constraints (must be smaller than 3).
+ * @H: a symmetric positive definite Hessian.
+ * @c: a #GtsVector.
+ *
+ * Solve a quadratic optimization problem: Given a quadratic objective function
+ * f which can be written as: f(x) = x^t. at H.x + @c^t.x + k, where @H is the 
+ * symmetric positive definite Hessian of f and k is a constant, find the
+ * minimum of f subject to the set of @n prior linear constraints, defined by
+ * the first @n rows of @A and @b (@A.x = @b). The new constraints given by
+ * the minimization are added to @A and @b only if they are linearly
+ * independent as determined by gts_matrix_compatible_row().
+ *
+ * Returns: the new number of constraints defined by @A and @b.
+ */
+guint gts_matrix_quadratic_optimization (GtsMatrix * A,
+					 GtsVector b,
+					 guint n,
+					 GtsMatrix * H,
+					 GtsVector c)
+{
+  g_return_val_if_fail (A != NULL, 0);
+  g_return_val_if_fail (b != NULL, 0);
+  g_return_val_if_fail (n < 3, 0);
+  g_return_val_if_fail (H != NULL, 0);
+
+  switch (n) {
+  case 0: {
+    n = gts_matrix_compatible_row (A, b, n, H[0], - c[0]);
+    n = gts_matrix_compatible_row (A, b, n, H[1], - c[1]);
+    n = gts_matrix_compatible_row (A, b, n, H[2], - c[2]);
+    return n;
+  }
+  case 1: {
+    GtsVector Q0 = {0., 0., 0.};
+    GtsVector Q1 = {0., 0., 0.};
+    GtsVector A1;
+    gdouble max = A[0][0]*A[0][0];
+    guint d = 0;
+
+    /* build a vector orthogonal to the constraint */
+    if (A[0][1]*A[0][1] > max) { max = A[0][1]*A[0][1]; d = 1; }
+    if (A[0][2]*A[0][2] > max) { max = A[0][2]*A[0][2]; d = 2; }
+    switch (d) {
+    case 0: Q0[0] = - A[0][2]/A[0][0]; Q0[2] = 1.0; break;
+    case 1: Q0[1] = - A[0][2]/A[0][1]; Q0[2] = 1.0; break;
+    case 2: Q0[2] = - A[0][0]/A[0][2]; Q0[0] = 1.0; break;
+    }
+
+    /* build a second vector orthogonal to the first and to the constraint */
+    gts_vector_cross (Q1, A[0], Q0);
+
+    A1[0] = gts_vector_scalar (Q0, H[0]);
+    A1[1] = gts_vector_scalar (Q0, H[1]);
+    A1[2] = gts_vector_scalar (Q0, H[2]);
+
+    n = gts_matrix_compatible_row (A, b, n, A1, - gts_vector_scalar (Q0, c));
+    
+    A1[0] = gts_vector_scalar (Q1, H[0]);
+    A1[1] = gts_vector_scalar (Q1, H[1]);
+    A1[2] = gts_vector_scalar (Q1, H[2]);
+
+    n = gts_matrix_compatible_row (A, b, n, A1, - gts_vector_scalar (Q1, c));
+
+    return n;
+  }
+  case 2: {
+    /* build a vector orthogonal to the two constraints */
+    GtsVector A1, Q;
+
+    gts_vector_cross (Q, A[0], A[1]);
+    A1[0] = gts_vector_scalar (Q, H[0]);
+    A1[1] = gts_vector_scalar (Q, H[1]);
+    A1[2] = gts_vector_scalar (Q, H[2]);
+    
+    n = gts_matrix_compatible_row (A, b, n, A1, - gts_vector_scalar (Q, c));
+
+    return n;
+  }
+  default:
+    g_assert_not_reached ();
+  }
+  return 0;
+}
+
+/**
+ * gts_matrix_destroy:
+ * @m: a #GtsMatrix.
+ *
+ * Free all the memory allocated for @m.
+ */
+void gts_matrix_destroy (GtsMatrix * m)
+{
+  g_free (m);
+}
+
+/**
+ * gts_matrix_product:
+ * @m1: a #GtsMatrix.
+ * @m2: another #GtsMatrix.
+ *
+ * Returns: a new #GtsMatrix, product of @m1 and @m2.
+ */
+GtsMatrix * gts_matrix_product (GtsMatrix * m1, GtsMatrix * m2)
+{
+  guint i, j;
+  GtsMatrix * m;
+
+  g_return_val_if_fail (m1 != NULL, NULL);
+  g_return_val_if_fail (m2 != NULL, NULL);
+  g_return_val_if_fail (m1 != m2, NULL);
+
+  m = gts_matrix_new (0., 0., 0.,
+		      0., 0., 0.,
+		      0., 0., 0.);
+  for (i = 0; i < 3; i++)
+    for (j = 0; j < 3; j++)
+      m[i][j] = m1[i][0]*m2[0][j] + m1[i][1]*m2[1][j] + m1[i][2]*m2[2][j];
+  return m;
+}
diff --git a/src/misc.c b/src/misc.c
new file mode 100644
index 0000000..484144c
--- /dev/null
+++ b/src/misc.c
@@ -0,0 +1,171 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+#include "gts-private.h"
+#include "config.h"
+
+const guint gts_major_version = GTS_MAJOR_VERSION;
+const guint gts_minor_version = GTS_MINOR_VERSION;
+const guint gts_micro_version = GTS_MICRO_VERSION;
+const guint gts_interface_age = GTS_INTERFACE_AGE;
+const guint gts_binary_age = GTS_BINARY_AGE;
+
+static gboolean char_in_string (char c, const char * s)
+{
+  while (*s != '\0')
+    if (*(s++) == c)
+      return TRUE;
+  return FALSE;
+}
+
+/**
+ * gts_get_token:
+ * @fptr: a file pointer.
+ * @buf: a buffer in which to return the result.
+ * @delimiters: a string of characters used to delimit the fields.
+ * @comments: a string of characters defining the start of a comment.
+ *
+ * Reads characters from @fptr and fills @buf with a string delimited
+ * by characters in @delimiters. Comments starts with a character in
+ * @comments and ends with a newline character ('\n').
+ *
+ * Returns: the last character read from @fptr.
+ */
+gint gts_get_token (FILE * fptr, GString * buf, 
+		    const char * delimiters,
+		    const char * comments)
+{
+  gint c;
+  gboolean in_string = FALSE;
+
+  g_return_val_if_fail (fptr != NULL, EOF);
+  g_return_val_if_fail (buf != NULL, EOF);
+  g_return_val_if_fail (delimiters != NULL, EOF);
+  g_return_val_if_fail (comments != NULL, EOF);
+
+  buf->str[0] = '\0';
+  buf->len = 0;
+  c = fgetc (fptr);
+  while (c != EOF && (!in_string || !char_in_string (c, delimiters))) {
+    if (char_in_string (c, comments))
+      gts_get_newline (fptr);
+    else if (in_string)
+      g_string_append_c (buf, c);
+    else if (!char_in_string (c, delimiters)) {
+      in_string = TRUE;
+      g_string_append_c (buf, c);
+    }
+    c = fgetc (fptr);
+  }
+  return c;
+}
+
+/**
+ * gts_get_newline:
+ * @fptr: a file pointer.
+ *
+ * Reads characters from @fptr until a '\n' character is met.
+ */
+void gts_get_newline (FILE * fptr)
+{
+  gint c;
+
+  g_return_if_fail (fptr != NULL);
+  
+  c = fgetc (fptr);
+  while (c != EOF && c != '\n')
+    c = fgetc (fptr);
+}
+
+#ifdef DEBUG_FUNCTIONS
+static GHashTable * ids = NULL;
+static guint next_id = 1;
+
+guint id (gpointer p)
+{
+  g_return_val_if_fail (p != NULL, 0);
+  g_return_val_if_fail (ids != NULL, 0);
+  g_assert (g_hash_table_lookup (ids, p));
+  return GPOINTER_TO_UINT (g_hash_table_lookup (ids, p));
+}
+
+void id_insert (gpointer p)
+{
+  g_return_if_fail (p != NULL);
+  if (ids == NULL) ids = g_hash_table_new (NULL, NULL);
+  g_assert (g_hash_table_lookup (ids, p) == NULL);
+  g_hash_table_insert (ids, p, GUINT_TO_POINTER (next_id++));
+}
+
+void id_remove (gpointer p)
+{
+  g_assert (g_hash_table_lookup (ids, p));  
+  g_hash_table_remove (ids, p);
+}
+
+void gts_write_triangle (GtsTriangle * t, 
+			 GtsPoint * o,
+			 FILE * fptr)
+{
+  gdouble xo = o ? o->x : 0.0;
+  gdouble yo = o ? o->y : 0.0;
+  gdouble zo = o ? o->z : 0.0;
+
+  g_return_if_fail (t != NULL && fptr != NULL);
+
+  fprintf (fptr, "(hdefine geometry \"t%d\" { =\n", id (t));
+  fprintf (fptr, "OFF 3 1 0\n"
+	   "%g %g %g\n%g %g %g\n%g %g %g\n3 0 1 2\n})\n"
+	   "(geometry \"t%d\" { : \"t%d\"})\n"
+	   "(normalization \"t%d\" none)\n",
+	   GTS_POINT (GTS_SEGMENT (t->e1)->v1)->x - xo, 
+	   GTS_POINT (GTS_SEGMENT (t->e1)->v1)->y - yo,
+	   GTS_POINT (GTS_SEGMENT (t->e1)->v1)->z - zo,
+	   GTS_POINT (GTS_SEGMENT (t->e1)->v2)->x - xo, 
+	   GTS_POINT (GTS_SEGMENT (t->e1)->v2)->y - yo, 
+	   GTS_POINT (GTS_SEGMENT (t->e1)->v2)->z - zo,
+	   GTS_POINT (gts_triangle_vertex (t))->x - xo,
+	   GTS_POINT (gts_triangle_vertex (t))->y - yo,
+	   GTS_POINT (gts_triangle_vertex (t))->z - zo,
+	   id (t), id (t), id (t));
+}
+
+void gts_write_segment (GtsSegment * s, 
+			GtsPoint * o,
+			FILE * fptr)
+{
+  gdouble xo = o ? o->x : 0.0;
+  gdouble yo = o ? o->y : 0.0;
+  gdouble zo = o ? o->z : 0.0;
+
+  g_return_if_fail (s != NULL && fptr != NULL);
+
+  fprintf (fptr, "(geometry \"s%d\" { =\n", id (s));
+  fprintf (fptr, "VECT 1 2 0 2 0 %g %g %g %g %g %g })\n"
+	   "(normalization \"s%d\" none)\n",
+	   GTS_POINT (s->v1)->x - xo, 
+	   GTS_POINT (s->v1)->y - yo, 
+	   GTS_POINT (s->v1)->z - zo,
+	   GTS_POINT (s->v2)->x - xo, 
+	   GTS_POINT (s->v2)->y - yo, 
+	   GTS_POINT (s->v2)->z - zo,
+	   id (s));
+}
+#endif /* DEBUG_FUNCTIONS */
diff --git a/src/named.c b/src/named.c
new file mode 100644
index 0000000..711cc46
--- /dev/null
+++ b/src/named.c
@@ -0,0 +1,209 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include "gts.h"
+
+static gint nvertex_read (GtsObject ** po, FILE * fptr)
+{
+  GString * buf;
+  gint delim = 0;
+
+  if ((*po)->klass->parent_class->read)
+    delim = (* (*po)->klass->parent_class->read) (po, fptr);
+  if (delim != '\n' && delim != EOF) {
+    buf = g_string_new ("");
+    delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+    if (delim == EOF) {
+      g_string_free (buf, TRUE);
+      return EOF;
+    }
+    strncpy (GTS_NVERTEX (*po)->name, buf->str, GTS_NAME_LENGTH);
+    g_string_free (buf, TRUE);
+  }
+  return delim;
+}
+
+static void nvertex_write (GtsObject * o, FILE * fptr)
+{
+  GtsNVertex * nv = GTS_NVERTEX (o);
+
+  (* o->klass->parent_class->write) (o, fptr);
+  if (nv->name[0] != '\0')
+    fprintf (fptr, " %s", nv->name);
+}
+
+static void nvertex_class_init (GtsNVertexClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->read = nvertex_read;
+  GTS_OBJECT_CLASS (klass)->write = nvertex_write;
+}
+
+static void nvertex_init (GtsNVertex * nvertex)
+{
+  nvertex->name[0] = '\0';
+}
+
+/**
+ * gts_nvertex_class:
+ *
+ * Returns: the #GtsNVertexClass.
+ */
+GtsNVertexClass * gts_nvertex_class (void)
+{
+  static GtsNVertexClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo nvertex_info = {
+      "GtsNVertex",
+      sizeof (GtsNVertex),
+      sizeof (GtsNVertexClass),
+      (GtsObjectClassInitFunc) nvertex_class_init,
+      (GtsObjectInitFunc) nvertex_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_vertex_class ()), 
+				  &nvertex_info);
+  }
+
+  return klass;
+}
+
+static gint nedge_read (GtsObject ** po, FILE * fptr)
+{
+  GString * buf;
+  gint delim;
+
+  buf = g_string_new ("");
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF) {
+    g_string_free (buf, TRUE);
+    return EOF;
+  }
+  strncpy (GTS_NEDGE (*po)->name, buf->str, GTS_NAME_LENGTH);
+  g_string_free (buf, TRUE);
+  return delim;
+}
+
+static void nedge_write (GtsObject * o, FILE * fptr)
+{
+  GtsNEdge * ne = GTS_NEDGE (o);
+
+  if (ne->name[0] != '\0')
+    fprintf (fptr, " %s", ne->name);
+}
+
+static void nedge_class_init (GtsNEdgeClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->read = nedge_read;
+  GTS_OBJECT_CLASS (klass)->write = nedge_write;
+}
+
+static void nedge_init (GtsNEdge * nedge)
+{
+  nedge->name[0] = '\0';
+}
+
+/**
+ * gts_nedge_class:
+ *
+ * Returns: the #GtsNEdgeClass.
+ */
+GtsNEdgeClass * gts_nedge_class (void)
+{
+  static GtsNEdgeClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo nedge_info = {
+      "GtsNEdge",
+      sizeof (GtsNEdge),
+      sizeof (GtsNEdgeClass),
+      (GtsObjectClassInitFunc) nedge_class_init,
+      (GtsObjectInitFunc) nedge_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_edge_class ()), 
+				  &nedge_info);
+  }
+
+  return klass;
+}
+
+static gint nface_read (GtsObject ** po, FILE * fptr)
+{
+  GString * buf;
+  gint delim;
+
+  buf = g_string_new ("");
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF) {
+    g_string_free (buf, TRUE);
+    return EOF;
+  }
+  strncpy (GTS_NFACE (*po)->name, buf->str, GTS_NAME_LENGTH);
+  g_string_free (buf, TRUE);
+  return delim;
+}
+
+static void nface_write (GtsObject * o, FILE * fptr)
+{
+  GtsNFace * nf = GTS_NFACE (o);
+
+  if (nf->name[0] != '\0')
+    fprintf (fptr, " %s", GTS_NFACE (o)->name);
+}
+
+static void nface_class_init (GtsNFaceClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->read = nface_read;
+  GTS_OBJECT_CLASS (klass)->write = nface_write;
+}
+
+static void nface_init (GtsNFace * nface)
+{
+  nface->name[0] = '\0';
+}
+
+/**
+ * gts_nface_class:
+ *
+ * Returns: the #GtsNFaceClass.
+ */
+GtsNFaceClass * gts_nface_class (void)
+{
+  static GtsNFaceClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo nface_info = {
+      "GtsNFace",
+      sizeof (GtsNFace),
+      sizeof (GtsNFaceClass),
+      (GtsObjectClassInitFunc) nface_class_init,
+      (GtsObjectInitFunc) nface_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_face_class ()), 
+				  &nface_info);
+  }
+
+  return klass;
+}
diff --git a/src/object.c b/src/object.c
new file mode 100644
index 0000000..4622cdc
--- /dev/null
+++ b/src/object.c
@@ -0,0 +1,377 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <string.h>
+#include "gts.h"
+#include "gts-private.h"
+
+static GHashTable * class_table = NULL;
+
+static void gts_object_class_init (GtsObjectClass * klass,
+				   GtsObjectClass * parent_class)
+{
+  if (parent_class) {
+    gts_object_class_init (klass, parent_class->parent_class);
+    if (parent_class->info.class_init_func)
+      (*parent_class->info.class_init_func) (klass);
+  }
+}
+
+/**
+ * gts_object_class_new:
+ * @parent_class: a #GtsObjectClass.
+ * @info: a #GtsObjectClassInfo, description of the new class to create.
+ *
+ * Returns: a new #GtsObjectClass derived from @parent_class and described by
+ * @info.
+ */
+gpointer gts_object_class_new (GtsObjectClass * parent_class,
+			       GtsObjectClassInfo * info)
+{
+  GtsObjectClass * klass;
+
+  g_return_val_if_fail (info != NULL, NULL);
+
+  klass = g_malloc (info->class_size);
+  klass->info = *info;
+  klass->parent_class = parent_class;
+  gts_object_class_init (klass, klass);
+
+  if (!class_table)
+    class_table = g_hash_table_new (g_str_hash, g_str_equal);
+  g_hash_table_insert (class_table, klass->info.name, klass);
+
+  return klass;
+}
+
+/**
+ * gts_object_class_from_name:
+ * @name: the name of a #GtsObjectClass.
+ *
+ * Returns: the #GtsObjectClass with name @name or %NULL if it hasn't been 
+ * instantiated yet.
+ */
+GtsObjectClass * gts_object_class_from_name (gchar * name)
+{
+  g_return_val_if_fail (name != NULL, NULL);
+
+  if (!class_table)
+    return NULL;
+  return g_hash_table_lookup (class_table, name);
+}
+
+static void object_destroy (GtsObject * object)
+{
+#ifdef DEBUG_IDENTITY
+#ifdef DEBUG_LEAKS
+  fprintf (stderr, "destroy %s %p->%d\n", 
+	   object->klass->info.name,
+	   object, 
+	   id (object));
+#endif
+  id_remove (object);
+#endif
+  g_free (object);
+}
+
+static void object_clone (GtsObject * clone, GtsObject * object)
+{
+  memcpy (clone, object, object->klass->info.object_size);
+  clone->reserved = NULL;
+}
+
+static void object_class_init (GtsObjectClass * klass)
+{
+  klass->clone = object_clone;
+  klass->destroy = object_destroy;
+  klass->read = NULL;
+  klass->write = NULL;
+  klass->color = NULL;  
+  klass->attributes = NULL;
+}
+
+static void object_init (GtsObject * object)
+{
+  object->reserved = NULL;
+  object->flags = 0;
+}
+
+/**
+ * gts_object_class:
+ *
+ * Returns: the #GtsObjectClass.
+ */
+GtsObjectClass * gts_object_class (void)
+{
+  static GtsObjectClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo object_info = {
+      "GtsObject",
+      sizeof (GtsObject),
+      sizeof (GtsObjectClass),
+      (GtsObjectClassInitFunc) object_class_init,
+      (GtsObjectInitFunc) object_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (NULL, &object_info);
+  }
+
+  return klass;
+}
+
+#ifndef G_CAN_INLINE
+/**
+ * gts_object_is_from_class:
+ * @object: a #GtsObject.
+ * @klass: a #GtsObjectClass.
+ *
+ * Returns: @object if @object is of class @klass or of a class derived from
+ * @klass, %NULL otherwise.
+ */
+gpointer gts_object_is_from_class (gpointer object,
+				   gpointer klass)
+{
+  GtsObjectClass * c;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  if (object == NULL)
+    return NULL;
+
+  c = ((GtsObject *) object)->klass;
+
+  g_return_val_if_fail (c != NULL, NULL);
+
+  while (c) {
+    if (c == klass)
+      return object;
+    c = c->parent_class;
+  }
+
+  return NULL;
+}
+
+/**
+ * gts_object_class_is_from_class:
+ * @klass: a #GtsObjectClass.
+ * @from: a #GtsObjectClass.
+ *
+ * Returns: @klass if @klass is equal to @from or if @klass is derived
+ * from @from, %NULL otherwise.
+ */
+gpointer gts_object_class_is_from_class (gpointer klass,
+					 gpointer from)
+{
+  GtsObjectClass * c;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (from != NULL, NULL);
+
+  c = (GtsObjectClass *) klass;
+  while (c) {
+    if (c == from)
+      return klass;
+    c = c->parent_class;
+  }
+
+  return NULL;
+}
+#endif /* not G_CAN_INLINE */
+
+/**
+ * gts_object_check_cast:
+ * @object: a #GtsObject.
+ * @klass: a #GtsObjectClass.
+ *
+ * Returns: @object while emitting warnings if @object is not of class @klass.
+ */
+gpointer gts_object_check_cast (gpointer object, 
+				gpointer klass)
+{
+  if (!object) {
+    g_warning ("invalid cast from (NULL) pointer to `%s'",
+	       GTS_OBJECT_CLASS (klass)->info.name);
+    return object;
+  }
+  if (!((GtsObject *) object)->klass) {
+    g_warning ("invalid unclassed pointer in cast to `%s'",
+	       GTS_OBJECT_CLASS (klass)->info.name);
+    return object;
+  }
+  if (!gts_object_is_from_class (object, klass)) {
+    g_warning ("invalid cast from `%s' to `%s'",
+	       ((GtsObject *) object)->klass->info.name,
+	       GTS_OBJECT_CLASS (klass)->info.name);
+    return object;
+  }
+  return object;
+}
+
+/**
+ * gts_object_class_check_cast:
+ * @klass: a #GtsObjectClass.
+ * @from: a #GtsObjectClass.
+ *
+ * Returns: @klass while emitting warnings if @klass is not derived from
+ * @from.
+ */
+gpointer gts_object_class_check_cast (gpointer klass, 
+				      gpointer from)
+{
+  if (!klass) {
+    g_warning ("invalid cast from (NULL) pointer to `%s'",
+	       GTS_OBJECT_CLASS (from)->info.name);
+    return klass;
+  }
+  if (!gts_object_class_is_from_class (klass, from)) {
+    g_warning ("invalid cast from `%s' to `%s'",
+	       GTS_OBJECT_CLASS (klass)->info.name,
+	       GTS_OBJECT_CLASS (from)->info.name);
+    return klass;
+  }
+  return klass;
+}
+
+/**
+ * gts_object_init:
+ * @object: a #GtsObject.
+ * @klass: a #GtsObjectClass.
+ *
+ * Calls the init method of @klass with @object as argument. This is done 
+ * recursively in the correct order (from the base class to the top). You
+ * should rarely need this function as it is called automatically by the
+ * constructor for each class.
+ */
+void gts_object_init (GtsObject * object, GtsObjectClass * klass)
+{
+  GtsObjectClass * parent_class;
+
+  g_return_if_fail (object != NULL);
+  g_return_if_fail (klass != NULL);
+
+  parent_class = klass->parent_class;
+  if (parent_class)
+    gts_object_init (object, parent_class);
+  if (klass->info.object_init_func)
+    (*klass->info.object_init_func) (object);
+}
+
+/**
+ * gts_object_new:
+ * @klass: a #GtsObjectClass.
+ *
+ * Returns: a new initialized object of class @klass.
+ */
+GtsObject * gts_object_new (GtsObjectClass * klass)
+{
+  GtsObject * object;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  object = g_malloc (klass->info.object_size);
+  object->klass = klass;
+  gts_object_init (object, klass);
+
+#ifdef DEBUG_IDENTITY
+  id_insert (object);
+#ifdef DEBUG_LEAKS
+  fprintf (stderr, "new %s %p->%d\n", klass->info.name, 
+	   object, 
+	   id (object));
+#endif
+#endif
+
+  return object;
+}
+
+/**
+ * gts_object_clone:
+ * @object: a #GtsObject.
+ *
+ * Calls the clone method of @object. The call to this function will fail
+ * if no clone method exists for the given object.
+ *
+ * Returns: a new object clone of @object.
+ */
+GtsObject * gts_object_clone (GtsObject * object)
+{
+  GtsObject * clone;
+
+  g_return_val_if_fail (object != NULL, NULL);
+  g_return_val_if_fail (object->klass->clone, NULL);
+
+  clone = g_malloc (object->klass->info.object_size);
+  clone->klass = object->klass;
+  object_init (clone);
+  (* object->klass->clone) (clone, object);
+
+#ifdef DEBUG_IDENTITY
+  id_insert (clone);
+#ifdef DEBUG_LEAKS
+  fprintf (stderr, "clone %s %p->%d\n", clone->klass->info.name, 
+	   clone, 
+	   id (clone));
+#endif
+#endif
+
+  return clone;
+}
+
+/**
+ * gts_object_destroy:
+ * @object: a #GtsObject.
+ *
+ * Calls the destroy method of @object, freeing all memory allocated for it.
+ */
+void gts_object_destroy (GtsObject * object)
+{
+  g_assert (object->klass->destroy);
+  GTS_OBJECT_SET_FLAGS (object, GTS_DESTROYED);
+  (* object->klass->destroy) (object);
+}
+
+/**
+ * gts_object_reset_reserved:
+ * @object: a #GtsObject.
+ *
+ * Reset the reserved field of @object.
+ */
+void gts_object_reset_reserved (GtsObject * object)
+{
+  g_return_if_fail (object != NULL);
+
+  object->reserved = NULL;
+}
+
+/**
+ * gts_object_attributes:
+ * @object: a #GtsObject.
+ * @from: a #GtsObject.
+ *
+ * Calls the attributes() method of @object using @from as source.
+ */
+void gts_object_attributes (GtsObject * object, GtsObject * from)
+{
+  g_return_if_fail (object != NULL);
+
+  if (object->klass->attributes)
+    (* object->klass->attributes) (object, from);
+}
diff --git a/src/oocs.c b/src/oocs.c
new file mode 100644
index 0000000..f4dd86a
--- /dev/null
+++ b/src/oocs.c
@@ -0,0 +1,387 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include "gts.h"
+
+static void cluster_destroy (GtsObject * object)
+{
+  GtsCluster * c = GTS_CLUSTER (object);
+
+  if (c->v && gts_vertex_is_unattached (c->v))
+    gts_object_destroy (GTS_OBJECT (c->v));
+
+  /* do not forget to call destroy method of the parent */
+  (* GTS_OBJECT_CLASS (gts_cluster_class ())->parent_class->destroy) (object);
+}
+
+static void cluster_add (GtsCluster * c, GtsPoint * p, gpointer data)
+{
+  GtsPoint * cp;
+
+  g_return_if_fail (c != NULL);
+  g_return_if_fail (c->v != NULL);
+  g_return_if_fail (p != NULL);
+
+  cp = GTS_POINT (c->v);
+  
+  cp->x += p->x;
+  cp->y += p->y;
+  cp->z += p->z;
+  c->n++;
+}
+
+static void cluster_update (GtsCluster * c)
+{
+  GtsPoint * p;
+
+  g_return_if_fail (c != NULL);
+  g_return_if_fail (c->v != NULL);
+
+  if (c->n > 1) {
+    p = GTS_POINT (c->v);
+    p->x /= c->n;
+    p->y /= c->n;
+    p->z /= c->n;
+  }
+}
+
+static void cluster_class_init (GtsClusterClass * klass)
+{
+  klass->add = cluster_add;
+  klass->update = cluster_update;
+
+  GTS_OBJECT_CLASS (klass)->destroy = cluster_destroy;
+}
+
+static void cluster_init (GtsCluster * c)
+{
+  c->v = NULL;
+  c->n = 0;
+}
+
+/**
+ * gts_cluster_class:
+ *
+ * Returns: the #GtsClusterClass.
+ */
+GtsClusterClass * gts_cluster_class (void)
+{
+  static GtsClusterClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo cluster_info = {
+      "GtsCluster",
+      sizeof (GtsCluster),
+      sizeof (GtsClusterClass),
+      (GtsObjectClassInitFunc) cluster_class_init,
+      (GtsObjectInitFunc) cluster_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &cluster_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_cluster_new:
+ * @klass: a #GtsClusterClass.
+ * @id: the id of the new cluster.
+ * @vklass: a #GtsVertexClass for the representative vertex of the cluster.
+ *
+ * Returns: a new #GtsCluster.
+ */
+GtsCluster * gts_cluster_new (GtsClusterClass * klass,
+			      GtsClusterId id,
+			      GtsVertexClass * vklass)
+{
+  GtsCluster * c;
+
+  c = GTS_CLUSTER (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  c->id = id;
+  c->v = gts_vertex_new (vklass, 0., 0., 0.);
+
+  return c;
+}
+
+/**
+ * gts_cluster_add:
+ * @c: a #GtsCluster.
+ * @p: a #GtsPoint.
+ * @data: data to pass to the add() virtual method of #GtsClusterClass.
+ *
+ * Adds point @p to cluster @c.
+ */
+void gts_cluster_add (GtsCluster * c, GtsPoint * p, gpointer data)
+{
+  g_return_if_fail (c != NULL);
+  g_return_if_fail (p != NULL);
+
+  (* GTS_CLUSTER_CLASS (GTS_OBJECT (c)->klass)->add) (c, p, data);
+}
+
+/**
+ * gts_cluster_update:
+ * @c: a #GtsCluster.
+ *
+ * Updates the position of the vertex representative of all the
+ * vertices added to @c.  
+ */
+void gts_cluster_update (GtsCluster * c)
+{
+  g_return_if_fail (c != NULL);
+
+  (* GTS_CLUSTER_CLASS (GTS_OBJECT (c)->klass)->update) (c);
+}
+
+static void destroy_cluster (GtsClusterId * id, GtsObject * cluster)
+{
+  gts_object_destroy (cluster);
+}
+
+static void cluster_grid_destroy (GtsObject * object)
+{
+  GtsClusterGrid * cluster_grid = GTS_CLUSTER_GRID (object);
+
+  g_hash_table_foreach (cluster_grid->clusters, 
+			(GHFunc) destroy_cluster, NULL);
+  g_hash_table_destroy (cluster_grid->clusters);
+  
+  (* GTS_OBJECT_CLASS (gts_cluster_grid_class ())->parent_class->destroy) 
+    (object);
+}
+
+static void cluster_grid_class_init (GtsClusterGridClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->destroy = cluster_grid_destroy;
+}
+
+static gint cluster_id_equal (gconstpointer v1,
+			      gconstpointer v2)
+{
+  const GtsClusterId * id1 = (const GtsClusterId *) v1;
+  const GtsClusterId * id2 = (const GtsClusterId *) v2;
+  return ((id1->x == id2->x) && (id1->y == id2->y) && (id1->z == id2->z));
+}
+
+static guint cluster_id_hash (gconstpointer key)
+{
+  const GtsClusterId * id = (const GtsClusterId *) key;
+  return id->x + id->y + id->z;
+}
+
+static void cluster_grid_init (GtsClusterGrid * cluster_grid)
+{
+  cluster_grid->surface = NULL;
+  cluster_grid->bbox = NULL;
+  cluster_grid->cluster_class = gts_cluster_class ();
+  cluster_grid->clusters = g_hash_table_new (cluster_id_hash,
+					      cluster_id_equal);
+}
+
+/**
+ * gts_cluster_grid_class:
+ *
+ * Returns: the #GtsClusterGridClass.
+ */
+GtsClusterGridClass * gts_cluster_grid_class (void)
+{
+  static GtsClusterGridClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo cluster_grid_info = {
+      "GtsClusterGrid",
+      sizeof (GtsClusterGrid),
+      sizeof (GtsClusterGridClass),
+      (GtsObjectClassInitFunc) cluster_grid_class_init,
+      (GtsObjectInitFunc) cluster_grid_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &cluster_grid_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_cluster_grid_new:
+ * @klass: a #GtsClusterGridClass.
+ * @cluster_class: the klass to be used for the vertex clusters.
+ * @s: the simplified surface.
+ * @bbox: bounding box of the surface to be simplified.
+ * @delta: the size of one grid cell of the simplification grid.
+ *
+ * Returns: a new #GtsClusterGrid.
+ */
+GtsClusterGrid * gts_cluster_grid_new (GtsClusterGridClass * klass,
+				       GtsClusterClass * cluster_class,
+				       GtsSurface * s,
+				       GtsBBox * bbox,
+				       gdouble delta)
+{
+  GtsClusterGrid * cluster_grid;
+  GtsVector size;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (cluster_class != NULL, NULL);
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (bbox != NULL, NULL);
+  g_return_val_if_fail (delta > 0., NULL);
+
+  size[0] = ceil ((bbox->x2 - bbox->x1)/delta);
+  size[1] = ceil ((bbox->y2 - bbox->y1)/delta);
+  size[2] = ceil ((bbox->z2 - bbox->z1)/delta);
+  g_return_val_if_fail (size[0] <= 2.*G_MAXINT + 2. &&
+			size[1] <= 2.*G_MAXINT + 2. &&
+			size[2] <= 2.*G_MAXINT + 2., NULL);
+  cluster_grid = 
+    GTS_CLUSTER_GRID (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  cluster_grid->cluster_class = cluster_class;
+  cluster_grid->surface = s;
+  cluster_grid->bbox = bbox;
+  cluster_grid->size[0] = size[0];
+  cluster_grid->size[1] = size[1];
+  cluster_grid->size[2] = size[2];
+
+  return cluster_grid;
+}
+
+static GtsClusterId cluster_index (GtsPoint * p,
+				   GtsBBox * bb,
+				   GtsVector n)
+{
+  GtsClusterId id;
+  
+  g_return_val_if_fail (p->x >= bb->x1 && p->x <= bb->x2, id);
+  g_return_val_if_fail (p->y >= bb->y1 && p->y <= bb->y2, id);
+  g_return_val_if_fail (p->z >= bb->z1 && p->z <= bb->z2, id);
+  
+  id.x = p->x == bb->x2 ? n[0] - 1. : n[0]*(p->x - bb->x1)/(bb->x2 - bb->x1);
+  id.y = p->y == bb->y2 ? n[1] - 1. : n[1]*(p->y - bb->y1)/(bb->y2 - bb->y1);
+  id.z = p->z == bb->z2 ? n[2] - 1. : n[2]*(p->z - bb->z1)/(bb->z2 - bb->z1);
+
+  return id;
+}
+
+static GtsCluster * cluster_grid_add_point (GtsClusterGrid * cluster_grid,
+					    GtsPoint * p,
+					    gpointer data)
+{
+  GtsClusterId id = cluster_index (p, 
+				   cluster_grid->bbox, 
+				   cluster_grid->size);
+  GtsCluster * c = g_hash_table_lookup (cluster_grid->clusters, &id);
+
+  if (c == NULL) {
+    c = gts_cluster_new (cluster_grid->cluster_class, id, 
+			 cluster_grid->surface->vertex_class);
+    g_hash_table_insert (cluster_grid->clusters, &c->id, c);
+  }
+  
+  gts_cluster_add (c, p, data);
+  
+  return c;
+}
+
+/**
+ * gts_cluster_grid_add_triangle:
+ * @cluster_grid: a #GtsClusterGrid.
+ * @p1: a #GtsPoint.
+ * @p2: a #GtsPoint.
+ * @p3: a #GtsPoint.
+ * @data: user data to pass to the cluster add() method.
+ *
+ * Adds the triangle defined by @p1, @p2 and @p3 to the respective clusters
+ * of @cluster_grid.
+ */
+void gts_cluster_grid_add_triangle (GtsClusterGrid * cluster_grid,
+				    GtsPoint * p1,
+				    GtsPoint * p2,
+				    GtsPoint * p3,
+				    gpointer data)
+{
+  GtsCluster * c1, * c2, * c3;
+
+  g_return_if_fail (cluster_grid != NULL);
+  g_return_if_fail (p1 != NULL);
+  g_return_if_fail (p2 != NULL);
+  g_return_if_fail (p3 != NULL);
+  g_return_if_fail (cluster_grid->surface != NULL);
+
+  c1 = cluster_grid_add_point (cluster_grid, p1, data);
+  c2 = cluster_grid_add_point (cluster_grid, p2, data);
+  c3 = cluster_grid_add_point (cluster_grid, p3, data);
+  
+  if (c1 != c2 && c2 != c3 && c3 != c1) {
+    GtsVertex * v1, * v2, * v3;
+    GtsEdge * e1, * e2, * e3;
+    gboolean new_edge = FALSE;
+    
+    v1 = c1->v; v2 = c2->v; v3 = c3->v;
+
+    if ((e1 = GTS_EDGE (gts_vertices_are_connected (v1, v2))) == NULL) {
+      e1 = gts_edge_new (cluster_grid->surface->edge_class, v1, v2);
+      new_edge = TRUE;
+    }
+    if ((e2 = GTS_EDGE (gts_vertices_are_connected (v2, v3))) == NULL) {
+      e2 = gts_edge_new (cluster_grid->surface->edge_class, v2, v3);
+      new_edge = TRUE;
+    }
+    if ((e3 = GTS_EDGE (gts_vertices_are_connected (v3, v1))) == NULL) {
+      e3 = gts_edge_new (cluster_grid->surface->edge_class, v3, v1);
+      new_edge = TRUE;
+    }
+    if (new_edge || !gts_triangle_use_edges (e1, e2, e3))
+      gts_surface_add_face (cluster_grid->surface, 
+			    gts_face_new (cluster_grid->surface->face_class, 
+					  e1, e2, e3));
+  }
+}
+
+static void update_cluster (gint * id, GtsCluster * cluster, GtsRange * stats)
+{
+  gts_cluster_update (cluster);
+  gts_range_add_value (stats, cluster->n);
+}
+
+/**
+ * gts_cluster_grid_update:
+ * @cluster_grid: a #GtsClusterGrid.
+ *
+ * Updates the representative vertices of all the clusters of @cluster_grid.
+ *
+ * Returns: a #GtsRange describing the statistics for the number of vertices
+ * added to each cluster of @cluster_grid.
+ */
+GtsRange gts_cluster_grid_update (GtsClusterGrid * cluster_grid)
+{
+  GtsRange stats;
+
+  gts_range_init (&stats);
+  g_return_val_if_fail (cluster_grid != NULL, stats);
+
+  g_hash_table_foreach (cluster_grid->clusters, 
+			(GHFunc) update_cluster, &stats);
+  gts_range_update (&stats);
+
+  return stats;
+}
diff --git a/src/partition.c b/src/partition.c
new file mode 100644
index 0000000..4eb8f5b
--- /dev/null
+++ b/src/partition.c
@@ -0,0 +1,1164 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+/* #define DEBUG */
+
+/* Graph partition */
+
+/**
+ * gts_graph_partition_edges_cut:
+ * @partition: a list of @GtsGraph representing a partition.
+ *
+ * Returns: the number of edges cut by the partition.
+ */
+guint gts_graph_partition_edges_cut (GSList * partition)
+{
+  guint cuts = 0;
+
+  while (partition) {
+    cuts += gts_graph_edges_cut (partition->data);
+    partition = partition->next;
+  }
+
+  return cuts/2;
+}
+
+/**
+ * gts_graph_partition_edges_cut_weight:
+ * @partition: a list of @GtsGraph representing a partition.
+ *
+ * Returns: the total weight of the edges cut by the partition.
+ */
+gfloat gts_graph_partition_edges_cut_weight (GSList * partition)
+{
+  gfloat weight = 0.;
+
+  while (partition) {
+    weight += gts_graph_edges_cut_weight (partition->data);
+    partition = partition->next;
+  }
+
+  return weight/2.;
+}
+
+/**
+ * gts_graph_partition_print_stats:
+ * @partition: a list of @GtsGraph representing a partition.
+ * @fp: a file pointer.
+ *
+ * Writes to @fp a summary of the properties of @partition.
+ */
+void gts_graph_partition_print_stats (GSList * partition,
+				      FILE * fp)
+{
+  GtsRange weight;
+  GSList * i;
+
+  g_return_if_fail (partition != NULL);
+  g_return_if_fail (fp != NULL);
+
+  gts_range_init (&weight);
+  i = partition;
+  while (i) {
+    gts_range_add_value (&weight, gts_graph_weight (i->data));
+    i = i->next;
+  }
+  gts_range_update (&weight);
+
+  fprintf (fp, 
+	   "# parts: %d\n"
+	   "#   edge cuts: %5d edge cuts weight: %5g\n"
+	   "#   weight: ",
+	   g_slist_length (partition),
+	   gts_graph_partition_edges_cut (partition),
+	   gts_graph_partition_edges_cut_weight (partition));
+  gts_range_print (&weight, fp);
+  fputc ('\n', fp);
+}
+
+/**
+ * gts_graph_partition_balance:
+ * @partition: a list of @GtsGraph representing a partition.
+ *
+ * Returns: the difference between the maximum and the minimum weight
+ * of the graphs in @partition.  
+ */
+gfloat gts_graph_partition_balance (GSList * partition)
+{
+  gfloat wmin = G_MAXFLOAT;
+  gfloat wmax = - G_MAXFLOAT;
+
+  g_return_val_if_fail (partition != NULL, 0.);
+
+  while (partition) {
+    gfloat weight = gts_graph_weight (partition->data);
+    if (weight < wmin)
+      wmin = weight;
+    if (weight > wmax)
+      wmax = weight;
+    partition = partition->next;
+  }
+  return wmax - wmin;
+}
+
+/**
+ * gts_graph_partition_clone:
+ * @partition: a list of @GtsGraph representing a partition.
+ *
+ * Returns: a new partition clone of @partition (i.e. a list of new
+ * graphs clones of the graphs in @partition).  
+ */
+GSList * gts_graph_partition_clone (GSList * partition)
+{
+  GSList * cparts = NULL;
+
+  while (partition) {
+    cparts = 
+      g_slist_prepend (cparts, 
+		       gts_object_clone (GTS_OBJECT (partition->data)));
+    partition = partition->next;
+  }
+  return cparts;
+}
+
+/**
+ * gts_graph_partition_destroy:
+ * @partition: a list of @GtsGraph representing a partition.
+ *
+ * Destroys all the graphs in @partition and frees @partition.
+ */
+void gts_graph_partition_destroy (GSList * partition)
+{
+  GSList * i = partition;
+
+  while (i) {
+    gts_object_destroy (GTS_OBJECT (i->data));
+    i = i->next;
+  }
+  g_slist_free (partition);
+}
+
+static void find_smallest_degree (GtsGNode * n, gpointer * data)
+{
+  GtsGNode ** nmin = data[0];
+  GtsGraph * g = data[1];
+  guint * min = data[2];
+  guint degree = gts_gnode_degree (n, g);
+
+  if (degree < *min) {
+    *min = degree;
+    *nmin = n;
+  }
+}
+
+static gint graph_comp_weight (GtsGraph * g1, GtsGraph * g2)
+{
+  if (gts_graph_weight (g1) > gts_graph_weight (g2))
+    return 1;
+  return -1;
+}
+
+static void partition_update (GSList * list, GtsGraph * g)
+{
+  GSList * i;
+  GtsGraph * g1;
+  GtsHeap * size_heap;
+  gboolean reinit = TRUE;
+
+  /* initialize traversals */
+  i = list;
+  while (i) {
+    GtsGNode * seed = GTS_OBJECT (i->data)->reserved;
+    GTS_OBJECT (seed)->reserved = 
+      gts_graph_traverse_new (g, seed, GTS_BREADTH_FIRST, reinit);
+    reinit = FALSE;
+    i = i->next;
+  }
+  
+  size_heap = gts_heap_new ((GCompareFunc) graph_comp_weight);
+  i = list;
+  while (i) {
+    gts_heap_insert (size_heap, i->data);
+    i = i->next;
+  }
+  while ((g1 = gts_heap_remove_top (size_heap))) {
+    GtsGraphTraverse * t = GTS_OBJECT (GTS_OBJECT (g1)->reserved)->reserved;
+    GtsGNode * n = gts_graph_traverse_next (t);
+    if (n) {
+      gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (n));
+      gts_heap_insert (size_heap, g1);
+    }
+  }
+  gts_heap_destroy (size_heap);
+
+  /* destroy traversals */
+  i = list;
+  while (i) {
+    GtsGNode * seed = GTS_OBJECT (i->data)->reserved;
+    gts_graph_traverse_destroy (GTS_OBJECT (seed)->reserved);
+    GTS_OBJECT (seed)->reserved = NULL;
+    i = i->next;
+  }
+}
+
+static void better_seed (GtsGNode * n, gpointer * data)
+{
+  guint * sum = data[0];
+  GtsGNode ** seed = data[1];
+  GtsGraph * g = data[2];
+  guint sum1 = gts_graph_distance_sum (g, n);
+  
+  if (sum1 < *sum) {
+    *sum = sum1;
+    *seed = n;
+  }
+}
+
+static GtsGNode * graph_new_seed (GtsGraph * g, GtsGNode * seed)
+{
+  guint sum = gts_graph_distance_sum (g, seed);
+  gpointer data[3];
+  GtsGNode * new_seed = seed;
+
+  data[0] = ∑
+  data[1] = &new_seed;
+  data[2] = g;
+  gts_gnode_foreach_neighbor (seed, g, (GtsFunc) better_seed, data);
+
+  return new_seed;
+}
+
+/**
+ * gts_graph_bubble_partition:
+ * @g: a #GtsGraph.
+ * @np: number of partitions.
+ * @niter: the maximum number of iterations.
+ * @step_info: a #GtsFunc or %NULL.
+ * @data: user data to pass to @step_info.
+ *
+ * An implementation of the "bubble partitioning algorithm" of
+ * Diekmann, Preis, Schlimbach and Walshaw (2000). The maximum number
+ * of iteration on the positions of the graph growing seeds is
+ * controlled by @niter.
+ *
+ * If not %NULL @step_info is called after each iteration on the seeds
+ * positions passing the partition (a GSList) as argument.
+ *
+ * Returns: a list of @np new #GtsGraph representing the partition.  
+ */
+GSList * gts_graph_bubble_partition (GtsGraph * g, 
+				     guint np, 
+				     guint niter,
+				     GtsFunc step_info,
+				     gpointer data)
+{
+  GSList * list = NULL, * seeds = NULL;
+  GtsGNode * seed = NULL;
+  guint min = G_MAXINT/2 - 1;
+  gpointer info[3];
+  GtsGraph * g1;
+  gboolean changed = TRUE;
+
+  g_return_val_if_fail (g != NULL, NULL);
+  g_return_val_if_fail (np > 0, NULL);
+
+  info[0] = &seed;
+  info[1] = g;
+  info[2] = &min;
+  gts_container_foreach (GTS_CONTAINER (g), 
+			 (GtsFunc) find_smallest_degree,
+			 info);
+  if (seed == NULL)
+    return NULL;
+
+  g1 = GTS_GRAPH (gts_object_new (GTS_OBJECT (g)->klass));
+  gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed));
+  list = g_slist_prepend (list, g1);
+  GTS_OBJECT (g1)->reserved = seed;
+  seeds = g_slist_prepend (seeds, seed);
+
+  while (--np && seed)
+    if ((seed = gts_graph_farthest (g, seeds))) {
+      g1 = GTS_GRAPH (gts_object_new (GTS_OBJECT (g)->klass));
+      gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed));
+      list = g_slist_prepend (list, g1);
+      GTS_OBJECT (g1)->reserved = seed;
+      seeds = g_slist_prepend (seeds, seed);
+    }
+  g_slist_free (seeds);
+  
+  partition_update (list, g);
+
+  while (changed && niter--) {
+    GSList * i;
+
+    changed = FALSE;
+    i = list;
+    while (i) {
+      GtsGraph * g1 = i->data;
+      GtsGNode * seed = GTS_OBJECT (g1)->reserved;
+      GtsGNode * new_seed = graph_new_seed (g1, seed);
+      if (new_seed != seed) {
+	changed = TRUE;
+	GTS_OBJECT (g1)->reserved = new_seed;
+      }
+      i = i->next;
+    }
+
+    if (changed) {
+      i = list;
+      while (i) {
+	GtsGraph * g1 = i->data;
+	GtsGNode * seed = GTS_OBJECT (g1)->reserved;
+
+	gts_object_destroy (GTS_OBJECT (g1));
+	i->data = g1 = GTS_GRAPH (gts_object_new (GTS_OBJECT (g)->klass));
+	gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed));
+	GTS_OBJECT (g1)->reserved = seed;
+	i = i->next;
+      }
+      partition_update (list, g);
+      if (step_info)
+	(* step_info) (list, data);
+    }
+  }
+  g_slist_foreach (list, (GFunc) gts_object_reset_reserved, NULL);
+  return list;
+}
+
+/* Graph bisection */
+
+static gdouble node_cost (GtsGNode * n, gpointer * data)
+{
+  GtsGraph * g = data[0];
+  GtsGraph * g1 = data[1];
+  GSList * i = GTS_SLIST_CONTAINER (n)->items;
+  gdouble cost = 0.;
+
+  while (i) {
+    GtsGEdge * e = i->data;
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, e);
+
+    if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) {
+      if (gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g1)))
+	cost -= gts_gedge_weight (e);
+      else 
+	cost += gts_gedge_weight (e);
+    }
+    i = i->next;
+  }
+
+  return cost;
+}
+
+static void add_neighbor (GtsGNode * n, GtsEHeap * heap)
+{
+  if (GTS_OBJECT (n)->reserved == n)
+    return;
+  if (GTS_OBJECT (n)->reserved)
+    gts_eheap_remove (heap, GTS_OBJECT (n)->reserved);
+  GTS_OBJECT (n)->reserved = gts_eheap_insert (heap, n);
+}
+
+static void add_unused (GtsGNode * n, GtsGraph * g2)
+{
+  if (GTS_OBJECT (n)->reserved)
+    GTS_OBJECT (n)->reserved = NULL;
+  else
+    gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n));
+}
+
+static gdouble degree_cost (GtsGNode * n, GtsGraph * g)
+{
+  return gts_gnode_degree (n, g); 
+}
+
+static void add_seed (GtsGNode * n, GtsEHeap * heap)
+{
+  gts_eheap_insert (heap, n);
+}
+
+static void boundary_node1 (GtsGNode * n, GtsGraphBisection * bg)
+{
+  GSList * i = GTS_SLIST_CONTAINER (n)->items;
+
+  while (i) {
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+    if (gts_containee_is_contained (GTS_CONTAINEE (n1), 
+				    GTS_CONTAINER (bg->g2))) {
+      g_hash_table_insert (bg->bg1, n, n1);
+      return;
+    }
+    i = i->next;
+  }
+}
+
+static void boundary_node2 (GtsGNode * n, GtsGraphBisection * bg)
+{
+  GSList * i = GTS_SLIST_CONTAINER (n)->items;
+
+  while (i) {
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+    if (gts_containee_is_contained (GTS_CONTAINEE (n1), 
+				    GTS_CONTAINER (bg->g1))) {
+      g_hash_table_insert (bg->bg2, n, n1);
+      return;
+    }
+    i = i->next;
+  }
+}
+
+static void check_bg (GtsGNode * n, gpointer * data)
+{
+  GHashTable * bg = data[0];
+  GtsGraph * g = data[1];
+  gboolean * ok = data[2];
+  guint * nb = data[3];
+  guint nn = gts_gnode_degree (n, g);
+
+  if (nn > 0)
+    (*nb)++;
+  if ((nn > 0 && !g_hash_table_lookup (bg, n)) ||
+      (nn == 0 && g_hash_table_lookup (bg, n))) {
+    g_warning ("nn: %d lookup: %p\n",
+	       nn, g_hash_table_lookup (bg, n));
+    *ok = FALSE;
+  }
+}
+
+/**
+ * gts_graph_bisection_check:
+ * @bg: a #GtsGraphBisection.
+ *
+ * Checks that the boundary of @bg is correctly defined (used for
+ * debugging purposes).
+ *
+ * Returns: %TRUE if @bg is ok, %FALSE otherwise.  
+ */
+gboolean gts_graph_bisection_check (GtsGraphBisection * bg)
+{
+  gboolean ok = TRUE;
+  guint nb;
+  gpointer data[4];
+
+  g_return_val_if_fail (bg != NULL, FALSE);
+
+  nb = 0;
+  data[0] = bg->bg1;
+  data[1] = bg->g2;
+  data[2] = &ok;
+  data[3] = &nb;
+  gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) check_bg, data);
+  g_return_val_if_fail (g_hash_table_size (bg->bg1) == nb, FALSE);
+
+  nb = 0;
+  data[0] = bg->bg2;
+  data[1] = bg->g1;
+  gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) check_bg, data);
+  g_return_val_if_fail (g_hash_table_size (bg->bg2) == nb, FALSE);
+
+  return ok;
+}
+
+/**
+ * gts_graph_ggg_bisection:
+ * @g: a #GtsGraph.
+ * @ntry: the number of randomly selected initial seeds.
+ *
+ * An implementation of the "Greedy Graph Growing" algorithm of
+ * Karypis and Kumar (1997).  
+ *
+ * @ntry randomly chosen seeds are used and the best partition is retained.
+ *
+ * Returns: a new #GtsGraphBisection of @g.
+ */
+GtsGraphBisection * gts_graph_ggg_bisection (GtsGraph * g, guint ntry)
+{
+  gfloat size, bestcost = G_MAXFLOAT, smin;
+  GtsGraph * bestg1 = NULL, * bestg2 = NULL;
+  GtsEHeap * degree_heap;
+  GtsGNode * seed;
+  GtsGraphBisection * bg;
+
+  g_return_val_if_fail (g != NULL, NULL);
+
+  bg = g_malloc (sizeof (GtsGraphBisection));
+  bg->g = g;
+
+  size = gts_graph_weight (g)/2.;
+  smin = 0.9*size;
+
+  degree_heap = gts_eheap_new ((GtsKeyFunc) degree_cost, g);
+  gts_eheap_freeze (degree_heap);
+  gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_seed, degree_heap);
+  gts_eheap_thaw (degree_heap);
+
+  while (ntry && ((seed = gts_eheap_remove_top (degree_heap, NULL)))) {
+    GtsGraph * g1, * g2;
+    GtsGNode * n;
+    gdouble cost;
+    gpointer data[2];
+    GtsEHeap * heap;
+  
+    g1 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass),
+			g->node_class, g->edge_class);
+    g2 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass),
+			g->node_class, g->edge_class);
+    
+    data[0] = g;
+    data[1] = g1;
+    heap = gts_eheap_new ((GtsKeyFunc) node_cost, data);
+
+    gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (seed));
+    GTS_OBJECT (seed)->reserved = seed;
+    gts_gnode_foreach_neighbor (seed, g, (GtsFunc) add_neighbor, heap);
+
+    while ((n = gts_eheap_remove_top (heap, &cost)))
+      if (gts_graph_weight (g1) + gts_gnode_weight (n) <= size) {
+	gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (n));
+	GTS_OBJECT (n)->reserved = n;
+	gts_gnode_foreach_neighbor (n, g, (GtsFunc) add_neighbor, heap);
+      }
+      else
+	GTS_OBJECT (n)->reserved = NULL;
+    gts_eheap_destroy (heap);
+    
+    gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_unused, g2);
+
+    cost = gts_graph_edges_cut_weight (g1);
+    if (!bestg1 || (cost < bestcost && gts_graph_weight (g1) >= smin)) {
+      if (bestg1)
+	bestcost = cost;
+      if (bestg1)
+	gts_object_destroy (GTS_OBJECT (bestg1));
+      if (bestg2)
+	gts_object_destroy (GTS_OBJECT (bestg2));
+      bestg1 = g1;
+      bestg2 = g2;
+    }
+    else {
+      gts_object_destroy (GTS_OBJECT (g1));
+      gts_object_destroy (GTS_OBJECT (g2));
+    }
+
+    ntry--;
+  }
+  gts_eheap_destroy (degree_heap);
+
+#ifdef DEBUG
+  fprintf (stderr, "bestcost: %5g g1: %5g|%5d g2: %5g|%5d\n",
+	   bestcost, 
+	   gts_graph_weight (bestg1), 
+	   gts_container_size (GTS_CONTAINER (bestg1)),
+	   gts_graph_weight (bestg2), 
+	   gts_container_size (GTS_CONTAINER (bestg2)));
+#endif
+
+  bg->g1 = bestg1;
+  bg->g2 = bestg2;
+  
+  /* boundary nodes */
+  bg->bg1 = g_hash_table_new (NULL, NULL);
+  gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) boundary_node1, bg);
+  bg->bg2 = g_hash_table_new (NULL, NULL);
+  gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) boundary_node2, bg);
+
+  return bg;
+}
+
+/**
+ * gts_graph_bfgg_bisection:
+ * @g: a #GtsGraph.
+ * @ntry: the number of randomly selected initial seeds.
+ *
+ * An implementation of a "Breadth-First Graph Growing" algorithm.
+ *
+ * @ntry randomly chosen seeds are used and the best partition is retained.
+ *
+ * Returns: a new #GtsGraphBisection of @g.
+ */
+GtsGraphBisection * gts_graph_bfgg_bisection (GtsGraph * g, guint ntry)
+{
+  gfloat size, bestcost = G_MAXFLOAT, smin;
+  GtsGraph * bestg1 = NULL, * bestg2 = NULL;
+  GtsEHeap * degree_heap;
+  GtsGNode * seed;
+  GtsGraphBisection * bg;
+
+  g_return_val_if_fail (g != NULL, NULL);
+
+  bg = g_malloc (sizeof (GtsGraphBisection));
+  bg->g = g;
+
+  size = gts_graph_weight (g)/2.;
+  smin = 0.9*size;
+
+  degree_heap = gts_eheap_new ((GtsKeyFunc) degree_cost, g);
+  gts_eheap_freeze (degree_heap);
+  gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_seed, degree_heap);
+  gts_eheap_thaw (degree_heap);
+
+  while (ntry && ((seed = gts_eheap_remove_top (degree_heap, NULL)))) {
+    GtsGraph * g1, * g2;
+    GtsGNode * n;
+    gdouble cost;
+    GtsGraphTraverse * t = gts_graph_traverse_new (g, seed, 
+						   GTS_BREADTH_FIRST, TRUE);
+    
+    g1 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass),
+			g->node_class, g->edge_class);
+    g2 = gts_graph_new (GTS_GRAPH_CLASS (GTS_OBJECT (g)->klass),
+			g->node_class, g->edge_class);
+
+    while ((n = gts_graph_traverse_next (t)))
+      if (gts_graph_weight (g1) + gts_gnode_weight (n) <= size) {
+	gts_container_add (GTS_CONTAINER (g1), GTS_CONTAINEE (n));
+	GTS_OBJECT (n)->reserved = n;
+      }
+    gts_graph_traverse_destroy (t);
+    
+    gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) add_unused, g2);
+
+    cost = gts_graph_edges_cut_weight (g1);
+    if (!bestg1 || (cost < bestcost && gts_graph_weight (g1) >= smin)) {
+      if (bestg1)
+	bestcost = cost;
+      if (bestg1)
+	gts_object_destroy (GTS_OBJECT (bestg1));
+      if (bestg2)
+	gts_object_destroy (GTS_OBJECT (bestg2));
+      bestg1 = g1;
+      bestg2 = g2;
+    }
+    else {
+      gts_object_destroy (GTS_OBJECT (g1));
+      gts_object_destroy (GTS_OBJECT (g2));
+    }
+
+    ntry--;
+  }
+  gts_eheap_destroy (degree_heap);
+
+#ifdef DEBUG
+  fprintf (stderr, "bestcost: %5g g1: %5g|%5d g2: %5g|%5d\n",
+	   bestcost, 
+	   gts_graph_weight (bestg1), 
+	   gts_container_size (GTS_CONTAINER (bestg1)),
+	   gts_graph_weight (bestg2), 
+	   gts_container_size (GTS_CONTAINER (bestg2)));
+#endif
+
+  bg->g1 = bestg1;
+  bg->g2 = bestg2;
+  
+  /* boundary nodes */
+  bg->bg1 = g_hash_table_new (NULL, NULL);
+  gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) boundary_node1, bg);
+  bg->bg2 = g_hash_table_new (NULL, NULL);
+  gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) boundary_node2, bg);
+
+  return bg;
+}
+
+static gdouble node_move_cost1 (GtsGNode * n, GtsGraphBisection * bg)
+{
+  return gts_gnode_move_cost (n, bg->g1, bg->g2);
+}
+
+static gdouble node_move_cost2 (GtsGNode * n, GtsGraphBisection * bg)
+{
+  return gts_gnode_move_cost (n, bg->g2, bg->g1);
+}
+
+static void build_heap (GtsGNode * n, GtsEHeap * heap)
+{
+  GTS_OBJECT (n)->reserved = gts_eheap_insert (heap, n);
+}
+
+/**
+ * gts_graph_bisection_kl_refine:
+ * @bg: a #GtsGraphBisection.
+ * @mmax: the maximum number of unsuccessful successive moves.
+ *
+ * An implementation of the simplified Kernighan-Lin algorithm for
+ * graph bisection refinement as described in Karypis and Kumar
+ * (1997).
+ *
+ * The algorithm stops if @mmax consecutive modes do not lead to a
+ * decrease in the number of edges cut. This last @mmax moves are
+ * undone.
+ *
+ * Returns: the decrease in the weight of the edges cut by the bisection.  
+ */
+gdouble gts_graph_bisection_kl_refine (GtsGraphBisection * bg,
+				       guint mmax)
+{
+  GtsEHeap * h1, * h2;
+  GtsGNode * n;
+  guint nm = 0, i;
+  GtsGNode ** moves;
+  gdouble bestcost = 0., totalcost = 0.;
+
+  g_return_val_if_fail (bg != NULL, 0.);
+  g_return_val_if_fail (mmax > 0, 0.);
+
+  h1 = gts_eheap_new ((GtsKeyFunc) node_move_cost1, bg);
+  gts_eheap_freeze (h1);
+  gts_container_foreach (GTS_CONTAINER (bg->g1), (GtsFunc) build_heap, h1);
+  gts_eheap_thaw (h1);
+
+  h2 = gts_eheap_new ((GtsKeyFunc) node_move_cost2, bg);
+  gts_eheap_freeze (h2);
+  gts_container_foreach (GTS_CONTAINER (bg->g2), (GtsFunc) build_heap, h2);
+  gts_eheap_thaw (h2);
+
+  moves = g_malloc (sizeof (GtsGNode *)*mmax);
+
+  do {
+    GtsGraph * g1, * g2;
+    gdouble cost;
+
+    if (gts_graph_weight (bg->g1) > gts_graph_weight (bg->g2)) {
+      n = gts_eheap_remove_top (h1, &cost);
+      g1 = bg->g1;
+      g2 = bg->g2;
+    }
+    else {
+      n = gts_eheap_remove_top (h2, &cost);
+      g1 = bg->g2;
+      g2 = bg->g1;
+    }
+    if (n) {
+      GSList * i;
+
+      GTS_OBJECT (n)->reserved = NULL;
+      gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n));
+      gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n));
+
+      totalcost += cost;
+      if (totalcost < bestcost) {
+	bestcost = totalcost;
+	nm = 0;
+      }
+      else
+	moves[nm++] = n;
+
+      i = GTS_SLIST_CONTAINER (n)->items;
+      while (i) {
+	GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+	if (GTS_OBJECT (n1)->reserved && 
+	    gts_containee_is_contained (GTS_CONTAINEE (n1), 
+					GTS_CONTAINER (bg->g))) {
+	  GtsEHeap * h = 
+	    gts_containee_is_contained (GTS_CONTAINEE (n1), 
+					GTS_CONTAINER (bg->g1)) ? h1 : h2;
+	  gts_eheap_remove (h, GTS_OBJECT (n1)->reserved);
+	  GTS_OBJECT (n1)->reserved = gts_eheap_insert (h, n1);
+	}
+	i = i->next;
+      }
+    }
+  } while (n && nm < mmax);
+
+  gts_eheap_foreach (h1, (GFunc) gts_object_reset_reserved, NULL);
+  gts_eheap_foreach (h2, (GFunc) gts_object_reset_reserved, NULL);
+  gts_eheap_destroy (h1);
+  gts_eheap_destroy (h2);
+
+  /* undo last nm moves */
+  for (i = 0; i < nm; i++) {
+    GtsGNode * n = moves[i];
+    GtsGraph * g1 = 
+      gts_containee_is_contained (GTS_CONTAINEE (n),
+				  GTS_CONTAINER (bg->g1)) ? bg->g1 : bg->g2;
+    GtsGraph * g2 = g1 == bg->g1 ? bg->g2 : bg->g1;
+    
+    gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n));
+    gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n));
+  }
+  g_free (moves);
+
+  return bestcost;
+}
+
+static void build_bheap (GtsGNode * n, GtsGNode * n1, GtsEHeap * heap)
+{
+  GTS_OBJECT (n)->reserved = gts_eheap_insert (heap, n);
+}
+
+static void update_neighbors (GtsGNode * n, GtsGraphBisection * bg,
+			      GtsEHeap * h1, GtsEHeap * h2)
+{
+  GSList * i;
+
+  i = GTS_SLIST_CONTAINER (n)->items;
+  while (i) {
+    GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+    if (gts_containee_is_contained (GTS_CONTAINEE (n1), 
+				    GTS_CONTAINER (bg->g))) {
+      GtsEHeap * h;
+      GtsGraph * g1, * g2;
+      GHashTable * bg1;
+
+      if (gts_containee_is_contained (GTS_CONTAINEE (n1),
+				      GTS_CONTAINER (bg->g1))) {
+	h = h1;
+	g1 = bg->g1;
+	g2 = bg->g2;
+	bg1 = bg->bg1;
+      }
+      else {
+	h = h2;
+	g1 = bg->g2;
+	g2 = bg->g1;
+	bg1 = bg->bg2;
+      }
+      g_hash_table_remove (bg1, n1);
+      if (h && GTS_OBJECT (n1)->reserved && GTS_OBJECT (n1)->reserved != n1) {
+	gts_eheap_remove (h, GTS_OBJECT (n1)->reserved);
+	GTS_OBJECT (n1)->reserved = NULL;
+      }
+      if (gts_gnode_degree (n1, g2)) {
+	g_hash_table_insert (bg1, n1, n1);
+	if (h && GTS_OBJECT (n1)->reserved != n1)
+	  GTS_OBJECT (n1)->reserved = gts_eheap_insert (h, n1);
+      }
+    }
+    i = i->next;
+  }  
+}
+
+/**
+ * gts_graph_bisection_bkl_refine:
+ * @bg: a #GtsGraphBisection.
+ * @mmax: the maximum number of unsuccessful successive moves.
+ *
+ * An implementation of the simplified boundary Kernighan-Lin
+ * algorithm for graph bisection refinement as described in Karypis
+ * and Kumar (1997).
+ *
+ * The algorithm stops if @mmax consecutive modes do not lead to a
+ * decrease in the number of edges cut. This last @mmax moves are
+ * undone.
+ *
+ * Returns: the decrease in the weight of the edges cut by the bisection.  
+ */
+gdouble gts_graph_bisection_bkl_refine (GtsGraphBisection * bg,
+					guint mmax)
+{
+  GtsEHeap * h1, * h2;
+  GtsGNode * n;
+  guint nm = 0, i;
+  GtsGNode ** moves;
+  gdouble bestcost = 0., totalcost = 0.;
+
+  g_return_val_if_fail (bg != NULL, 0.);
+  g_return_val_if_fail (mmax > 0, 0.);
+
+  h1 = gts_eheap_new ((GtsKeyFunc) node_move_cost1, bg);
+  gts_eheap_freeze (h1);
+  g_hash_table_foreach (bg->bg1, (GHFunc) build_bheap, h1);
+  gts_eheap_thaw (h1);
+
+  h2 = gts_eheap_new ((GtsKeyFunc) node_move_cost2, bg);
+  gts_eheap_freeze (h2);
+  g_hash_table_foreach (bg->bg2, (GHFunc) build_bheap, h2);
+  gts_eheap_thaw (h2);
+
+  moves = g_malloc (sizeof (GtsGNode *)*mmax);
+
+  do {
+    GtsGraph * g1, * g2;
+    GHashTable * bg1, * bg2;
+    gdouble cost;
+
+    if (gts_graph_weight (bg->g1) > gts_graph_weight (bg->g2)) {
+      n = gts_eheap_remove_top (h1, &cost);
+      g1 = bg->g1;
+      g2 = bg->g2;
+      bg1 = bg->bg1;
+      bg2 = bg->bg2;
+    }
+    else {
+      n = gts_eheap_remove_top (h2, &cost);
+      g1 = bg->g2;
+      g2 = bg->g1;
+      bg1 = bg->bg2;
+      bg2 = bg->bg1;
+    }
+    if (n) {
+      GTS_OBJECT (n)->reserved = n;
+      gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n));
+      gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n));
+      g_hash_table_remove (bg1, n);
+      if (gts_gnode_degree (n, g1))
+	g_hash_table_insert (bg2, n, n);
+
+      update_neighbors (n, bg, h1, h2);
+  
+      totalcost += cost;
+      if (totalcost < bestcost) {
+	bestcost = totalcost;
+	nm = 0;
+      }
+      else
+	moves[nm++] = n;
+    }
+  } while (n && nm < mmax);
+
+  gts_container_foreach (GTS_CONTAINER (bg->g), 
+			 (GtsFunc) gts_object_reset_reserved, NULL);
+  gts_eheap_destroy (h1);
+  gts_eheap_destroy (h2);
+
+  /* undo last nm moves */
+  for (i = 0; i < nm; i++) {
+    GtsGNode * n = moves[i];
+    GtsGraph * g1, * g2;
+    GHashTable * bg1, * bg2;
+
+    if (gts_containee_is_contained (GTS_CONTAINEE (n),
+				    GTS_CONTAINER (bg->g1))) {
+      g1 = bg->g1;
+      g2 = bg->g2;
+      bg1 = bg->bg1;
+      bg2 = bg->bg2;
+    }
+    else {
+      g1 = bg->g2;
+      g2 = bg->g1;
+      bg1 = bg->bg2;
+      bg2 = bg->bg1;
+    }
+    
+    gts_container_add (GTS_CONTAINER (g2), GTS_CONTAINEE (n));
+    gts_container_remove (GTS_CONTAINER (g1), GTS_CONTAINEE (n));
+    g_hash_table_remove (bg1, n);
+    if (gts_gnode_degree (n, g1))
+      g_hash_table_insert (bg2, n, n);
+
+    update_neighbors (n, bg, NULL, NULL);
+  }
+  g_free (moves);
+
+  return bestcost;
+}
+
+/* Multilevel partitioning */
+
+static void bisection_children (GtsGNodeSplit * ns, GtsGraphBisection * bg)
+{
+  GtsGraph * g, * g1;
+  GHashTable * bbg;
+  GtsGNode * n1 = GTS_GNODE_SPLIT_N1 (ns);
+  GtsGNode * n2 = GTS_GNODE_SPLIT_N2 (ns);
+
+  if (gts_containee_is_contained (GTS_CONTAINEE (ns->n),
+				  GTS_CONTAINER (bg->g1))) {
+    g = bg->g1;
+    g1 = bg->g2;
+    bbg = bg->bg1;
+  }
+  else {
+    g = bg->g2;
+    g1 = bg->g1;
+    bbg = bg->bg2;
+  }
+
+  gts_allow_floating_gnodes = TRUE;
+  gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (ns->n));
+  gts_allow_floating_gnodes = FALSE;
+  gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n1));
+  gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n2));
+
+  if (g_hash_table_lookup (bbg, ns->n)) {
+    g_hash_table_remove (bbg, ns->n);
+    if (gts_gnode_degree (n1, g1) > 0)
+      g_hash_table_insert (bbg, n1, n1);
+    if (gts_gnode_degree (n2, g1) > 0)
+      g_hash_table_insert (bbg, n2, n2);
+  }
+}
+
+/**
+ * gts_graph_bisection_new:
+ * @wg: a #GtsWGraph.
+ * @ntry: the number of tries for the graph growing algorithm.
+ * @mmax: the number of unsucessful moves for the refinement algorithm.
+ * @nmin: the minimum number of nodes of the coarsest graph.
+ *
+ * An implementation of a multilevel bisection algorithm as presented
+ * in Karypis and Kumar (1997). A multilevel hierarchy of graphs is
+ * created using the #GtsPGraph object. The bisection of the coarsest
+ * graph is created using the gts_graph_ggg_bisection() function. The
+ * graph is then uncoarsened using gts_pgraph_down() and at each level
+ * the bisection is refined using gts_graph_bisection_bkl_refine().
+ *
+ * Returns: a new #GtsGraphBisection of @wg.  
+ */
+GtsGraphBisection * gts_graph_bisection_new (GtsWGraph * wg,
+					     guint ntry,
+					     guint mmax,
+					     guint nmin)
+{
+  GtsGraph * g;
+  GtsPGraph * pg;
+  GtsGraphBisection * bg;
+  gdouble cost;
+
+  g_return_val_if_fail (wg != NULL, NULL);
+
+  g = GTS_GRAPH (wg);
+  pg = gts_pgraph_new (gts_pgraph_class (), g, 
+		       gts_gnode_split_class (),
+		       gts_wgnode_class (),
+		       gts_wgedge_class (),
+		       nmin);
+
+  bg = gts_graph_ggg_bisection (g, ntry);
+#ifdef DEBUG
+  fprintf (stderr, "before size: %5d weight: %5g cuts: %5d cweight: %5g\n",
+	   gts_container_size (GTS_CONTAINER (bg->g1)),
+	   gts_graph_weight (bg->g1),
+	   gts_graph_edges_cut (bg->g1),
+	   gts_graph_edges_cut_weight (bg->g1));
+  g_assert (gts_graph_bisection_check (bg));
+#endif
+  while ((cost = gts_graph_bisection_bkl_refine (bg, mmax))) {
+#ifdef DEBUG
+    fprintf (stderr, "  cost: %g\n", cost);
+    g_assert (gts_graph_bisection_check (bg));
+#endif
+  }
+#ifdef DEBUG
+  fprintf (stderr, "after  size: %5d weight: %5g cuts: %5d cweight: %5g\n",
+	   gts_container_size (GTS_CONTAINER (bg->g1)),
+	   gts_graph_weight (bg->g1),
+	   gts_graph_edges_cut (bg->g1),
+	   gts_graph_edges_cut_weight (bg->g1));
+#endif
+  while (gts_pgraph_down (pg, (GtsFunc) bisection_children, bg)) {
+#ifdef DEBUG
+    fprintf (stderr, "before size: %5d weight: %5g cuts: %5d cweight: %5g\n",
+	     gts_container_size (GTS_CONTAINER (bg->g1)),
+	     gts_graph_weight (bg->g1),
+	     gts_graph_edges_cut (bg->g1),
+	     gts_graph_edges_cut_weight (bg->g1));	   
+#endif
+    while ((cost = gts_graph_bisection_bkl_refine (bg, mmax))) {
+#ifdef DEBUG
+      fprintf (stderr, "  cost: %g\n", cost);
+      g_assert (gts_graph_bisection_check (bg));
+#endif
+    }
+#ifdef DEBUG
+    fprintf (stderr, "after  size: %5d weight: %5g cuts: %5d cweight: %5g\n",
+	     gts_container_size (GTS_CONTAINER (bg->g1)),
+	     gts_graph_weight (bg->g1),
+	     gts_graph_edges_cut (bg->g1),
+	     gts_graph_edges_cut_weight (bg->g1));
+#endif
+  }
+  gts_object_destroy (GTS_OBJECT (pg));
+
+  return bg;
+}
+
+/**
+ * gts_graph_bisection_destroy:
+ * @bg: a #GtsGraphBisection.
+ * @destroy_graphs: controls graph destruction.
+ *
+ * Frees all the memory allocated for @bg. If @destroy_graphs is %TRUE
+ * the graphs created by @bg are destroyed.  
+ */
+void gts_graph_bisection_destroy (GtsGraphBisection * bg,
+				  gboolean destroy_graphs)
+{
+  g_return_if_fail (bg != NULL);
+
+  g_hash_table_destroy (bg->bg1);
+  g_hash_table_destroy (bg->bg2);
+
+  if (destroy_graphs) {
+    gts_object_destroy (GTS_OBJECT (bg->g1));
+    gts_object_destroy (GTS_OBJECT (bg->g2));
+  }
+
+  g_free (bg);
+}
+
+static void recursive_bisection (GtsWGraph * wg,
+				 guint np,
+				 guint ntry,
+				 guint mmax,
+				 guint nmin,
+				 GSList ** list)
+{
+  if (np == 0)
+    *list = g_slist_prepend (*list, wg);
+  else {
+    GtsGraphBisection * bg = gts_graph_bisection_new (wg, ntry, mmax, nmin);
+    GtsGraph * g1 = bg->g1;
+    GtsGraph * g2 = bg->g2;
+
+    gts_object_destroy (GTS_OBJECT (wg));
+    gts_graph_bisection_destroy (bg, FALSE);
+    recursive_bisection (GTS_WGRAPH (g1), np - 1, ntry, mmax, nmin, list);
+    recursive_bisection (GTS_WGRAPH (g2), np - 1, ntry, mmax, nmin, list);
+  }
+}
+
+/**
+ * gts_graph_recursive_bisection:
+ * @wg: a #GtsWGraph.
+ * @n: the number of bisection levels.
+ * @ntry: the number of tries for the graph growing algorithm.
+ * @mmax: the number of unsucessful moves for the refinement algorithm.
+ * @nmin: the minimum number of nodes of the coarsest graph.
+ *
+ * Calls gts_graph_bisection_new() recursively in order to obtain a
+ * 2^@n partition of @wg.
+ *
+ * Returns: a list of 2^@n new #GtsGraph representing the partition.
+ */
+GSList * gts_graph_recursive_bisection (GtsWGraph * wg,
+					guint n,
+					guint ntry,
+					guint mmax,
+					guint nmin)
+{
+  GtsGraphBisection * bg;
+  GtsGraph * g1, * g2;
+  GSList * list = NULL;
+
+  g_return_val_if_fail (wg != NULL, NULL);
+  g_return_val_if_fail (n > 0, NULL);
+  
+  bg = gts_graph_bisection_new (wg, ntry, mmax, nmin);
+  g1 = bg->g1;
+  g2 = bg->g2;
+  gts_graph_bisection_destroy (bg, FALSE);
+  recursive_bisection (GTS_WGRAPH (g1), n - 1, ntry, mmax, nmin, &list);
+  recursive_bisection (GTS_WGRAPH (g2), n - 1, ntry, mmax, nmin, &list);
+
+  return list;
+}
diff --git a/src/pgraph.c b/src/pgraph.c
new file mode 100644
index 0000000..2c13c1e
--- /dev/null
+++ b/src/pgraph.c
@@ -0,0 +1,584 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+/* GtsGNodeSplit */
+
+static void gnode_split_destroy (GtsObject * object)
+{
+  GtsGNodeSplit * ns = GTS_GNODE_SPLIT (object);
+
+  if (gts_container_size (GTS_CONTAINER (ns->n)) == 0) {
+    g_assert (GTS_SLIST_CONTAINEE (ns->n)->containers == NULL);
+    gts_object_destroy (GTS_OBJECT (ns->n));
+  }
+  else {
+    GtsGNode * n1 = GTS_GNODE_SPLIT_N1 (ns);
+    GtsGNode * n2 = GTS_GNODE_SPLIT_N2 (ns);
+
+    g_warning ("Memory deallocation for GtsGNodeSplit not fully implemented yet: memory leak!");
+  }
+
+  (* GTS_OBJECT_CLASS (gts_gnode_split_class ())->parent_class->destroy) 
+    (object);
+}
+
+static void gnode_split_class_init (GtsGNodeSplitClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->destroy = gnode_split_destroy;
+}
+
+static void gnode_split_init (GtsGNodeSplit * ns)
+{
+  ns->n = NULL;
+  ns->n1 = ns->n2 = NULL;
+}
+
+/**
+ * gts_gnode_split_class:
+ *
+ * Returns: the #GtsGNodeSplitClass.
+ */
+GtsGNodeSplitClass * gts_gnode_split_class (void)
+{
+  static GtsGNodeSplitClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo gnode_split_info = {
+      "GtsGNodeSplit",
+      sizeof (GtsGNodeSplit),
+      sizeof (GtsGNodeSplitClass),
+      (GtsObjectClassInitFunc) gnode_split_class_init,
+      (GtsObjectInitFunc) gnode_split_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &gnode_split_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_gnode_split_new:
+ * @klass: a #GtsGNodeSplitClass.
+ * @n: a #GtsGNode.
+ * @n1: a #GtsGNodeSplit or #GtsGNode.
+ * @n2: a #GtsGNodeSplit or #GtsGNode.
+ *
+ * Creates a new #GtsGNodeSplit which would collapse @n1 and @n2 into
+ * @n. The collapse itself is not performed.
+ *
+ * Returns: the new #GtsGNodeSplit.
+ */
+GtsGNodeSplit * gts_gnode_split_new (GtsGNodeSplitClass * klass,
+				     GtsGNode * n, 
+				     GtsObject * n1,
+				     GtsObject * n2)
+{
+  GtsGNodeSplit * ns;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (n != NULL, NULL);
+  g_return_val_if_fail (GTS_IS_GNODE_SPLIT (n1) || GTS_IS_GNODE (n1), NULL);
+  g_return_val_if_fail (GTS_IS_GNODE_SPLIT (n2) || GTS_IS_GNODE (n2), NULL);
+
+  ns = GTS_GNODE_SPLIT (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  ns->n = n;
+  ns->n1 = n1;
+  ns->n2 = n2;
+
+  return ns;
+}
+
+static void connect_edge (GtsGEdge * e, gpointer * data)
+{
+  GtsGNode * n = data[0];
+  GtsGNode * n1 = data[1];
+  GtsGNode * n2 = data[2];
+
+  if (GTS_OBJECT (e)->reserved || /* edge is disconnected */
+      gts_gedge_connects (e, n1, n2))
+    return;
+  if (e->n1 == n1 || e->n1 == n2)
+    e->n1 = n;
+  else if (e->n2 == n1 || e->n2 == n2)
+    e->n2 = n;
+  else
+    g_assert_not_reached ();
+  gts_container_add (GTS_CONTAINER (n), GTS_CONTAINEE (e));
+}
+
+/**
+ * gts_gnode_split_collapse:
+ * @ns: a #GtsGNodeSplit.
+ * @g: a #GtsGraph.
+ * @klass: a #GtsWGEdgeClass.
+ *
+ * Collapses the node split @ns. Any new edge created during the
+ * process will be of class @klass.  
+ */
+void gts_gnode_split_collapse (GtsGNodeSplit * ns,
+			       GtsGraph * g,
+			       GtsWGEdgeClass * klass)
+{
+  GtsGNode * n1, * n2;
+  GSList * i;
+  gpointer data[3];
+
+  g_return_if_fail (ns != NULL);
+  g_return_if_fail (g != NULL);
+  g_return_if_fail (gts_container_size (GTS_CONTAINER (ns->n)) == 0);
+
+  n1 = GTS_GNODE_SPLIT_N1 (ns);
+  n2 = GTS_GNODE_SPLIT_N2 (ns);
+
+  /* look for triangles */
+  i = GTS_SLIST_CONTAINER (n1)->items;
+  while (i) {
+    GtsGEdge * e13 = i->data;
+    GtsGNode * n3 = GTS_GNODE_NEIGHBOR (n1, e13);
+    if (n3 != n2) {
+      GSList * j = GTS_SLIST_CONTAINER (n3)->items;
+      while (j) {
+	GtsGEdge * e32 = j->data;
+	GSList * next = j->next;
+	GtsGNode * n4 = GTS_GNODE_NEIGHBOR (n3, e32);
+	if (n4 == n2) { /* found triangle n1 (e13) n3 (e32) n2 */
+	  gts_wgedge_new (klass, ns->n, n3,
+			  gts_gedge_weight (e13) + gts_gedge_weight (e32));
+	  GTS_OBJECT (e13)->reserved = n3;
+	  GTS_OBJECT (e32)->reserved = n3;
+	  GTS_SLIST_CONTAINER (n3)->items = 
+	    g_slist_remove (GTS_SLIST_CONTAINER (n3)->items, e32);
+	}
+	j = next;
+      }
+      if (GTS_OBJECT (e13)->reserved == n3)
+	GTS_SLIST_CONTAINER (n3)->items = 
+	  g_slist_remove (GTS_SLIST_CONTAINER (n3)->items, e13);
+    }
+    i = i->next;
+  }
+
+  /* connect edges to new node */
+  data[0] = ns->n;
+  data[1] = n1;
+  data[2] = n2;
+  gts_container_foreach (GTS_CONTAINER (n1), (GtsFunc) connect_edge, data);
+  gts_container_foreach (GTS_CONTAINER (n2), (GtsFunc) connect_edge, data);
+
+  gts_allow_floating_gnodes = TRUE;
+  gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (n1));
+  gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (n2));
+  gts_allow_floating_gnodes = FALSE;
+  gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (ns->n));
+}
+
+static void restore_edge (GtsGEdge * e, gpointer * data)
+{
+  GtsGNode * n = data[0];
+  GtsGNode * n1 = data[1];
+  GtsGNode * n2 = data[2];
+  GtsGNode * n3 = GTS_OBJECT (e)->reserved;
+
+  if (n3) { /* e is a disconnected edge */
+    GTS_OBJECT (e)->reserved = NULL;
+    gts_container_add (GTS_CONTAINER (n3), GTS_CONTAINEE (e));
+    return;
+  }
+
+  if (gts_gedge_connects (e, n1, n2))
+    return;
+
+  if (e->n1 == n)
+    e->n1 = n1;
+  else if (e->n2 == n)
+    e->n2 = n1;
+  else
+    g_assert_not_reached ();
+  GTS_SLIST_CONTAINER (n)->items = 
+    g_slist_remove (GTS_SLIST_CONTAINER (n)->items, e);
+}
+
+/**
+ * gts_gnode_split_expand:
+ * @ns: a #GtsGNodeSplit.
+ * @g: a #GtsGraph.
+ *
+ * Expands the node split ns adding the new nodes to @g.
+ */
+void gts_gnode_split_expand (GtsGNodeSplit * ns,
+			     GtsGraph * g)
+{
+  GtsGNode * n1, * n2;
+  gpointer data[3];
+  GSList * i;
+
+  g_return_if_fail (ns != NULL);
+  g_return_if_fail (g != NULL);
+  g_return_if_fail (gts_containee_is_contained (GTS_CONTAINEE (ns->n), 
+						GTS_CONTAINER (g)));
+
+  n1 = GTS_GNODE_SPLIT_N1 (ns);
+  n2 = GTS_GNODE_SPLIT_N2 (ns);
+
+  data[0] = ns->n;
+  data[1] = n1;
+  data[2] = n2;
+  gts_container_foreach (GTS_CONTAINER (n1), (GtsFunc) restore_edge, data);
+  data[1] = n2;
+  data[2] = n1;
+  gts_container_foreach (GTS_CONTAINER (n2), (GtsFunc) restore_edge, data);
+
+  i = GTS_SLIST_CONTAINER (ns->n)->items;
+  while (i) {
+    GSList * next = i->next;
+    gts_container_remove (GTS_CONTAINER (ns->n), GTS_CONTAINEE (i->data));
+    i = next;
+  }
+  g_assert (gts_container_size (GTS_CONTAINER (ns->n)) == 0);
+  
+  gts_allow_floating_gnodes = TRUE;
+  gts_container_remove (GTS_CONTAINER (g), GTS_CONTAINEE (ns->n));
+  gts_allow_floating_gnodes = FALSE;
+
+  gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n1));
+  gts_container_add (GTS_CONTAINER (g), GTS_CONTAINEE (n2));
+}
+
+/* GtsPGraph */
+
+static void pgraph_destroy (GtsObject * object)
+{
+  GtsPGraph * pg = GTS_PGRAPH (object);
+  guint i;
+
+  for (i = 0; i < pg->split->len; i++)
+    gts_object_destroy (GTS_OBJECT (g_ptr_array_index (pg->split, i)));
+  g_ptr_array_free (pg->split, TRUE);
+  g_array_free (pg->levels, TRUE);
+
+  (* GTS_OBJECT_CLASS (gts_pgraph_class ())->parent_class->destroy) (object);
+}
+
+static void pgraph_class_init (GtsPGraphClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->destroy = pgraph_destroy;
+}
+
+static void pgraph_init (GtsPGraph * pg)
+{
+  pg->g = NULL;
+  pg->split = g_ptr_array_new ();
+  pg->levels = g_array_new (FALSE, FALSE, sizeof (guint));
+  pg->level = 0;
+  pg->split_class = gts_gnode_split_class ();
+  pg->edge_class = gts_wgedge_class ();
+  pg->pos = pg->min = 0;
+}
+
+/**
+ * gts_pgraph_class:
+ *
+ * Returns: the #GtsPGraphClass.
+ */
+GtsPGraphClass * gts_pgraph_class (void)
+{
+  static GtsPGraphClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo pgraph_info = {
+      "GtsPGraph",
+      sizeof (GtsPGraph),
+      sizeof (GtsPGraphClass),
+      (GtsObjectClassInitFunc) pgraph_class_init,
+      (GtsObjectInitFunc) pgraph_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &pgraph_info);
+  }
+
+  return klass;
+}
+
+static void match_neighbor (GtsGNode * n, gpointer * data)
+{
+  if (!GTS_OBJECT (n)->reserved) {
+    GtsGraph * g = data[0];
+    GSList ** list = data[1];
+    GSList * i = GTS_SLIST_CONTAINER (n)->items;
+    gfloat wmax = - G_MAXFLOAT;
+    GtsGEdge * emax = NULL;
+    
+    while (i) {
+      GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, i->data);
+      if (!GTS_OBJECT (n1)->reserved &&
+	  gts_gedge_weight (i->data) > wmax &&
+	  gts_containee_is_contained (GTS_CONTAINEE (n1), GTS_CONTAINER (g))) {
+	emax = i->data;
+	wmax = gts_gedge_weight (emax);
+      }
+      i = i->next;
+    }
+    if (emax) {
+      GtsGNode * n1 = GTS_GNODE_NEIGHBOR (n, emax);
+
+      GTS_OBJECT (n1)->reserved = n;
+      GTS_OBJECT (n)->reserved = n1;
+      *list = g_slist_prepend (*list, emax);
+    }
+  }
+}
+
+static GSList * maximal_matching (GtsGraph * g)
+{
+  GSList * list = NULL;
+  gpointer data[2];
+
+  data[0] = g;
+  data[1] = &list;
+  gts_container_foreach (GTS_CONTAINER (g), (GtsFunc) match_neighbor, data);
+  gts_container_foreach (GTS_CONTAINER (g), 
+			 (GtsFunc) gts_object_reset_reserved,
+			 NULL);
+
+  return list;
+}
+
+/**
+ * gts_pgraph_new:
+ * @klass: a #GtsPGraphClass.
+ * @g: a #GtsGraph.
+ * @split_class: a #GtsGNodeSplitClass.
+ * @node_class: a #GtsWGNodeClass.
+ * @edge_class: a #GtsWGEdgeClass.
+ * @min: the minimum number of nodes.
+ *
+ * Creates a new multilevel approximation of graph @g. At each level a
+ * maximal matching is created using the Heavy Edge Matching (HEM)
+ * technique of Karypis and Kumar (1997). The newly created nodes are
+ * of type @node_class and their weight is set to the sum of the
+ * weights of their children. The newly created edges are of type
+ * @edge_class and their weight is set to the sum of the weight of the
+ * collapsed edges. The last level is reached when the maximal
+ * matching obtained would lead to a graph with less than @min nodes.
+ *
+ * Returns: the new #GtsPGraph containing the multilevel
+ * representation of @g.  
+ */
+GtsPGraph * gts_pgraph_new (GtsPGraphClass * klass,
+			    GtsGraph * g,
+			    GtsGNodeSplitClass * split_class,
+			    GtsWGNodeClass * node_class,
+			    GtsWGEdgeClass * edge_class,
+			    guint min)
+{
+  GtsPGraph * pg;
+  GSList * matching;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (g != NULL, NULL);
+  g_return_val_if_fail (split_class != NULL, NULL);
+  g_return_val_if_fail (node_class != NULL, NULL);
+  g_return_val_if_fail (edge_class != NULL, NULL);
+
+  pg = GTS_PGRAPH (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  pg->g = g;
+  pg->split_class = split_class;
+  pg->edge_class = edge_class;
+
+  while (gts_container_size (GTS_CONTAINER (g)) > min &&
+	 (matching = maximal_matching (g))) {
+    GSList * i = matching;
+    guint size = gts_container_size (GTS_CONTAINER (g));
+
+    g_array_append_val (pg->levels, size);
+
+    while (i && gts_container_size (GTS_CONTAINER (g)) > min) {
+      GtsGEdge * e = i->data;
+      GtsGNode * n = GTS_GNODE (gts_wgnode_new (node_class,
+						gts_gnode_weight (e->n1) +
+						gts_gnode_weight (e->n2)));
+      GtsGNodeSplit * ns = gts_gnode_split_new (split_class, n,
+						GTS_OBJECT (e->n1),
+						GTS_OBJECT (e->n2));
+      gts_gnode_split_collapse (ns, g, edge_class);
+      g_ptr_array_add (pg->split, ns);
+      i = i->next;
+    }
+    g_slist_free (matching);
+  }
+
+  pg->pos = pg->split->len;
+  pg->min = gts_container_size (GTS_CONTAINER (g));
+  pg->level = pg->levels->len;
+  
+  return pg;
+}
+
+/**
+ * gts_pgraph_add_node:
+ * @pg: a #GtsPGraph.
+ *
+ * Adds one node to the multilevel graph @pg by expanding the next
+ * available #GtsGNodeSplit.
+ *
+ * Returns: the expanded #GtsGNodeSplit or #NULL if all the
+ * #GtsGNodeSplit have already been expanded.  
+ */
+GtsGNodeSplit * gts_pgraph_add_node (GtsPGraph * pg)
+{ 
+  GtsGNodeSplit * ns;
+
+  g_return_val_if_fail (pg != NULL, NULL);
+
+  if (pg->pos == 0)
+    return NULL;
+
+  ns = g_ptr_array_index (pg->split, --pg->pos);
+  gts_gnode_split_expand (ns, pg->g);
+
+  return ns;
+}
+
+/**
+ * gts_pgraph_remove_node:
+ * @pg: a #GtsPGraph.
+ *
+ * Removes one node from the multilevel graph @pg by collapsing the
+ * first available #GtsGNodeSplit.
+ *
+ * Returns: the collapsed #GtsGNodeSplit or %NULL if all the
+ * #GtsGNodeSplit have already been collapsed.  
+ */
+GtsGNodeSplit * gts_pgraph_remove_node (GtsPGraph * pg)
+{
+  GtsGNodeSplit * ns;
+
+  g_return_val_if_fail (pg != NULL, NULL);
+
+  if (pg->pos == pg->split->len)
+    return NULL;
+
+  ns = g_ptr_array_index (pg->split, pg->pos++);
+  gts_gnode_split_collapse (ns, pg->g, pg->edge_class);
+
+  return ns;
+}
+
+/**
+ * gts_pgraph_max_node_number:
+ * @pg: a #GtsPGraph.
+ *
+ * Returns: the maximum number of nodes of @pg i.e. the number of
+ * nodes if all the #GtsGNodeSplit were expanded.  
+ */
+guint gts_pgraph_max_node_number (GtsPGraph * pg)
+{
+  g_return_val_if_fail (pg != NULL, 0);
+
+  return pg->min + pg->split->len;
+}
+
+/**
+ * gts_pgraph_min_node_number:
+ * @pg: a #GtsPGraph.
+ *
+ * Returns: the minimum number of nodes of @pg i.e. the number of
+ * nodes if all the #GtsGNodeSplit were collapsed.  
+ */
+guint gts_pgraph_min_node_number (GtsPGraph * pg)
+{
+  g_return_val_if_fail (pg != NULL, 0);
+
+  return pg->min;
+}
+
+/**
+ * gts_pgraph_set_node_number:
+ * @pg: a #GtsPGraph.
+ * @n: a number of nodes.
+ *
+ * Performs the required number of collapses or expansions to set the
+ * number of nodes of @pg to @n.
+ */
+void gts_pgraph_set_node_number (GtsPGraph * pg, guint n)
+{
+  g_return_if_fail (pg != NULL);
+
+  n = pg->min + pg->split->len - n;
+  while (pg->pos > n && gts_pgraph_add_node (pg))
+    ;
+  while (pg->pos < n && gts_pgraph_remove_node (pg))
+    ;
+}
+
+/**
+ * gts_pgraph_get_node_number:
+ * @pg: a #GtsPGraph.
+ *
+ * Returns: the current number of nodes of @pg.
+ */
+guint gts_pgraph_get_node_number (GtsPGraph * pg)
+{
+  g_return_val_if_fail (pg != NULL, 0);
+  
+  return pg->min + pg->split->len - pg->pos;
+}
+
+/**
+ * gts_pgraph_down:
+ * @pg: a #GtsPGraph.
+ * @func: a #GtsFunc or %NULL.
+ * @data: user data to pass to @func.
+ *
+ * Performs the required number of expansions to go from the current
+ * level to the level immediately below.
+ *
+ * If @func is not %NULL, it is called after each #GtsGNodeSplit has
+ * been expanded.  
+ *
+ * Returns: %FALSE if it is not possible to go down one level, %TRUE
+ * otherwise.  
+ */
+gboolean gts_pgraph_down (GtsPGraph * pg,
+			  GtsFunc func,
+			  gpointer data)
+{
+  guint size;
+
+  g_return_val_if_fail (pg != NULL, FALSE);
+
+  if (pg->level == 0)
+    return FALSE;
+
+  size = g_array_index (pg->levels, guint, --(pg->level));
+  while (gts_container_size (GTS_CONTAINER (pg->g)) < size) {
+    GtsGNodeSplit * ns = gts_pgraph_add_node (pg);
+
+    g_assert (ns);
+    if (func)
+      (* func) (ns, data);
+  }
+  return TRUE;
+}
+
diff --git a/src/point.c b/src/point.c
new file mode 100644
index 0000000..40bbdfa
--- /dev/null
+++ b/src/point.c
@@ -0,0 +1,796 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "gts.h"
+#include "gts-private.h"
+#ifdef USE_ROBUST_PREDICATES
+#include "predicates.h"
+#endif /* USE_ROBUST_PREDICATES */
+
+static gint point_read (GtsObject ** o, FILE * fptr)
+{
+  GtsPoint * p = GTS_POINT (*o);
+  GString * buf;
+  gint delim;
+
+  buf = g_string_new ("");
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return EOF;
+  }
+  p->x = atof (buf->str);
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return EOF;
+  }
+  p->y = atof (buf->str);
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF) {
+    g_string_free (buf, TRUE);
+    return EOF;
+  }
+  p->z = atof (buf->str);
+  g_string_free (buf, TRUE);
+  return delim;
+}
+
+static void point_write (GtsObject * o, FILE * fptr)
+{
+  GtsPoint * p = GTS_POINT (o);
+
+  fprintf (fptr, "%.10g %.10g %.10g", p->x, p->y, p->z);
+}
+
+static void point_class_init (GtsObjectClass * klass)
+{
+  klass->read = point_read;
+  klass->write = point_write;
+}
+
+/**
+ * gts_point_class:
+ *
+ * Returns: the #GtsPointClass.
+ */
+GtsPointClass * gts_point_class (void)
+{
+  static GtsPointClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo point_info = {
+      "GtsPoint",
+      sizeof (GtsPoint),
+      sizeof (GtsPointClass),
+      (GtsObjectClassInitFunc) point_class_init,
+      (GtsObjectInitFunc) NULL,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), 
+				  &point_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_point_new:
+ * @klass: a #GtsPointClass.
+ * @x: the x-coordinate.
+ * @y: the y-coordinate.
+ * @z: the z-coordinate.
+ *
+ * Returns: a new #GtsPoint.
+ */
+GtsPoint * gts_point_new (GtsPointClass * klass,
+			  gdouble x, gdouble y, gdouble z)
+{
+  GtsPoint * p;
+  
+  p = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  p->x = x;
+  p->y = y;
+  p->z = z;
+
+  return p;
+}
+
+/**
+ * gts_point_set:
+ * @p: a #GtsPoint.
+ * @x: the x-coordinate.
+ * @y: the y-coordinate.
+ * @z: the z-coordinate.
+ *
+ * Sets the coordinates of @p.
+ */
+void gts_point_set (GtsPoint * p, gdouble x, gdouble y, gdouble z)
+{
+  g_return_if_fail (p != NULL);
+
+  p->x = x;
+  p->y = y;
+  p->z = z;
+}
+
+/**
+ * gts_point_distance:
+ * @p1: a #GtsPoint.
+ * @p2: another #GtsPoint.
+ *
+ * Returns: the Euclidean distance between @p1 and @p2.
+ */
+gdouble gts_point_distance (GtsPoint * p1, GtsPoint * p2)
+{
+  g_return_val_if_fail (p1 != NULL && p2 != NULL, 0.0);
+  
+  return sqrt ((p1->x - p2->x)*(p1->x - p2->x) + 
+	       (p1->y - p2->y)*(p1->y - p2->y) + 
+	       (p1->z - p2->z)*(p1->z - p2->z));
+}
+
+/**
+ * gts_point_distance2:
+ * @p1: a #GtsPoint.
+ * @p2: another #GtsPoint.
+ *
+ * Returns: the square of the Euclidean distance between @p1 and @p2.
+ */
+gdouble gts_point_distance2 (GtsPoint * p1, GtsPoint * p2)
+{
+  g_return_val_if_fail (p1 != NULL && p2 != NULL, 0.0);
+  
+  return
+    (p1->x - p2->x)*(p1->x - p2->x) +
+    (p1->y - p2->y)*(p1->y - p2->y) + 
+    (p1->z - p2->z)*(p1->z - p2->z);
+}
+
+/**
+ * gts_point_orientation_3d:
+ * @p1: a #GtsPoint.
+ * @p2: a #GtsPoint.
+ * @p3: a #GtsPoint.
+ * @p4: a #GtsPoint.
+ *
+ * Checks if @p4 lies above, below or on the plane passing through the
+ * points @p1, @p2 and @p3. Below is defined so that @p1, @p2 and @p3
+ * appear in counterclockwise order when viewed from above the
+ * plane. The returned value is an approximation of six times the
+ * signed volume of the tetrahedron defined by the four points. This
+ * function uses adaptive floating point arithmetic and is
+ * consequently geometrically robust.
+ *
+ * Returns: a positive value if @p4 lies below, a negative value if
+ * @p4 lies above the plane, zero if the four points are coplanar.  
+ */
+gdouble gts_point_orientation_3d (GtsPoint * p1,
+				  GtsPoint * p2,
+				  GtsPoint * p3,
+				  GtsPoint * p4)
+{
+  g_return_val_if_fail (p1 != NULL && p2 != NULL && 
+			p3 != NULL && p4 != NULL, 0.0);
+#ifdef USE_ROBUST_PREDICATES
+  return orient3d ((gdouble *) &p1->x, 
+		   (gdouble *) &p2->x, 
+		   (gdouble *) &p3->x, 
+		   (gdouble *) &p4->x);
+#else
+  {
+    gdouble adx, bdx, cdx;
+    gdouble ady, bdy, cdy;
+    gdouble adz, bdz, cdz;
+    
+    adx = p1->x - p4->x;
+    bdx = p2->x - p4->x;
+    cdx = p3->x - p4->x;
+    ady = p1->y - p4->y;
+    bdy = p2->y - p4->y;
+    cdy = p3->y - p4->y;
+    adz = p1->z - p4->z;
+    bdz = p2->z - p4->z;
+    cdz = p3->z - p4->z;
+    
+    return adx * (bdy * cdz - bdz * cdy)
+      + bdx * (cdy * adz - cdz * ady)
+      + cdx * (ady * bdz - adz * bdy);
+  }
+#endif /* USE_ROBUST_PREDICATES */
+}
+
+/**
+ * gts_point_is_in_triangle:
+ * @p: a #GtsPoint.
+ * @t: a #GtsTriangle.
+ *
+ * Tests if the planar projection (x, y) of @p is inside, outside or
+ * on the boundary of the planar projection of @t.  This function is
+ * geometrically robust.
+ * 
+ * Returns: %GTS_IN if @p is inside @t, %GTS_ON if @p is on the boundary of
+ * @t, %GTS_OUT otherwise.  
+ */
+GtsIntersect gts_point_is_in_triangle (GtsPoint * p, GtsTriangle * t)
+{
+  GtsVertex * v1, * v2, * v3;
+  gdouble d1, d2, d3;
+
+  g_return_val_if_fail (p != NULL && t != NULL, FALSE);
+
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+
+  d1 = gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p);
+  if (d1 < 0.0)
+    return GTS_OUT;
+  d2 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p);
+  if (d2 < 0.0)
+    return GTS_OUT;
+  d3 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p);
+  if (d3 < 0.0)
+    return GTS_OUT;
+  if (d1 == 0.0 || d2 == 0.0 || d3 == 0.0)
+    return GTS_ON;
+  return GTS_IN;
+}
+
+/**
+ * gts_point_in_triangle_circle:
+ * @p: a #GtsPoint.
+ * @t: a #GtsTriangle.
+ *
+ * Tests if the planar projection (x, y) of @p is inside or outside
+ * the circumcircle of the planar projection of @t. This function is
+ * geometrically robust.
+ * 
+ * Returns: a positive number if @p lies inside,
+ * a negative number if @p lies outside and zero if @p lies on 
+ * the circumcircle of @t.  
+ */
+gdouble gts_point_in_triangle_circle (GtsPoint * p, GtsTriangle * t)
+{
+  GtsPoint * p1, * p2, * p3;
+
+  g_return_val_if_fail (p != NULL && t != NULL, 0.0);
+
+  gts_triangle_vertices (t, 
+			 (GtsVertex **) &p1, 
+			 (GtsVertex **) &p2, 
+			 (GtsVertex **) &p3);
+
+#ifdef USE_ROBUST_PREDICATES
+  return incircle ((gdouble *) &p1->x, 
+		   (gdouble *) &p2->x, 
+		   (gdouble *) &p3->x, 
+		   (gdouble *) &p->x);
+#else
+  {
+    gdouble adx, bdx, cdx, ady, bdy, cdy;
+    gdouble bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady;
+    gdouble alift, blift, clift;
+    gdouble det;
+    
+    adx = p1->x - p->x;
+    bdx = p2->x - p->x;
+    cdx = p3->x - p->x;
+    ady = p1->y - p->y;
+    bdy = p2->y - p->y;
+    cdy = p3->y - p->y;
+    
+    bdxcdy = bdx*cdy;
+    cdxbdy = cdx*bdy;
+    alift = adx*adx + ady*ady;
+    
+    cdxady = cdx*ady;
+    adxcdy = adx*cdy;
+    blift = bdx*bdx + bdy*bdy;
+    
+    adxbdy = adx*bdy;
+    bdxady = bdx*ady;
+    clift = cdx*cdx + cdy*cdy;
+    
+    det = alift*(bdxcdy - cdxbdy)
+      + blift*(cdxady - adxcdy)
+      + clift*(adxbdy - bdxady);
+    return det;
+  }
+#endif /* USE_ROBUST_PREDICATES */
+}
+
+/**
+ * gts_point_in_circle:
+ * @p: a #GtsPoint.
+ * @p1: a #GtsPoint.
+ * @p2: a #GtsPoint.
+ * @p3: a #GtsPoint.
+ *
+ * Tests if the planar projection (x, y) of @p is inside or outside the
+ * circle defined by the planar projection of @p1, @p2 and @p3.
+ * 
+ * Returns: a positive number if @p lies inside,
+ * a negative number if @p lies outside and zero if @p lies on 
+ * the circle.
+ */
+gdouble gts_point_in_circle (GtsPoint * p, 
+			     GtsPoint * p1, GtsPoint * p2, GtsPoint * p3)
+{
+  g_return_val_if_fail (p != NULL && p1 != NULL && p2 != NULL && p3 != NULL, 
+			0.0);
+
+#ifdef USE_ROBUST_PREDICATES
+  return incircle ((gdouble *) &p1->x, 
+		   (gdouble *) &p2->x, 
+		   (gdouble *) &p3->x, 
+		   (gdouble *) &p->x);
+#else
+  {
+    gdouble adx, bdx, cdx, ady, bdy, cdy;
+    gdouble bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady;
+    gdouble alift, blift, clift;
+    gdouble det;
+    
+    adx = p1->x - p->x;
+    bdx = p2->x - p->x;
+    cdx = p3->x - p->x;
+    ady = p1->y - p->y;
+    bdy = p2->y - p->y;
+    cdy = p3->y - p->y;
+    
+    bdxcdy = bdx*cdy;
+    cdxbdy = cdx*bdy;
+    alift = adx*adx + ady*ady;
+    
+    cdxady = cdx*ady;
+    adxcdy = adx*cdy;
+    blift = bdx*bdx + bdy*bdy;
+    
+    adxbdy = adx*bdy;
+    bdxady = bdx*ady;
+    clift = cdx*cdx + cdy*cdy;
+    
+    det = alift*(bdxcdy - cdxbdy)
+      + blift*(cdxady - adxcdy)
+      + clift*(adxbdy - bdxady);
+    return det;
+  }
+#endif /* USE_ROBUST_PREDICATES */
+}
+
+/**
+ * gts_point_segment_distance2:
+ * @p: a #GtsPoint.
+ * @s: a #GtsSegment.
+ *
+ * Returns: the square of the minimun Euclidean distance between @p and @s.
+ */
+gdouble gts_point_segment_distance2 (GtsPoint * p, GtsSegment * s)
+{
+  gdouble t, ns2, x, y, z;
+  GtsPoint * p1, * p2;
+
+  g_return_val_if_fail (p != NULL, 0.0);
+  g_return_val_if_fail (s != NULL, 0.0);
+
+  p1 = GTS_POINT (s->v1);
+  p2 = GTS_POINT (s->v2);
+  ns2 = gts_point_distance2 (p1, p2);
+  if (ns2 == 0.0)
+    return gts_point_distance2 (p, p1);
+  t = ((p2->x - p1->x)*(p->x - p1->x) + 
+       (p2->y - p1->y)*(p->y - p1->y) +
+       (p2->z - p1->z)*(p->z - p1->z))/ns2;
+  if (t > 1.0)
+    return gts_point_distance2 (p, p2);
+  if (t < 0.0)
+    return gts_point_distance2 (p, p1);
+  x = (1. - t)*p1->x + t*p2->x - p->x;
+  y = (1. - t)*p1->y + t*p2->y - p->y;
+  z = (1. - t)*p1->z + t*p2->z - p->z;
+  return x*x + y*y + z*z;
+}
+
+/**
+ * gts_point_segment_distance:
+ * @p: a #GtsPoint.
+ * @s: a #GtsSegment.
+ *
+ * Returns: the minimun Euclidean distance between @p and @s.
+ */
+gdouble gts_point_segment_distance (GtsPoint * p, GtsSegment * s)
+{
+  g_return_val_if_fail (p != NULL, 0.0);
+  g_return_val_if_fail (s != NULL, 0.0);
+
+  return sqrt (gts_point_segment_distance2 (p, s));
+}
+
+/**
+ * gts_point_segment_closest:
+ * @p: a #GtsPoint.
+ * @s: a #GtsSegment.
+ * @closest: a #GtsPoint.
+ *
+ * Set the coordinates of @closest to the coordinates of the point belonging
+ * to @s closest to @p.
+ */
+void gts_point_segment_closest (GtsPoint * p, 
+				GtsSegment * s,
+				GtsPoint * closest)
+{
+  gdouble t, ns2;
+  GtsPoint * p1, * p2;
+
+  g_return_if_fail (p != NULL);
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (closest != NULL);
+
+  p1 = GTS_POINT (s->v1);
+  p2 = GTS_POINT (s->v2);
+  ns2 = gts_point_distance2 (p1, p2);
+
+  if (ns2 == 0.0) {
+    gts_point_set (closest, p1->x, p1->y, p1->z);
+    return;
+  }
+
+  t = ((p2->x - p1->x)*(p->x - p1->x) + 
+       (p2->y - p1->y)*(p->y - p1->y) +
+       (p2->z - p1->z)*(p->z - p1->z))/ns2;
+
+  if (t > 1.0)
+    gts_point_set (closest, p2->x, p2->y, p2->z);
+  else if (t < 0.0)
+    gts_point_set (closest, p1->x, p1->y, p1->z);
+  else
+    gts_point_set (closest,
+		   (1. - t)*p1->x + t*p2->x,
+		   (1. - t)*p1->y + t*p2->y,
+		   (1. - t)*p1->z + t*p2->z);
+}
+
+/**
+ * gts_point_triangle_distance2:
+ * @p: a #GtsPoint.
+ * @t: a #GtsTriangle.
+ *
+ * Returns: the square of the minimun Euclidean distance between @p and @t.
+ */
+gdouble gts_point_triangle_distance2 (GtsPoint * p, GtsTriangle * t)
+{
+  GtsPoint * p1, * p2, * p3;
+  GtsEdge * e1, * e2, * e3;
+  GtsVector p1p2, p1p3, pp1;
+  gdouble A, B, C, D, E, det;
+  gdouble t1, t2;
+  gdouble x, y, z;
+
+  g_return_val_if_fail (p != NULL, 0.0);
+  g_return_val_if_fail (t != NULL, 0.0);
+
+  gts_triangle_vertices_edges (t, NULL, 
+			       (GtsVertex **) &p1, 
+			       (GtsVertex **) &p2, 
+			       (GtsVertex **) &p3, 
+			       &e1, &e2, &e3);
+
+  gts_vector_init (p1p2, p1, p2);
+  gts_vector_init (p1p3, p1, p3);
+  gts_vector_init (pp1, p, p1);
+
+  B = gts_vector_scalar (p1p3, p1p2);
+  E = gts_vector_scalar (p1p2, p1p2);
+  C = gts_vector_scalar (p1p3, p1p3);
+  
+  det = B*B - E*C;
+  if (det == 0.) { /* p1p2 and p1p3 are colinear */
+    gdouble d1 = gts_point_segment_distance2 (p, GTS_SEGMENT (e1));
+    gdouble d2 = gts_point_segment_distance2 (p, GTS_SEGMENT (e3));
+    if (d1 < d2)
+      return d1;
+    return d2;
+  }
+
+  A = gts_vector_scalar (p1p3, pp1);
+  D = gts_vector_scalar (p1p2, pp1);
+  
+  t1 = (D*C - A*B)/det;
+  t2 = (A*E - D*B)/det;
+
+  if (t1 < 0.)
+    return gts_point_segment_distance2 (p, GTS_SEGMENT (e3));
+  if (t2 < 0.)
+    return gts_point_segment_distance2 (p, GTS_SEGMENT (e1));
+  if (t1 + t2 > 1.)
+    return gts_point_segment_distance2 (p, GTS_SEGMENT (e2));
+
+  x = pp1[0] + t1*p1p2[0] + t2*p1p3[0];
+  y = pp1[1] + t1*p1p2[1] + t2*p1p3[1];
+  z = pp1[2] + t1*p1p2[2] + t2*p1p3[2];
+
+  return x*x + y*y + z*z;
+}
+
+/**
+ * gts_point_triangle_distance:
+ * @p: a #GtsPoint.
+ * @t: a #GtsTriangle.
+ *
+ * Returns: the minimun Euclidean distance between @p and @t.
+ */
+gdouble gts_point_triangle_distance (GtsPoint * p, GtsTriangle * t)
+{
+  g_return_val_if_fail (p != NULL, 0.0);
+  g_return_val_if_fail (t != NULL, 0.0);
+
+  return sqrt (gts_point_triangle_distance2 (p, t));
+}
+
+/**
+ * gts_point_triangle_closest:
+ * @p: a #GtsPoint.
+ * @t: a #GtsTriangle.
+ * @closest: a #GtsPoint.
+ *
+ * Set the coordinates of @closest to those of the point belonging to @t and 
+ * closest to @p.
+ */
+void gts_point_triangle_closest (GtsPoint * p, 
+				 GtsTriangle * t, 
+				 GtsPoint * closest)
+{
+  GtsPoint * p1, * p2, * p3;
+  GtsEdge * e1, * e2, * e3;
+  GtsVector p1p2, p1p3, pp1;
+  gdouble A, B, C, D, E, det;
+  gdouble t1, t2;
+
+  g_return_if_fail (p != NULL);
+  g_return_if_fail (t != NULL);
+  g_return_if_fail (closest != NULL);
+
+  gts_triangle_vertices_edges (t, NULL, 
+			       (GtsVertex **) &p1, 
+			       (GtsVertex **) &p2, 
+			       (GtsVertex **) &p3, 
+			       &e1, &e2, &e3);
+
+  gts_vector_init (p1p2, p1, p2);
+  gts_vector_init (p1p3, p1, p3);
+  gts_vector_init (pp1, p, p1);
+
+  B = gts_vector_scalar (p1p3, p1p2);
+  E = gts_vector_scalar (p1p2, p1p2);
+  C = gts_vector_scalar (p1p3, p1p3);
+  
+  det = B*B - E*C;
+  if (det == 0.) { /* p1p2 and p1p3 are colinear */
+    GtsPoint * cp = 
+      GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (gts_point_class ())));
+    gts_point_segment_closest (p, GTS_SEGMENT (e1), cp);
+    gts_point_segment_closest (p, GTS_SEGMENT (e3), closest);
+
+    if (gts_point_distance2 (cp, p) < gts_point_distance2 (closest, p))
+      gts_point_set (closest, cp->x, cp->y, cp->z);
+    gts_object_destroy (GTS_OBJECT (cp));
+    return;
+  }
+
+  A = gts_vector_scalar (p1p3, pp1);
+  D = gts_vector_scalar (p1p2, pp1);
+  
+  t1 = (D*C - A*B)/det;
+  t2 = (A*E - D*B)/det;
+
+  if (t1 < 0.)
+    gts_point_segment_closest (p, GTS_SEGMENT (e3), closest);
+  else if (t2 < 0.)
+    gts_point_segment_closest (p, GTS_SEGMENT (e1), closest);
+  else if (t1 + t2 > 1.)
+    gts_point_segment_closest (p, GTS_SEGMENT (e2), closest);
+  else
+    gts_point_set (closest, 
+		   p1->x + t1*p1p2[0] + t2*p1p3[0],
+		   p1->y + t1*p1p2[1] + t2*p1p3[1],
+		   p1->z + t1*p1p2[2] + t2*p1p3[2]);
+}
+
+/**
+ * gts_segment_triangle_intersection:
+ * @s: a #GtsSegment.
+ * @t: a #GtsTriangle.
+ * @boundary: if %TRUE, the boundary of @t is taken into account.
+ * @klass: a #GtsPointClass to be used for the new point.
+ *
+ * Checks if @s intersects @t. If this is the case, creates a new
+ * point pi intersection of @s with @t.
+ *
+ * This function is geometrically robust in the sense that it will not
+ * return a point if @s and @t do not intersect and will return a
+ * point if @s and @t do intersect. However, the point coordinates are
+ * subject to round-off errors.
+ *
+ * Note that this function will not return any point if @s is contained in
+ * the plane defined by @t.
+ * 
+ * Returns: a summit of @t (if @boundary is set to %TRUE), one of the endpoints
+ * of @s or a new #GtsPoint, intersection of @s with @t or %NULL if @s 
+ * and @t don't intersect.  
+ */
+GtsPoint * gts_segment_triangle_intersection (GtsSegment * s,
+					      GtsTriangle * t,
+					      gboolean boundary,
+					      GtsPointClass * klass)
+{
+  GtsPoint * A, * B, * C, * D, * E, * I;
+  gdouble ABCE, ABCD, ADCE, ABDE, BCDE;
+  gdouble c;
+
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (t != NULL, NULL);
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  A = GTS_POINT (GTS_SEGMENT (t->e1)->v1);
+  B = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  C = GTS_POINT (gts_triangle_vertex (t));
+  D = GTS_POINT (s->v1); 
+  E = GTS_POINT (s->v2);
+
+  ABCE = gts_point_orientation_3d (A, B, C, E);
+  ABCD = gts_point_orientation_3d (A, B, C, D);
+  if (ABCE < 0.0 || ABCD > 0.0) {
+    GtsPoint * tmpp;
+    gdouble tmp;
+    tmpp = E; E = D; D = tmpp;
+    tmp = ABCE; ABCE = ABCD; ABCD = tmp;
+  }
+  if (ABCE < 0.0 || ABCD > 0.0)
+    return NULL;
+  ADCE = gts_point_orientation_3d (A, D, C, E);
+  if ((boundary && ADCE < 0.) || (!boundary && ADCE <= 0.))
+    return NULL;
+  ABDE = gts_point_orientation_3d (A, B, D, E);
+  if ((boundary && ABDE < 0.) || (!boundary && ABDE <= 0.))
+    return NULL;
+  BCDE = gts_point_orientation_3d (B, C, D, E);
+  if ((boundary && BCDE < 0.) || (!boundary && BCDE <= 0.))
+    return NULL;
+  if (ABCE == 0.0) {
+    if (ABCD == 0.0)
+      /* s is contained in the plane defined by t*/
+      return NULL;
+    return E;
+  }
+  if (ABCD == 0.0)
+    return D;
+  if (boundary) { /* corners of @t */
+    if (ABDE == 0.) {
+      if (ADCE == 0.)
+	return A;
+      if (BCDE == 0.)
+	return B;
+    }
+    else if (BCDE == 0. && ADCE == 0.)
+      return C;
+  }
+  c = ABCE/(ABCE - ABCD);
+  I = GTS_POINT (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  gts_point_set (I,
+		 E->x + c*(D->x - E->x),
+		 E->y + c*(D->y - E->y),
+		 E->z + c*(D->z - E->z));
+  return I;
+}
+
+/**
+ * gts_point_transform:
+ * @p: a #GtsPoint.
+ * @m: the #GtsMatrix representing the transformation to 
+ * apply to the coordinates of @p.
+ *
+ * Transform the coordinates of @p according to @m. (p[] becomes m[][].p[]).
+ */
+void gts_point_transform (GtsPoint * p, GtsMatrix * m)
+{
+  gdouble x, y, z;
+  g_return_if_fail (p != NULL && m != NULL);
+  x = m[0][0]*p->x + m[0][1]*p->y + m[0][2]*p->z;
+  y = m[1][0]*p->x + m[1][1]*p->y + m[1][2]*p->z;
+  z = m[2][0]*p->x + m[2][1]*p->y + m[2][2]*p->z;
+  p->x = x; p->y = y; p->z = z;
+}
+
+/**
+ * gts_point_orientation:
+ * @p1: a #GtsPoint.
+ * @p2: a #GtsPoint.
+ * @p3: a #GtsPoint.
+ *
+ * Checks for orientation of the projection of three points on the
+ * (x,y) plane. The result is also an approximation of twice the
+ * signed area of the triangle defined by the three points. This
+ * function uses adaptive floating point arithmetic and is
+ * consequently geometrically robust.
+ *
+ * Returns: a positive value if @p1, @p2 and @p3 appear in
+ * counterclockwise order, a negative value if they appear in
+ * clockwise order and zero if they are colinear.  
+ */
+gdouble gts_point_orientation (GtsPoint * p1, GtsPoint * p2, GtsPoint * p3)
+{
+#ifdef USE_ROBUST_PREDICATES
+  g_return_val_if_fail (p1 != NULL && p2 != NULL && p3 != NULL, 0.0);
+
+  return orient2d ((gdouble *) &p1->x, 
+		   (gdouble *) &p2->x, 
+		   (gdouble *) &p3->x);
+#else
+  gdouble acx, bcx, acy, bcy;
+  
+  g_return_val_if_fail (p1 != NULL && p2 != NULL && p3 != NULL, 0.0);
+
+  acx = p1->x - p3->x;
+  bcx = p2->x - p3->x;
+  acy = p1->y - p3->y;
+  bcy = p2->y - p3->y;
+  return acx * bcy - acy * bcx;
+#endif /* USE_ROBUST_PREDICATES */
+}
+
+/** 
+ * gts_point_is_inside_surface: 
+ * @p: a #GtsPoint.  
+ * @tree: a bounding box tree of the faces of a closed, orientable
+ * surface (see gts_bb_tree_surface()).
+ * @is_open: %TRUE if the surface defined by @tree is "open" i.e. its volume 
+ * is negative, %FALSE otherwise.
+ *
+ * Returns: %TRUE if @p is inside or on the boundary of the surface
+ * defined by @tree, %FALSE otherwise.  
+ */
+gboolean gts_point_is_inside_surface (GtsPoint * p, 
+				      GNode * tree,
+				      gboolean is_open)
+{
+  GSList * list, * i, * stabbed = NULL;
+  gboolean inside;
+
+  g_return_val_if_fail (p != NULL, FALSE);
+  g_return_val_if_fail (tree != NULL, FALSE);
+
+  i = list = gts_bb_tree_stabbed (tree, p);
+  while (i) {
+    GtsTriangle * t = GTS_TRIANGLE (GTS_BBOX (i->data)->bounded);
+    GtsObject * o = gts_triangle_is_stabbed (t, p, NULL);
+    
+    if (o && !g_slist_find (stabbed, o))
+      stabbed = g_slist_prepend (stabbed, o);
+    i = i->next;
+  }
+  g_slist_free (list);
+
+  inside = (g_slist_length (stabbed) % 2 != 0);
+  g_slist_free (stabbed);
+
+  return is_open ? !inside : inside;
+}
+
diff --git a/src/predicates.c b/src/predicates.c
new file mode 100644
index 0000000..3c850a8
--- /dev/null
+++ b/src/predicates.c
@@ -0,0 +1,2696 @@
+/*****************************************************************************/
+/*                                                                           */
+/*  Routines for Arbitrary Precision Floating-point Arithmetic               */
+/*  and Fast Robust Geometric Predicates                                     */
+/*  (predicates.c)                                                           */
+/*                                                                           */
+/*  May 18, 1996                                                             */
+/*                                                                           */
+/*  Placed in the public domain by                                           */
+/*  Jonathan Richard Shewchuk                                                */
+/*  School of Computer Science                                               */
+/*  Carnegie Mellon University                                               */
+/*  5000 Forbes Avenue                                                       */
+/*  Pittsburgh, Pennsylvania  15213-3891                                     */
+/*  jrs at cs.cmu.edu                                                           */
+/*                                                                           */
+/*  This file contains C implementation of algorithms for exact addition     */
+/*    and multiplication of floating-point numbers, and predicates for       */
+/*    robustly performing the orientation and incircle tests used in         */
+/*    computational geometry.  The algorithms and underlying theory are      */
+/*    described in Jonathan Richard Shewchuk.  "Adaptive Precision Floating- */
+/*    Point Arithmetic and Fast Robust Geometric Predicates."  Technical     */
+/*    Report CMU-CS-96-140, School of Computer Science, Carnegie Mellon      */
+/*    University, Pittsburgh, Pennsylvania, May 1996.  (Submitted to         */
+/*    Discrete & Computational Geometry.)                                    */
+/*                                                                           */
+/*  This file, the paper listed above, and other information are available   */
+/*    from the Web page http://www.cs.cmu.edu/~quake/robust.html .           */
+/*                                                                           */
+/*****************************************************************************/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  Using this code:                                                         */
+/*                                                                           */
+/*  First, read the short or long version of the paper (from the Web page    */
+/*    above).                                                                */
+/*                                                                           */
+/*  Be sure to call exactinit() once, before calling any of the arithmetic   */
+/*    functions or geometric predicates.  Also be sure to turn on the        */
+/*    optimizer when compiling this file.                                    */
+/*                                                                           */
+/*                                                                           */
+/*  Several geometric predicates are defined.  Their parameters are all      */
+/*    points.  Each point is an array of two or three floating-point         */
+/*    numbers.  The geometric predicates, described in the papers, are       */
+/*                                                                           */
+/*    orient2d(pa, pb, pc)                                                   */
+/*    orient2dfast(pa, pb, pc)                                               */
+/*    orient3d(pa, pb, pc, pd)                                               */
+/*    orient3dfast(pa, pb, pc, pd)                                           */
+/*    incircle(pa, pb, pc, pd)                                               */
+/*    incirclefast(pa, pb, pc, pd)                                           */
+/*    insphere(pa, pb, pc, pd, pe)                                           */
+/*    inspherefast(pa, pb, pc, pd, pe)                                       */
+/*                                                                           */
+/*  Those with suffix "fast" are approximate, non-robust versions.  Those    */
+/*    without the suffix are adaptive precision, robust versions.  There     */
+/*    are also versions with the suffices "exact" and "slow", which are      */
+/*    non-adaptive, exact arithmetic versions, which I use only for timings  */
+/*    in my arithmetic papers.                                               */
+/*                                                                           */
+/*                                                                           */
+/*  An expansion is represented by an array of floating-point numbers,       */
+/*    sorted from smallest to largest magnitude (possibly with interspersed  */
+/*    zeros).  The length of each expansion is stored as a separate integer, */
+/*    and each arithmetic function returns an integer which is the length    */
+/*    of the expansion it created.                                           */
+/*                                                                           */
+/*  Several arithmetic functions are defined.  Their parameters are          */
+/*                                                                           */
+/*    e, f           Input expansions                                        */
+/*    elen, flen     Lengths of input expansions (must be >= 1)              */
+/*    h              Output expansion                                        */
+/*    b              Input scalar                                            */
+/*                                                                           */
+/*  The arithmetic functions are                                             */
+/*                                                                           */
+/*    grow_expansion(elen, e, b, h)                                          */
+/*    grow_expansion_zeroelim(elen, e, b, h)                                 */
+/*    expansion_sum(elen, e, flen, f, h)                                     */
+/*    expansion_sum_zeroelim1(elen, e, flen, f, h)                           */
+/*    expansion_sum_zeroelim2(elen, e, flen, f, h)                           */
+/*    fast_expansion_sum(elen, e, flen, f, h)                                */
+/*    fast_expansion_sum_zeroelim(elen, e, flen, f, h)                       */
+/*    linear_expansion_sum(elen, e, flen, f, h)                              */
+/*    linear_expansion_sum_zeroelim(elen, e, flen, f, h)                     */
+/*    scale_expansion(elen, e, b, h)                                         */
+/*    scale_expansion_zeroelim(elen, e, b, h)                                */
+/*    compress(elen, e, h)                                                   */
+/*                                                                           */
+/*  All of these are described in the long version of the paper; some are    */
+/*    described in the short version.  All return an integer that is the     */
+/*    length of h.  Those with suffix _zeroelim perform zero elimination,    */
+/*    and are recommended over their counterparts.  The procedure            */
+/*    fast_expansion_sum_zeroelim() (or linear_expansion_sum_zeroelim() on   */
+/*    processors that do not use the round-to-even tiebreaking rule) is      */
+/*    recommended over expansion_sum_zeroelim().  Each procedure has a       */
+/*    little note next to it (in the code below) that tells you whether or   */
+/*    not the output expansion may be the same array as one of the input     */
+/*    expansions.                                                            */
+/*                                                                           */
+/*                                                                           */
+/*  If you look around below, you'll also find macros for a bunch of         */
+/*    simple unrolled arithmetic operations, and procedures for printing     */
+/*    expansions (commented out because they don't work with all C           */
+/*    compilers) and for generating random floating-point numbers whose      */
+/*    significand bits are all random.  Most of the macros have undocumented */
+/*    requirements that certain of their parameters should not be the same   */
+/*    variable; for safety, better to make sure all the parameters are       */
+/*    distinct variables.  Feel free to send email to jrs at cs.cmu.edu if you  */
+/*    have questions.                                                        */
+/*                                                                           */
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "predicates.h"
+
+/* Use header file generated automatically by predicates_init. */
+#define USE_PREDICATES_INIT
+
+#ifdef USE_PREDICATES_INIT
+#include "predicates_init.h"
+#endif /* USE_PREDICATES_INIT */
+
+/* FPU control. We MUST have only double precision (not extended precision) */
+#include "rounding.h"
+
+/* On some machines, the exact arithmetic routines might be defeated by the  */
+/*   use of internal extended precision floating-point registers.  Sometimes */
+/*   this problem can be fixed by defining certain values to be volatile,    */
+/*   thus forcing them to be stored to memory and rounded off.  This isn't   */
+/*   a great solution, though, as it slows the arithmetic down.              */
+/*                                                                           */
+/* To try this out, write "#define INEXACT volatile" below.  Normally,       */
+/*   however, INEXACT should be defined to be nothing.  ("#define INEXACT".) */
+
+#define INEXACT                          /* Nothing */
+/* #define INEXACT volatile */
+
+#define REAL double                      /* float or double */
+#define REALPRINT doubleprint
+#define REALRAND doublerand
+#define NARROWRAND narrowdoublerand
+#define UNIFORMRAND uniformdoublerand
+
+/* Which of the following two methods of finding the absolute values is      */
+/*   fastest is compiler-dependent.  A few compilers can inline and optimize */
+/*   the fabs() call; but most will incur the overhead of a function call,   */
+/*   which is disastrously slow.  A faster way on IEEE machines might be to  */
+/*   mask the appropriate bit, but that's difficult to do in C.              */
+
+#define Absolute(a)  ((a) >= 0.0 ? (a) : -(a))
+/* #define Absolute(a)  fabs(a) */
+
+/* Many of the operations are broken up into two pieces, a main part that    */
+/*   performs an approximate operation, and a "tail" that computes the       */
+/*   roundoff error of that operation.                                       */
+/*                                                                           */
+/* The operations Fast_Two_Sum(), Fast_Two_Diff(), Two_Sum(), Two_Diff(),    */
+/*   Split(), and Two_Product() are all implemented as described in the      */
+/*   reference.  Each of these macros requires certain variables to be       */
+/*   defined in the calling routine.  The variables `bvirt', `c', `abig',    */
+/*   `_i', `_j', `_k', `_l', `_m', and `_n' are declared `INEXACT' because   */
+/*   they store the result of an operation that may incur roundoff error.    */
+/*   The input parameter `x' (or the highest numbered `x_' parameter) must   */
+/*   also be declared `INEXACT'.                                             */
+
+#define Fast_Two_Sum_Tail(a, b, x, y) \
+  bvirt = x - a; \
+  y = b - bvirt
+
+#define Fast_Two_Sum(a, b, x, y) \
+  x = (REAL) (a + b); \
+  Fast_Two_Sum_Tail(a, b, x, y)
+
+#define Fast_Two_Diff_Tail(a, b, x, y) \
+  bvirt = a - x; \
+  y = bvirt - b
+
+#define Fast_Two_Diff(a, b, x, y) \
+  x = (REAL) (a - b); \
+  Fast_Two_Diff_Tail(a, b, x, y)
+
+#define Two_Sum_Tail(a, b, x, y) \
+  bvirt = (REAL) (x - a); \
+  avirt = x - bvirt; \
+  bround = b - bvirt; \
+  around = a - avirt; \
+  y = around + bround
+
+#define Two_Sum(a, b, x, y) \
+  x = (REAL) (a + b); \
+  Two_Sum_Tail(a, b, x, y)
+
+#define Two_Diff_Tail(a, b, x, y) \
+  bvirt = (REAL) (a - x); \
+  avirt = x + bvirt; \
+  bround = bvirt - b; \
+  around = a - avirt; \
+  y = around + bround
+
+#define Two_Diff(a, b, x, y) \
+  x = (REAL) (a - b); \
+  Two_Diff_Tail(a, b, x, y)
+
+#define Split(a, ahi, alo) \
+  c = (REAL) (splitter * a); \
+  abig = (REAL) (c - a); \
+  ahi = c - abig; \
+  alo = a - ahi
+
+#define Two_Product_Tail(a, b, x, y) \
+  Split(a, ahi, alo); \
+  Split(b, bhi, blo); \
+  err1 = x - (ahi * bhi); \
+  err2 = err1 - (alo * bhi); \
+  err3 = err2 - (ahi * blo); \
+  y = (alo * blo) - err3
+
+#define Two_Product(a, b, x, y) \
+  x = (REAL) (a * b); \
+  Two_Product_Tail(a, b, x, y)
+
+/* Two_Product_Presplit() is Two_Product() where one of the inputs has       */
+/*   already been split.  Avoids redundant splitting.                        */
+
+#define Two_Product_Presplit(a, b, bhi, blo, x, y) \
+  x = (REAL) (a * b); \
+  Split(a, ahi, alo); \
+  err1 = x - (ahi * bhi); \
+  err2 = err1 - (alo * bhi); \
+  err3 = err2 - (ahi * blo); \
+  y = (alo * blo) - err3
+
+/* Two_Product_2Presplit() is Two_Product() where both of the inputs have    */
+/*   already been split.  Avoids redundant splitting.                        */
+
+#define Two_Product_2Presplit(a, ahi, alo, b, bhi, blo, x, y) \
+  x = (REAL) (a * b); \
+  err1 = x - (ahi * bhi); \
+  err2 = err1 - (alo * bhi); \
+  err3 = err2 - (ahi * blo); \
+  y = (alo * blo) - err3
+
+/* Square() can be done more quickly than Two_Product().                     */
+
+#define Square_Tail(a, x, y) \
+  Split(a, ahi, alo); \
+  err1 = x - (ahi * ahi); \
+  err3 = err1 - ((ahi + ahi) * alo); \
+  y = (alo * alo) - err3
+
+#define Square(a, x, y) \
+  x = (REAL) (a * a); \
+  Square_Tail(a, x, y)
+
+/* Macros for summing expansions of various fixed lengths.  These are all    */
+/*   unrolled versions of Expansion_Sum().                                   */
+
+#define Two_One_Sum(a1, a0, b, x2, x1, x0) \
+  Two_Sum(a0, b , _i, x0); \
+  Two_Sum(a1, _i, x2, x1)
+
+#define Two_One_Diff(a1, a0, b, x2, x1, x0) \
+  Two_Diff(a0, b , _i, x0); \
+  Two_Sum( a1, _i, x2, x1)
+
+#define Two_Two_Sum(a1, a0, b1, b0, x3, x2, x1, x0) \
+  Two_One_Sum(a1, a0, b0, _j, _0, x0); \
+  Two_One_Sum(_j, _0, b1, x3, x2, x1)
+
+#define Two_Two_Diff(a1, a0, b1, b0, x3, x2, x1, x0) \
+  Two_One_Diff(a1, a0, b0, _j, _0, x0); \
+  Two_One_Diff(_j, _0, b1, x3, x2, x1)
+
+#define Four_One_Sum(a3, a2, a1, a0, b, x4, x3, x2, x1, x0) \
+  Two_One_Sum(a1, a0, b , _j, x1, x0); \
+  Two_One_Sum(a3, a2, _j, x4, x3, x2)
+
+#define Four_Two_Sum(a3, a2, a1, a0, b1, b0, x5, x4, x3, x2, x1, x0) \
+  Four_One_Sum(a3, a2, a1, a0, b0, _k, _2, _1, _0, x0); \
+  Four_One_Sum(_k, _2, _1, _0, b1, x5, x4, x3, x2, x1)
+
+#define Four_Four_Sum(a3, a2, a1, a0, b4, b3, b1, b0, x7, x6, x5, x4, x3, x2, \
+                      x1, x0) \
+  Four_Two_Sum(a3, a2, a1, a0, b1, b0, _l, _2, _1, _0, x1, x0); \
+  Four_Two_Sum(_l, _2, _1, _0, b4, b3, x7, x6, x5, x4, x3, x2)
+
+#define Eight_One_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b, x8, x7, x6, x5, x4, \
+                      x3, x2, x1, x0) \
+  Four_One_Sum(a3, a2, a1, a0, b , _j, x3, x2, x1, x0); \
+  Four_One_Sum(a7, a6, a5, a4, _j, x8, x7, x6, x5, x4)
+
+#define Eight_Two_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b1, b0, x9, x8, x7, \
+                      x6, x5, x4, x3, x2, x1, x0) \
+  Eight_One_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b0, _k, _6, _5, _4, _3, _2, \
+                _1, _0, x0); \
+  Eight_One_Sum(_k, _6, _5, _4, _3, _2, _1, _0, b1, x9, x8, x7, x6, x5, x4, \
+                x3, x2, x1)
+
+#define Eight_Four_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b4, b3, b1, b0, x11, \
+                       x10, x9, x8, x7, x6, x5, x4, x3, x2, x1, x0) \
+  Eight_Two_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b1, b0, _l, _6, _5, _4, _3, \
+                _2, _1, _0, x1, x0); \
+  Eight_Two_Sum(_l, _6, _5, _4, _3, _2, _1, _0, b4, b3, x11, x10, x9, x8, \
+                x7, x6, x5, x4, x3, x2)
+
+/* Macros for multiplying expansions of various fixed lengths.               */
+
+#define Two_One_Product(a1, a0, b, x3, x2, x1, x0) \
+  Split(b, bhi, blo); \
+  Two_Product_Presplit(a0, b, bhi, blo, _i, x0); \
+  Two_Product_Presplit(a1, b, bhi, blo, _j, _0); \
+  Two_Sum(_i, _0, _k, x1); \
+  Fast_Two_Sum(_j, _k, x3, x2)
+
+#define Four_One_Product(a3, a2, a1, a0, b, x7, x6, x5, x4, x3, x2, x1, x0) \
+  Split(b, bhi, blo); \
+  Two_Product_Presplit(a0, b, bhi, blo, _i, x0); \
+  Two_Product_Presplit(a1, b, bhi, blo, _j, _0); \
+  Two_Sum(_i, _0, _k, x1); \
+  Fast_Two_Sum(_j, _k, _i, x2); \
+  Two_Product_Presplit(a2, b, bhi, blo, _j, _0); \
+  Two_Sum(_i, _0, _k, x3); \
+  Fast_Two_Sum(_j, _k, _i, x4); \
+  Two_Product_Presplit(a3, b, bhi, blo, _j, _0); \
+  Two_Sum(_i, _0, _k, x5); \
+  Fast_Two_Sum(_j, _k, x7, x6)
+
+#define Two_Two_Product(a1, a0, b1, b0, x7, x6, x5, x4, x3, x2, x1, x0) \
+  Split(a0, a0hi, a0lo); \
+  Split(b0, bhi, blo); \
+  Two_Product_2Presplit(a0, a0hi, a0lo, b0, bhi, blo, _i, x0); \
+  Split(a1, a1hi, a1lo); \
+  Two_Product_2Presplit(a1, a1hi, a1lo, b0, bhi, blo, _j, _0); \
+  Two_Sum(_i, _0, _k, _1); \
+  Fast_Two_Sum(_j, _k, _l, _2); \
+  Split(b1, bhi, blo); \
+  Two_Product_2Presplit(a0, a0hi, a0lo, b1, bhi, blo, _i, _0); \
+  Two_Sum(_1, _0, _k, x1); \
+  Two_Sum(_2, _k, _j, _1); \
+  Two_Sum(_l, _j, _m, _2); \
+  Two_Product_2Presplit(a1, a1hi, a1lo, b1, bhi, blo, _j, _0); \
+  Two_Sum(_i, _0, _n, _0); \
+  Two_Sum(_1, _0, _i, x2); \
+  Two_Sum(_2, _i, _k, _1); \
+  Two_Sum(_m, _k, _l, _2); \
+  Two_Sum(_j, _n, _k, _0); \
+  Two_Sum(_1, _0, _j, x3); \
+  Two_Sum(_2, _j, _i, _1); \
+  Two_Sum(_l, _i, _m, _2); \
+  Two_Sum(_1, _k, _i, x4); \
+  Two_Sum(_2, _i, _k, x5); \
+  Two_Sum(_m, _k, x7, x6)
+
+/* An expansion of length two can be squared more quickly than finding the   */
+/*   product of two different expansions of length two, and the result is    */
+/*   guaranteed to have no more than six (rather than eight) components.     */
+
+#define Two_Square(a1, a0, x5, x4, x3, x2, x1, x0) \
+  Square(a0, _j, x0); \
+  _0 = a0 + a0; \
+  Two_Product(a1, _0, _k, _1); \
+  Two_One_Sum(_k, _1, _j, _l, _2, x1); \
+  Square(a1, _j, _1); \
+  Two_Two_Sum(_j, _1, _l, _2, x5, x4, x3, x2)
+
+#ifndef USE_PREDICATES_INIT
+
+static REAL splitter;     /* = 2^ceiling(p / 2) + 1.  Used to split floats in half. */
+/* A set of coefficients used to calculate maximum roundoff errors.          */
+static REAL resulterrbound;
+static REAL ccwerrboundA, ccwerrboundB, ccwerrboundC;
+static REAL o3derrboundA, o3derrboundB, o3derrboundC;
+static REAL iccerrboundA, iccerrboundB, iccerrboundC;
+static REAL isperrboundA, isperrboundB, isperrboundC;
+
+#endif /* USE_PREDICATES_INIT */
+
+/*****************************************************************************/
+/*                                                                           */
+/*  doubleprint()   Print the bit representation of a double.                */
+/*                                                                           */
+/*  Useful for debugging exact arithmetic routines.                          */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+void doubleprint(number)
+double number;
+{
+  unsigned long long no;
+  unsigned long long sign, expo;
+  int exponent;
+  int i, bottomi;
+
+  no = *(unsigned long long *) &number;
+  sign = no & 0x8000000000000000ll;
+  expo = (no >> 52) & 0x7ffll;
+  exponent = (int) expo;
+  exponent = exponent - 1023;
+  if (sign) {
+    printf("-");
+  } else {
+    printf(" ");
+  }
+  if (exponent == -1023) {
+    printf(
+      "0.0000000000000000000000000000000000000000000000000000_     (   )");
+  } else {
+    printf("1.");
+    bottomi = -1;
+    for (i = 0; i < 52; i++) {
+      if (no & 0x0008000000000000ll) {
+        printf("1");
+        bottomi = i;
+      } else {
+        printf("0");
+      }
+      no <<= 1;
+    }
+    printf("_%d  (%d)", exponent, exponent - 1 - bottomi);
+  }
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  floatprint()   Print the bit representation of a float.                  */
+/*                                                                           */
+/*  Useful for debugging exact arithmetic routines.                          */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+void floatprint(number)
+float number;
+{
+  unsigned no;
+  unsigned sign, expo;
+  int exponent;
+  int i, bottomi;
+
+  no = *(unsigned *) &number;
+  sign = no & 0x80000000;
+  expo = (no >> 23) & 0xff;
+  exponent = (int) expo;
+  exponent = exponent - 127;
+  if (sign) {
+    printf("-");
+  } else {
+    printf(" ");
+  }
+  if (exponent == -127) {
+    printf("0.00000000000000000000000_     (   )");
+  } else {
+    printf("1.");
+    bottomi = -1;
+    for (i = 0; i < 23; i++) {
+      if (no & 0x00400000) {
+        printf("1");
+        bottomi = i;
+      } else {
+        printf("0");
+      }
+      no <<= 1;
+    }
+    printf("_%3d  (%3d)", exponent, exponent - 1 - bottomi);
+  }
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  expansion_print()   Print the bit representation of an expansion.        */
+/*                                                                           */
+/*  Useful for debugging exact arithmetic routines.                          */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+void expansion_print(elen, e)
+int elen;
+REAL *e;
+{
+  int i;
+
+  for (i = elen - 1; i >= 0; i--) {
+    REALPRINT(e[i]);
+    if (i > 0) {
+      printf(" +\n");
+    } else {
+      printf("\n");
+    }
+  }
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  doublerand()   Generate a double with random 53-bit significand and a    */
+/*                 random exponent in [0, 511].                              */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+static double doublerand()
+{
+  double result;
+  double expo;
+  long a, b, c;
+  long i;
+
+  a = random();
+  b = random();
+  c = random();
+  result = (double) (a - 1073741824) * 8388608.0 + (double) (b >> 8);
+  for (i = 512, expo = 2; i <= 131072; i *= 2, expo = expo * expo) {
+    if (c & i) {
+      result *= expo;
+    }
+  }
+  return result;
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  narrowdoublerand()   Generate a double with random 53-bit significand    */
+/*                       and a random exponent in [0, 7].                    */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+static double narrowdoublerand()
+{
+  double result;
+  double expo;
+  long a, b, c;
+  long i;
+
+  a = random();
+  b = random();
+  c = random();
+  result = (double) (a - 1073741824) * 8388608.0 + (double) (b >> 8);
+  for (i = 512, expo = 2; i <= 2048; i *= 2, expo = expo * expo) {
+    if (c & i) {
+      result *= expo;
+    }
+  }
+  return result;
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  uniformdoublerand()   Generate a double with random 53-bit significand.  */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+static double uniformdoublerand()
+{
+  double result;
+  long a, b;
+
+  a = random();
+  b = random();
+  result = (double) (a - 1073741824) * 8388608.0 + (double) (b >> 8);
+  return result;
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  floatrand()   Generate a float with random 24-bit significand and a      */
+/*                random exponent in [0, 63].                                */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+static float floatrand()
+{
+  float result;
+  float expo;
+  long a, c;
+  long i;
+
+  a = random();
+  c = random();
+  result = (float) ((a - 1073741824) >> 6);
+  for (i = 512, expo = 2; i <= 16384; i *= 2, expo = expo * expo) {
+    if (c & i) {
+      result *= expo;
+    }
+  }
+  return result;
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  narrowfloatrand()   Generate a float with random 24-bit significand and  */
+/*                      a random exponent in [0, 7].                         */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+static float narrowfloatrand()
+{
+  float result;
+  float expo;
+  long a, c;
+  long i;
+
+  a = random();
+  c = random();
+  result = (float) ((a - 1073741824) >> 6);
+  for (i = 512, expo = 2; i <= 2048; i *= 2, expo = expo * expo) {
+    if (c & i) {
+      result *= expo;
+    }
+  }
+  return result;
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  uniformfloatrand()   Generate a float with random 24-bit significand.    */
+/*                                                                           */
+/*****************************************************************************/
+
+/*
+static float uniformfloatrand()
+{
+  float result;
+  long a;
+
+  a = random();
+  result = (float) ((a - 1073741824) >> 6);
+  return result;
+}
+*/
+
+/*****************************************************************************/
+/*                                                                           */
+/*  fast_expansion_sum_zeroelim()   Sum two expansions, eliminating zero     */
+/*                                  components from the output expansion.    */
+/*                                                                           */
+/*  Sets h = e + f.  See the long version of my paper for details.           */
+/*                                                                           */
+/*  If round-to-even is used (as with IEEE 754), maintains the strongly      */
+/*  nonoverlapping property.  (That is, if e is strongly nonoverlapping, h   */
+/*  will be also.)  Does NOT maintain the nonoverlapping or nonadjacent      */
+/*  properties.                                                              */
+/*                                                                           */
+/*****************************************************************************/
+
+static int fast_expansion_sum_zeroelim(int elen, REAL *e, 
+				       int flen, REAL *f, REAL *h)
+     /* h cannot be e or f. */
+{
+  REAL Q;
+  INEXACT REAL Qnew;
+  INEXACT REAL hh;
+  INEXACT REAL bvirt;
+  REAL avirt, bround, around;
+  int eindex, findex, hindex;
+  REAL enow, fnow;
+
+  enow = e[0];
+  fnow = f[0];
+  eindex = findex = 0;
+  if ((fnow > enow) == (fnow > -enow)) {
+    Q = enow;
+    enow = e[++eindex];
+  } else {
+    Q = fnow;
+    fnow = f[++findex];
+  }
+  hindex = 0;
+  if ((eindex < elen) && (findex < flen)) {
+    if ((fnow > enow) == (fnow > -enow)) {
+      Fast_Two_Sum(enow, Q, Qnew, hh);
+      enow = e[++eindex];
+    } else {
+      Fast_Two_Sum(fnow, Q, Qnew, hh);
+      fnow = f[++findex];
+    }
+    Q = Qnew;
+    if (hh != 0.0) {
+      h[hindex++] = hh;
+    }
+    while ((eindex < elen) && (findex < flen)) {
+      if ((fnow > enow) == (fnow > -enow)) {
+        Two_Sum(Q, enow, Qnew, hh);
+        enow = e[++eindex];
+      } else {
+        Two_Sum(Q, fnow, Qnew, hh);
+        fnow = f[++findex];
+      }
+      Q = Qnew;
+      if (hh != 0.0) {
+        h[hindex++] = hh;
+      }
+    }
+  }
+  while (eindex < elen) {
+    Two_Sum(Q, enow, Qnew, hh);
+    enow = e[++eindex];
+    Q = Qnew;
+    if (hh != 0.0) {
+      h[hindex++] = hh;
+    }
+  }
+  while (findex < flen) {
+    Two_Sum(Q, fnow, Qnew, hh);
+    fnow = f[++findex];
+    Q = Qnew;
+    if (hh != 0.0) {
+      h[hindex++] = hh;
+    }
+  }
+  if ((Q != 0.0) || (hindex == 0)) {
+    h[hindex++] = Q;
+  }
+  return hindex;
+}
+
+/*****************************************************************************/
+/*                                                                           */
+/*  scale_expansion_zeroelim()   Multiply an expansion by a scalar,          */
+/*                               eliminating zero components from the        */
+/*                               output expansion.                           */
+/*                                                                           */
+/*  Sets h = be.  See either version of my paper for details.                */
+/*                                                                           */
+/*  Maintains the nonoverlapping property.  If round-to-even is used (as     */
+/*  with IEEE 754), maintains the strongly nonoverlapping and nonadjacent    */
+/*  properties as well.  (That is, if e has one of these properties, so      */
+/*  will h.)                                                                 */
+/*                                                                           */
+/*****************************************************************************/
+
+static int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h)
+     /* e and h cannot be the same. */
+{
+  INEXACT REAL Q, sum;
+  REAL hh;
+  INEXACT REAL product1;
+  REAL product0;
+  int eindex, hindex;
+  REAL enow;
+  INEXACT REAL bvirt;
+  REAL avirt, bround, around;
+  INEXACT REAL c;
+  INEXACT REAL abig;
+  REAL ahi, alo, bhi, blo;
+  REAL err1, err2, err3;
+
+  Split(b, bhi, blo);
+  Two_Product_Presplit(e[0], b, bhi, blo, Q, hh);
+  hindex = 0;
+  if (hh != 0) {
+    h[hindex++] = hh;
+  }
+  for (eindex = 1; eindex < elen; eindex++) {
+    enow = e[eindex];
+    Two_Product_Presplit(enow, b, bhi, blo, product1, product0);
+    Two_Sum(Q, product0, sum, hh);
+    if (hh != 0) {
+      h[hindex++] = hh;
+    }
+    Fast_Two_Sum(product1, sum, Q, hh);
+    if (hh != 0) {
+      h[hindex++] = hh;
+    }
+  }
+  if ((Q != 0.0) || (hindex == 0)) {
+    h[hindex++] = Q;
+  }
+  return hindex;
+}
+
+/*****************************************************************************/
+/*                                                                           */
+/*  estimate()   Produce a one-word estimate of an expansion's value.        */
+/*                                                                           */
+/*  See either version of my paper for details.                              */
+/*                                                                           */
+/*****************************************************************************/
+
+static REAL estimate(int elen, REAL *e)
+{
+  REAL Q;
+  int eindex;
+
+  Q = e[0];
+  for (eindex = 1; eindex < elen; eindex++) {
+    Q += e[eindex];
+  }
+  return Q;
+}
+
+/*****************************************************************************/
+/*                                                                           */
+/*  orient2dfast()   Approximate 2D orientation test.  Nonrobust.            */
+/*  orient2dexact()   Exact 2D orientation test.  Robust.                    */
+/*  orient2dslow()   Another exact 2D orientation test.  Robust.             */
+/*  orient2d()   Adaptive exact 2D orientation test.  Robust.                */
+/*                                                                           */
+/*               Return a positive value if the points pa, pb, and pc occur  */
+/*               in counterclockwise order; a negative value if they occur   */
+/*               in clockwise order; and zero if they are collinear.  The    */
+/*               result is also a rough approximation of twice the signed    */
+/*               area of the triangle defined by the three points.           */
+/*                                                                           */
+/*  Only the first and last routine should be used; the middle two are for   */
+/*  timings.                                                                 */
+/*                                                                           */
+/*  The last three use exact arithmetic to ensure a correct answer.  The     */
+/*  result returned is the determinant of a matrix.  In orient2d() only,     */
+/*  this determinant is computed adaptively, in the sense that exact         */
+/*  arithmetic is used only to the degree it is needed to ensure that the    */
+/*  returned value has the correct sign.  Hence, orient2d() is usually quite */
+/*  fast, but will run more slowly when the input points are collinear or    */
+/*  nearly so.                                                               */
+/*                                                                           */
+/*****************************************************************************/
+
+static REAL orient2dadapt(REAL *pa, REAL *pb, REAL *pc, REAL detsum)
+{
+  INEXACT REAL acx, acy, bcx, bcy;
+  REAL acxtail, acytail, bcxtail, bcytail;
+  INEXACT REAL detleft, detright;
+  REAL detlefttail, detrighttail;
+  REAL det, errbound;
+  REAL B[4], C1[8], C2[12], D[16];
+  INEXACT REAL B3;
+  int C1length, C2length, Dlength;
+  REAL u[4];
+  INEXACT REAL u3;
+  INEXACT REAL s1, t1;
+  REAL s0, t0;
+
+  INEXACT REAL bvirt;
+  REAL avirt, bround, around;
+  INEXACT REAL c;
+  INEXACT REAL abig;
+  REAL ahi, alo, bhi, blo;
+  REAL err1, err2, err3;
+  INEXACT REAL _i, _j;
+  REAL _0;
+
+  acx = (REAL) (pa[0] - pc[0]);
+  bcx = (REAL) (pb[0] - pc[0]);
+  acy = (REAL) (pa[1] - pc[1]);
+  bcy = (REAL) (pb[1] - pc[1]);
+
+  Two_Product(acx, bcy, detleft, detlefttail);
+  Two_Product(acy, bcx, detright, detrighttail);
+
+  Two_Two_Diff(detleft, detlefttail, detright, detrighttail,
+               B3, B[2], B[1], B[0]);
+  B[3] = B3;
+
+  det = estimate(4, B);
+  errbound = ccwerrboundB * detsum;
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  Two_Diff_Tail(pa[0], pc[0], acx, acxtail);
+  Two_Diff_Tail(pb[0], pc[0], bcx, bcxtail);
+  Two_Diff_Tail(pa[1], pc[1], acy, acytail);
+  Two_Diff_Tail(pb[1], pc[1], bcy, bcytail);
+
+  if ((acxtail == 0.0) && (acytail == 0.0)
+      && (bcxtail == 0.0) && (bcytail == 0.0)) {
+    return det;
+  }
+
+  errbound = ccwerrboundC * detsum + resulterrbound * Absolute(det);
+  det += (acx * bcytail + bcy * acxtail)
+       - (acy * bcxtail + bcx * acytail);
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  Two_Product(acxtail, bcy, s1, s0);
+  Two_Product(acytail, bcx, t1, t0);
+  Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]);
+  u[3] = u3;
+  C1length = fast_expansion_sum_zeroelim(4, B, 4, u, C1);
+
+  Two_Product(acx, bcytail, s1, s0);
+  Two_Product(acy, bcxtail, t1, t0);
+  Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]);
+  u[3] = u3;
+  C2length = fast_expansion_sum_zeroelim(C1length, C1, 4, u, C2);
+
+  Two_Product(acxtail, bcytail, s1, s0);
+  Two_Product(acytail, bcxtail, t1, t0);
+  Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]);
+  u[3] = u3;
+  Dlength = fast_expansion_sum_zeroelim(C2length, C2, 4, u, D);
+
+  return(D[Dlength - 1]);
+}
+
+REAL orient2d(pa, pb, pc)
+REAL *pa;
+REAL *pb;
+REAL *pc;
+{
+  REAL detleft, detright, det;
+  REAL detsum, errbound;
+  REAL orient;
+
+  FPU_ROUND_DOUBLE;
+
+  detleft = (pa[0] - pc[0]) * (pb[1] - pc[1]);
+  detright = (pa[1] - pc[1]) * (pb[0] - pc[0]);
+  det = detleft - detright;
+
+  if (detleft > 0.0) {
+    if (detright <= 0.0) {
+      FPU_RESTORE;
+      return det;
+    } else {
+      detsum = detleft + detright;
+    }
+  } else if (detleft < 0.0) {
+    if (detright >= 0.0) {
+      FPU_RESTORE;
+      return det;
+    } else {
+      detsum = -detleft - detright;
+    }
+  } else {
+    FPU_RESTORE;
+    return det;
+  }
+
+  errbound = ccwerrboundA * detsum;
+  if ((det >= errbound) || (-det >= errbound)) {
+    FPU_RESTORE;
+    return det;
+  }
+
+  orient = orient2dadapt(pa, pb, pc, detsum);
+  FPU_RESTORE;
+  return orient;
+}
+
+/*****************************************************************************/
+/*                                                                           */
+/*  orient3dfast()   Approximate 3D orientation test.  Nonrobust.            */
+/*  orient3dexact()   Exact 3D orientation test.  Robust.                    */
+/*  orient3dslow()   Another exact 3D orientation test.  Robust.             */
+/*  orient3d()   Adaptive exact 3D orientation test.  Robust.                */
+/*                                                                           */
+/*               Return a positive value if the point pd lies below the      */
+/*               plane passing through pa, pb, and pc; "below" is defined so */
+/*               that pa, pb, and pc appear in counterclockwise order when   */
+/*               viewed from above the plane.  Returns a negative value if   */
+/*               pd lies above the plane.  Returns zero if the points are    */
+/*               coplanar.  The result is also a rough approximation of six  */
+/*               times the signed volume of the tetrahedron defined by the   */
+/*               four points.                                                */
+/*                                                                           */
+/*  Only the first and last routine should be used; the middle two are for   */
+/*  timings.                                                                 */
+/*                                                                           */
+/*  The last three use exact arithmetic to ensure a correct answer.  The     */
+/*  result returned is the determinant of a matrix.  In orient3d() only,     */
+/*  this determinant is computed adaptively, in the sense that exact         */
+/*  arithmetic is used only to the degree it is needed to ensure that the    */
+/*  returned value has the correct sign.  Hence, orient3d() is usually quite */
+/*  fast, but will run more slowly when the input points are coplanar or     */
+/*  nearly so.                                                               */
+/*                                                                           */
+/*****************************************************************************/
+
+static REAL orient3dadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, 
+			  REAL permanent)
+{
+  INEXACT REAL adx, bdx, cdx, ady, bdy, cdy, adz, bdz, cdz;
+  REAL det, errbound;
+
+  INEXACT REAL bdxcdy1, cdxbdy1, cdxady1, adxcdy1, adxbdy1, bdxady1;
+  REAL bdxcdy0, cdxbdy0, cdxady0, adxcdy0, adxbdy0, bdxady0;
+  REAL bc[4], ca[4], ab[4];
+  INEXACT REAL bc3, ca3, ab3;
+  REAL adet[8], bdet[8], cdet[8];
+  int alen, blen, clen;
+  REAL abdet[16];
+  int ablen;
+  REAL *finnow, *finother, *finswap;
+  REAL fin1[192], fin2[192];
+  int finlength;
+
+  REAL adxtail, bdxtail, cdxtail;
+  REAL adytail, bdytail, cdytail;
+  REAL adztail, bdztail, cdztail;
+  INEXACT REAL at_blarge, at_clarge;
+  INEXACT REAL bt_clarge, bt_alarge;
+  INEXACT REAL ct_alarge, ct_blarge;
+  REAL at_b[4], at_c[4], bt_c[4], bt_a[4], ct_a[4], ct_b[4];
+  int at_blen, at_clen, bt_clen, bt_alen, ct_alen, ct_blen;
+  INEXACT REAL bdxt_cdy1, cdxt_bdy1, cdxt_ady1;
+  INEXACT REAL adxt_cdy1, adxt_bdy1, bdxt_ady1;
+  REAL bdxt_cdy0, cdxt_bdy0, cdxt_ady0;
+  REAL adxt_cdy0, adxt_bdy0, bdxt_ady0;
+  INEXACT REAL bdyt_cdx1, cdyt_bdx1, cdyt_adx1;
+  INEXACT REAL adyt_cdx1, adyt_bdx1, bdyt_adx1;
+  REAL bdyt_cdx0, cdyt_bdx0, cdyt_adx0;
+  REAL adyt_cdx0, adyt_bdx0, bdyt_adx0;
+  REAL bct[8], cat[8], abt[8];
+  int bctlen, catlen, abtlen;
+  INEXACT REAL bdxt_cdyt1, cdxt_bdyt1, cdxt_adyt1;
+  INEXACT REAL adxt_cdyt1, adxt_bdyt1, bdxt_adyt1;
+  REAL bdxt_cdyt0, cdxt_bdyt0, cdxt_adyt0;
+  REAL adxt_cdyt0, adxt_bdyt0, bdxt_adyt0;
+  REAL u[4], v[12], w[16];
+  INEXACT REAL u3;
+  int vlength, wlength;
+  REAL negate;
+
+  INEXACT REAL bvirt;
+  REAL avirt, bround, around;
+  INEXACT REAL c;
+  INEXACT REAL abig;
+  REAL ahi, alo, bhi, blo;
+  REAL err1, err2, err3;
+  INEXACT REAL _i, _j, _k;
+  REAL _0;
+
+  adx = (REAL) (pa[0] - pd[0]);
+  bdx = (REAL) (pb[0] - pd[0]);
+  cdx = (REAL) (pc[0] - pd[0]);
+  ady = (REAL) (pa[1] - pd[1]);
+  bdy = (REAL) (pb[1] - pd[1]);
+  cdy = (REAL) (pc[1] - pd[1]);
+  adz = (REAL) (pa[2] - pd[2]);
+  bdz = (REAL) (pb[2] - pd[2]);
+  cdz = (REAL) (pc[2] - pd[2]);
+
+  Two_Product(bdx, cdy, bdxcdy1, bdxcdy0);
+  Two_Product(cdx, bdy, cdxbdy1, cdxbdy0);
+  Two_Two_Diff(bdxcdy1, bdxcdy0, cdxbdy1, cdxbdy0, bc3, bc[2], bc[1], bc[0]);
+  bc[3] = bc3;
+  alen = scale_expansion_zeroelim(4, bc, adz, adet);
+
+  Two_Product(cdx, ady, cdxady1, cdxady0);
+  Two_Product(adx, cdy, adxcdy1, adxcdy0);
+  Two_Two_Diff(cdxady1, cdxady0, adxcdy1, adxcdy0, ca3, ca[2], ca[1], ca[0]);
+  ca[3] = ca3;
+  blen = scale_expansion_zeroelim(4, ca, bdz, bdet);
+
+  Two_Product(adx, bdy, adxbdy1, adxbdy0);
+  Two_Product(bdx, ady, bdxady1, bdxady0);
+  Two_Two_Diff(adxbdy1, adxbdy0, bdxady1, bdxady0, ab3, ab[2], ab[1], ab[0]);
+  ab[3] = ab3;
+  clen = scale_expansion_zeroelim(4, ab, cdz, cdet);
+
+  ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet);
+  finlength = fast_expansion_sum_zeroelim(ablen, abdet, clen, cdet, fin1);
+
+  det = estimate(finlength, fin1);
+  errbound = o3derrboundB * permanent;
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  Two_Diff_Tail(pa[0], pd[0], adx, adxtail);
+  Two_Diff_Tail(pb[0], pd[0], bdx, bdxtail);
+  Two_Diff_Tail(pc[0], pd[0], cdx, cdxtail);
+  Two_Diff_Tail(pa[1], pd[1], ady, adytail);
+  Two_Diff_Tail(pb[1], pd[1], bdy, bdytail);
+  Two_Diff_Tail(pc[1], pd[1], cdy, cdytail);
+  Two_Diff_Tail(pa[2], pd[2], adz, adztail);
+  Two_Diff_Tail(pb[2], pd[2], bdz, bdztail);
+  Two_Diff_Tail(pc[2], pd[2], cdz, cdztail);
+
+  if ((adxtail == 0.0) && (bdxtail == 0.0) && (cdxtail == 0.0)
+      && (adytail == 0.0) && (bdytail == 0.0) && (cdytail == 0.0)
+      && (adztail == 0.0) && (bdztail == 0.0) && (cdztail == 0.0)) {
+    return det;
+  }
+
+  errbound = o3derrboundC * permanent + resulterrbound * Absolute(det);
+  det += (adz * ((bdx * cdytail + cdy * bdxtail)
+                 - (bdy * cdxtail + cdx * bdytail))
+          + adztail * (bdx * cdy - bdy * cdx))
+       + (bdz * ((cdx * adytail + ady * cdxtail)
+                 - (cdy * adxtail + adx * cdytail))
+          + bdztail * (cdx * ady - cdy * adx))
+       + (cdz * ((adx * bdytail + bdy * adxtail)
+                 - (ady * bdxtail + bdx * adytail))
+          + cdztail * (adx * bdy - ady * bdx));
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  finnow = fin1;
+  finother = fin2;
+
+  if (adxtail == 0.0) {
+    if (adytail == 0.0) {
+      at_b[0] = 0.0;
+      at_blen = 1;
+      at_c[0] = 0.0;
+      at_clen = 1;
+    } else {
+      negate = -adytail;
+      Two_Product(negate, bdx, at_blarge, at_b[0]);
+      at_b[1] = at_blarge;
+      at_blen = 2;
+      Two_Product(adytail, cdx, at_clarge, at_c[0]);
+      at_c[1] = at_clarge;
+      at_clen = 2;
+    }
+  } else {
+    if (adytail == 0.0) {
+      Two_Product(adxtail, bdy, at_blarge, at_b[0]);
+      at_b[1] = at_blarge;
+      at_blen = 2;
+      negate = -adxtail;
+      Two_Product(negate, cdy, at_clarge, at_c[0]);
+      at_c[1] = at_clarge;
+      at_clen = 2;
+    } else {
+      Two_Product(adxtail, bdy, adxt_bdy1, adxt_bdy0);
+      Two_Product(adytail, bdx, adyt_bdx1, adyt_bdx0);
+      Two_Two_Diff(adxt_bdy1, adxt_bdy0, adyt_bdx1, adyt_bdx0,
+                   at_blarge, at_b[2], at_b[1], at_b[0]);
+      at_b[3] = at_blarge;
+      at_blen = 4;
+      Two_Product(adytail, cdx, adyt_cdx1, adyt_cdx0);
+      Two_Product(adxtail, cdy, adxt_cdy1, adxt_cdy0);
+      Two_Two_Diff(adyt_cdx1, adyt_cdx0, adxt_cdy1, adxt_cdy0,
+                   at_clarge, at_c[2], at_c[1], at_c[0]);
+      at_c[3] = at_clarge;
+      at_clen = 4;
+    }
+  }
+  if (bdxtail == 0.0) {
+    if (bdytail == 0.0) {
+      bt_c[0] = 0.0;
+      bt_clen = 1;
+      bt_a[0] = 0.0;
+      bt_alen = 1;
+    } else {
+      negate = -bdytail;
+      Two_Product(negate, cdx, bt_clarge, bt_c[0]);
+      bt_c[1] = bt_clarge;
+      bt_clen = 2;
+      Two_Product(bdytail, adx, bt_alarge, bt_a[0]);
+      bt_a[1] = bt_alarge;
+      bt_alen = 2;
+    }
+  } else {
+    if (bdytail == 0.0) {
+      Two_Product(bdxtail, cdy, bt_clarge, bt_c[0]);
+      bt_c[1] = bt_clarge;
+      bt_clen = 2;
+      negate = -bdxtail;
+      Two_Product(negate, ady, bt_alarge, bt_a[0]);
+      bt_a[1] = bt_alarge;
+      bt_alen = 2;
+    } else {
+      Two_Product(bdxtail, cdy, bdxt_cdy1, bdxt_cdy0);
+      Two_Product(bdytail, cdx, bdyt_cdx1, bdyt_cdx0);
+      Two_Two_Diff(bdxt_cdy1, bdxt_cdy0, bdyt_cdx1, bdyt_cdx0,
+                   bt_clarge, bt_c[2], bt_c[1], bt_c[0]);
+      bt_c[3] = bt_clarge;
+      bt_clen = 4;
+      Two_Product(bdytail, adx, bdyt_adx1, bdyt_adx0);
+      Two_Product(bdxtail, ady, bdxt_ady1, bdxt_ady0);
+      Two_Two_Diff(bdyt_adx1, bdyt_adx0, bdxt_ady1, bdxt_ady0,
+                  bt_alarge, bt_a[2], bt_a[1], bt_a[0]);
+      bt_a[3] = bt_alarge;
+      bt_alen = 4;
+    }
+  }
+  if (cdxtail == 0.0) {
+    if (cdytail == 0.0) {
+      ct_a[0] = 0.0;
+      ct_alen = 1;
+      ct_b[0] = 0.0;
+      ct_blen = 1;
+    } else {
+      negate = -cdytail;
+      Two_Product(negate, adx, ct_alarge, ct_a[0]);
+      ct_a[1] = ct_alarge;
+      ct_alen = 2;
+      Two_Product(cdytail, bdx, ct_blarge, ct_b[0]);
+      ct_b[1] = ct_blarge;
+      ct_blen = 2;
+    }
+  } else {
+    if (cdytail == 0.0) {
+      Two_Product(cdxtail, ady, ct_alarge, ct_a[0]);
+      ct_a[1] = ct_alarge;
+      ct_alen = 2;
+      negate = -cdxtail;
+      Two_Product(negate, bdy, ct_blarge, ct_b[0]);
+      ct_b[1] = ct_blarge;
+      ct_blen = 2;
+    } else {
+      Two_Product(cdxtail, ady, cdxt_ady1, cdxt_ady0);
+      Two_Product(cdytail, adx, cdyt_adx1, cdyt_adx0);
+      Two_Two_Diff(cdxt_ady1, cdxt_ady0, cdyt_adx1, cdyt_adx0,
+                   ct_alarge, ct_a[2], ct_a[1], ct_a[0]);
+      ct_a[3] = ct_alarge;
+      ct_alen = 4;
+      Two_Product(cdytail, bdx, cdyt_bdx1, cdyt_bdx0);
+      Two_Product(cdxtail, bdy, cdxt_bdy1, cdxt_bdy0);
+      Two_Two_Diff(cdyt_bdx1, cdyt_bdx0, cdxt_bdy1, cdxt_bdy0,
+                   ct_blarge, ct_b[2], ct_b[1], ct_b[0]);
+      ct_b[3] = ct_blarge;
+      ct_blen = 4;
+    }
+  }
+
+  bctlen = fast_expansion_sum_zeroelim(bt_clen, bt_c, ct_blen, ct_b, bct);
+  wlength = scale_expansion_zeroelim(bctlen, bct, adz, w);
+  finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w,
+                                          finother);
+  finswap = finnow; finnow = finother; finother = finswap;
+
+  catlen = fast_expansion_sum_zeroelim(ct_alen, ct_a, at_clen, at_c, cat);
+  wlength = scale_expansion_zeroelim(catlen, cat, bdz, w);
+  finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w,
+                                          finother);
+  finswap = finnow; finnow = finother; finother = finswap;
+
+  abtlen = fast_expansion_sum_zeroelim(at_blen, at_b, bt_alen, bt_a, abt);
+  wlength = scale_expansion_zeroelim(abtlen, abt, cdz, w);
+  finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w,
+                                          finother);
+  finswap = finnow; finnow = finother; finother = finswap;
+
+  if (adztail != 0.0) {
+    vlength = scale_expansion_zeroelim(4, bc, adztail, v);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, vlength, v,
+                                            finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (bdztail != 0.0) {
+    vlength = scale_expansion_zeroelim(4, ca, bdztail, v);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, vlength, v,
+                                            finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (cdztail != 0.0) {
+    vlength = scale_expansion_zeroelim(4, ab, cdztail, v);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, vlength, v,
+                                            finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+
+  if (adxtail != 0.0) {
+    if (bdytail != 0.0) {
+      Two_Product(adxtail, bdytail, adxt_bdyt1, adxt_bdyt0);
+      Two_One_Product(adxt_bdyt1, adxt_bdyt0, cdz, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                              finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (cdztail != 0.0) {
+        Two_One_Product(adxt_bdyt1, adxt_bdyt0, cdztail, u3, u[2], u[1], u[0]);
+        u[3] = u3;
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                                finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+    }
+    if (cdytail != 0.0) {
+      negate = -adxtail;
+      Two_Product(negate, cdytail, adxt_cdyt1, adxt_cdyt0);
+      Two_One_Product(adxt_cdyt1, adxt_cdyt0, bdz, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                              finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (bdztail != 0.0) {
+        Two_One_Product(adxt_cdyt1, adxt_cdyt0, bdztail, u3, u[2], u[1], u[0]);
+        u[3] = u3;
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                                finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+    }
+  }
+  if (bdxtail != 0.0) {
+    if (cdytail != 0.0) {
+      Two_Product(bdxtail, cdytail, bdxt_cdyt1, bdxt_cdyt0);
+      Two_One_Product(bdxt_cdyt1, bdxt_cdyt0, adz, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                              finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (adztail != 0.0) {
+        Two_One_Product(bdxt_cdyt1, bdxt_cdyt0, adztail, u3, u[2], u[1], u[0]);
+        u[3] = u3;
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                                finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+    }
+    if (adytail != 0.0) {
+      negate = -bdxtail;
+      Two_Product(negate, adytail, bdxt_adyt1, bdxt_adyt0);
+      Two_One_Product(bdxt_adyt1, bdxt_adyt0, cdz, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                              finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (cdztail != 0.0) {
+        Two_One_Product(bdxt_adyt1, bdxt_adyt0, cdztail, u3, u[2], u[1], u[0]);
+        u[3] = u3;
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                                finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+    }
+  }
+  if (cdxtail != 0.0) {
+    if (adytail != 0.0) {
+      Two_Product(cdxtail, adytail, cdxt_adyt1, cdxt_adyt0);
+      Two_One_Product(cdxt_adyt1, cdxt_adyt0, bdz, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                              finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (bdztail != 0.0) {
+        Two_One_Product(cdxt_adyt1, cdxt_adyt0, bdztail, u3, u[2], u[1], u[0]);
+        u[3] = u3;
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                                finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+    }
+    if (bdytail != 0.0) {
+      negate = -cdxtail;
+      Two_Product(negate, bdytail, cdxt_bdyt1, cdxt_bdyt0);
+      Two_One_Product(cdxt_bdyt1, cdxt_bdyt0, adz, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                              finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (adztail != 0.0) {
+        Two_One_Product(cdxt_bdyt1, cdxt_bdyt0, adztail, u3, u[2], u[1], u[0]);
+        u[3] = u3;
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, 4, u,
+                                                finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+    }
+  }
+
+  if (adztail != 0.0) {
+    wlength = scale_expansion_zeroelim(bctlen, bct, adztail, w);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w,
+                                            finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (bdztail != 0.0) {
+    wlength = scale_expansion_zeroelim(catlen, cat, bdztail, w);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w,
+                                            finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (cdztail != 0.0) {
+    wlength = scale_expansion_zeroelim(abtlen, abt, cdztail, w);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, wlength, w,
+                                            finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+
+  return finnow[finlength - 1];
+}
+
+REAL orient3d(pa, pb, pc, pd)
+REAL *pa;
+REAL *pb;
+REAL *pc;
+REAL *pd;
+{
+  REAL adx, bdx, cdx, ady, bdy, cdy, adz, bdz, cdz;
+  REAL bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady;
+  REAL det;
+  REAL permanent, errbound;
+  REAL orient;
+
+  FPU_ROUND_DOUBLE;
+
+  adx = pa[0] - pd[0];
+  bdx = pb[0] - pd[0];
+  cdx = pc[0] - pd[0];
+  ady = pa[1] - pd[1];
+  bdy = pb[1] - pd[1];
+  cdy = pc[1] - pd[1];
+  adz = pa[2] - pd[2];
+  bdz = pb[2] - pd[2];
+  cdz = pc[2] - pd[2];
+
+  bdxcdy = bdx * cdy;
+  cdxbdy = cdx * bdy;
+
+  cdxady = cdx * ady;
+  adxcdy = adx * cdy;
+
+  adxbdy = adx * bdy;
+  bdxady = bdx * ady;
+
+  det = adz * (bdxcdy - cdxbdy) 
+      + bdz * (cdxady - adxcdy)
+      + cdz * (adxbdy - bdxady);
+
+  permanent = (Absolute(bdxcdy) + Absolute(cdxbdy)) * Absolute(adz)
+            + (Absolute(cdxady) + Absolute(adxcdy)) * Absolute(bdz)
+            + (Absolute(adxbdy) + Absolute(bdxady)) * Absolute(cdz);
+  errbound = o3derrboundA * permanent;
+  if ((det > errbound) || (-det > errbound)) {
+    FPU_RESTORE;
+    return det;
+  }
+
+  orient = orient3dadapt(pa, pb, pc, pd, permanent);
+  FPU_RESTORE;
+  return orient;
+}
+
+/*****************************************************************************/
+/*                                                                           */
+/*  incirclefast()   Approximate 2D incircle test.  Nonrobust.               */
+/*  incircleexact()   Exact 2D incircle test.  Robust.                       */
+/*  incircleslow()   Another exact 2D incircle test.  Robust.                */
+/*  incircle()   Adaptive exact 2D incircle test.  Robust.                   */
+/*                                                                           */
+/*               Return a positive value if the point pd lies inside the     */
+/*               circle passing through pa, pb, and pc; a negative value if  */
+/*               it lies outside; and zero if the four points are cocircular.*/
+/*               The points pa, pb, and pc must be in counterclockwise       */
+/*               order, or the sign of the result will be reversed.          */
+/*                                                                           */
+/*  Only the first and last routine should be used; the middle two are for   */
+/*  timings.                                                                 */
+/*                                                                           */
+/*  The last three use exact arithmetic to ensure a correct answer.  The     */
+/*  result returned is the determinant of a matrix.  In incircle() only,     */
+/*  this determinant is computed adaptively, in the sense that exact         */
+/*  arithmetic is used only to the degree it is needed to ensure that the    */
+/*  returned value has the correct sign.  Hence, incircle() is usually quite */
+/*  fast, but will run more slowly when the input points are cocircular or   */
+/*  nearly so.                                                               */
+/*                                                                           */
+/*****************************************************************************/
+
+static REAL incircleadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, 
+			  REAL permanent)
+{
+  INEXACT REAL adx, bdx, cdx, ady, bdy, cdy;
+  REAL det, errbound;
+
+  INEXACT REAL bdxcdy1, cdxbdy1, cdxady1, adxcdy1, adxbdy1, bdxady1;
+  REAL bdxcdy0, cdxbdy0, cdxady0, adxcdy0, adxbdy0, bdxady0;
+  REAL bc[4], ca[4], ab[4];
+  INEXACT REAL bc3, ca3, ab3;
+  REAL axbc[8], axxbc[16], aybc[8], ayybc[16], adet[32];
+  int axbclen, axxbclen, aybclen, ayybclen, alen;
+  REAL bxca[8], bxxca[16], byca[8], byyca[16], bdet[32];
+  int bxcalen, bxxcalen, bycalen, byycalen, blen;
+  REAL cxab[8], cxxab[16], cyab[8], cyyab[16], cdet[32];
+  int cxablen, cxxablen, cyablen, cyyablen, clen;
+  REAL abdet[64];
+  int ablen;
+  REAL fin1[1152], fin2[1152];
+  REAL *finnow, *finother, *finswap;
+  int finlength;
+
+  REAL adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;
+  INEXACT REAL adxadx1, adyady1, bdxbdx1, bdybdy1, cdxcdx1, cdycdy1;
+  REAL adxadx0, adyady0, bdxbdx0, bdybdy0, cdxcdx0, cdycdy0;
+  REAL aa[4], bb[4], cc[4];
+  INEXACT REAL aa3, bb3, cc3;
+  INEXACT REAL ti1, tj1;
+  REAL ti0, tj0;
+  REAL u[4], v[4];
+  INEXACT REAL u3, v3;
+  REAL temp8[8], temp16a[16], temp16b[16], temp16c[16];
+  REAL temp32a[32], temp32b[32], temp48[48], temp64[64];
+  int temp8len, temp16alen, temp16blen, temp16clen;
+  int temp32alen, temp32blen, temp48len, temp64len;
+  REAL axtbb[8], axtcc[8], aytbb[8], aytcc[8];
+  int axtbblen, axtcclen, aytbblen, aytcclen;
+  REAL bxtaa[8], bxtcc[8], bytaa[8], bytcc[8];
+  int bxtaalen, bxtcclen, bytaalen, bytcclen;
+  REAL cxtaa[8], cxtbb[8], cytaa[8], cytbb[8];
+  int cxtaalen, cxtbblen, cytaalen, cytbblen;
+  REAL axtbc[8], aytbc[8], bxtca[8], bytca[8], cxtab[8], cytab[8];
+  int axtbclen = 0, aytbclen = 0;
+  int bxtcalen = 0, bytcalen = 0;
+  int cxtablen = 0, cytablen = 0;
+  REAL axtbct[16], aytbct[16], bxtcat[16], bytcat[16], cxtabt[16], cytabt[16];
+  int axtbctlen, aytbctlen, bxtcatlen, bytcatlen, cxtabtlen, cytabtlen;
+  REAL axtbctt[8], aytbctt[8], bxtcatt[8];
+  REAL bytcatt[8], cxtabtt[8], cytabtt[8];
+  int axtbcttlen, aytbcttlen, bxtcattlen, bytcattlen, cxtabttlen, cytabttlen;
+  REAL abt[8], bct[8], cat[8];
+  int abtlen, bctlen, catlen;
+  REAL abtt[4], bctt[4], catt[4];
+  int abttlen, bcttlen, cattlen;
+  INEXACT REAL abtt3, bctt3, catt3;
+  REAL negate;
+
+  INEXACT REAL bvirt;
+  REAL avirt, bround, around;
+  INEXACT REAL c;
+  INEXACT REAL abig;
+  REAL ahi, alo, bhi, blo;
+  REAL err1, err2, err3;
+  INEXACT REAL _i, _j;
+  REAL _0;
+
+  adx = (REAL) (pa[0] - pd[0]);
+  bdx = (REAL) (pb[0] - pd[0]);
+  cdx = (REAL) (pc[0] - pd[0]);
+  ady = (REAL) (pa[1] - pd[1]);
+  bdy = (REAL) (pb[1] - pd[1]);
+  cdy = (REAL) (pc[1] - pd[1]);
+
+  Two_Product(bdx, cdy, bdxcdy1, bdxcdy0);
+  Two_Product(cdx, bdy, cdxbdy1, cdxbdy0);
+  Two_Two_Diff(bdxcdy1, bdxcdy0, cdxbdy1, cdxbdy0, bc3, bc[2], bc[1], bc[0]);
+  bc[3] = bc3;
+  axbclen = scale_expansion_zeroelim(4, bc, adx, axbc);
+  axxbclen = scale_expansion_zeroelim(axbclen, axbc, adx, axxbc);
+  aybclen = scale_expansion_zeroelim(4, bc, ady, aybc);
+  ayybclen = scale_expansion_zeroelim(aybclen, aybc, ady, ayybc);
+  alen = fast_expansion_sum_zeroelim(axxbclen, axxbc, ayybclen, ayybc, adet);
+
+  Two_Product(cdx, ady, cdxady1, cdxady0);
+  Two_Product(adx, cdy, adxcdy1, adxcdy0);
+  Two_Two_Diff(cdxady1, cdxady0, adxcdy1, adxcdy0, ca3, ca[2], ca[1], ca[0]);
+  ca[3] = ca3;
+  bxcalen = scale_expansion_zeroelim(4, ca, bdx, bxca);
+  bxxcalen = scale_expansion_zeroelim(bxcalen, bxca, bdx, bxxca);
+  bycalen = scale_expansion_zeroelim(4, ca, bdy, byca);
+  byycalen = scale_expansion_zeroelim(bycalen, byca, bdy, byyca);
+  blen = fast_expansion_sum_zeroelim(bxxcalen, bxxca, byycalen, byyca, bdet);
+
+  Two_Product(adx, bdy, adxbdy1, adxbdy0);
+  Two_Product(bdx, ady, bdxady1, bdxady0);
+  Two_Two_Diff(adxbdy1, adxbdy0, bdxady1, bdxady0, ab3, ab[2], ab[1], ab[0]);
+  ab[3] = ab3;
+  cxablen = scale_expansion_zeroelim(4, ab, cdx, cxab);
+  cxxablen = scale_expansion_zeroelim(cxablen, cxab, cdx, cxxab);
+  cyablen = scale_expansion_zeroelim(4, ab, cdy, cyab);
+  cyyablen = scale_expansion_zeroelim(cyablen, cyab, cdy, cyyab);
+  clen = fast_expansion_sum_zeroelim(cxxablen, cxxab, cyyablen, cyyab, cdet);
+
+  ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet);
+  finlength = fast_expansion_sum_zeroelim(ablen, abdet, clen, cdet, fin1);
+
+  det = estimate(finlength, fin1);
+  errbound = iccerrboundB * permanent;
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  Two_Diff_Tail(pa[0], pd[0], adx, adxtail);
+  Two_Diff_Tail(pa[1], pd[1], ady, adytail);
+  Two_Diff_Tail(pb[0], pd[0], bdx, bdxtail);
+  Two_Diff_Tail(pb[1], pd[1], bdy, bdytail);
+  Two_Diff_Tail(pc[0], pd[0], cdx, cdxtail);
+  Two_Diff_Tail(pc[1], pd[1], cdy, cdytail);
+  if ((adxtail == 0.0) && (bdxtail == 0.0) && (cdxtail == 0.0)
+      && (adytail == 0.0) && (bdytail == 0.0) && (cdytail == 0.0)) {
+    return det;
+  }
+
+  errbound = iccerrboundC * permanent + resulterrbound * Absolute(det);
+  det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail)
+                                     - (bdy * cdxtail + cdx * bdytail))
+          + 2.0 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx))
+       + ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail)
+                                     - (cdy * adxtail + adx * cdytail))
+          + 2.0 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx))
+       + ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail)
+                                     - (ady * bdxtail + bdx * adytail))
+          + 2.0 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  finnow = fin1;
+  finother = fin2;
+
+  if ((bdxtail != 0.0) || (bdytail != 0.0)
+      || (cdxtail != 0.0) || (cdytail != 0.0)) {
+    Square(adx, adxadx1, adxadx0);
+    Square(ady, adyady1, adyady0);
+    Two_Two_Sum(adxadx1, adxadx0, adyady1, adyady0, aa3, aa[2], aa[1], aa[0]);
+    aa[3] = aa3;
+  }
+  if ((cdxtail != 0.0) || (cdytail != 0.0)
+      || (adxtail != 0.0) || (adytail != 0.0)) {
+    Square(bdx, bdxbdx1, bdxbdx0);
+    Square(bdy, bdybdy1, bdybdy0);
+    Two_Two_Sum(bdxbdx1, bdxbdx0, bdybdy1, bdybdy0, bb3, bb[2], bb[1], bb[0]);
+    bb[3] = bb3;
+  }
+  if ((adxtail != 0.0) || (adytail != 0.0)
+      || (bdxtail != 0.0) || (bdytail != 0.0)) {
+    Square(cdx, cdxcdx1, cdxcdx0);
+    Square(cdy, cdycdy1, cdycdy0);
+    Two_Two_Sum(cdxcdx1, cdxcdx0, cdycdy1, cdycdy0, cc3, cc[2], cc[1], cc[0]);
+    cc[3] = cc3;
+  }
+
+  if (adxtail != 0.0) {
+    axtbclen = scale_expansion_zeroelim(4, bc, adxtail, axtbc);
+    temp16alen = scale_expansion_zeroelim(axtbclen, axtbc, 2.0 * adx,
+                                          temp16a);
+
+    axtcclen = scale_expansion_zeroelim(4, cc, adxtail, axtcc);
+    temp16blen = scale_expansion_zeroelim(axtcclen, axtcc, bdy, temp16b);
+
+    axtbblen = scale_expansion_zeroelim(4, bb, adxtail, axtbb);
+    temp16clen = scale_expansion_zeroelim(axtbblen, axtbb, -cdy, temp16c);
+
+    temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                            temp16blen, temp16b, temp32a);
+    temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c,
+                                            temp32alen, temp32a, temp48);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                            temp48, finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (adytail != 0.0) {
+    aytbclen = scale_expansion_zeroelim(4, bc, adytail, aytbc);
+    temp16alen = scale_expansion_zeroelim(aytbclen, aytbc, 2.0 * ady,
+                                          temp16a);
+
+    aytbblen = scale_expansion_zeroelim(4, bb, adytail, aytbb);
+    temp16blen = scale_expansion_zeroelim(aytbblen, aytbb, cdx, temp16b);
+
+    aytcclen = scale_expansion_zeroelim(4, cc, adytail, aytcc);
+    temp16clen = scale_expansion_zeroelim(aytcclen, aytcc, -bdx, temp16c);
+
+    temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                            temp16blen, temp16b, temp32a);
+    temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c,
+                                            temp32alen, temp32a, temp48);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                            temp48, finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (bdxtail != 0.0) {
+    bxtcalen = scale_expansion_zeroelim(4, ca, bdxtail, bxtca);
+    temp16alen = scale_expansion_zeroelim(bxtcalen, bxtca, 2.0 * bdx,
+                                          temp16a);
+
+    bxtaalen = scale_expansion_zeroelim(4, aa, bdxtail, bxtaa);
+    temp16blen = scale_expansion_zeroelim(bxtaalen, bxtaa, cdy, temp16b);
+
+    bxtcclen = scale_expansion_zeroelim(4, cc, bdxtail, bxtcc);
+    temp16clen = scale_expansion_zeroelim(bxtcclen, bxtcc, -ady, temp16c);
+
+    temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                            temp16blen, temp16b, temp32a);
+    temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c,
+                                            temp32alen, temp32a, temp48);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                            temp48, finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (bdytail != 0.0) {
+    bytcalen = scale_expansion_zeroelim(4, ca, bdytail, bytca);
+    temp16alen = scale_expansion_zeroelim(bytcalen, bytca, 2.0 * bdy,
+                                          temp16a);
+
+    bytcclen = scale_expansion_zeroelim(4, cc, bdytail, bytcc);
+    temp16blen = scale_expansion_zeroelim(bytcclen, bytcc, adx, temp16b);
+
+    bytaalen = scale_expansion_zeroelim(4, aa, bdytail, bytaa);
+    temp16clen = scale_expansion_zeroelim(bytaalen, bytaa, -cdx, temp16c);
+
+    temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                            temp16blen, temp16b, temp32a);
+    temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c,
+                                            temp32alen, temp32a, temp48);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                            temp48, finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (cdxtail != 0.0) {
+    cxtablen = scale_expansion_zeroelim(4, ab, cdxtail, cxtab);
+    temp16alen = scale_expansion_zeroelim(cxtablen, cxtab, 2.0 * cdx,
+                                          temp16a);
+
+    cxtbblen = scale_expansion_zeroelim(4, bb, cdxtail, cxtbb);
+    temp16blen = scale_expansion_zeroelim(cxtbblen, cxtbb, ady, temp16b);
+
+    cxtaalen = scale_expansion_zeroelim(4, aa, cdxtail, cxtaa);
+    temp16clen = scale_expansion_zeroelim(cxtaalen, cxtaa, -bdy, temp16c);
+
+    temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                            temp16blen, temp16b, temp32a);
+    temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c,
+                                            temp32alen, temp32a, temp48);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                            temp48, finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+  if (cdytail != 0.0) {
+    cytablen = scale_expansion_zeroelim(4, ab, cdytail, cytab);
+    temp16alen = scale_expansion_zeroelim(cytablen, cytab, 2.0 * cdy,
+                                          temp16a);
+
+    cytaalen = scale_expansion_zeroelim(4, aa, cdytail, cytaa);
+    temp16blen = scale_expansion_zeroelim(cytaalen, cytaa, bdx, temp16b);
+
+    cytbblen = scale_expansion_zeroelim(4, bb, cdytail, cytbb);
+    temp16clen = scale_expansion_zeroelim(cytbblen, cytbb, -adx, temp16c);
+
+    temp32alen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                            temp16blen, temp16b, temp32a);
+    temp48len = fast_expansion_sum_zeroelim(temp16clen, temp16c,
+                                            temp32alen, temp32a, temp48);
+    finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                            temp48, finother);
+    finswap = finnow; finnow = finother; finother = finswap;
+  }
+
+  if ((adxtail != 0.0) || (adytail != 0.0)) {
+    if ((bdxtail != 0.0) || (bdytail != 0.0)
+        || (cdxtail != 0.0) || (cdytail != 0.0)) {
+      Two_Product(bdxtail, cdy, ti1, ti0);
+      Two_Product(bdx, cdytail, tj1, tj0);
+      Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      negate = -bdy;
+      Two_Product(cdxtail, negate, ti1, ti0);
+      negate = -bdytail;
+      Two_Product(cdx, negate, tj1, tj0);
+      Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]);
+      v[3] = v3;
+      bctlen = fast_expansion_sum_zeroelim(4, u, 4, v, bct);
+
+      Two_Product(bdxtail, cdytail, ti1, ti0);
+      Two_Product(cdxtail, bdytail, tj1, tj0);
+      Two_Two_Diff(ti1, ti0, tj1, tj0, bctt3, bctt[2], bctt[1], bctt[0]);
+      bctt[3] = bctt3;
+      bcttlen = 4;
+    } else {
+      bct[0] = 0.0;
+      bctlen = 1;
+      bctt[0] = 0.0;
+      bcttlen = 1;
+    }
+
+    if (adxtail != 0.0) {
+      temp16alen = scale_expansion_zeroelim(axtbclen, axtbc, adxtail, temp16a);
+      axtbctlen = scale_expansion_zeroelim(bctlen, bct, adxtail, axtbct);
+      temp32alen = scale_expansion_zeroelim(axtbctlen, axtbct, 2.0 * adx,
+                                            temp32a);
+      temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp32alen, temp32a, temp48);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                              temp48, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (bdytail != 0.0) {
+        temp8len = scale_expansion_zeroelim(4, cc, adxtail, temp8);
+        temp16alen = scale_expansion_zeroelim(temp8len, temp8, bdytail,
+                                              temp16a);
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen,
+                                                temp16a, finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+      if (cdytail != 0.0) {
+        temp8len = scale_expansion_zeroelim(4, bb, -adxtail, temp8);
+        temp16alen = scale_expansion_zeroelim(temp8len, temp8, cdytail,
+                                              temp16a);
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen,
+                                                temp16a, finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+
+      temp32alen = scale_expansion_zeroelim(axtbctlen, axtbct, adxtail,
+                                            temp32a);
+      axtbcttlen = scale_expansion_zeroelim(bcttlen, bctt, adxtail, axtbctt);
+      temp16alen = scale_expansion_zeroelim(axtbcttlen, axtbctt, 2.0 * adx,
+                                            temp16a);
+      temp16blen = scale_expansion_zeroelim(axtbcttlen, axtbctt, adxtail,
+                                            temp16b);
+      temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp16blen, temp16b, temp32b);
+      temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a,
+                                              temp32blen, temp32b, temp64);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len,
+                                              temp64, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+    }
+    if (adytail != 0.0) {
+      temp16alen = scale_expansion_zeroelim(aytbclen, aytbc, adytail, temp16a);
+      aytbctlen = scale_expansion_zeroelim(bctlen, bct, adytail, aytbct);
+      temp32alen = scale_expansion_zeroelim(aytbctlen, aytbct, 2.0 * ady,
+                                            temp32a);
+      temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp32alen, temp32a, temp48);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                              temp48, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+
+
+      temp32alen = scale_expansion_zeroelim(aytbctlen, aytbct, adytail,
+                                            temp32a);
+      aytbcttlen = scale_expansion_zeroelim(bcttlen, bctt, adytail, aytbctt);
+      temp16alen = scale_expansion_zeroelim(aytbcttlen, aytbctt, 2.0 * ady,
+                                            temp16a);
+      temp16blen = scale_expansion_zeroelim(aytbcttlen, aytbctt, adytail,
+                                            temp16b);
+      temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp16blen, temp16b, temp32b);
+      temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a,
+                                              temp32blen, temp32b, temp64);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len,
+                                              temp64, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+    }
+  }
+  if ((bdxtail != 0.0) || (bdytail != 0.0)) {
+    if ((cdxtail != 0.0) || (cdytail != 0.0)
+        || (adxtail != 0.0) || (adytail != 0.0)) {
+      Two_Product(cdxtail, ady, ti1, ti0);
+      Two_Product(cdx, adytail, tj1, tj0);
+      Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      negate = -cdy;
+      Two_Product(adxtail, negate, ti1, ti0);
+      negate = -cdytail;
+      Two_Product(adx, negate, tj1, tj0);
+      Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]);
+      v[3] = v3;
+      catlen = fast_expansion_sum_zeroelim(4, u, 4, v, cat);
+
+      Two_Product(cdxtail, adytail, ti1, ti0);
+      Two_Product(adxtail, cdytail, tj1, tj0);
+      Two_Two_Diff(ti1, ti0, tj1, tj0, catt3, catt[2], catt[1], catt[0]);
+      catt[3] = catt3;
+      cattlen = 4;
+    } else {
+      cat[0] = 0.0;
+      catlen = 1;
+      catt[0] = 0.0;
+      cattlen = 1;
+    }
+
+    if (bdxtail != 0.0) {
+      temp16alen = scale_expansion_zeroelim(bxtcalen, bxtca, bdxtail, temp16a);
+      bxtcatlen = scale_expansion_zeroelim(catlen, cat, bdxtail, bxtcat);
+      temp32alen = scale_expansion_zeroelim(bxtcatlen, bxtcat, 2.0 * bdx,
+                                            temp32a);
+      temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp32alen, temp32a, temp48);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                              temp48, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (cdytail != 0.0) {
+        temp8len = scale_expansion_zeroelim(4, aa, bdxtail, temp8);
+        temp16alen = scale_expansion_zeroelim(temp8len, temp8, cdytail,
+                                              temp16a);
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen,
+                                                temp16a, finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+      if (adytail != 0.0) {
+        temp8len = scale_expansion_zeroelim(4, cc, -bdxtail, temp8);
+        temp16alen = scale_expansion_zeroelim(temp8len, temp8, adytail,
+                                              temp16a);
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen,
+                                                temp16a, finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+
+      temp32alen = scale_expansion_zeroelim(bxtcatlen, bxtcat, bdxtail,
+                                            temp32a);
+      bxtcattlen = scale_expansion_zeroelim(cattlen, catt, bdxtail, bxtcatt);
+      temp16alen = scale_expansion_zeroelim(bxtcattlen, bxtcatt, 2.0 * bdx,
+                                            temp16a);
+      temp16blen = scale_expansion_zeroelim(bxtcattlen, bxtcatt, bdxtail,
+                                            temp16b);
+      temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp16blen, temp16b, temp32b);
+      temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a,
+                                              temp32blen, temp32b, temp64);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len,
+                                              temp64, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+    }
+    if (bdytail != 0.0) {
+      temp16alen = scale_expansion_zeroelim(bytcalen, bytca, bdytail, temp16a);
+      bytcatlen = scale_expansion_zeroelim(catlen, cat, bdytail, bytcat);
+      temp32alen = scale_expansion_zeroelim(bytcatlen, bytcat, 2.0 * bdy,
+                                            temp32a);
+      temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp32alen, temp32a, temp48);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                              temp48, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+
+
+      temp32alen = scale_expansion_zeroelim(bytcatlen, bytcat, bdytail,
+                                            temp32a);
+      bytcattlen = scale_expansion_zeroelim(cattlen, catt, bdytail, bytcatt);
+      temp16alen = scale_expansion_zeroelim(bytcattlen, bytcatt, 2.0 * bdy,
+                                            temp16a);
+      temp16blen = scale_expansion_zeroelim(bytcattlen, bytcatt, bdytail,
+                                            temp16b);
+      temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp16blen, temp16b, temp32b);
+      temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a,
+                                              temp32blen, temp32b, temp64);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len,
+                                              temp64, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+    }
+  }
+  if ((cdxtail != 0.0) || (cdytail != 0.0)) {
+    if ((adxtail != 0.0) || (adytail != 0.0)
+        || (bdxtail != 0.0) || (bdytail != 0.0)) {
+      Two_Product(adxtail, bdy, ti1, ti0);
+      Two_Product(adx, bdytail, tj1, tj0);
+      Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]);
+      u[3] = u3;
+      negate = -ady;
+      Two_Product(bdxtail, negate, ti1, ti0);
+      negate = -adytail;
+      Two_Product(bdx, negate, tj1, tj0);
+      Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]);
+      v[3] = v3;
+      abtlen = fast_expansion_sum_zeroelim(4, u, 4, v, abt);
+
+      Two_Product(adxtail, bdytail, ti1, ti0);
+      Two_Product(bdxtail, adytail, tj1, tj0);
+      Two_Two_Diff(ti1, ti0, tj1, tj0, abtt3, abtt[2], abtt[1], abtt[0]);
+      abtt[3] = abtt3;
+      abttlen = 4;
+    } else {
+      abt[0] = 0.0;
+      abtlen = 1;
+      abtt[0] = 0.0;
+      abttlen = 1;
+    }
+
+    if (cdxtail != 0.0) {
+      temp16alen = scale_expansion_zeroelim(cxtablen, cxtab, cdxtail, temp16a);
+      cxtabtlen = scale_expansion_zeroelim(abtlen, abt, cdxtail, cxtabt);
+      temp32alen = scale_expansion_zeroelim(cxtabtlen, cxtabt, 2.0 * cdx,
+                                            temp32a);
+      temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp32alen, temp32a, temp48);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                              temp48, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+      if (adytail != 0.0) {
+        temp8len = scale_expansion_zeroelim(4, bb, cdxtail, temp8);
+        temp16alen = scale_expansion_zeroelim(temp8len, temp8, adytail,
+                                              temp16a);
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen,
+                                                temp16a, finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+      if (bdytail != 0.0) {
+        temp8len = scale_expansion_zeroelim(4, aa, -cdxtail, temp8);
+        temp16alen = scale_expansion_zeroelim(temp8len, temp8, bdytail,
+                                              temp16a);
+        finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp16alen,
+                                                temp16a, finother);
+        finswap = finnow; finnow = finother; finother = finswap;
+      }
+
+      temp32alen = scale_expansion_zeroelim(cxtabtlen, cxtabt, cdxtail,
+                                            temp32a);
+      cxtabttlen = scale_expansion_zeroelim(abttlen, abtt, cdxtail, cxtabtt);
+      temp16alen = scale_expansion_zeroelim(cxtabttlen, cxtabtt, 2.0 * cdx,
+                                            temp16a);
+      temp16blen = scale_expansion_zeroelim(cxtabttlen, cxtabtt, cdxtail,
+                                            temp16b);
+      temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp16blen, temp16b, temp32b);
+      temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a,
+                                              temp32blen, temp32b, temp64);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len,
+                                              temp64, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+    }
+    if (cdytail != 0.0) {
+      temp16alen = scale_expansion_zeroelim(cytablen, cytab, cdytail, temp16a);
+      cytabtlen = scale_expansion_zeroelim(abtlen, abt, cdytail, cytabt);
+      temp32alen = scale_expansion_zeroelim(cytabtlen, cytabt, 2.0 * cdy,
+                                            temp32a);
+      temp48len = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp32alen, temp32a, temp48);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp48len,
+                                              temp48, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+
+
+      temp32alen = scale_expansion_zeroelim(cytabtlen, cytabt, cdytail,
+                                            temp32a);
+      cytabttlen = scale_expansion_zeroelim(abttlen, abtt, cdytail, cytabtt);
+      temp16alen = scale_expansion_zeroelim(cytabttlen, cytabtt, 2.0 * cdy,
+                                            temp16a);
+      temp16blen = scale_expansion_zeroelim(cytabttlen, cytabtt, cdytail,
+                                            temp16b);
+      temp32blen = fast_expansion_sum_zeroelim(temp16alen, temp16a,
+                                              temp16blen, temp16b, temp32b);
+      temp64len = fast_expansion_sum_zeroelim(temp32alen, temp32a,
+                                              temp32blen, temp32b, temp64);
+      finlength = fast_expansion_sum_zeroelim(finlength, finnow, temp64len,
+                                              temp64, finother);
+      finswap = finnow; finnow = finother; finother = finswap;
+    }
+  }
+
+  return finnow[finlength - 1];
+}
+
+REAL incircle(pa, pb, pc, pd)
+REAL *pa;
+REAL *pb;
+REAL *pc;
+REAL *pd;
+{
+  REAL adx, bdx, cdx, ady, bdy, cdy;
+  REAL bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady;
+  REAL alift, blift, clift;
+  REAL det;
+  REAL permanent, errbound;
+  REAL inc;
+
+  FPU_ROUND_DOUBLE;
+  
+  adx = pa[0] - pd[0];
+  bdx = pb[0] - pd[0];
+  cdx = pc[0] - pd[0];
+  ady = pa[1] - pd[1];
+  bdy = pb[1] - pd[1];
+  cdy = pc[1] - pd[1];
+
+  bdxcdy = bdx * cdy;
+  cdxbdy = cdx * bdy;
+  alift = adx * adx + ady * ady;
+
+  cdxady = cdx * ady;
+  adxcdy = adx * cdy;
+  blift = bdx * bdx + bdy * bdy;
+
+  adxbdy = adx * bdy;
+  bdxady = bdx * ady;
+  clift = cdx * cdx + cdy * cdy;
+
+  det = alift * (bdxcdy - cdxbdy)
+      + blift * (cdxady - adxcdy)
+      + clift * (adxbdy - bdxady);
+
+  permanent = (Absolute(bdxcdy) + Absolute(cdxbdy)) * alift
+            + (Absolute(cdxady) + Absolute(adxcdy)) * blift
+            + (Absolute(adxbdy) + Absolute(bdxady)) * clift;
+  errbound = iccerrboundA * permanent;
+  if ((det > errbound) || (-det > errbound)) {
+    FPU_RESTORE;
+    return det;
+  }
+
+  inc = incircleadapt(pa, pb, pc, pd, permanent);
+  FPU_RESTORE;
+  return inc;
+}
+
+/*****************************************************************************/
+/*                                                                           */
+/*  inspherefast()   Approximate 3D insphere test.  Nonrobust.               */
+/*  insphereexact()   Exact 3D insphere test.  Robust.                       */
+/*  insphereslow()   Another exact 3D insphere test.  Robust.                */
+/*  insphere()   Adaptive exact 3D insphere test.  Robust.                   */
+/*                                                                           */
+/*               Return a positive value if the point pe lies inside the     */
+/*               sphere passing through pa, pb, pc, and pd; a negative value */
+/*               if it lies outside; and zero if the five points are         */
+/*               cospherical.  The points pa, pb, pc, and pd must be ordered */
+/*               so that they have a positive orientation (as defined by     */
+/*               orient3d()), or the sign of the result will be reversed.    */
+/*                                                                           */
+/*  Only the first and last routine should be used; the middle two are for   */
+/*  timings.                                                                 */
+/*                                                                           */
+/*  The last three use exact arithmetic to ensure a correct answer.  The     */
+/*  result returned is the determinant of a matrix.  In insphere() only,     */
+/*  this determinant is computed adaptively, in the sense that exact         */
+/*  arithmetic is used only to the degree it is needed to ensure that the    */
+/*  returned value has the correct sign.  Hence, insphere() is usually quite */
+/*  fast, but will run more slowly when the input points are cospherical or  */
+/*  nearly so.                                                               */
+/*                                                                           */
+/*****************************************************************************/
+
+static REAL insphereexact(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
+{
+  INEXACT REAL axby1, bxcy1, cxdy1, dxey1, exay1;
+  INEXACT REAL bxay1, cxby1, dxcy1, exdy1, axey1;
+  INEXACT REAL axcy1, bxdy1, cxey1, dxay1, exby1;
+  INEXACT REAL cxay1, dxby1, excy1, axdy1, bxey1;
+  REAL axby0, bxcy0, cxdy0, dxey0, exay0;
+  REAL bxay0, cxby0, dxcy0, exdy0, axey0;
+  REAL axcy0, bxdy0, cxey0, dxay0, exby0;
+  REAL cxay0, dxby0, excy0, axdy0, bxey0;
+  REAL ab[4], bc[4], cd[4], de[4], ea[4];
+  REAL ac[4], bd[4], ce[4], da[4], eb[4];
+  REAL temp8a[8], temp8b[8], temp16[16];
+  int temp8alen, temp8blen, temp16len;
+  REAL abc[24], bcd[24], cde[24], dea[24], eab[24];
+  REAL abd[24], bce[24], cda[24], deb[24], eac[24];
+  int abclen, bcdlen, cdelen, dealen, eablen;
+  int abdlen, bcelen, cdalen, deblen, eaclen;
+  REAL temp48a[48], temp48b[48];
+  int temp48alen, temp48blen;
+  REAL abcd[96], bcde[96], cdea[96], deab[96], eabc[96];
+  int abcdlen, bcdelen, cdealen, deablen, eabclen;
+  REAL temp192[192];
+  REAL det384x[384], det384y[384], det384z[384];
+  int xlen, ylen, zlen;
+  REAL detxy[768];
+  int xylen;
+  REAL adet[1152], bdet[1152], cdet[1152], ddet[1152], edet[1152];
+  int alen, blen, clen, dlen, elen;
+  REAL abdet[2304], cddet[2304], cdedet[3456];
+  int ablen, cdlen;
+  REAL deter[5760];
+  int deterlen;
+  int i;
+
+  INEXACT REAL bvirt;
+  REAL avirt, bround, around;
+  INEXACT REAL c;
+  INEXACT REAL abig;
+  REAL ahi, alo, bhi, blo;
+  REAL err1, err2, err3;
+  INEXACT REAL _i, _j;
+  REAL _0;
+
+  Two_Product(pa[0], pb[1], axby1, axby0);
+  Two_Product(pb[0], pa[1], bxay1, bxay0);
+  Two_Two_Diff(axby1, axby0, bxay1, bxay0, ab[3], ab[2], ab[1], ab[0]);
+
+  Two_Product(pb[0], pc[1], bxcy1, bxcy0);
+  Two_Product(pc[0], pb[1], cxby1, cxby0);
+  Two_Two_Diff(bxcy1, bxcy0, cxby1, cxby0, bc[3], bc[2], bc[1], bc[0]);
+
+  Two_Product(pc[0], pd[1], cxdy1, cxdy0);
+  Two_Product(pd[0], pc[1], dxcy1, dxcy0);
+  Two_Two_Diff(cxdy1, cxdy0, dxcy1, dxcy0, cd[3], cd[2], cd[1], cd[0]);
+
+  Two_Product(pd[0], pe[1], dxey1, dxey0);
+  Two_Product(pe[0], pd[1], exdy1, exdy0);
+  Two_Two_Diff(dxey1, dxey0, exdy1, exdy0, de[3], de[2], de[1], de[0]);
+
+  Two_Product(pe[0], pa[1], exay1, exay0);
+  Two_Product(pa[0], pe[1], axey1, axey0);
+  Two_Two_Diff(exay1, exay0, axey1, axey0, ea[3], ea[2], ea[1], ea[0]);
+
+  Two_Product(pa[0], pc[1], axcy1, axcy0);
+  Two_Product(pc[0], pa[1], cxay1, cxay0);
+  Two_Two_Diff(axcy1, axcy0, cxay1, cxay0, ac[3], ac[2], ac[1], ac[0]);
+
+  Two_Product(pb[0], pd[1], bxdy1, bxdy0);
+  Two_Product(pd[0], pb[1], dxby1, dxby0);
+  Two_Two_Diff(bxdy1, bxdy0, dxby1, dxby0, bd[3], bd[2], bd[1], bd[0]);
+
+  Two_Product(pc[0], pe[1], cxey1, cxey0);
+  Two_Product(pe[0], pc[1], excy1, excy0);
+  Two_Two_Diff(cxey1, cxey0, excy1, excy0, ce[3], ce[2], ce[1], ce[0]);
+
+  Two_Product(pd[0], pa[1], dxay1, dxay0);
+  Two_Product(pa[0], pd[1], axdy1, axdy0);
+  Two_Two_Diff(dxay1, dxay0, axdy1, axdy0, da[3], da[2], da[1], da[0]);
+
+  Two_Product(pe[0], pb[1], exby1, exby0);
+  Two_Product(pb[0], pe[1], bxey1, bxey0);
+  Two_Two_Diff(exby1, exby0, bxey1, bxey0, eb[3], eb[2], eb[1], eb[0]);
+
+  temp8alen = scale_expansion_zeroelim(4, bc, pa[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, ac, -pb[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, ab, pc[2], temp8a);
+  abclen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       abc);
+
+  temp8alen = scale_expansion_zeroelim(4, cd, pb[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, bd, -pc[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, bc, pd[2], temp8a);
+  bcdlen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       bcd);
+
+  temp8alen = scale_expansion_zeroelim(4, de, pc[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, ce, -pd[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, cd, pe[2], temp8a);
+  cdelen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       cde);
+
+  temp8alen = scale_expansion_zeroelim(4, ea, pd[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, da, -pe[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, de, pa[2], temp8a);
+  dealen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       dea);
+
+  temp8alen = scale_expansion_zeroelim(4, ab, pe[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, eb, -pa[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, ea, pb[2], temp8a);
+  eablen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       eab);
+
+  temp8alen = scale_expansion_zeroelim(4, bd, pa[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, da, pb[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, ab, pd[2], temp8a);
+  abdlen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       abd);
+
+  temp8alen = scale_expansion_zeroelim(4, ce, pb[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, eb, pc[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, bc, pe[2], temp8a);
+  bcelen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       bce);
+
+  temp8alen = scale_expansion_zeroelim(4, da, pc[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, ac, pd[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, cd, pa[2], temp8a);
+  cdalen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       cda);
+
+  temp8alen = scale_expansion_zeroelim(4, eb, pd[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, bd, pe[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, de, pb[2], temp8a);
+  deblen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       deb);
+
+  temp8alen = scale_expansion_zeroelim(4, ac, pe[2], temp8a);
+  temp8blen = scale_expansion_zeroelim(4, ce, pa[2], temp8b);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp8blen, temp8b,
+                                          temp16);
+  temp8alen = scale_expansion_zeroelim(4, ea, pc[2], temp8a);
+  eaclen = fast_expansion_sum_zeroelim(temp8alen, temp8a, temp16len, temp16,
+                                       eac);
+
+  temp48alen = fast_expansion_sum_zeroelim(cdelen, cde, bcelen, bce, temp48a);
+  temp48blen = fast_expansion_sum_zeroelim(deblen, deb, bcdlen, bcd, temp48b);
+  for (i = 0; i < temp48blen; i++) {
+    temp48b[i] = -temp48b[i];
+  }
+  bcdelen = fast_expansion_sum_zeroelim(temp48alen, temp48a,
+                                        temp48blen, temp48b, bcde);
+  xlen = scale_expansion_zeroelim(bcdelen, bcde, pa[0], temp192);
+  xlen = scale_expansion_zeroelim(xlen, temp192, pa[0], det384x);
+  ylen = scale_expansion_zeroelim(bcdelen, bcde, pa[1], temp192);
+  ylen = scale_expansion_zeroelim(ylen, temp192, pa[1], det384y);
+  zlen = scale_expansion_zeroelim(bcdelen, bcde, pa[2], temp192);
+  zlen = scale_expansion_zeroelim(zlen, temp192, pa[2], det384z);
+  xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy);
+  alen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, adet);
+
+  temp48alen = fast_expansion_sum_zeroelim(dealen, dea, cdalen, cda, temp48a);
+  temp48blen = fast_expansion_sum_zeroelim(eaclen, eac, cdelen, cde, temp48b);
+  for (i = 0; i < temp48blen; i++) {
+    temp48b[i] = -temp48b[i];
+  }
+  cdealen = fast_expansion_sum_zeroelim(temp48alen, temp48a,
+                                        temp48blen, temp48b, cdea);
+  xlen = scale_expansion_zeroelim(cdealen, cdea, pb[0], temp192);
+  xlen = scale_expansion_zeroelim(xlen, temp192, pb[0], det384x);
+  ylen = scale_expansion_zeroelim(cdealen, cdea, pb[1], temp192);
+  ylen = scale_expansion_zeroelim(ylen, temp192, pb[1], det384y);
+  zlen = scale_expansion_zeroelim(cdealen, cdea, pb[2], temp192);
+  zlen = scale_expansion_zeroelim(zlen, temp192, pb[2], det384z);
+  xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy);
+  blen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, bdet);
+
+  temp48alen = fast_expansion_sum_zeroelim(eablen, eab, deblen, deb, temp48a);
+  temp48blen = fast_expansion_sum_zeroelim(abdlen, abd, dealen, dea, temp48b);
+  for (i = 0; i < temp48blen; i++) {
+    temp48b[i] = -temp48b[i];
+  }
+  deablen = fast_expansion_sum_zeroelim(temp48alen, temp48a,
+                                        temp48blen, temp48b, deab);
+  xlen = scale_expansion_zeroelim(deablen, deab, pc[0], temp192);
+  xlen = scale_expansion_zeroelim(xlen, temp192, pc[0], det384x);
+  ylen = scale_expansion_zeroelim(deablen, deab, pc[1], temp192);
+  ylen = scale_expansion_zeroelim(ylen, temp192, pc[1], det384y);
+  zlen = scale_expansion_zeroelim(deablen, deab, pc[2], temp192);
+  zlen = scale_expansion_zeroelim(zlen, temp192, pc[2], det384z);
+  xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy);
+  clen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, cdet);
+
+  temp48alen = fast_expansion_sum_zeroelim(abclen, abc, eaclen, eac, temp48a);
+  temp48blen = fast_expansion_sum_zeroelim(bcelen, bce, eablen, eab, temp48b);
+  for (i = 0; i < temp48blen; i++) {
+    temp48b[i] = -temp48b[i];
+  }
+  eabclen = fast_expansion_sum_zeroelim(temp48alen, temp48a,
+                                        temp48blen, temp48b, eabc);
+  xlen = scale_expansion_zeroelim(eabclen, eabc, pd[0], temp192);
+  xlen = scale_expansion_zeroelim(xlen, temp192, pd[0], det384x);
+  ylen = scale_expansion_zeroelim(eabclen, eabc, pd[1], temp192);
+  ylen = scale_expansion_zeroelim(ylen, temp192, pd[1], det384y);
+  zlen = scale_expansion_zeroelim(eabclen, eabc, pd[2], temp192);
+  zlen = scale_expansion_zeroelim(zlen, temp192, pd[2], det384z);
+  xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy);
+  dlen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, ddet);
+
+  temp48alen = fast_expansion_sum_zeroelim(bcdlen, bcd, abdlen, abd, temp48a);
+  temp48blen = fast_expansion_sum_zeroelim(cdalen, cda, abclen, abc, temp48b);
+  for (i = 0; i < temp48blen; i++) {
+    temp48b[i] = -temp48b[i];
+  }
+  abcdlen = fast_expansion_sum_zeroelim(temp48alen, temp48a,
+                                        temp48blen, temp48b, abcd);
+  xlen = scale_expansion_zeroelim(abcdlen, abcd, pe[0], temp192);
+  xlen = scale_expansion_zeroelim(xlen, temp192, pe[0], det384x);
+  ylen = scale_expansion_zeroelim(abcdlen, abcd, pe[1], temp192);
+  ylen = scale_expansion_zeroelim(ylen, temp192, pe[1], det384y);
+  zlen = scale_expansion_zeroelim(abcdlen, abcd, pe[2], temp192);
+  zlen = scale_expansion_zeroelim(zlen, temp192, pe[2], det384z);
+  xylen = fast_expansion_sum_zeroelim(xlen, det384x, ylen, det384y, detxy);
+  elen = fast_expansion_sum_zeroelim(xylen, detxy, zlen, det384z, edet);
+
+  ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet);
+  cdlen = fast_expansion_sum_zeroelim(clen, cdet, dlen, ddet, cddet);
+  cdelen = fast_expansion_sum_zeroelim(cdlen, cddet, elen, edet, cdedet);
+  deterlen = fast_expansion_sum_zeroelim(ablen, abdet, cdelen, cdedet, deter);
+
+  return deter[deterlen - 1];
+}
+
+static REAL insphereadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe, 
+			  REAL permanent)
+{
+  INEXACT REAL aex, bex, cex, dex, aey, bey, cey, dey, aez, bez, cez, dez;
+  REAL det, errbound;
+
+  INEXACT REAL aexbey1, bexaey1, bexcey1, cexbey1;
+  INEXACT REAL cexdey1, dexcey1, dexaey1, aexdey1;
+  INEXACT REAL aexcey1, cexaey1, bexdey1, dexbey1;
+  REAL aexbey0, bexaey0, bexcey0, cexbey0;
+  REAL cexdey0, dexcey0, dexaey0, aexdey0;
+  REAL aexcey0, cexaey0, bexdey0, dexbey0;
+  REAL ab[4], bc[4], cd[4], da[4], ac[4], bd[4];
+  INEXACT REAL ab3, bc3, cd3, da3, ac3, bd3;
+  REAL abeps, bceps, cdeps, daeps, aceps, bdeps;
+  REAL temp8a[8], temp8b[8], temp8c[8], temp16[16], temp24[24], temp48[48];
+  int temp8alen, temp8blen, temp8clen, temp16len, temp24len, temp48len;
+  REAL xdet[96], ydet[96], zdet[96], xydet[192];
+  int xlen, ylen, zlen, xylen;
+  REAL adet[288], bdet[288], cdet[288], ddet[288];
+  int alen, blen, clen, dlen;
+  REAL abdet[576], cddet[576];
+  int ablen, cdlen;
+  REAL fin1[1152];
+  int finlength;
+
+  REAL aextail, bextail, cextail, dextail;
+  REAL aeytail, beytail, ceytail, deytail;
+  REAL aeztail, beztail, ceztail, deztail;
+
+  INEXACT REAL bvirt;
+  REAL avirt, bround, around;
+  INEXACT REAL c;
+  INEXACT REAL abig;
+  REAL ahi, alo, bhi, blo;
+  REAL err1, err2, err3;
+  INEXACT REAL _i, _j;
+  REAL _0;
+
+  aex = (REAL) (pa[0] - pe[0]);
+  bex = (REAL) (pb[0] - pe[0]);
+  cex = (REAL) (pc[0] - pe[0]);
+  dex = (REAL) (pd[0] - pe[0]);
+  aey = (REAL) (pa[1] - pe[1]);
+  bey = (REAL) (pb[1] - pe[1]);
+  cey = (REAL) (pc[1] - pe[1]);
+  dey = (REAL) (pd[1] - pe[1]);
+  aez = (REAL) (pa[2] - pe[2]);
+  bez = (REAL) (pb[2] - pe[2]);
+  cez = (REAL) (pc[2] - pe[2]);
+  dez = (REAL) (pd[2] - pe[2]);
+
+  Two_Product(aex, bey, aexbey1, aexbey0);
+  Two_Product(bex, aey, bexaey1, bexaey0);
+  Two_Two_Diff(aexbey1, aexbey0, bexaey1, bexaey0, ab3, ab[2], ab[1], ab[0]);
+  ab[3] = ab3;
+
+  Two_Product(bex, cey, bexcey1, bexcey0);
+  Two_Product(cex, bey, cexbey1, cexbey0);
+  Two_Two_Diff(bexcey1, bexcey0, cexbey1, cexbey0, bc3, bc[2], bc[1], bc[0]);
+  bc[3] = bc3;
+
+  Two_Product(cex, dey, cexdey1, cexdey0);
+  Two_Product(dex, cey, dexcey1, dexcey0);
+  Two_Two_Diff(cexdey1, cexdey0, dexcey1, dexcey0, cd3, cd[2], cd[1], cd[0]);
+  cd[3] = cd3;
+
+  Two_Product(dex, aey, dexaey1, dexaey0);
+  Two_Product(aex, dey, aexdey1, aexdey0);
+  Two_Two_Diff(dexaey1, dexaey0, aexdey1, aexdey0, da3, da[2], da[1], da[0]);
+  da[3] = da3;
+
+  Two_Product(aex, cey, aexcey1, aexcey0);
+  Two_Product(cex, aey, cexaey1, cexaey0);
+  Two_Two_Diff(aexcey1, aexcey0, cexaey1, cexaey0, ac3, ac[2], ac[1], ac[0]);
+  ac[3] = ac3;
+
+  Two_Product(bex, dey, bexdey1, bexdey0);
+  Two_Product(dex, bey, dexbey1, dexbey0);
+  Two_Two_Diff(bexdey1, bexdey0, dexbey1, dexbey0, bd3, bd[2], bd[1], bd[0]);
+  bd[3] = bd3;
+
+  temp8alen = scale_expansion_zeroelim(4, cd, bez, temp8a);
+  temp8blen = scale_expansion_zeroelim(4, bd, -cez, temp8b);
+  temp8clen = scale_expansion_zeroelim(4, bc, dez, temp8c);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a,
+                                          temp8blen, temp8b, temp16);
+  temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c,
+                                          temp16len, temp16, temp24);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, aex, temp48);
+  xlen = scale_expansion_zeroelim(temp48len, temp48, -aex, xdet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, aey, temp48);
+  ylen = scale_expansion_zeroelim(temp48len, temp48, -aey, ydet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, aez, temp48);
+  zlen = scale_expansion_zeroelim(temp48len, temp48, -aez, zdet);
+  xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet);
+  alen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, adet);
+
+  temp8alen = scale_expansion_zeroelim(4, da, cez, temp8a);
+  temp8blen = scale_expansion_zeroelim(4, ac, dez, temp8b);
+  temp8clen = scale_expansion_zeroelim(4, cd, aez, temp8c);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a,
+                                          temp8blen, temp8b, temp16);
+  temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c,
+                                          temp16len, temp16, temp24);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, bex, temp48);
+  xlen = scale_expansion_zeroelim(temp48len, temp48, bex, xdet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, bey, temp48);
+  ylen = scale_expansion_zeroelim(temp48len, temp48, bey, ydet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, bez, temp48);
+  zlen = scale_expansion_zeroelim(temp48len, temp48, bez, zdet);
+  xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet);
+  blen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, bdet);
+
+  temp8alen = scale_expansion_zeroelim(4, ab, dez, temp8a);
+  temp8blen = scale_expansion_zeroelim(4, bd, aez, temp8b);
+  temp8clen = scale_expansion_zeroelim(4, da, bez, temp8c);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a,
+                                          temp8blen, temp8b, temp16);
+  temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c,
+                                          temp16len, temp16, temp24);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, cex, temp48);
+  xlen = scale_expansion_zeroelim(temp48len, temp48, -cex, xdet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, cey, temp48);
+  ylen = scale_expansion_zeroelim(temp48len, temp48, -cey, ydet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, cez, temp48);
+  zlen = scale_expansion_zeroelim(temp48len, temp48, -cez, zdet);
+  xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet);
+  clen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, cdet);
+
+  temp8alen = scale_expansion_zeroelim(4, bc, aez, temp8a);
+  temp8blen = scale_expansion_zeroelim(4, ac, -bez, temp8b);
+  temp8clen = scale_expansion_zeroelim(4, ab, cez, temp8c);
+  temp16len = fast_expansion_sum_zeroelim(temp8alen, temp8a,
+                                          temp8blen, temp8b, temp16);
+  temp24len = fast_expansion_sum_zeroelim(temp8clen, temp8c,
+                                          temp16len, temp16, temp24);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, dex, temp48);
+  xlen = scale_expansion_zeroelim(temp48len, temp48, dex, xdet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, dey, temp48);
+  ylen = scale_expansion_zeroelim(temp48len, temp48, dey, ydet);
+  temp48len = scale_expansion_zeroelim(temp24len, temp24, dez, temp48);
+  zlen = scale_expansion_zeroelim(temp48len, temp48, dez, zdet);
+  xylen = fast_expansion_sum_zeroelim(xlen, xdet, ylen, ydet, xydet);
+  dlen = fast_expansion_sum_zeroelim(xylen, xydet, zlen, zdet, ddet);
+
+  ablen = fast_expansion_sum_zeroelim(alen, adet, blen, bdet, abdet);
+  cdlen = fast_expansion_sum_zeroelim(clen, cdet, dlen, ddet, cddet);
+  finlength = fast_expansion_sum_zeroelim(ablen, abdet, cdlen, cddet, fin1);
+
+  det = estimate(finlength, fin1);
+  errbound = isperrboundB * permanent;
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  Two_Diff_Tail(pa[0], pe[0], aex, aextail);
+  Two_Diff_Tail(pa[1], pe[1], aey, aeytail);
+  Two_Diff_Tail(pa[2], pe[2], aez, aeztail);
+  Two_Diff_Tail(pb[0], pe[0], bex, bextail);
+  Two_Diff_Tail(pb[1], pe[1], bey, beytail);
+  Two_Diff_Tail(pb[2], pe[2], bez, beztail);
+  Two_Diff_Tail(pc[0], pe[0], cex, cextail);
+  Two_Diff_Tail(pc[1], pe[1], cey, ceytail);
+  Two_Diff_Tail(pc[2], pe[2], cez, ceztail);
+  Two_Diff_Tail(pd[0], pe[0], dex, dextail);
+  Two_Diff_Tail(pd[1], pe[1], dey, deytail);
+  Two_Diff_Tail(pd[2], pe[2], dez, deztail);
+  if ((aextail == 0.0) && (aeytail == 0.0) && (aeztail == 0.0)
+      && (bextail == 0.0) && (beytail == 0.0) && (beztail == 0.0)
+      && (cextail == 0.0) && (ceytail == 0.0) && (ceztail == 0.0)
+      && (dextail == 0.0) && (deytail == 0.0) && (deztail == 0.0)) {
+    return det;
+  }
+
+  errbound = isperrboundC * permanent + resulterrbound * Absolute(det);
+  abeps = (aex * beytail + bey * aextail)
+        - (aey * bextail + bex * aeytail);
+  bceps = (bex * ceytail + cey * bextail)
+        - (bey * cextail + cex * beytail);
+  cdeps = (cex * deytail + dey * cextail)
+        - (cey * dextail + dex * ceytail);
+  daeps = (dex * aeytail + aey * dextail)
+        - (dey * aextail + aex * deytail);
+  aceps = (aex * ceytail + cey * aextail)
+        - (aey * cextail + cex * aeytail);
+  bdeps = (bex * deytail + dey * bextail)
+        - (bey * dextail + dex * beytail);
+  det += (((bex * bex + bey * bey + bez * bez)
+           * ((cez * daeps + dez * aceps + aez * cdeps)
+              + (ceztail * da3 + deztail * ac3 + aeztail * cd3))
+           + (dex * dex + dey * dey + dez * dez)
+           * ((aez * bceps - bez * aceps + cez * abeps)
+              + (aeztail * bc3 - beztail * ac3 + ceztail * ab3)))
+          - ((aex * aex + aey * aey + aez * aez)
+           * ((bez * cdeps - cez * bdeps + dez * bceps)
+              + (beztail * cd3 - ceztail * bd3 + deztail * bc3))
+           + (cex * cex + cey * cey + cez * cez)
+           * ((dez * abeps + aez * bdeps + bez * daeps)
+              + (deztail * ab3 + aeztail * bd3 + beztail * da3))))
+       + 2.0 * (((bex * bextail + bey * beytail + bez * beztail)
+                 * (cez * da3 + dez * ac3 + aez * cd3)
+                 + (dex * dextail + dey * deytail + dez * deztail)
+                 * (aez * bc3 - bez * ac3 + cez * ab3))
+                - ((aex * aextail + aey * aeytail + aez * aeztail)
+                 * (bez * cd3 - cez * bd3 + dez * bc3)
+                 + (cex * cextail + cey * ceytail + cez * ceztail)
+                 * (dez * ab3 + aez * bd3 + bez * da3)));
+  if ((det >= errbound) || (-det >= errbound)) {
+    return det;
+  }
+
+  return insphereexact(pa, pb, pc, pd, pe);
+}
+
+REAL insphere(pa, pb, pc, pd, pe)
+REAL *pa;
+REAL *pb;
+REAL *pc;
+REAL *pd;
+REAL *pe;
+{
+  REAL aex, bex, cex, dex;
+  REAL aey, bey, cey, dey;
+  REAL aez, bez, cez, dez;
+  REAL aexbey, bexaey, bexcey, cexbey, cexdey, dexcey, dexaey, aexdey;
+  REAL aexcey, cexaey, bexdey, dexbey;
+  REAL alift, blift, clift, dlift;
+  REAL ab, bc, cd, da, ac, bd;
+  REAL abc, bcd, cda, dab;
+  REAL aezplus, bezplus, cezplus, dezplus;
+  REAL aexbeyplus, bexaeyplus, bexceyplus, cexbeyplus;
+  REAL cexdeyplus, dexceyplus, dexaeyplus, aexdeyplus;
+  REAL aexceyplus, cexaeyplus, bexdeyplus, dexbeyplus;
+  REAL det;
+  REAL permanent, errbound;
+  REAL ins;
+
+  FPU_ROUND_DOUBLE;
+
+  aex = pa[0] - pe[0];
+  bex = pb[0] - pe[0];
+  cex = pc[0] - pe[0];
+  dex = pd[0] - pe[0];
+  aey = pa[1] - pe[1];
+  bey = pb[1] - pe[1];
+  cey = pc[1] - pe[1];
+  dey = pd[1] - pe[1];
+  aez = pa[2] - pe[2];
+  bez = pb[2] - pe[2];
+  cez = pc[2] - pe[2];
+  dez = pd[2] - pe[2];
+
+  aexbey = aex * bey;
+  bexaey = bex * aey;
+  ab = aexbey - bexaey;
+  bexcey = bex * cey;
+  cexbey = cex * bey;
+  bc = bexcey - cexbey;
+  cexdey = cex * dey;
+  dexcey = dex * cey;
+  cd = cexdey - dexcey;
+  dexaey = dex * aey;
+  aexdey = aex * dey;
+  da = dexaey - aexdey;
+
+  aexcey = aex * cey;
+  cexaey = cex * aey;
+  ac = aexcey - cexaey;
+  bexdey = bex * dey;
+  dexbey = dex * bey;
+  bd = bexdey - dexbey;
+
+  abc = aez * bc - bez * ac + cez * ab;
+  bcd = bez * cd - cez * bd + dez * bc;
+  cda = cez * da + dez * ac + aez * cd;
+  dab = dez * ab + aez * bd + bez * da;
+
+  alift = aex * aex + aey * aey + aez * aez;
+  blift = bex * bex + bey * bey + bez * bez;
+  clift = cex * cex + cey * cey + cez * cez;
+  dlift = dex * dex + dey * dey + dez * dez;
+
+  det = (dlift * abc - clift * dab) + (blift * cda - alift * bcd);
+
+  aezplus = Absolute(aez);
+  bezplus = Absolute(bez);
+  cezplus = Absolute(cez);
+  dezplus = Absolute(dez);
+  aexbeyplus = Absolute(aexbey);
+  bexaeyplus = Absolute(bexaey);
+  bexceyplus = Absolute(bexcey);
+  cexbeyplus = Absolute(cexbey);
+  cexdeyplus = Absolute(cexdey);
+  dexceyplus = Absolute(dexcey);
+  dexaeyplus = Absolute(dexaey);
+  aexdeyplus = Absolute(aexdey);
+  aexceyplus = Absolute(aexcey);
+  cexaeyplus = Absolute(cexaey);
+  bexdeyplus = Absolute(bexdey);
+  dexbeyplus = Absolute(dexbey);
+  permanent = ((cexdeyplus + dexceyplus) * bezplus
+               + (dexbeyplus + bexdeyplus) * cezplus
+               + (bexceyplus + cexbeyplus) * dezplus)
+            * alift
+            + ((dexaeyplus + aexdeyplus) * cezplus
+               + (aexceyplus + cexaeyplus) * dezplus
+               + (cexdeyplus + dexceyplus) * aezplus)
+            * blift
+            + ((aexbeyplus + bexaeyplus) * dezplus
+               + (bexdeyplus + dexbeyplus) * aezplus
+               + (dexaeyplus + aexdeyplus) * bezplus)
+            * clift
+            + ((bexceyplus + cexbeyplus) * aezplus
+               + (cexaeyplus + aexceyplus) * bezplus
+               + (aexbeyplus + bexaeyplus) * cezplus)
+            * dlift;
+  errbound = isperrboundA * permanent;
+  if ((det > errbound) || (-det > errbound)) {
+    FPU_RESTORE;
+    return det;
+  }
+
+  ins = insphereadapt(pa, pb, pc, pd, pe, permanent);
+  FPU_RESTORE;
+  return ins;
+}
diff --git a/src/predicates.h b/src/predicates.h
new file mode 100644
index 0000000..8b026ed
--- /dev/null
+++ b/src/predicates.h
@@ -0,0 +1,41 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+/* Header file for robust predicates by Jonathan Richard Shewchuk */
+
+#ifndef __PREDICATES_H__
+#define __PREDICATES_H__
+
+double orient2d            (double * pa,
+			    double * pb,
+			    double * pc);
+double orient3d            (double * pa,
+			    double * pb,
+			    double * pc,
+			    double * pd);
+double incircle            (double * pa,
+			    double * pb,
+			    double * pc,
+			    double * pd);
+double insphere            (double * pa,
+			    double * pb,
+			    double * pc,
+			    double * pd,
+			    double * pe);
+
+#endif /* __PREDICATES_H__ */
diff --git a/src/predicates_init.c b/src/predicates_init.c
new file mode 100644
index 0000000..5d8cfb7
--- /dev/null
+++ b/src/predicates_init.c
@@ -0,0 +1,108 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* This program creates a header file defining the various constants needed by
+ * predicates.c. These constant are machine dependent.
+ * adapted from predicates.c by Jonathan Richard Shewchuk
+ */
+
+#include <stdio.h>
+
+/* FPU control. We MUST have only double precision (not extended precision) */
+#include "rounding.h"
+
+int main (int argc, char * argv[])
+{
+  double half = 0.5;
+  double check = 1.0, lastcheck;
+  int every_other = 1;
+  /* epsilon = 2^(-p).  Used to estimate roundoff errors. */
+  double epsilon = 1.0;   
+  /* splitter = 2^ceiling(p / 2) + 1.  Used to split floats in half. */
+  double splitter = 1.0;
+  /* A set of coefficients used to calculate maximum roundoff errors. */
+  double resulterrbound;
+  double ccwerrboundA, ccwerrboundB, ccwerrboundC;
+  double o3derrboundA, o3derrboundB, o3derrboundC;
+  double iccerrboundA, iccerrboundB, iccerrboundC;
+  double isperrboundA, isperrboundB, isperrboundC;
+
+  FPU_ROUND_DOUBLE;
+
+  epsilon = 1.0;
+  splitter = 1.0;
+  /* Repeatedly divide `epsilon' by two until it is too small to add to   */
+  /* one without causing roundoff.  (Also check if the sum is equal to    */
+  /* the previous sum, for machines that round up instead of using exact  */
+  /* rounding.  Not that this library will work on such machines anyway). */
+  do {
+    lastcheck = check;
+    epsilon *= half;
+    if (every_other) {
+      splitter *= 2.0;
+    }
+    every_other = !every_other;
+    check = 1.0 + epsilon;
+  } while ((check != 1.0) && (check != lastcheck));
+  splitter += 1.0;
+  /* Error bounds for orientation and incircle tests. */
+  resulterrbound = (3.0 + 8.0 * epsilon) * epsilon;
+  ccwerrboundA = (3.0 + 16.0 * epsilon) * epsilon;
+  ccwerrboundB = (2.0 + 12.0 * epsilon) * epsilon;
+  ccwerrboundC = (9.0 + 64.0 * epsilon) * epsilon * epsilon;
+  o3derrboundA = (7.0 + 56.0 * epsilon) * epsilon;
+  o3derrboundB = (3.0 + 28.0 * epsilon) * epsilon;
+  o3derrboundC = (26.0 + 288.0 * epsilon) * epsilon * epsilon;
+  iccerrboundA = (10.0 + 96.0 * epsilon) * epsilon;
+  iccerrboundB = (4.0 + 48.0 * epsilon) * epsilon;
+  iccerrboundC = (44.0 + 576.0 * epsilon) * epsilon * epsilon;
+  isperrboundA = (16.0 + 224.0 * epsilon) * epsilon;
+  isperrboundB = (5.0 + 72.0 * epsilon) * epsilon;
+  isperrboundC = (71.0 + 1408.0 * epsilon) * epsilon * epsilon;
+
+  puts ("/* This file was generated automatically by predicates_init\n"
+	" *\n"
+	" * This file is free software; you can redistribute it and/or\n"
+	" * modify it under the terms of the GNU Library General Public\n"
+	" * License as published by the Free Software Foundation; either\n"
+	" * version 2 of the License, or (at your option) any later version.\n"
+	" *\n"
+	" * This file is distributed in the hope that it will be useful,\n"
+	" * but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+	" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+	" */\n");
+  printf ("static double splitter = %f;\n", splitter);
+  printf ("static double resulterrbound = %.16g;\n", resulterrbound);
+  printf ("static double ccwerrboundA = %.16g;\n", ccwerrboundA);
+  printf ("static double ccwerrboundB = %.16g;\n", ccwerrboundB);
+  printf ("static double ccwerrboundC = %.16g;\n", ccwerrboundC);
+  printf ("static double o3derrboundA = %.16g;\n", o3derrboundA);
+  printf ("static double o3derrboundB = %.16g;\n", o3derrboundB);
+  printf ("static double o3derrboundC = %.16g;\n", o3derrboundC);
+  printf ("static double iccerrboundA = %.16g;\n", iccerrboundA);
+  printf ("static double iccerrboundB = %.16g;\n", iccerrboundB);
+  printf ("static double iccerrboundC = %.16g;\n", iccerrboundC);
+  printf ("static double isperrboundA = %.16g;\n", isperrboundA);
+  printf ("static double isperrboundB = %.16g;\n", isperrboundB);
+  printf ("static double isperrboundC = %.16g;\n", isperrboundC);
+  
+  FPU_RESTORE;
+
+  return 0;
+}
diff --git a/src/psurface.c b/src/psurface.c
new file mode 100644
index 0000000..75f33df
--- /dev/null
+++ b/src/psurface.c
@@ -0,0 +1,471 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#include "gts.h"
+
+#define HEAP_INSERT_OBJECT(h, e) (GTS_OBJECT (e)->reserved =\
+                                   gts_eheap_insert (h, e))
+#define HEAP_REMOVE_OBJECT(h, e) (gts_eheap_remove (h, GTS_OBJECT (e)->reserved),\
+				  GTS_OBJECT (e)->reserved = NULL)
+
+static void psurface_destroy (GtsObject * object)
+{
+  GtsPSurface * ps = GTS_PSURFACE (object);
+  guint i;
+
+  for (i = 0; i < ps->split->len; i++)
+    gts_object_destroy (GTS_OBJECT (g_ptr_array_index (ps->split, i)));
+  g_ptr_array_free (ps->split, TRUE);
+  if (ps->vertices)
+    g_ptr_array_free (ps->vertices, TRUE);
+  if (ps->faces)
+    g_ptr_array_free (ps->faces, TRUE);
+
+  (* GTS_OBJECT_CLASS (gts_psurface_class ())->parent_class->destroy) (object);
+}
+
+static void psurface_class_init (GtsObjectClass * klass)
+{
+  klass->destroy = psurface_destroy;
+}
+
+static void psurface_init (GtsPSurface * psurface)
+{
+  psurface->s = NULL;
+  psurface->split = g_ptr_array_new ();
+  psurface->split_class = gts_split_class ();
+  psurface->pos = psurface->min = 0;
+  psurface->vertices = psurface->faces = NULL;
+}
+
+/**
+ * gts_psurface_class:
+ * 
+ * Returns: the #GtsPSurfaceClass.
+ */
+GtsPSurfaceClass * gts_psurface_class (void)
+{
+  static GtsPSurfaceClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo psurface_info = {
+      "GtsPSurface",
+      sizeof (GtsPSurface),
+      sizeof (GtsPSurfaceClass),
+      (GtsObjectClassInitFunc) psurface_class_init,
+      (GtsObjectInitFunc) psurface_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), 
+				  &psurface_info);
+  }
+
+  return klass;
+}
+
+static GtsVertex * edge_collapse (GtsPSurface * ps,
+				  GtsEdge * e,
+				  GtsEHeap * heap,
+				  GtsCoarsenFunc coarsen_func,
+				  gpointer coarsen_data,
+				  gdouble maxcosine2)
+{
+  GtsVertex  * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid;
+  GtsSplit * vs;
+  GtsObject * o1, * o2;
+
+  /* if the edge is degenerate (i.e. v1 == v2), destroy and return */
+  if (v1 == v2) {
+    gts_object_destroy (GTS_OBJECT (e));
+    return NULL;
+  }
+
+  if (!gts_edge_collapse_is_valid (e) ||
+      /* check that a non-manifold edge is not a contact edge */
+      (g_slist_length (e->triangles) > 2 && gts_edge_is_contact (e) > 1)) {
+    GTS_OBJECT (e)->reserved = 
+      gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE);
+    return NULL;
+  }
+
+  mid = (*coarsen_func) (e, ps->s->vertex_class, coarsen_data);
+
+  if (gts_edge_collapse_creates_fold (e, mid, maxcosine2)) {
+    GTS_OBJECT (e)->reserved = 
+      gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE);
+    gts_object_destroy (GTS_OBJECT (mid));
+    return NULL;
+  }
+
+  if (GTS_OBJECT (v1)->reserved)
+    o1 = GTS_OBJECT (v1)->reserved;
+  else
+    o1 = GTS_OBJECT (v1);
+  if (GTS_OBJECT (v2)->reserved)
+    o2 = GTS_OBJECT (v2)->reserved;
+  else
+    o2 = GTS_OBJECT (v2);
+  vs = gts_split_new (ps->split_class, mid, o1, o2);
+  gts_split_collapse (vs, ps->s->edge_class, heap);
+  GTS_OBJECT (vs->v)->reserved = vs;
+  g_ptr_array_add (ps->split, vs);
+
+  return mid;
+}
+
+static void update_2nd_closest_neighbors (GtsVertex * v, GtsEHeap * heap)
+{
+  GSList * i = v->segments;
+  GSList * list = NULL;
+  
+  while (i) {
+    GtsSegment * s = i->data;
+    if (GTS_IS_EDGE (s)) {
+      GtsVertex * v1 = s->v1 == v ? s->v2 : s->v1;
+      GSList * j = v1->segments;
+      while (j) {
+	GtsSegment * s1 = j->data;
+	if (GTS_IS_EDGE (s1) && !g_slist_find (list, s1))
+	  list = g_slist_prepend (list, s1);
+	j = j->next;
+      }
+    }
+    i = i->next;
+  }
+
+  i = list;
+  while (i) {
+    GtsEdge * e = i->data;
+    if (GTS_OBJECT (e)->reserved)
+      HEAP_REMOVE_OBJECT (heap, e);
+    HEAP_INSERT_OBJECT (heap, e);
+    i = i->next;
+  }
+
+  g_slist_free (list);
+}
+
+static gdouble edge_length2 (GtsEdge * e)
+{
+  return gts_point_distance2 (GTS_POINT (GTS_SEGMENT (e)->v1), 
+			      GTS_POINT (GTS_SEGMENT (e)->v2));
+}
+
+static void create_heap_coarsen (GtsEdge * e, GtsEHeap * heap)
+{
+  HEAP_INSERT_OBJECT (heap, e);
+}
+
+/* #define DEBUG_FOLD */
+/* #define DEBUG_CONTACT_VERTEX */
+
+#ifdef DEBUG_FOLD
+static void check_fold (GtsTriangle * t, gdouble * maxcosine2)
+{
+  GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3;
+
+  
+  if (gts_triangles_are_folded (e1->triangles, 
+				GTS_SEGMENT (e1)->v1,
+				GTS_SEGMENT (e1)->v2,
+				*maxcosine2) ||
+      gts_triangles_are_folded (e2->triangles, 
+				GTS_SEGMENT (e2)->v1,
+				GTS_SEGMENT (e2)->v2,
+				*maxcosine2) ||
+      gts_triangles_are_folded (e3->triangles, 
+				GTS_SEGMENT (e3)->v1,
+				GTS_SEGMENT (e3)->v2,
+				*maxcosine2)) {
+    fprintf (stderr, "triangle %p:(%p,%p,%p) is folded\n", t, e1, e2, e3);
+    g_assert_not_reached ();
+  }
+}
+#endif
+
+/**
+ * gts_psurface_new:
+ * @klass: a #GtsPSurfaceClass.
+ * @surface: a #GtsSurface.
+ * @split_class: a #GtsSplitClass to use for the new progressive surface.
+ * @cost_func: cost function for the edge collapse algorithm.
+ * @cost_data: data to pass to @cost_func.
+ * @coarsen_func: the function returning the vertex replacement for the edge 
+ * collapse.
+ * @coarsen_data: data to pass to @coarsen_func.
+ * @stop_func: the function to call to decide whether to stop the coarsening
+ * process.
+ * @stop_data: data to pass to @stop_func.
+ * @minangle: the minimum angle allowable between two neighboring triangles. 
+ * This is used to avoid introducing folds in the mesh during simplification.
+ *
+ * This function works in exactly the same way as the
+ * gts_surface_coarsen() function, except that the history of edge
+ * collapse is saved in an array of #GtsSplit objects. This allows for
+ * dynamic continuous multiresolution control of the input @surface.
+ *
+ * Returns: a new progressive surface.
+ */
+GtsPSurface * gts_psurface_new (GtsPSurfaceClass * klass,
+				GtsSurface * surface,
+				GtsSplitClass * split_class,
+				GtsKeyFunc cost_func,
+				gpointer cost_data,
+				GtsCoarsenFunc coarsen_func,
+				gpointer coarsen_data,
+				GtsStopFunc stop_func,
+				gpointer stop_data,
+				gdouble minangle)
+{
+  GtsPSurface * psurface;
+  GtsEHeap * heap;
+  GtsEdge * e;
+  gdouble top_cost, maxcosine2;
+  guint i;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (surface != NULL, NULL);
+  g_return_val_if_fail (split_class != NULL, NULL);
+  g_return_val_if_fail (stop_func != NULL, NULL);
+
+  psurface = GTS_PSURFACE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  psurface->s = surface;
+  psurface->split_class = split_class;
+
+  if (cost_func == NULL)
+    cost_func = (GtsKeyFunc) edge_length2;
+  if (coarsen_func == NULL)
+    coarsen_func = (GtsCoarsenFunc) gts_segment_midvertex;
+
+  heap = gts_eheap_new (cost_func, cost_data);
+  maxcosine2 = cos (minangle); maxcosine2 *= maxcosine2;
+
+  gts_eheap_freeze (heap);
+  gts_surface_foreach_edge (surface, (GtsFunc) create_heap_coarsen, heap);
+  gts_eheap_thaw (heap);
+  /* we want to control edge destruction manually */
+  gts_allow_floating_edges = TRUE;
+  while ((e = gts_eheap_remove_top (heap, &top_cost)) &&
+	 (top_cost < G_MAXDOUBLE) &&
+	 !(*stop_func) (top_cost, gts_eheap_size (heap) - 
+			gts_edge_face_number (e, surface), stop_data)) {
+    GtsVertex * v = edge_collapse (psurface, e, heap, 
+				   coarsen_func, coarsen_data, maxcosine2);
+    if (v != NULL) {
+      update_2nd_closest_neighbors (v, heap);
+#ifdef DEBUG_FOLD
+      {
+	GSList * triangles = gts_vertex_triangles (v, NULL), * i;
+	fprintf (stderr, "\n---- Check for folds ----\n%p: ", v);
+	i = triangles;
+	while (i) {
+	  GtsTriangle * t = i->data;
+	  fprintf (stderr, "%p:(%p,%p,%p) ", t, t->e1, t->e2, t->e3);
+	  i = i->next;
+	}
+	fprintf (stderr, "\n");
+	g_slist_free (triangles);
+	gts_surface_foreach_face (surface, (GtsFunc) check_fold, &maxcosine2);
+      }
+#endif
+#ifdef DEBUG_CONTACT_VERTEX
+      if (gts_vertex_is_contact (v, FALSE) != 1) {
+	FILE * fptr = fopen ("after", "wt");
+	GSList * triangles = gts_vertex_triangles (v, NULL), * i;
+
+	fprintf (stderr, "collapse of %p created a contact vertex\n", e);
+		 
+	fprintf (fptr, 
+		 "(geometry \"sphere\" { = SPHERE 0.1 0. 0. 0. })\n"
+		 "(normalization \"sphere\" none)\n");
+	i = triangles;
+	while (i) {
+	  gts_write_triangle (i->data, GTS_POINT (v), fptr);
+	  i = i->next;
+	}
+	g_assert_not_reached ();
+      }
+#endif
+    }
+  }
+  gts_allow_floating_edges = FALSE;
+
+  /* set reserved field of remaining edges back to NULL */
+  if (e) GTS_OBJECT (e)->reserved = NULL;
+  gts_eheap_foreach (heap, (GFunc) gts_object_reset_reserved, NULL);
+
+  gts_eheap_destroy (heap);
+
+  psurface->pos = psurface->split->len;
+  psurface->min = gts_surface_vertex_number (psurface->s);
+
+  /* set reserved field of vertices (used to build the hierarchy) 
+     back to NULL */
+  for (i = 0; i < psurface->split->len; i++) {
+    GtsSplit * vs = g_ptr_array_index (psurface->split, i);
+    gts_object_reset_reserved (GTS_OBJECT (vs->v));
+  }
+
+  return psurface;
+}
+
+/**
+ * gts_psurface_add_vertex:
+ * @ps: a #GtsPSurface.
+ *
+ * Adds a vertex to the progressive surface @ps by expanding the next
+ * available #GtsSplit.
+ *
+ * Returns: the expanded #GtsSplit or %NULL if all the #GtsSplit have already
+ * been expanded.
+ */
+GtsSplit * gts_psurface_add_vertex (GtsPSurface * ps) 
+{ 
+  GtsSplit * vs;
+
+  g_return_val_if_fail (ps != NULL, NULL);
+  g_return_val_if_fail (GTS_PSURFACE_IS_CLOSED (ps), NULL);
+
+  if (ps->pos == 0)
+    return NULL;
+
+  vs = g_ptr_array_index (ps->split, --ps->pos);
+  gts_split_expand (vs, ps->s, ps->s->edge_class);
+
+  return vs;
+}
+
+/**
+ * gts_psurface_remove_vertex:
+ * @ps: a #GtsPSurface.
+ *
+ * Removes one vertex from the progressive surface @ps by collapsing the first
+ * available #GtsSplit.
+ *
+ * Returns: the collapsed #GtsSplit or %NULL if all the #GtsSplit have already
+ * been collapsed.
+ */
+GtsSplit * gts_psurface_remove_vertex (GtsPSurface * ps)
+{
+  GtsSplit * vs;
+
+  g_return_val_if_fail (ps != NULL, NULL);
+  g_return_val_if_fail (GTS_PSURFACE_IS_CLOSED (ps), NULL);
+
+  if (ps->pos == ps->split->len)
+    return NULL;
+
+  vs = g_ptr_array_index (ps->split, ps->pos++);
+  gts_split_collapse (vs, ps->s->edge_class, NULL);
+
+  return vs;
+}
+
+/**
+ * gts_psurface_max_vertex_number:
+ * @ps: a #GtsPSurface.
+ *
+ * Returns: the maximum number of vertices of @ps i.e. the number of vertices
+ * if all the #GtsSplit were expanded.
+ */
+guint gts_psurface_max_vertex_number (GtsPSurface * ps)
+{
+  g_return_val_if_fail (ps != NULL, 0);
+
+  return ps->min + ps->split->len;
+}
+
+/**
+ * gts_psurface_min_vertex_number:
+ * @ps: a #GtsPSurface.
+ *
+ * Returns: the minimum number of vertices of @ps i.e. the number of vertices
+ * if all the #GtsSplit were collapsed.
+ */
+guint gts_psurface_min_vertex_number (GtsPSurface * ps)
+{
+  g_return_val_if_fail (ps != NULL, 0);
+
+  return ps->min;
+}
+
+/**
+ * gts_psurface_set_vertex_number:
+ * @ps: a #GtsPSurface.
+ * @n: a number of vertices.
+ *
+ * Performs the required number of collapses or expansions to set the number
+ * of vertices of @ps to @n.
+ */
+void gts_psurface_set_vertex_number (GtsPSurface * ps, guint n)
+{
+  g_return_if_fail (ps != NULL);
+  g_return_if_fail (GTS_PSURFACE_IS_CLOSED (ps));
+
+  n = ps->min + ps->split->len - n;
+  while (ps->pos > n && gts_psurface_add_vertex (ps))
+    ;
+  while (ps->pos < n && gts_psurface_remove_vertex (ps))
+    ;
+}
+
+/**
+ * gts_psurface_get_vertex_number:
+ * @ps: a #GtsPSurface.
+ *
+ * Returns: the current number of vertices of @ps.
+ */
+guint gts_psurface_get_vertex_number (GtsPSurface * ps)
+{
+  g_return_val_if_fail (ps != NULL, 0);
+  
+  if (!GTS_PSURFACE_IS_CLOSED (ps))
+    return ps->min + ps->pos;
+  else
+    return ps->min + ps->split->len - ps->pos;
+}
+
+/**
+ * gts_psurface_foreach_vertex:
+ * @ps: a #GtsPSurface.
+ * @func: a function to call for each vertex of @ps.
+ * @data: data to be passed to @func.
+ *
+ * Calls @func for each (potential) vertex of @ps, whether actually used
+ * or not. The vertices are called in the order they were created during the
+ * edge collapse operation.
+ */
+void gts_psurface_foreach_vertex (GtsPSurface * ps, 
+				  GtsFunc func, 
+				  gpointer data)
+{
+  guint i;
+
+  g_return_if_fail (ps != NULL);
+  g_return_if_fail (func != NULL);
+  g_return_if_fail (GTS_PSURFACE_IS_CLOSED (ps));
+  
+  for (i = 0; i < ps->split->len; i++) {
+    GtsSplit * vs = g_ptr_array_index (ps->split, i);
+    (*func) (vs->v, data);
+  }
+}
diff --git a/src/refine.c b/src/refine.c
new file mode 100644
index 0000000..6b6afd3
--- /dev/null
+++ b/src/refine.c
@@ -0,0 +1,416 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include "gts.h"
+
+/**
+ * gts_vertex_encroaches_edge:
+ * @v: a #GtsVertex.
+ * @e: a #GtsEdge.
+ *
+ * Returns: %TRUE if @v is strictly contained in the diametral circle of @e,
+ * %FALSE otherwise.
+ */
+gboolean gts_vertex_encroaches_edge (GtsVertex * v, GtsEdge * e)
+{
+  GtsPoint * p, * p1, * p2;
+
+  g_return_val_if_fail (v != NULL, FALSE);
+  g_return_val_if_fail (e != NULL, FALSE);
+
+  p = GTS_POINT (v);
+  p1 = GTS_POINT (GTS_SEGMENT (e)->v1);
+  p2 = GTS_POINT (GTS_SEGMENT (e)->v2);
+
+  if ((p1->x - p->x)*(p2->x - p->x) + (p1->y - p->y)*(p2->y - p->y) < 0.0)
+    return TRUE;
+  return FALSE;
+}
+
+/**
+ * gts_edge_is_encroached:
+ * @e: a #GtsEdge.
+ * @s: a #GtsSurface describing a (constrained) Delaunay triangulation.
+ * @encroaches: a #GtsEncroachFunc.
+ * @data: user data to be passed to @encroaches.
+ *
+ * Returns: a #GtsVertex belonging to @s and encroaching upon @e
+ * (as defined by @encroaches) or %NULL if there is none.  
+ */
+GtsVertex * gts_edge_is_encroached (GtsEdge * e,
+				    GtsSurface * s,
+				    GtsEncroachFunc encroaches,
+				    gpointer data)
+{
+  GSList * i;
+
+  g_return_val_if_fail (e != NULL, NULL);
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (encroaches != NULL, NULL);
+
+  i = e->triangles;
+  while (i) {
+    GtsFace * f = i->data;
+    if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, s)) {
+      GtsVertex * v = gts_triangle_vertex_opposite (GTS_TRIANGLE (f), e);
+      if ((* encroaches) (v, e, s, data))
+	return v;
+    }
+    i = i->next;
+  }
+
+  return NULL;
+}
+
+#define ALREADY_ENCROACHED(c) (GTS_OBJECT (c)->reserved)
+
+static void vertex_encroaches (GtsVertex * v,
+			       GtsSurface * surface,
+			       GtsFifo * encroached,
+			       GtsEncroachFunc encroaches,
+			       gpointer data)
+{
+  GSList * triangles, * i;
+
+  g_return_if_fail (v != NULL);
+  g_return_if_fail (surface != NULL);
+  g_return_if_fail (encroached != NULL);
+  g_return_if_fail (encroaches != NULL);
+
+  i = triangles = gts_vertex_triangles (v, NULL);
+  while (i) {
+    GtsFace * f = i->data;
+    if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, surface)) {
+      GtsEdge * e = gts_triangle_edge_opposite (i->data, v);
+      if (!ALREADY_ENCROACHED (e) && 
+	  GTS_IS_CONSTRAINT (e) &&
+	  (* encroaches) (v, e, surface, data)) {
+	gts_fifo_push (encroached, e);
+	ALREADY_ENCROACHED (e) = encroached;
+      }
+    }
+    i = i->next;
+  }
+  g_slist_free (triangles);
+}
+
+static void make_encroached_fifo (GtsEdge * e, gpointer * datas)
+{
+  GtsFifo * fifo = datas[0];
+  GtsSurface * s = datas[1];
+  GtsEncroachFunc encroaches = datas[2];
+  gpointer data = datas[3];
+
+  if (GTS_IS_CONSTRAINT (e) && 
+      gts_edge_is_encroached (e, s, encroaches, data))
+    gts_fifo_push (fifo, e);
+}
+
+#define SQUARE_ROOT_TWO 1.41421356237309504880168872420969807856967187
+#define DISTANCE_2D(v1, v2) (sqrt ((GTS_POINT (v2)->x - GTS_POINT (v1)->x)*\
+                                   (GTS_POINT (v2)->x - GTS_POINT (v1)->x) +\
+                                   (GTS_POINT (v2)->y - GTS_POINT (v1)->y)*\
+                                   (GTS_POINT (v2)->y - GTS_POINT (v1)->y)))
+
+/* finds where to split the given edge to avoid infinite cycles. (see
+   Shewchuk's thesis for details */
+static GtsVertex * split_edge (GtsEdge * e,
+			       GtsSurface * surface)
+{
+  GSList * i = e->triangles;
+  GtsEdge * c = NULL;
+
+  /* look for constraints touching e */
+  while (i && !c) {
+    GtsTriangle * t = i->data;
+    if (GTS_IS_FACE (t) && 
+	gts_face_has_parent_surface (GTS_FACE (t), surface)) {
+      GtsEdge * e1, * e2;
+      if (t->e1 == e) { e1 = t->e2; e2 = t->e3; }
+      else if (t->e2 == e) { e1 = t->e1; e2 = t->e3; }
+      else { e1 = t->e1; e2 = t->e2; }
+      if (GTS_IS_CONSTRAINT (e1) && !GTS_IS_CONSTRAINT (e2))
+	c = e1;
+      else if (GTS_IS_CONSTRAINT (e2) && !GTS_IS_CONSTRAINT (e1))
+	c = e2;
+    }
+    i = i->next;
+  }
+  if (c) {
+    /* use power of two concentric shells */
+    GtsVertex * v1 = GTS_SEGMENT (e)->v1;
+    GtsVertex * v2 = GTS_SEGMENT (e)->v2;
+    gdouble l = DISTANCE_2D (v1, v2);
+    gdouble nearestpower = 1., split;
+
+    while (l > SQUARE_ROOT_TWO*nearestpower)
+      nearestpower *= 2.;
+    while (l < SQUARE_ROOT_TWO*nearestpower/2.)
+      nearestpower /= 2.;
+    split = nearestpower/l/2.;
+
+    if (GTS_SEGMENT (c)->v1 == v2 || GTS_SEGMENT (c)->v2 == v2)
+      split = 1. - split;
+    return gts_vertex_new (surface->vertex_class,
+			   (1. - split)*GTS_POINT (v1)->x +
+			   split*GTS_POINT (v2)->x,
+			   (1. - split)*GTS_POINT (v1)->y +
+			   split*GTS_POINT (v2)->y,
+			   (1. - split)*GTS_POINT (v1)->z +
+			   split*GTS_POINT (v2)->z);
+  }
+  else
+    return gts_segment_midvertex (GTS_SEGMENT (e), surface->vertex_class);
+}
+
+static gint split_encroached (GtsSurface * surface, 
+			      GtsFifo * encroached,
+			      gint steiner_max,
+			      GtsEncroachFunc encroaches,
+			      gpointer data)
+{
+  GtsSegment * s;
+
+  while (steiner_max-- != 0 && (s = gts_fifo_pop (encroached))) {
+    GtsVertex * v = split_edge (GTS_EDGE (s), surface);
+    GtsFace * boundary = gts_edge_is_boundary (GTS_EDGE (s), surface);
+    GtsFace * f = boundary;
+#if 1
+    GtsEdge * e1 = GTS_EDGE (gts_object_clone (GTS_OBJECT (s)));
+    GtsEdge * e2 = GTS_EDGE (gts_object_clone (GTS_OBJECT (s)));
+
+    GTS_SEGMENT (e1)->v1 = s->v1;
+    s->v1->segments = g_slist_prepend (s->v1->segments, e1);
+    GTS_SEGMENT (e1)->v2 = v;
+    v->segments = g_slist_prepend (v->segments, e1);
+
+    GTS_SEGMENT (e2)->v1 = v;
+    v->segments = g_slist_prepend (v->segments, e2);
+    GTS_SEGMENT (e2)->v2 = s->v2;
+    s->v2->segments = g_slist_prepend (s->v2->segments, e2);
+#else
+    GtsEdge * e1 = gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (s)->klass),
+				 s->v1, v);
+    GtsEdge * e2 = gts_edge_new (GTS_EDGE_CLASS (GTS_OBJECT (s)->klass),
+				 v, s->v2);
+#endif
+
+    GTS_OBJECT (s)->klass = GTS_OBJECT_CLASS (surface->edge_class);
+
+    if (f == NULL)
+      g_assert ((f = gts_edge_has_parent_surface (GTS_EDGE (s), surface)));
+    g_assert (gts_delaunay_add_vertex_to_face (surface, v, f) == NULL);
+
+    if (boundary)
+      gts_object_destroy (GTS_OBJECT (s));
+
+    vertex_encroaches (v, surface, encroached, encroaches, data);
+
+    if (gts_edge_is_encroached (e1, surface, encroaches, data)) {
+      gts_fifo_push (encroached, e1);
+      ALREADY_ENCROACHED (e1) = encroached;
+    }
+    if (gts_edge_is_encroached (e2, surface, encroaches, data)) {
+      gts_fifo_push (encroached, e2);
+      ALREADY_ENCROACHED (e2) = encroached;
+    }
+  }
+
+  return steiner_max;
+}
+
+/**
+ * gts_delaunay_conform:
+ * @surface: a #GtsSurface describing a constrained Delaunay triangulation.
+ * @steiner_max: maximum number of Steiner points.
+ * @encroaches: a #GtsEncroachFunc.
+ * @data: user-data to pass to @encroaches.
+ *
+ * Recursively split constraints of @surface which are encroached by
+ * vertices of @surface (see Shewchuk 96 for details). The split
+ * constraints are destroyed and replaced by a set of new constraints
+ * of the same class. If gts_vertex_encroaches_edge() is used for
+ * @encroaches, the resulting surface will be Delaunay conforming.
+ *
+ * If @steiner_max is positive or nul, the recursive splitting
+ * procedure will stop when this maximum number of Steiner points is
+ * reached. In that case the resulting surface will not necessarily be
+ * Delaunay conforming.
+ *
+ * Returns: the number of remaining encroached edges. If @steiner_max
+ * is set to a negative value and gts_vertex_encroaches_edge() is used
+ * for @encroaches this should always be zero. 
+ */
+guint gts_delaunay_conform (GtsSurface * surface,
+			    gint steiner_max,
+			    GtsEncroachFunc encroaches,
+			    gpointer data)
+{
+  GtsFifo * encroached;
+  gpointer datas[4];
+  guint encroached_number;
+
+  g_return_val_if_fail (surface != NULL, 0);
+  g_return_val_if_fail (surface != NULL, 0);
+  g_return_val_if_fail (encroaches != NULL, 0);
+
+  datas[0] = encroached = gts_fifo_new ();
+  datas[1] = surface;
+  datas[2] = encroaches;
+  datas[3] = data;
+  gts_surface_foreach_edge (surface, (GtsFunc) make_encroached_fifo, datas);
+
+  split_encroached (surface, 
+		    encroached, 
+		    steiner_max,
+		    encroaches, data);
+  gts_fifo_foreach (encroached, (GtsFunc) gts_object_reset_reserved, NULL);
+  encroached_number = gts_fifo_size (encroached);
+  gts_fifo_destroy (encroached);
+  return encroached_number;
+}
+
+#define EHEAP_PAIR(f) (GTS_OBJECT (f)->reserved)
+
+static void heap_surface_add_face (GtsSurface * s, GtsFace * f)
+{
+  GtsEHeap * heap = GTS_OBJECT (s)->reserved;
+  gdouble key = gts_eheap_key (heap, f);
+
+  if (key != 0.)
+    EHEAP_PAIR (f) = gts_eheap_insert_with_key (heap, f, key);
+  
+  if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->add_face)
+    (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->add_face) 
+      (s, f);
+}
+
+static void heap_surface_remove_face (GtsSurface * s, GtsFace * f)
+{
+  GtsEHeap * heap = GTS_OBJECT (s)->reserved;
+
+  if (EHEAP_PAIR (f))
+    gts_eheap_remove (heap, EHEAP_PAIR (f));
+
+  if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->remove_face)
+    (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass->parent_class)->remove_face) 
+      (s, f);
+}
+
+static void heap_surface_class_init (GtsSurfaceClass * klass)
+{
+  klass->add_face = heap_surface_add_face;
+  klass->remove_face = heap_surface_remove_face;
+}
+
+static GtsObjectClass * heap_surface_class_new (GtsObjectClass * parent_class)
+{
+  GtsObjectClassInfo heap_surface_info;
+
+  heap_surface_info = parent_class->info;
+  heap_surface_info.class_init_func = (GtsObjectClassInitFunc)
+    heap_surface_class_init;
+  return gts_object_class_new (parent_class,
+			       &heap_surface_info);
+}
+
+static void make_face_heap (GtsFace * f, GtsEHeap * heap)
+{
+  gdouble key = gts_eheap_key (heap, f);
+
+  if (key != 0.)
+    EHEAP_PAIR (f) = gts_eheap_insert_with_key (heap, f, key);
+}
+
+/**
+ * gts_delaunay_refine:
+ * @surface: a #GtsSurface describing a conforming Delaunay triangulation.
+ * @steiner_max: maximum number of Steiner points.
+ * @encroaches: a #GtsEncroachFunc.
+ * @encroach_data: user-data to pass to @encroaches.
+ * @cost: a #GtsKeyFunc used to sort the faces during refinement.
+ * @cost_data: user-data to pass to @cost.
+ *
+ * An implementation of the refinement algorithm described in Ruppert
+ * (1995) and Shewchuk (1996).
+ * 
+ * Returns: the number of unrefined faces of @surface left. Should be zero
+ * if @steiner_max is set to a negative value.
+ */
+guint gts_delaunay_refine (GtsSurface * surface,
+			   gint steiner_max,
+			   GtsEncroachFunc encroaches,
+			   gpointer encroach_data,
+			   GtsKeyFunc cost,
+			   gpointer cost_data)
+{
+  GtsObjectClass * heap_surface_class;
+  GtsObjectClass * original_class;
+  GtsEHeap * heap;
+  GtsFifo * encroached;
+  GtsFace * f;
+  guint unrefined_number;
+
+  g_return_val_if_fail (surface != NULL, 0);
+  g_return_val_if_fail (encroaches != NULL, 0);
+  g_return_val_if_fail (cost != NULL, 0);
+
+  original_class = GTS_OBJECT (surface)->klass;
+  heap_surface_class = heap_surface_class_new (original_class);
+  GTS_OBJECT (surface)->klass = heap_surface_class;
+
+  heap = gts_eheap_new (cost, cost_data);
+  gts_surface_foreach_face (surface, (GtsFunc) make_face_heap, heap);
+  encroached = gts_fifo_new ();
+  
+  GTS_OBJECT (surface)->reserved = heap;
+
+  while (steiner_max-- != 0 && (f = gts_eheap_remove_top (heap, NULL))) {
+    GtsVertex * c = 
+      GTS_VERTEX (gts_triangle_circumcircle_center (GTS_TRIANGLE (f),
+		  GTS_POINT_CLASS (surface->vertex_class)));
+    EHEAP_PAIR (f) = NULL;
+    g_assert (c != NULL);
+    g_assert (gts_delaunay_add_vertex (surface, c, f) == NULL);
+
+    vertex_encroaches (c, surface, encroached, encroaches, encroach_data);
+    if (!gts_fifo_is_empty (encroached)) {
+      gts_delaunay_remove_vertex (surface, c);
+      steiner_max = split_encroached (surface, 
+				      encroached, 
+				      steiner_max, 
+				      encroaches, 
+				      encroach_data);
+    }
+  }
+
+  unrefined_number = gts_eheap_size (heap);
+  gts_eheap_foreach (heap, (GFunc) gts_object_reset_reserved, NULL);
+  gts_eheap_destroy (heap);
+
+  gts_fifo_foreach (encroached, (GtsFunc) gts_object_reset_reserved, NULL);
+  gts_fifo_destroy (encroached);
+
+  GTS_OBJECT (surface)->klass = original_class;
+  GTS_OBJECT (surface)->reserved = NULL;
+  g_free (heap_surface_class);
+
+  return unrefined_number;
+}
diff --git a/src/rounding.h b/src/rounding.h
new file mode 100644
index 0000000..32729ca
--- /dev/null
+++ b/src/rounding.h
@@ -0,0 +1,52 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#ifdef HAVE_FPU_CONTROL_H
+#  include <fpu_control.h>
+   static fpu_control_t fpu_round_double =
+     (_FPU_DEFAULT & ~ _FPU_EXTENDED)|_FPU_DOUBLE;
+   static fpu_control_t fpu_init;
+#  define FPU_ROUND_DOUBLE  { _FPU_GETCW(fpu_init);\
+                             _FPU_SETCW(fpu_round_double); }
+#  define FPU_RESTORE       {_FPU_SETCW(fpu_init);}
+#else /* not HAVE_FPU_CONTROL_H */
+#  ifdef __FreeBSD__
+#    include <floatingpoint.h>
+#    define FPU_ROUND_DOUBLE  (fpsetprec(FP_PD))
+#    define FPU_RESTORE       (fpsetprec(FP_PE))
+#  else /* not __FreeBSD__ */
+#    ifdef WIN32
+#      ifdef _MSC_VER
+#        include <float.h>
+         static unsigned int fpu_init;
+#        define FPU_ROUND_DOUBLE (fpu_init = _controlfp (0, 0),\
+                                 _controlfp (_PC_53, MCW_PC))
+#        define FPU_RESTORE      (_controlfp (fpu_init, 0xfffff))
+#      else /* not _MSC_VER */
+#        error "You need the Microsoft C compiler for the Win32 version"
+#      endif /*  not _MSC_VER */
+#    else /* not WIN32 */
+#      warning "Unknown CPU: assuming default double precision rounding"
+#      define FPU_ROUND_DOUBLE
+#      define FPU_RESTORE
+#    endif /* not WIN32 */
+#  endif /* not __FreeBSD__ */
+#endif /* not HAVE_FPU_CONTROL_H */
diff --git a/src/segment.c b/src/segment.c
new file mode 100644
index 0000000..58a0540
--- /dev/null
+++ b/src/segment.c
@@ -0,0 +1,233 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+static void segment_destroy (GtsObject * object)
+{
+  GtsSegment * segment = GTS_SEGMENT (object);
+  GtsVertex * v1 = segment->v1;
+  GtsVertex * v2 = segment->v2;
+
+  v1->segments = g_slist_remove (v1->segments, segment);
+  if (!GTS_OBJECT_DESTROYED (v1) &&
+      !gts_allow_floating_vertices && v1->segments == NULL)
+    gts_object_destroy (GTS_OBJECT (v1));
+
+  v2->segments = g_slist_remove (v2->segments, segment);
+  if (!GTS_OBJECT_DESTROYED (v2) &&
+      !gts_allow_floating_vertices && v2->segments == NULL)
+    gts_object_destroy (GTS_OBJECT (v2));
+
+  (* GTS_OBJECT_CLASS (gts_segment_class ())->parent_class->destroy) (object);
+}
+
+static void segment_class_init (GtsObjectClass * klass)
+{
+  klass->destroy = segment_destroy;
+}
+
+static void segment_init (GtsSegment * segment)
+{
+  segment->v1 = segment->v2 = NULL;
+}
+
+/**
+ * gts_segment_class:
+ *
+ * Returns: the #GtsSegmentClass.
+ */
+GtsSegmentClass * gts_segment_class (void)
+{
+  static GtsSegmentClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo segment_info = {
+      "GtsSegment",
+      sizeof (GtsSegment),
+      sizeof (GtsSegmentClass),
+      (GtsObjectClassInitFunc) segment_class_init,
+      (GtsObjectInitFunc) segment_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), 
+				  &segment_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_segment_new:
+ * @klass: a #GtsSegmentClass.
+ * @v1: a #GtsVertex.
+ * @v2: another #GtsVertex different from @v1.
+ *
+ * Returns: a new #GtsSegment linking @v1 and @v2.
+ */
+GtsSegment * gts_segment_new (GtsSegmentClass * klass, 
+			      GtsVertex * v1, GtsVertex * v2)
+{
+  GtsSegment * s;
+
+  g_return_val_if_fail (v1 != NULL, NULL);
+  g_return_val_if_fail (v2 != NULL, NULL);
+  g_return_val_if_fail (v1 != v2, NULL);
+
+  s = GTS_SEGMENT (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  s->v1 = v1;
+  s->v2 = v2;
+  v1->segments = g_slist_prepend (v1->segments, s);
+  v2->segments = g_slist_prepend (v2->segments, s);
+  
+  return s;
+}
+
+/**
+ * gts_segment_is_duplicate:
+ * @s: a #GtsSegment.
+ *
+ * Returns: the first #GtsSegment different from @s which shares the
+ * same endpoints or %NULL if there is none.
+ */
+GtsSegment * gts_segment_is_duplicate (GtsSegment * s)
+{
+  GSList * i;
+  GtsVertex * v2;
+
+  g_return_val_if_fail (s != NULL, NULL);
+
+  v2 = s->v2;
+  i = s->v1->segments;
+  if (s->v1 == v2) /* s is degenerate: special treatment */
+    while (i) {
+      GtsSegment * s1 = i->data;
+      if (s1 != s && s1->v1 == v2 && s1->v2 == v2)
+	return s1;
+      i = i->next;
+    }
+  else /* s is not degenerate */
+    while (i) {
+      GtsSegment * s1 = i->data;
+      if (s1 != s && (s1->v1 == v2 || s1->v2 == v2))
+	return s1;
+      i = i->next;
+    }
+  return NULL;
+}
+
+/**
+ * gts_segments_are_intersecting:
+ * @s1: a #GtsSegment.
+ * @s2: a #GtsSegment.
+ *
+ * Returns: %GTS_IN if @s1 and @s2 are intersecting, %GTS_ON if one of the
+ * endpoints of @s1 (resp. @s2) lies on @s2 (resp. @s1), %GTS_OUT otherwise.
+ */
+GtsIntersect gts_segments_are_intersecting (GtsSegment * s1, GtsSegment * s2)
+{
+  GtsPoint * p1, * p2, * p3, * p4;
+  gdouble d1, d2, d3, d4;
+
+  g_return_val_if_fail (s1 != NULL && s2 != NULL, FALSE);
+
+  p1 = GTS_POINT (s1->v1); p2 = GTS_POINT (s1->v2);
+  p3 = GTS_POINT (s2->v1); p4 = GTS_POINT (s2->v2);
+  d1 = gts_point_orientation (p1, p2, p3);
+  d2 = gts_point_orientation (p1, p2, p4);
+  if ((d1 > 0.0 && d2 > 0.0) ||
+      (d1 < 0.0 && d2 < 0.0))
+    return GTS_OUT;
+  d3 = gts_point_orientation (p3, p4, p1);
+  d4 = gts_point_orientation (p3, p4, p2);
+  if ((d3 > 0.0 && d4 > 0.0) ||
+      (d3 < 0.0 && d4 < 0.0))
+    return GTS_OUT;
+  if (d1 == 0.0 || d2 == 0.0 || d3 == 0.0 || d4 == 0.0)
+    return GTS_ON;
+  return GTS_IN;
+}
+
+/**
+ * gts_segment_midvertex:
+ * @s: a #GtsSegment.
+ * @klass: a #GtsVertexClass to be used for the new vertex.
+ *
+ * Returns: a new #GtsVertex, midvertex of @s.
+ */
+GtsVertex * gts_segment_midvertex (GtsSegment * s, GtsVertexClass * klass)
+{
+  GtsPoint * p1, * p2;
+
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (klass != NULL, NULL);
+
+  p1 = GTS_POINT (s->v1); p2 = GTS_POINT (s->v2);
+  return gts_vertex_new (klass,
+			 (p1->x + p2->x)/2., 
+			 (p1->y + p2->y)/2.,
+			 (p1->z + p2->z)/2.);
+}
+
+/**
+ * gts_segments_from_vertices:
+ * @vertices: a list of #GtsVertex.
+ * 
+ * Returns: a list of unique #GtsSegment which have one of their vertices in 
+ * @vertices.
+ */
+GSList * gts_segments_from_vertices (GSList * vertices)
+{
+  GHashTable * hash;
+  GSList * segments = NULL, * i;
+
+  hash = g_hash_table_new (NULL, NULL);
+  i = vertices;
+  while (i) {
+    GSList * j = GTS_VERTEX (i->data)->segments;
+    while (j) {
+      GtsSegment * s = j->data;
+      if (g_hash_table_lookup (hash, s) == NULL) {
+	segments = g_slist_prepend (segments, s);
+	g_hash_table_insert (hash, s, i);
+      }
+      j = j->next;
+    }
+    i = i->next;
+  }
+  g_hash_table_destroy (hash);
+  return segments;
+}
+
+/**
+ * gts_segment_is_ok:
+ * @s: a #GtsSegment.
+ * 
+ * Returns: %TRUE if @s is not degenerate (i.e. @s->v1 != @s->v2) and not 
+ * duplicate, %FALSE otherwise.
+ */
+gboolean gts_segment_is_ok (GtsSegment * s)
+{
+  g_return_val_if_fail (s != NULL, FALSE);
+  g_return_val_if_fail (s->v1 != s->v2, FALSE);
+  g_return_val_if_fail (!gts_segment_is_duplicate (s), FALSE);
+  g_return_val_if_fail (GTS_OBJECT (s)->reserved == NULL, FALSE);
+  return TRUE;
+}
diff --git a/src/split.c b/src/split.c
new file mode 100644
index 0000000..45152bd
--- /dev/null
+++ b/src/split.c
@@ -0,0 +1,1774 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "gts.h"
+
+#define DYNAMIC_SPLIT
+#define NEW
+
+/* #define DEBUG
+   #define DEBUG_HEXPAND
+   #define DEBUG_EXPAND */
+
+struct _GtsSplitCFace {
+  GtsFace * f;
+  GtsTriangle ** a1, ** a2;
+};
+
+typedef struct _CFace      CFace;
+typedef struct _CFaceClass CFaceClass;
+
+struct _CFace {
+  GtsObject object; 
+
+  GtsSplit * parent_split;
+  GtsTriangle * t;
+  guint flags;
+};
+/* the size of the CFace structure must be smaller or equal to the size
+   of the GtsFace structure as both structures use the same memory location */
+
+struct _CFaceClass {
+  GtsObjectClass parent_class;
+};
+
+#define IS_CFACE(obj) (gts_object_is_from_class (obj, cface_class ()))
+#define CFACE(obj)    ((CFace *) obj)
+#define CFACE_ORIENTATION(cf) ((cf)->flags & 0x1)
+#define CFACE_ORIENTATION_DIRECT(cf) ((cf)->flags |= 0x1)
+#define CFACE_VVS(cf)                ((cf)->flags & 0x2)
+#define CFACE_VVS_DIRECT(cf)         ((cf)->flags |= 0x2)
+#define CFACE_E1                     0x4
+#define CFACE_E2                     0x8
+#define CFACE_KEEP_VVS               0x10
+
+#define ROTATE_ORIENT(e, e1, e2, e3)  { if (e1 == e) { e1 = e2; e2 = e3; }\
+                                 else if (e2 == e) { e2 = e1; e1 = e3; }\
+                                 else g_assert (e3 == e); }
+#define SEGMENT_USE_VERTEX(s, v) ((s)->v1 == v || (s)->v2 == v)
+#define TRIANGLE_REPLACE_EDGE(t, e, with) { if ((t)->e1 == e)\
+					      (t)->e1 = with;\
+					    else if ((t)->e2 == e)\
+					      (t)->e2 = with;\
+					    else {\
+					      g_assert ((t)->e3 == e);\
+					      (t)->e3 = with;\
+					    }\
+                                          }
+
+#define HEAP_INSERT_OBJECT(h, e) (GTS_OBJECT (e)->reserved =\
+				  gts_eheap_insert (h, e))
+#define HEAP_REMOVE_OBJECT(h, e) (gts_eheap_remove (h, GTS_OBJECT (e)->reserved),\
+				   GTS_OBJECT (e)->reserved = NULL)
+
+static GtsObjectClass * cface_class (void)
+{
+  static GtsObjectClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo cface_info = {
+      "GtsCFace",
+      sizeof (CFace),
+      sizeof (CFaceClass),
+      (GtsObjectClassInitFunc) NULL,
+      (GtsObjectInitFunc) NULL,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &cface_info);
+    g_assert (sizeof (CFace) <= sizeof (GtsFace));
+  }
+
+  return klass;
+}
+
+/* Replace @e with @with for all the triangles using @e but @f.
+   Destroys @e and removes it from @heap (if not %NULL). 
+   Returns a triangle using e different from f or %NULL. */
+static GtsTriangle * replace_edge_collapse (GtsEdge * e, 
+					    GtsEdge * with, 
+					    CFace * cf,
+					    GtsEHeap * heap
+#ifdef DYNAMIC_SPLIT
+					    , GtsTriangle *** a1
+#endif
+#ifdef NEW
+					    , guint edge_flag
+#endif
+					    )
+{
+  GSList * i;
+  GtsTriangle * rt = NULL;
+#ifdef DYNAMIC_SPLIT
+  guint size;
+  GtsTriangle ** a;
+#endif
+
+#ifdef NEW
+  i = e->triangles;
+  e->triangles = NULL;
+  size = g_slist_length (i)*sizeof (GtsTriangle *);
+  *a1 = a = g_malloc (size > 0 ? size : sizeof (GtsTriangle *));
+  while (i) {
+    GtsTriangle * t = i->data;
+    GSList * next = i->next;
+    if (t != ((GtsTriangle *) cf)) {
+      if (IS_CFACE (t)) {
+	i->next = e->triangles;
+	e->triangles = i;
+	/* set the edge given by edge_flag (CFACE_E1 or CFACE_E2) */
+	GTS_OBJECT (t)->reserved = GUINT_TO_POINTER (edge_flag);
+	cf->flags |= CFACE_KEEP_VVS;
+      }
+      else {
+	TRIANGLE_REPLACE_EDGE (t, e, with);
+	i->next = with->triangles;
+	with->triangles = i;
+	rt = t;
+	*(a++) = t;
+      }
+    }
+    else
+      g_slist_free_1 (i);
+    i = next;
+  }
+  *a = NULL;
+  if (!e->triangles) {
+    if (heap)
+      HEAP_REMOVE_OBJECT (heap, e);
+    gts_object_destroy (GTS_OBJECT (e));
+  }
+#else /* not NEW */
+  i = e->triangles;
+#ifdef DYNAMIC_SPLIT
+  size = g_slist_length (i)*sizeof (GtsTriangle *);
+  *a1 = a = g_malloc (size > 0 ? size : sizeof (GtsTriangle *));
+#endif
+  while (i) {
+    GtsTriangle * t = i->data;
+    GSList * next = i->next;
+    if (t != ((GtsTriangle *) cf)) {
+      TRIANGLE_REPLACE_EDGE (t, e, with);
+      i->next = with->triangles;
+      with->triangles = i;
+      rt = t;
+#ifdef DYNAMIC_SPLIT
+      *(a++) = t;
+#endif
+    }
+    else
+      g_slist_free_1 (i);
+    i = next;
+  }
+#ifdef DYNAMIC_SPLIT
+  *a = NULL;
+#endif
+  if (heap)
+    HEAP_REMOVE_OBJECT (heap, e);
+  e->triangles = NULL;
+  gts_object_destroy (GTS_OBJECT (e));
+#endif /* NEW */
+
+  return rt;
+}
+
+static CFace * cface_new (GtsFace * f,
+			  GtsEdge * e,
+			  GtsVertex * v1, 
+			  GtsVertex * v2,
+			  GtsSplit * vs,
+			  GtsEHeap * heap,
+			  GtsEdgeClass * klass
+#ifdef DYNAMIC_SPLIT
+			  , GtsSplitCFace * scf
+#endif
+			  )
+{
+  CFace * cf;
+  GtsVertex * v;
+  GtsEdge * e1, * e2, * e3, * vvs;
+  GSList * i;
+  GtsTriangle * t, * t1 = NULL, * t2 = NULL;
+  guint flags;
+
+  g_return_val_if_fail (f != NULL, NULL);
+#ifndef NEW
+  g_return_val_if_fail (GTS_IS_FACE (f), NULL);
+#endif
+  g_return_val_if_fail (e != NULL, NULL);
+  g_return_val_if_fail (vs != NULL, NULL);
+
+  t = ((GtsTriangle *) f);
+  if (heap)
+    g_return_val_if_fail (!gts_triangle_is_duplicate (t), NULL);
+
+#ifdef NEW
+  /* get CFACE_E1 and CFACE_E2 info */
+  flags = GPOINTER_TO_UINT (GTS_OBJECT (f)->reserved);
+#endif
+  GTS_OBJECT_SET_FLAGS (f, GTS_DESTROYED);
+
+  i = f->surfaces;
+  while (i) {
+    GSList * next = i->next;
+    gts_surface_remove_face (i->data, f);
+    i = next;
+  }
+  g_slist_free (f->surfaces);
+
+  e1 = t->e1; e2 = t->e2; e3 = t->e3;
+  ROTATE_ORIENT (e, e1, e2, e3);
+
+  cf = (CFace *) f;
+#ifndef NEW
+  GTS_OBJECT (cf)->klass = cface_class ();
+#else
+  cf->flags = flags;
+#endif
+  gts_object_init (GTS_OBJECT (cf), cface_class ());
+  cf->parent_split = vs;
+
+  if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), v2)) {
+    CFACE_ORIENTATION_DIRECT (cf); /* v1->v2->v */
+    e3 = e1; e1 = e2; e2 = e3;
+  }
+  v = GTS_SEGMENT (e1)->v1 == v1 ?
+    GTS_SEGMENT (e1)->v2 : GTS_SEGMENT (e1)->v1;
+#ifdef NEW
+  if ((cf->flags & CFACE_E1) || (cf->flags & CFACE_E2))
+    g_assert ((vvs = GTS_EDGE (gts_vertices_are_connected (vs->v, v))));
+  else
+#endif
+  vvs = gts_edge_new (klass, v, vs->v);
+
+  t1 = replace_edge_collapse (e1, vvs, cf, heap
+#ifdef DYNAMIC_SPLIT
+			      , &scf->a1
+#endif
+#ifdef NEW
+			      , CFACE_E1
+#endif
+			      );
+  t2 = replace_edge_collapse (e2, vvs, cf, heap
+#ifdef DYNAMIC_SPLIT
+			      , &scf->a2
+#endif
+#ifdef NEW
+			      , CFACE_E2
+#endif
+			      );
+  t = cf->t = t1 ? t1 : t2;
+  g_assert (t);
+
+  /* set up flags necessary to find vvs */
+  if (t->e1 == vvs) e2 = t->e2;
+  else if (t->e2 == vvs) e2 = t->e3;
+  else {
+    g_assert (t->e3 == vvs);
+    e2 = t->e1;
+  }
+  if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e2), v))
+    CFACE_VVS_DIRECT (cf);
+
+  return cf;
+}
+
+static void find_vvs (GtsVertex * vs,
+		      GtsTriangle * t,
+		      GtsVertex ** v, GtsEdge ** vvs,
+		      gboolean orientation)
+{
+  GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3, * tmp;
+
+  if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e2), vs)) {
+    tmp = e1; e1 = e2; e2 = e3; e3 = tmp;
+  }
+  else if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e3), vs)) {
+    tmp = e1; e1 = e3; e3 = e2; e2 = tmp;
+  }
+  else
+    g_assert (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), vs));
+  if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e2), vs) ||
+      !gts_segments_touch (GTS_SEGMENT (e1), GTS_SEGMENT (e2))) {
+    tmp = e1; e1 = e2; e2 = e3; e3 = tmp;
+    g_assert (gts_segments_touch (GTS_SEGMENT (e1), GTS_SEGMENT (e2)));
+  }
+
+  *vvs = orientation ? e1 : e3;
+
+  if (GTS_SEGMENT (*vvs)->v1 != vs) {
+    g_assert (GTS_SEGMENT (*vvs)->v2 == vs);
+    *v = GTS_SEGMENT (*vvs)->v1;
+  }
+  else
+    *v = GTS_SEGMENT (*vvs)->v2;
+}
+
+static void replace_edge_expand (GtsEdge * e, 
+				 GtsEdge * with,
+				 GtsTriangle ** a,
+				 GtsVertex * v)
+{
+  GtsTriangle ** i = a, * t;
+
+  while ((t = *(i++))) {
+#ifdef DEBUG_EXPAND
+    g_assert (!IS_CFACE (t));
+    fprintf (stderr, "replacing %p->%d: e: %p->%d with: %p->%d\n",
+	     t, id (t), e, id (e), with, id (with));
+#endif
+    TRIANGLE_REPLACE_EDGE (t, e, with);
+    with->triangles = g_slist_prepend (with->triangles, t);
+    if (GTS_OBJECT (t)->reserved) {
+      /* apart from the triangles having e as an edge, t is the only
+	 triangle using v */
+      g_assert (GTS_OBJECT (t)->reserved == v);
+      GTS_OBJECT (t)->reserved = NULL;
+    }
+    else
+      GTS_OBJECT (t)->reserved = v;
+  }
+}
+
+static void cface_expand (CFace * cf,
+			  GtsTriangle ** a1,
+			  GtsTriangle ** a2,
+			  GtsEdge * e,
+			  GtsVertex * v1, 
+			  GtsVertex * v2,
+			  GtsVertex * vs,
+			  GtsEdgeClass * klass)
+{
+  GtsVertex * v;
+  GtsEdge * e1, * e2, * vvs;
+  gboolean orientation;
+  guint flags;
+
+  g_return_if_fail (cf != NULL);
+  g_return_if_fail (IS_CFACE (cf));
+  g_return_if_fail (e != NULL);
+  g_return_if_fail (vs != NULL);
+
+  flags = cf->flags;
+  orientation = CFACE_ORIENTATION (cf);
+
+  find_vvs (vs, cf->t, &v, &vvs, CFACE_VVS (cf));
+
+#ifdef NEW
+  if (flags & CFACE_E1)
+    e1 = GTS_EDGE (gts_vertices_are_connected (v1, v));
+  else
+    e1 = gts_edge_new (klass, v, v1);
+  if (flags & CFACE_E2)
+    e2 = GTS_EDGE (gts_vertices_are_connected (v2, v));
+  else
+    e2 = gts_edge_new (klass, v, v2);
+#else
+  e1 = gts_edge_new (v, v1);
+  e2 = gts_edge_new (v, v2);
+#endif
+
+  replace_edge_expand (vvs, e1, a1, v1);
+  replace_edge_expand (vvs, e2, a2, v2);
+
+#ifdef NEW
+  if (!(flags & CFACE_KEEP_VVS)) {
+    g_slist_free (vvs->triangles);
+    vvs->triangles = NULL;
+    gts_object_destroy (GTS_OBJECT (vvs));
+  }
+#else
+  g_slist_free (vvs->triangles);
+  vvs->triangles = NULL;
+  gts_object_destroy (GTS_OBJECT (vvs));
+#endif
+
+  /* gts_face_new : because I am "creating" a face */
+  GTS_OBJECT (cf)->klass = GTS_OBJECT_CLASS (gts_face_class ());
+  gts_object_init (GTS_OBJECT (cf), GTS_OBJECT (cf)->klass);
+  
+  if (orientation)
+    gts_triangle_set (GTS_TRIANGLE (cf), e, e2, e1);
+  else
+    gts_triangle_set (GTS_TRIANGLE (cf), e, e1, e2);
+}
+
+static void split_destroy (GtsObject * object)
+{
+  GtsSplit * vs = GTS_SPLIT (object);
+  guint i = vs->ncf;
+  GtsSplitCFace * cf = vs->cfaces;
+
+  while (i--) {
+    if (IS_CFACE (cf->f))
+      gts_object_destroy (GTS_OBJECT (cf->f));
+    g_free (cf->a1);
+    g_free (cf->a2);
+    cf++;
+  }
+  g_free (vs->cfaces);
+
+  if (!gts_allow_floating_vertices && vs->v && vs->v->segments == NULL)
+    gts_object_destroy (GTS_OBJECT (vs->v));
+
+  (* GTS_OBJECT_CLASS (gts_split_class ())->parent_class->destroy) (object);
+}
+
+static void split_class_init (GtsObjectClass * klass)
+{
+  klass->destroy = split_destroy;
+}
+
+static void split_init (GtsSplit * split)
+{
+  split->v1 = split->v2 = NULL;
+  split->v = NULL;
+  split->cfaces = NULL;
+  split->ncf = 0;
+}
+
+/**
+ * gts_split_class:
+ *
+ * Returns: the #GtsSplitClass.
+ */
+GtsSplitClass * gts_split_class (void)
+{
+  static GtsSplitClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo split_info = {
+      "GtsSplit",
+      sizeof (GtsSplit),
+      sizeof (GtsSplitClass),
+      (GtsObjectClassInitFunc) split_class_init,
+      (GtsObjectInitFunc) split_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), 
+				  &split_info);
+  }
+
+  return klass;
+}
+
+#ifdef DEBUG
+static gboolean edge_collapse_is_valid (GtsEdge * e)
+{
+  GSList * i;
+
+  g_return_val_if_fail (e != NULL, FALSE);
+  
+  if (gts_segment_is_duplicate (GTS_SEGMENT (e))) {
+    g_warning ("collapsing duplicate edge");
+    return FALSE;
+  }
+    
+  i = GTS_SEGMENT (e)->v1->segments;
+  while (i) {
+    GtsEdge * e1 = i->data;
+    if (e1 != e && GTS_IS_EDGE (e1)) {
+      GtsEdge * e2 = NULL;
+      GSList * j = GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v1 ? 
+	GTS_SEGMENT (e1)->v2->segments : GTS_SEGMENT (e1)->v1->segments;
+      while (j && !e2) {
+	GtsEdge * e1 = j->data;
+	if (GTS_IS_EDGE (e1) && 
+	    (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v2 || 
+	     GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e)->v2))
+	  e2 = e1;
+	j = j->next;
+      }
+      if (e2 && !gts_triangle_use_edges (e, e1, e2)) {
+	g_warning ("collapsing empty triangle");
+	return FALSE;
+      }
+    }
+    i = i->next;
+  }
+
+  if (gts_edge_is_boundary (e, NULL)) {
+    GtsTriangle * t = e->triangles->data;
+    if (gts_edge_is_boundary (t->e1, NULL) &&
+	gts_edge_is_boundary (t->e2, NULL) &&
+	gts_edge_is_boundary (t->e3, NULL)) {
+      g_warning ("collapsing single triangle");
+      return FALSE;
+    }
+  }
+  else {
+    if (gts_vertex_is_boundary (GTS_SEGMENT (e)->v1, NULL) &&
+	gts_vertex_is_boundary (GTS_SEGMENT (e)->v2, NULL)) {
+      g_warning ("collapsing two sides of a strip");
+      return FALSE;    
+    }
+    if (gts_edge_belongs_to_tetrahedron (e)) {
+      g_warning ("collapsing tetrahedron");
+      return FALSE;
+    }
+  }
+
+  return TRUE;
+}
+#endif /* DEBUG */
+
+static void print_split (GtsSplit * vs, FILE * fptr)
+{
+  guint j;
+  GtsSplitCFace * cf;
+
+  g_return_if_fail (vs != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  fprintf (fptr, "%p: v: %p v1: %p v2: %p ncf: %u cfaces: %p\n",
+	   vs, vs->v, vs->v1, vs->v2, vs->ncf, vs->cfaces);
+  cf = vs->cfaces;
+  j = vs->ncf;
+  while (j--) {
+    fprintf (stderr, "  f: %p a1: %p a2: %p\n",
+	     cf->f, cf->a1, cf->a2);
+    cf++;
+  }
+}
+
+/**
+ * gts_split_collapse:
+ * @vs: a #GtsSplit.
+ * @klass: a #GtsEdgeClass.
+ * @heap: a #GtsEHeap or %NULL.
+ *
+ * Collapses the vertex split @vs. Any new edge created during the process will
+ * be of class @klass. If heap is not %NULL, the new edges will be inserted
+ * into it and the destroyed edges will be removed from it.
+ */
+void gts_split_collapse (GtsSplit * vs, 
+			 GtsEdgeClass * klass,
+			 GtsEHeap * heap)
+{
+  GtsEdge * e;
+  GtsVertex * v, * v1, * v2;
+  GSList * i, * end;
+#ifdef DYNAMIC_SPLIT
+  GtsSplitCFace * cf;
+  guint j;
+#endif
+#ifdef DEBUG
+  gboolean invalid = FALSE;
+  static guint ninvalid = 0;
+#endif
+
+  g_return_if_fail (vs != NULL);
+  g_return_if_fail (klass != NULL);
+
+  v = vs->v;
+
+  g_return_if_fail (v->segments == NULL);
+  
+  /* we don't want to destroy vertices */
+  gts_allow_floating_vertices = TRUE;
+
+  v1 = GTS_SPLIT_V1 (vs);
+  v2 = GTS_SPLIT_V2 (vs);
+  g_assert ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2))));
+
+#ifdef DEBUG
+  fprintf (stderr, "collapsing %p: v1: %p v2: %p v: %p\n", vs, v1, v2, v);
+  if (!edge_collapse_is_valid (e)) {
+    char fname[80];
+    FILE * fptr;
+    GSList * triangles, * i;
+
+    g_warning ("invalid edge collapse");
+    invalid = TRUE;
+    sprintf (fname, "invalid.%d", ninvalid);
+    fptr = fopen (fname, "wt");
+    gts_write_segment (GTS_SEGMENT (e), GTS_POINT (v), fptr);
+    triangles = gts_vertex_triangles (v1, NULL);
+    triangles = gts_vertex_triangles (v2, triangles);
+    i = triangles;
+    while (i) {
+      gts_write_triangle (i->data, GTS_POINT (v), fptr);
+      i = i->next;
+    }
+    g_slist_free (triangles);
+    fclose (fptr);
+  }
+#endif
+
+  i = e->triangles;
+#ifdef DYNAMIC_SPLIT
+  cf = vs->cfaces;
+  j = vs->ncf;
+  while (j--) {
+    g_free (cf->a1);
+    g_free (cf->a2);
+    cf++;
+  }
+  g_free (vs->cfaces);
+
+  vs->ncf = g_slist_length (i);
+  g_assert (vs->ncf > 0);
+  cf = vs->cfaces = g_malloc (vs->ncf*sizeof (GtsSplitCFace));
+#endif /* DYNAMIC_SPLIT */
+#ifdef NEW
+  while (i) {
+    cf->f = i->data;
+    g_assert (GTS_IS_FACE (cf->f));
+    GTS_OBJECT (cf->f)->klass = GTS_OBJECT_CLASS (cface_class ());
+    cf++;
+    i = i->next;
+  }
+  i = e->triangles;
+  cf = vs->cfaces;
+  while (i) {
+    cface_new (i->data, e, v1, v2, vs, heap, klass, cf);
+#ifdef DEBUG
+    fprintf (stderr, "cface: %p->%d t: %p->%d a1: ", 
+	     cf->f, id (cf->f), CFACE (cf->f)->t, id (CFACE (cf->f)->t));
+    {
+      GtsTriangle * t, ** a;
+      a = cf->a1;
+      while ((t = *(a++)))
+	fprintf (stderr, "%p->%d ", t, id (t));
+      fprintf (stderr, "a2: ");
+      a = cf->a2;
+      while ((t = *(a++)))
+	fprintf (stderr, "%p->%d ", t, id (t));
+      fprintf (stderr, "\n");
+    }
+#endif
+    cf++;
+    i = i->next;
+  }
+#else /* not NEW */
+  while (i) {
+    cface_new (i->data, e, v1, v2, vs, heap
+#ifdef DYNAMIC_SPLIT
+	       , cf
+#endif /* DYNAMIC_SPLIT */
+	       );
+#ifdef DYNAMIC_SPLIT
+    cf->f = i->data;
+    cf++;
+#endif /* DYNAMIC_SPLIT */
+    i = i->next;
+  }
+#endif /* NEW */
+  g_slist_free (e->triangles);
+  e->triangles = NULL;
+  gts_object_destroy (GTS_OBJECT (e));
+
+  gts_allow_floating_vertices = FALSE;
+
+  end = NULL;
+  i = v1->segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    if (s->v1 == v1)
+      s->v1 = v;
+    else
+      s->v2 = v;
+    end = i;
+    i = i->next;
+  }
+  if (end) {
+    end->next = v->segments;
+    v->segments = v1->segments;
+    v1->segments = NULL;
+  }
+
+  end = NULL;
+  i = v2->segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    if (s->v1 == v2)
+      s->v1 = v;
+    else
+      s->v2 = v;
+    end = i;
+    i = i->next;
+  }
+  if (end) {
+    end->next = v->segments;
+    v->segments = v2->segments;
+    v2->segments = NULL;
+  }
+
+#ifdef DEBUG
+  if (invalid) {
+    char fname[80];
+    FILE * fptr;
+    GSList * triangles, * i;
+    GtsSurface * surface = NULL;
+
+    sprintf (fname, "invalid_after.%d", ninvalid);
+    fptr = fopen (fname, "wt");
+    triangles = gts_vertex_triangles (v, NULL);
+    i = triangles;
+    while (i) {
+      GtsTriangle * t = i->data;
+      fprintf (stderr, "checking %p->%d\n", t, id (t));
+      g_assert (GTS_IS_FACE (t));
+      gts_write_triangle (t, GTS_POINT (v), fptr);
+      surface = GTS_FACE (t)->surfaces->data;
+      if (gts_triangle_is_duplicate (t))
+	fprintf (stderr, "%p->%d is duplicate\n", t, id (t));
+      if (gts_segment_is_duplicate (GTS_SEGMENT (t->e1)))
+	fprintf (stderr, "e1 of %p->%d is duplicate\n", t, id (t));
+      if (gts_segment_is_duplicate (GTS_SEGMENT (t->e2)))
+	fprintf (stderr, "e2 of %p->%d is duplicate\n", t, id (t));
+      if (gts_segment_is_duplicate (GTS_SEGMENT (t->e3)))
+	fprintf (stderr, "e3 of %p->%d is duplicate\n", t, id (t));
+      i = i->next;
+    }
+    fclose (fptr);
+    g_slist_free (triangles);
+#if 0
+    gts_split_expand (vs, surface);
+
+    sprintf (fname, "invalid_after_after.%d", ninvalid);
+    fptr = fopen (fname, "wt");
+    triangles = gts_vertex_triangles (v1, NULL);
+    triangles = gts_vertex_triangles (v2, triangles);
+    i = triangles;
+    while (i) {
+      GtsTriangle * t = i->data;
+      gts_write_triangle (t, GTS_POINT (v), fptr);
+      surface = GTS_FACE (t)->surfaces->data;
+      if (gts_triangle_is_duplicate (t))
+	fprintf (stderr, "%p->%d is duplicate\n", t, id (t));
+      if (gts_segment_is_duplicate (GTS_SEGMENT (t->e1)))
+	fprintf (stderr, "e1 of %p->%d is duplicate\n", t, id (t));
+      if (gts_segment_is_duplicate (GTS_SEGMENT (t->e2)))
+	fprintf (stderr, "e2 of %p->%d is duplicate\n", t, id (t));
+      if (gts_segment_is_duplicate (GTS_SEGMENT (t->e3)))
+	fprintf (stderr, "e3 of %p->%d is duplicate\n", t, id (t));
+      i = i->next;
+    }
+    fclose (fptr);
+    g_slist_free (triangles);
+
+    exit (1);
+#endif
+    ninvalid++;
+  }
+#endif
+}
+
+/**
+ * gts_split_expand:
+ * @vs: a #GtsSplit.
+ * @s: a #GtsSurface.
+ * @klass: a #GtsEdgeClass.
+ *
+ * Expands the vertex split @vs adding the newly created faces to @s. Any 
+ * new edge will be of class @klass.
+ */
+void gts_split_expand (GtsSplit * vs, 
+		       GtsSurface * s,
+		       GtsEdgeClass * klass)
+{
+  GSList * i;
+  GtsEdge * e;
+  GtsVertex * v, * v1, * v2;  
+  gboolean changed = FALSE;
+  GtsSplitCFace * cf;
+  guint j;
+  
+  g_return_if_fail (vs != NULL);
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (klass != NULL);
+
+  /* we don't want to destroy vertices */
+  gts_allow_floating_vertices = TRUE;
+
+  v1 = GTS_SPLIT_V1 (vs);
+  v2 = GTS_SPLIT_V2 (vs);
+  v = vs->v;
+#ifdef DEBUG_EXPAND
+  fprintf (stderr, "expanding %p->%d: v1: %p->%d v2: %p->%d v: %p->%d\n",
+	   vs, id (vs), v1, id (v1), v2, id (v2), v, id (v));
+#endif
+  e = gts_edge_new (klass, v1, v2);
+  cf = vs->cfaces;
+  j = vs->ncf;
+  while (j--) {
+    cface_expand (CFACE (cf->f), cf->a1, cf->a2, e, v1, v2, v, klass);
+    gts_surface_add_face (s, cf->f);
+    cf++;
+  }
+
+  gts_allow_floating_vertices = FALSE;
+
+  /* this part is described by figure "expand.fig" */
+  i = v->segments;
+  while (i) {
+    GtsEdge * e1 = i->data;
+    GtsVertex * with = NULL;
+    GSList * j = e1->triangles, * next = i->next;
+    // fprintf (stderr, "e1: %p->%d\n", e1, id (e1));
+    while (j && !with) {
+      with = GTS_OBJECT (j->data)->reserved;
+      j = j->next;
+    }
+    if (with) {
+      j = e1->triangles;
+      while (j) {
+	GtsTriangle * t = j->data;
+	if (GTS_OBJECT (t)->reserved) {
+	  g_assert (GTS_OBJECT (t)->reserved == with);
+	  GTS_OBJECT (t)->reserved = NULL;
+	}
+	else
+	  GTS_OBJECT (t)->reserved = with;
+	j = j->next;
+      }
+      if (GTS_SEGMENT (e1)->v1 == v)
+	GTS_SEGMENT (e1)->v1 = with;
+      else
+	GTS_SEGMENT (e1)->v2 = with;
+
+      v->segments = g_slist_remove_link (v->segments, i);
+      i->next = with->segments;
+      with->segments = i;
+      changed = TRUE;
+    }
+    if (next)
+      i = next;
+    else {
+      /* check for infinite loop (the crossed out case in 
+	 figure "expand.fig") */
+      g_assert (changed);
+      changed = FALSE;
+      i = v->segments;
+    }
+  }
+}
+
+static void cface_neighbors (GtsSplitCFace * cf,
+			     GtsEdge * e,
+			     GtsVertex * v1,
+			     GtsVertex * v2)
+{
+  GtsTriangle * t = GTS_TRIANGLE (cf->f), ** a;
+  GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3;
+  GSList * i;
+  guint size;
+
+  ROTATE_ORIENT (e, e1, e2, e3);
+  if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), v2)) {
+    e3 = e1; e1 = e2; e2 = e3;
+  }
+  
+  i = e1->triangles;
+  size = g_slist_length (i)*sizeof (GtsTriangle *);
+  a = cf->a1 = g_malloc (size > 0 ? size : sizeof (GtsTriangle *));
+  while (i) {
+    if (i->data != t)
+      *(a++) = i->data;
+    i = i->next;
+  }
+  *a = NULL;
+
+  i = e2->triangles;
+  size = g_slist_length (i)*sizeof (GtsTriangle *);
+  a = cf->a2 = g_malloc (size > 0 ? size : sizeof (GtsTriangle *));
+  while (i) {
+    if (i->data != t)
+      *(a++) = i->data;
+    i = i->next;
+  }
+  *a = NULL;
+}
+
+/**
+ * gts_split_new:
+ * @klass: a #GtsSplitClass.
+ * @v: a #GtsVertex.
+ * @o1: either a #GtsVertex or a #GtsSplit.
+ * @o2: either a #GtsVertex or a #GtsSplit.
+ *
+ * Creates a new #GtsSplit which would collapse @o1 and @o2 into @v. The 
+ * collapse itself is not performed.
+ *
+ * Returns: the new #GtsSplit.
+ */
+GtsSplit * gts_split_new (GtsSplitClass * klass,
+			  GtsVertex * v,
+			  GtsObject * o1,
+			  GtsObject * o2)
+{
+  GtsSplit * vs;
+  GtsVertex * v1, * v2;
+  GtsEdge * e;
+  GSList * i;
+  GtsSplitCFace * cf;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (v != NULL, NULL);
+  g_return_val_if_fail (GTS_IS_SPLIT (o1) || GTS_IS_VERTEX (o1), NULL);
+  g_return_val_if_fail (GTS_IS_SPLIT (o2) || GTS_IS_VERTEX (o2), NULL);
+
+  vs = GTS_SPLIT (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  vs->v = v;
+  vs->v1 = o1;
+  vs->v2 = o2;
+  v1 = GTS_SPLIT_V1 (vs);
+  v2 = GTS_SPLIT_V2 (vs);
+#ifdef DYNAMIC_SPLIT
+  vs->ncf = 0;
+  vs->cfaces = NULL;
+#else
+  g_assert ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2))));
+  i = e->triangles;
+  vs->ncf = g_slist_length (i);
+  g_assert (vs->ncf > 0);
+  cf = vs->cfaces = g_malloc (vs->ncf*sizeof (GtsSplitCFace));
+  while (i) {
+    cf->f = i->data;
+    cface_neighbors (cf, e, v1, v2);
+    i = i->next;
+    cf++;
+  }
+#endif
+  
+  return vs;
+}
+
+static gboolean 
+split_traverse_pre_order (GtsSplit *           vs,
+			  GtsSplitTraverseFunc func,
+			  gpointer	       data)
+{
+  if (func (vs, data))
+    return TRUE;
+  if (GTS_IS_SPLIT (vs->v1) &&
+      split_traverse_pre_order (GTS_SPLIT (vs->v1), func, data))
+    return TRUE;
+  if (GTS_IS_SPLIT (vs->v2) &&
+      split_traverse_pre_order (GTS_SPLIT (vs->v2), func, data))
+    return TRUE;
+  return FALSE;
+}
+
+static gboolean 
+split_depth_traverse_pre_order (GtsSplit *             vs,
+				guint                  depth,
+				GtsSplitTraverseFunc   func,
+				gpointer	       data)
+{
+  if (func (vs, data))
+      return TRUE;
+    
+  depth--;
+  if (!depth)
+    return FALSE;
+
+  if (GTS_IS_SPLIT (vs->v1) &&
+      split_depth_traverse_pre_order (GTS_SPLIT (vs->v1), depth, func, data))
+    return TRUE;
+  if (GTS_IS_SPLIT (vs->v2) &&
+      split_depth_traverse_pre_order (GTS_SPLIT (vs->v2), depth, func, data))
+    return TRUE;
+  return FALSE;
+}
+
+static gboolean 
+split_traverse_post_order (GtsSplit *           vs,
+			   GtsSplitTraverseFunc func,
+			   gpointer	        data)
+{
+  if (GTS_IS_SPLIT (vs->v1) &&
+      split_traverse_post_order (GTS_SPLIT (vs->v1), func, data))
+    return TRUE;
+  if (GTS_IS_SPLIT (vs->v2) &&
+      split_traverse_post_order (GTS_SPLIT (vs->v2), func, data))
+    return TRUE;
+  if (func (vs, data))
+    return TRUE;
+  return FALSE;
+}
+
+static gboolean
+split_depth_traverse_post_order (GtsSplit *           vs,
+				 guint                depth,
+				 GtsSplitTraverseFunc func,
+				 gpointer	      data)
+{
+  depth--;
+  if (depth) {
+    if (GTS_IS_SPLIT (vs->v1) &&
+	split_depth_traverse_post_order (GTS_SPLIT (vs->v1), 
+					 depth, func, data))
+      return TRUE;
+    if (GTS_IS_SPLIT (vs->v2) &&
+	split_depth_traverse_post_order (GTS_SPLIT (vs->v2),
+					 depth, func, data))
+      return TRUE;
+  }
+  if (func (vs, data))
+    return TRUE;
+  return FALSE;
+}
+
+/**
+ * gts_split_traverse:
+ * @root: the #GtsSplit to start the traversal from.
+ * @order: the order in which nodes are visited - G_PRE_ORDER or G_POST_ORDER.
+ * @depth: the maximum depth of the traversal. Nodes below this depth
+ * will not be visited. If depth is -1 all nodes in the tree are
+ * visited. If depth is 1, only the root is visited. If depth is 2,
+ * the root and its children are visited. And so on.
+ * @func: the function to call for each visited #GtsHSplit.
+ * @data: user data to pass to the function.
+ *
+ * Traverses the #GtsSplit tree having @root as root. Calls @func for each
+ * #GtsSplit of the tree in the order specified by @order. If order is set
+ * to G_PRE_ORDER @func is called for the #GtsSplit then its children, if order
+ * is set to G_POST_ORDER @func is called for the children and then for the
+ * #GtsSplit.
+ */
+void gts_split_traverse (GtsSplit *           root,
+			 GTraverseType        order,
+			 gint                 depth,
+			 GtsSplitTraverseFunc func,
+			 gpointer             data)
+{
+  g_return_if_fail (root != NULL);
+  g_return_if_fail (func != NULL);
+  g_return_if_fail (order < G_LEVEL_ORDER);
+  g_return_if_fail (depth == -1 || depth > 0);
+
+  switch (order) {
+  case G_PRE_ORDER:
+    if (depth < 0)
+      split_traverse_pre_order (root, func, data);
+    else
+      split_depth_traverse_pre_order (root, depth, func, data);
+    break;
+  case G_POST_ORDER:
+    if (depth < 0)
+      split_traverse_post_order (root, func, data);
+    else
+      split_depth_traverse_post_order (root, depth, func, data);
+    break;
+  default:
+    g_assert_not_reached ();
+  }
+}
+
+/**
+ * gts_split_height:
+ * @root: a #GtsSplit.
+ *
+ * Returns: the maximum height of the vertex split tree having @root as root.
+ */
+guint gts_split_height (GtsSplit * root)
+{
+  guint height = 0, tmp_height;
+
+  g_return_val_if_fail (root != NULL, 0);
+
+  if (GTS_IS_SPLIT (root->v1)) {
+    tmp_height = gts_split_height (GTS_SPLIT (root->v1));
+    if (tmp_height > height)
+      height = tmp_height;
+  }
+  if (GTS_IS_SPLIT (root->v2)) {
+    tmp_height = gts_split_height (GTS_SPLIT (root->v2));
+    if (tmp_height > height)
+      height = tmp_height;
+  }
+
+  return height + 1;
+}
+
+static gboolean list_array_are_identical (GSList * list, 
+					  gpointer * array,
+					  gpointer excluded)
+{
+  while (list) {
+    gpointer data = list->data;
+    if (data != excluded) {
+      gboolean found = FALSE;
+      gpointer * a = array;
+      
+      while (!found && *a)
+	if (*(a++) == data)
+	  found = TRUE;
+      if (!found)
+	return FALSE;
+    }
+    list = list->next;
+  }
+  return TRUE;
+}
+
+#ifndef NEW
+gboolean gts_split_is_collapsable (GtsSplit * vs)
+{
+  guint i;
+  GtsSplitCFace * cf;
+  GtsVertex * v1, * v2;
+  GtsEdge * e;
+
+  g_return_val_if_fail (vs != NULL, FALSE);
+
+  v1 = GTS_SPLIT_V1 (vs);
+  v2 = GTS_SPLIT_V2 (vs);
+  g_return_val_if_fail ((e = GTS_EDGE (gts_vertices_are_connected (v1, v2))),
+			FALSE);
+
+#ifdef DYNAMIC_SPLIT
+  if (!gts_edge_collapse_is_valid (e))
+    return FALSE;
+#else 
+  i = vs->ncf;
+  cf = vs->cfaces;
+  while (i--) {
+    GtsTriangle * t = GTS_TRIANGLE (cf->f);
+    GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3;
+
+    ROTATE_ORIENT (e, e1, e2, e3);
+    if (SEGMENT_USE_VERTEX (GTS_SEGMENT (e1), v2)) {
+      e3 = e1; e1 = e2; e2 = e3;
+    }
+
+    if (!list_array_are_identical (e1->triangles, (gpointer *) cf->a1, t))
+      return FALSE;
+    if (!list_array_are_identical (e2->triangles, (gpointer *) cf->a2, t))
+      return FALSE;
+    
+    cf++;
+  }
+#endif
+  return TRUE;
+}
+#endif /* not NEW */
+
+#ifdef DEBUG_HEXPAND
+static guint expand_level = 0;
+
+static void expand_indent (FILE * fptr)
+{
+  guint i = expand_level;
+  while (i--)
+    fputc (' ', fptr);
+}
+#endif
+
+/**
+ * gts_hsplit_force_expand:
+ * @hs: a #GtsHSplit.
+ * @hsurface: a #GtsHSurface.
+ *
+ * Forces the expansion of @hs by first expanding all its dependencies not
+ * already expanded.
+ */
+void gts_hsplit_force_expand (GtsHSplit * hs,
+			      GtsHSurface * hsurface)
+{
+  guint i;
+  GtsSplitCFace * cf;
+
+  g_return_if_fail (hs != NULL);
+  g_return_if_fail (hsurface != NULL);
+  g_return_if_fail (hs->nchild == 0);
+
+#ifdef DEBUG_HEXPAND
+  expand_level += 2;
+#endif
+
+  if (hs->parent && hs->parent->nchild == 0) {
+#ifdef DEBUG_HEXPAND
+    expand_indent (stderr); 
+    fprintf (stderr, "expand parent %p\n", hs->parent);
+#endif
+    gts_hsplit_force_expand (hs->parent, hsurface);
+  }
+
+  i = GTS_SPLIT (hs)->ncf;
+  cf = GTS_SPLIT (hs)->cfaces;
+  while (i--) {
+    GtsTriangle ** j, * t;
+
+    j = cf->a1;
+    while ((t = *(j++)))
+      if (IS_CFACE (t)) {
+#ifdef DEBUG_HEXPAND
+	expand_indent (stderr); 
+	fprintf (stderr, "expand a1: cf->f: %p t: %p parent_split: %p\n", 
+		 cf->f,
+		 t,
+		 GTS_HSPLIT (CFACE (t)->parent_split));
+#endif
+	gts_hsplit_force_expand (GTS_HSPLIT (CFACE (t)->parent_split),
+				 hsurface);
+#ifdef DEBUG_HEXPAND
+	g_assert (!IS_CFACE (t));
+#endif
+      }
+    j = cf->a2;
+    while ((t = *(j++)))
+      if (IS_CFACE (t)) {
+#ifdef DEBUG_HEXPAND
+	expand_indent (stderr); 
+	fprintf (stderr, "expand a2: cf->f: %p t: %p parent_split: %p\n", 
+		 cf->f,
+		 t,
+		 GTS_HSPLIT (CFACE (t)->parent_split));
+#endif
+	gts_hsplit_force_expand (GTS_HSPLIT (CFACE (t)->parent_split),
+				 hsurface);
+      }
+    cf++;
+  }
+
+  gts_hsplit_expand (hs, hsurface);
+
+#ifdef DEBUG_HEXPAND
+  expand_level -= 2; 
+  expand_indent (stderr); 
+  fprintf (stderr, "%p expanded\n", hs);
+#endif
+}
+
+static void index_object (GtsObject * o, guint * n)
+{
+  o->reserved = GUINT_TO_POINTER ((*n)++);
+}
+
+static void index_face (GtsFace * f, gpointer * data)
+{
+  guint * nf = data[1];
+
+  g_hash_table_insert (data[0], f, GUINT_TO_POINTER ((*nf)++));
+}
+
+/**
+ * gts_psurface_write:
+ * @ps: a #GtsPSurface.
+ * @fptr: a file pointer.
+ *
+ * Writes to @fptr a GTS progressive surface description.
+ */
+void gts_psurface_write (GtsPSurface * ps, FILE * fptr)
+{
+  guint nv = 1;
+  guint nf = 1;
+  GHashTable * hash;
+  gpointer data[2];
+
+  g_return_if_fail (ps != NULL);
+  g_return_if_fail (fptr != NULL);
+  g_return_if_fail (GTS_PSURFACE_IS_CLOSED (ps));
+
+  while (gts_psurface_remove_vertex (ps))
+    ;
+
+  gts_surface_write (ps->s, fptr);
+  
+  gts_surface_foreach_vertex (ps->s, (GtsFunc) index_object, &nv);
+  hash = g_hash_table_new (NULL, NULL);
+  data[0] = hash;
+  data[1] = &nf;
+  gts_surface_foreach_face (ps->s, (GtsFunc) index_face, data);
+
+  fprintf (fptr, "%u\n", ps->split->len);
+  while (ps->pos) {
+    GtsSplit * vs = g_ptr_array_index (ps->split, --ps->pos);
+    GtsSplitCFace * scf = vs->cfaces;
+    GtsVertex * v1, * v2;
+    guint i = vs->ncf;
+
+    fprintf (fptr, "%u %u",
+	     GPOINTER_TO_UINT (GTS_OBJECT (vs->v)->reserved),
+	     vs->ncf);
+    if (GTS_OBJECT (vs)->klass->write)
+      (*GTS_OBJECT (vs)->klass->write) (GTS_OBJECT (vs), fptr);
+    fputc ('\n', fptr);
+
+    v1 = GTS_IS_SPLIT (vs->v1) ? GTS_SPLIT (vs->v1)->v : GTS_VERTEX (vs->v1);
+    GTS_OBJECT (v1)->reserved = GUINT_TO_POINTER (nv++);
+    v2 = GTS_IS_SPLIT (vs->v2) ? GTS_SPLIT (vs->v2)->v : GTS_VERTEX (vs->v2);
+    GTS_OBJECT (v2)->reserved = GUINT_TO_POINTER (nv++);
+
+    (*GTS_OBJECT (v1)->klass->write) (GTS_OBJECT (v1), fptr);
+    fputc ('\n', fptr);
+
+    (*GTS_OBJECT (v2)->klass->write) (GTS_OBJECT (v2), fptr);
+    fputc ('\n', fptr);
+    
+    while (i--) {
+      CFace * cf = CFACE (scf->f);
+      GtsTriangle ** a, * t;
+
+      fprintf (fptr, "%u %u",
+	       GPOINTER_TO_UINT (g_hash_table_lookup (hash, cf->t)),
+	       cf->flags);
+      if (GTS_OBJECT_CLASS (ps->s->face_class)->write)
+	(*GTS_OBJECT_CLASS (ps->s->face_class)->write) (GTS_OBJECT (cf), fptr);
+      fputc ('\n', fptr);
+
+      a = scf->a1;
+      while ((t = *(a++)))
+	fprintf (fptr, "%u\n",
+		 GPOINTER_TO_UINT (g_hash_table_lookup (hash, t)));
+      fprintf (fptr, "0\n");
+
+      a = scf->a2;
+      while ((t = *(a++)))
+	fprintf (fptr, "%u\n",
+		 GPOINTER_TO_UINT (g_hash_table_lookup (hash, t)));
+      fprintf (fptr, "0\n");
+
+      g_hash_table_insert (hash, cf, GUINT_TO_POINTER (nf++));
+
+      scf++;
+    }
+
+    gts_split_expand (vs, ps->s, ps->s->edge_class);
+  }
+
+  gts_surface_foreach_vertex (ps->s, 
+			      (GtsFunc) gts_object_reset_reserved, NULL);
+  g_hash_table_destroy (hash);
+}
+
+static GtsSurface * surface_read (GtsSurface * surface, 
+				  FILE * fptr, 
+				  guint * line,
+				  GPtrArray * vertices,
+				  GPtrArray * faces)
+{
+  GtsEdge ** edges;
+  guint n, np, ns, nt, line_number = 1;
+  gboolean syntax_error = FALSE;
+  GString * buf;
+  gint delim;
+
+  g_return_val_if_fail (surface != NULL, NULL);
+  g_return_val_if_fail (fptr != NULL, NULL);
+
+  buf = g_string_new ("");
+
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return NULL;
+  }
+  np = atoi (buf->str);
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return NULL;
+  }
+  ns = atoi (buf->str);
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF) {
+    g_string_free (buf, TRUE);
+    return NULL;
+  }
+  nt = atoi (buf->str);
+  if (delim != '\n')
+    gts_get_newline (fptr);
+
+  g_ptr_array_set_size (vertices, np);
+  g_ptr_array_set_size (faces, nt);
+  /* allocate ns + 1 just in case ns == 0 */
+  edges = g_malloc ((ns + 1)*sizeof (GtsEdge *));
+  
+  n = 0;
+  while (n < np && !syntax_error) {
+    GtsObject * new_vertex = 
+      gts_object_new (GTS_OBJECT_CLASS (surface->vertex_class));
+
+    line_number++;
+    delim = (*GTS_OBJECT_CLASS (surface->vertex_class)->read)
+      (&new_vertex, fptr);
+    if (delim == EOF)
+      syntax_error = TRUE;
+    else if (delim != '\n')
+      gts_get_newline (fptr);
+    g_ptr_array_index (vertices, n++) = new_vertex;
+  }
+  if (syntax_error)
+    np = n;
+
+  n = 0;
+  while (n < ns && !syntax_error) {
+    guint p1, p2;
+
+    line_number++;
+    delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+    if (delim == EOF || delim == '\n')
+      syntax_error = TRUE;
+    else {
+      p1 = atoi (buf->str);
+      delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+      if (delim == EOF)
+	syntax_error = TRUE;
+      else {
+	p2 = atoi (buf->str);
+	if (p1 == 0 || p2 == 0 || p1 > np || p2 > np)
+	  syntax_error = TRUE;
+	else {
+	  GtsEdge * new_edge = 
+	    gts_edge_new (surface->edge_class,
+			  g_ptr_array_index (vertices, p1 - 1),
+			  g_ptr_array_index (vertices, p2 - 1));
+	  if (delim != '\n') {
+	    if (GTS_OBJECT_CLASS (surface->edge_class)->read)
+	      delim = (*GTS_OBJECT_CLASS (surface->edge_class)->read)
+		((GtsObject **) &new_edge, fptr);
+	    if (delim != '\n')
+	      gts_get_newline (fptr);
+	  }
+	  edges[n++] = new_edge;
+	}
+      }
+    }
+  }
+  if (syntax_error)
+    ns = n;
+
+  n = 0;
+  while (n < nt && !syntax_error) {
+    guint s1, s2, s3;
+
+    line_number++;
+    delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+    if (delim == EOF || delim == '\n')
+      syntax_error = TRUE;
+    else {
+      s1 = atoi (buf->str);
+      delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+      if (delim == EOF || delim == '\n')
+	syntax_error = TRUE;
+      else {
+	s2 = atoi (buf->str);
+	delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+	if (delim == EOF)
+	  syntax_error = TRUE;
+	else {
+	  s3 = atoi (buf->str);
+	  if (s1 == 0 || s2 == 0 || s3 == 0 || s1 > ns || s2 > ns || s3 > ns)
+	    syntax_error = TRUE;
+	  else {
+	    GtsFace * new_face = gts_face_new (surface->face_class,
+					       edges[s1 - 1],
+					       edges[s2 - 1],
+					       edges[s3 - 1]);
+	    if (delim != '\n') {
+	      if (GTS_OBJECT_CLASS (surface->face_class)->read)
+		delim = (*GTS_OBJECT_CLASS (surface->face_class)->read)
+		  ((GtsObject **) &new_face, fptr);
+	      if (delim != '\n')
+		gts_get_newline (fptr);
+	    }
+	    gts_surface_add_face (surface, new_face);
+	    g_ptr_array_index (faces, n++) = new_face;
+	  }
+	}
+      }
+    }
+  }
+
+  if (syntax_error) {
+    while (np)
+      gts_object_destroy (GTS_OBJECT (g_ptr_array_index (vertices, np-- - 1)));
+    while (ns)
+      gts_object_destroy (GTS_OBJECT (edges[ns-- - 1]));
+    gts_object_destroy (GTS_OBJECT (surface));
+    surface = NULL;
+    if (line)
+      *line = line_number;
+  }
+
+  g_free (edges);
+  g_string_free (buf, TRUE);
+
+  return surface;
+}
+
+/**
+ * gts_psurface_open:
+ * @klass: a #GtsPSurfaceClass.
+ * @s: a #GtsSurface.
+ * @split_class: a #GtsSplitClass to use for the #GtsSplit.
+ * @fptr: a file pointer.
+ * @line: %NULL or a pointer to a variable to fill with the line number in case
+ * of an error in the file format. 
+ *
+ * Creates a new #GtsPSurface prepared for input from the file @fptr 
+ * containing a valid GTS representation of a progressive surface. The initial
+ * shape of the progressive surface is loaded into @s.
+ * 
+ * Before being usable as such this progressive surface must be closed using
+ * gts_psurface_close(). While open however, the functions
+ * gts_psurface_get_vertex_number(), gts_psurface_min_vertex_number() and
+ * gts_psurface_max_vertex_number() can still be used.
+ *
+ * Returns: a new #GtsPSurface or %NULL if there was a format error while
+ * reading the file, in which case @line is set to the line where
+ * the error occured.
+ */
+GtsPSurface * gts_psurface_open (GtsPSurfaceClass * klass,
+				 GtsSurface * s,
+				 GtsSplitClass * split_class,
+				 FILE * fptr,
+				 guint * line)
+{
+  GtsPSurface * ps;
+  guint ns = 0;
+
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (split_class != NULL, NULL);
+  g_return_val_if_fail (fptr != NULL, NULL);
+
+  ps = GTS_PSURFACE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  ps->s = s;
+  ps->split_class = split_class;
+
+  ps->vertices = g_ptr_array_new ();
+  ps->faces = g_ptr_array_new ();
+
+  if (surface_read (s, fptr, line, ps->vertices, ps->faces) == NULL)
+    return ps;
+
+  ps->min = gts_surface_vertex_number (ps->s);
+  ps->pos = 0;
+
+  if (fscanf (fptr, "%u", &ns) == 1)
+    g_ptr_array_set_size (ps->split, ns);
+
+  return ps;
+}
+
+/**
+ * gts_psurface_read_vertex:
+ * @ps: a #GtsPSurface prealably created with gts_psurface_open().
+ * @fptr: a file pointer.
+ *
+ * Reads in one vertex split operation from @fptr and performs the expansion.
+ *
+ * Returns: the newly created #GtsSplit or %NULL if no vertex split could be
+ * read from @fptr.
+ */
+GtsSplit * gts_psurface_read_vertex (GtsPSurface * ps, FILE * fptr)
+{
+  guint nv, ncf;
+  GtsSplit * vs, * parent;
+  GtsSplitCFace * scf;
+  gboolean ok = TRUE;
+  gint delim;
+  GString * buf;
+
+  g_return_val_if_fail (ps != NULL, NULL);
+  g_return_val_if_fail (fptr != NULL, NULL);
+  g_return_val_if_fail (!GTS_PSURFACE_IS_CLOSED (ps), NULL);
+  
+  if (ps->pos >= ps->split->len)
+    return NULL;
+
+  buf = g_string_new ("");
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return NULL;
+  }
+  nv = atoi (buf->str);
+  if (nv == 0 || nv > ps->vertices->len) {
+    g_string_free (buf, TRUE);
+    return NULL;
+  }
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF) {
+    g_string_free (buf, TRUE);
+    return NULL;
+  }
+  ncf = atoi (buf->str);
+  
+  vs = GTS_SPLIT (gts_object_new (GTS_OBJECT_CLASS (ps->split_class)));
+
+  vs->v = g_ptr_array_index (ps->vertices, nv - 1);
+  vs->v1 = vs->v2 = NULL;
+  vs->cfaces = NULL;
+  vs->ncf = 0;
+
+  if (delim != '\n') {
+    if (GTS_OBJECT (vs)->klass->read)
+      delim = (*GTS_OBJECT (vs)->klass->read) ((GtsObject **) &vs, fptr);
+    if (delim != '\n')
+      gts_get_newline (fptr);
+  }
+  
+  vs->v1 = gts_object_new (GTS_OBJECT_CLASS (ps->s->vertex_class));
+
+  delim = (*GTS_OBJECT_CLASS (ps->s->vertex_class)->read) 
+    (&(vs->v1), fptr);
+  if (delim == EOF)
+    ok = FALSE;
+  else {
+    vs->v1->reserved = vs;
+    g_ptr_array_add (ps->vertices, vs->v1);
+
+    if (delim != '\n') 
+      gts_get_newline (fptr);
+
+    vs->v2 = gts_object_new (GTS_OBJECT_CLASS (ps->s->vertex_class));
+
+    delim = (*GTS_OBJECT_CLASS (ps->s->vertex_class)->read) 
+      (&(vs->v2), fptr);
+    if (delim == EOF)
+      ok = FALSE;
+    else {
+      vs->v2->reserved = vs;
+      g_ptr_array_add (ps->vertices, vs->v2);
+
+      if (delim != '\n')
+	gts_get_newline (fptr);
+    }
+  }
+  if (ok) {
+    scf = vs->cfaces = g_malloc (sizeof (GtsSplitCFace)*ncf);
+    while (ok && ncf--) {
+      guint it, flags;
+      GtsFace * f;
+      CFace * cf;
+      GPtrArray * a;
+
+      delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+      if (delim == EOF || delim == '\n')
+	ok = FALSE;
+      else {
+	it = atoi (buf->str);
+	delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+	if (delim == EOF || it == 0 || it > ps->faces->len)
+	  ok = FALSE;
+	else {
+	  flags = atoi (buf->str);
+	  f = GTS_FACE (gts_object_new (GTS_OBJECT_CLASS (ps->s->face_class)));
+	  
+	  if (delim != '\n') {
+	    if (GTS_OBJECT (f)->klass->read)
+	      delim = (*GTS_OBJECT (f)->klass->read) 
+		((GtsObject **) &f, fptr);
+	    if (delim != '\n')
+	      gts_get_newline (fptr);
+	  }
+	  scf->f = f;
+
+	  cf = (CFace *) f;
+	  GTS_OBJECT (cf)->klass = GTS_OBJECT_CLASS (cface_class ());
+	  cf->parent_split = vs;
+	  cf->t = g_ptr_array_index (ps->faces, it - 1);
+	  cf->flags = flags;
+	  
+	  a = g_ptr_array_new ();
+	  while (ok && fscanf (fptr, "%u", &it) == 1 && it > 0) {
+	    if (it > ps->faces->len)
+	      ok = FALSE;
+	    else
+	      g_ptr_array_add (a, g_ptr_array_index (ps->faces, it - 1));
+	  }
+	  g_ptr_array_add (a, NULL);
+	  scf->a1 = (GtsTriangle **) a->pdata;
+	  g_ptr_array_free (a, FALSE);
+	  
+	  a = g_ptr_array_new ();
+	  while (ok && fscanf (fptr, "%u", &it) == 1 && it > 0) {
+	    if (it > ps->faces->len)
+	      ok = FALSE;
+	    else
+	      g_ptr_array_add (a, g_ptr_array_index (ps->faces, it - 1));
+	  }
+	  g_ptr_array_add (a, NULL);
+	  scf->a2 = (GtsTriangle **) a->pdata;
+	  g_ptr_array_free (a, FALSE);
+	  
+	  g_ptr_array_add (ps->faces, f);
+	  
+	  vs->ncf++;
+	  scf++;
+	}
+      }
+    }
+  }
+
+  if (ok) {
+    if ((parent = GTS_OBJECT (vs->v)->reserved)) {
+      GTS_OBJECT (vs->v)->reserved = NULL;
+      if (parent->v1 == GTS_OBJECT (vs->v))
+	parent->v1 = GTS_OBJECT (vs);
+      else {
+	g_assert (parent->v2 == GTS_OBJECT (vs->v));
+	parent->v2 = GTS_OBJECT (vs);
+      }
+    }
+    g_ptr_array_index (ps->split, ps->pos++) = vs;
+    gts_split_expand (vs, ps->s, ps->s->edge_class);
+    
+    g_string_free (buf, TRUE);
+
+    return vs;
+  }
+
+  if (vs->v1) gts_object_destroy (vs->v1);
+  if (vs->v2) gts_object_destroy (vs->v2);
+  gts_object_destroy (GTS_OBJECT (vs));
+  
+  g_string_free (buf, TRUE);
+  return NULL;
+}
+
+/**
+ * gts_psurface_close:
+ * @ps: a #GtsPSurface prealably created with gts_psurface_open().
+ *
+ * Closes a progressive surface.
+ */
+void gts_psurface_close (GtsPSurface * ps)
+{
+  g_return_if_fail (ps != NULL);
+  g_return_if_fail (!GTS_PSURFACE_IS_CLOSED (ps));
+
+  g_ptr_array_free (ps->vertices, TRUE);
+  g_ptr_array_free (ps->faces, TRUE);
+  ps->faces = ps->vertices = NULL;
+  
+  gts_surface_foreach_vertex (ps->s, 
+			      (GtsFunc) gts_object_reset_reserved, NULL);
+  if (ps->pos > 0)
+    g_ptr_array_set_size (ps->split, ps->pos);
+  if (ps->split->len > 1) {
+    guint i, half = ps->split->len/2, n = ps->split->len - 1;
+    
+    for (i = 0; i < half; i++) {
+      gpointer p1 = g_ptr_array_index (ps->split, i);
+      gpointer p2 = g_ptr_array_index (ps->split, n - i);
+      g_ptr_array_index (ps->split, n - i) = p1;
+      g_ptr_array_index (ps->split, i) = p2;
+    }
+  }
+  ps->pos = 0;
+}
diff --git a/src/stripe.c b/src/stripe.c
new file mode 100644
index 0000000..52bf535
--- /dev/null
+++ b/src/stripe.c
@@ -0,0 +1,167 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+
+#define HEAP_INSERT_TRIANGLE(h, t) (GTS_OBJECT (t)->reserved =\
+                                    gts_eheap_insert (h, t))
+
+static gdouble triangle_neighbors (GtsTriangle * t, GtsSurface * s)
+{
+  return gts_face_neighbor_number (GTS_FACE (t), s);
+}
+
+static void create_triangle_heap (GtsTriangle * t, GtsEHeap * heap)
+{
+  HEAP_INSERT_TRIANGLE (heap, t);
+}
+
+static GSList * triangle_neighbors_data (GtsTriangle * t)
+{
+  GSList * i, * list = NULL;
+  GtsEdge * ee[4], ** e1 = ee;
+
+  g_return_val_if_fail (t != NULL, NULL);
+
+  ee[0] = t->e1; ee[1] = t->e2; ee[2] = t->e3; ee[3] = NULL;
+  while (*e1) {
+    i = (*e1++)->triangles;
+    while (i) {
+      GtsTriangle * t1 = i->data;
+      if (t1 != t && GTS_OBJECT (t1)->reserved)
+	list = g_slist_prepend (list, t1);
+      i = i->next;
+    }
+  }
+  return list;  
+}
+
+static GtsTriangle * most_isolated_neighbor (GtsTriangle * t,
+					     GtsEHeap * heap)
+{
+  GSList * neighbors = triangle_neighbors_data (t);
+  GSList * same_key = NULL; /* neighbors of t with the same key */
+  GSList * i;
+  GtsTriangle * tmost = NULL;
+  gdouble keymin = G_MAXDOUBLE;
+  
+  i = neighbors;
+  while (i) {
+    GtsTriangle * t1 = i->data;
+    GtsEHeapPair * p = GTS_OBJECT (t1)->reserved;
+    gdouble key = p->key;
+    /* find keymin */
+    if (key < keymin) {
+      keymin = key;
+      g_slist_free (same_key);
+      same_key = g_slist_prepend (NULL, t1);
+    }
+    else if (key == keymin)
+      same_key = g_slist_prepend (same_key, t1);
+    /* decrease key */
+    g_assert (key > 0.);
+    gts_eheap_decrease_key (heap, p, key - 1.);
+    i = i->next;
+  }
+  g_slist_free (neighbors);
+  
+  if (same_key == NULL) /* no neighbors */
+    return NULL;
+  if (same_key->next == NULL) { /* only one neighbor with minimum key */
+    tmost = same_key->data;
+    g_slist_free (same_key);
+    return tmost;
+  }
+
+  /* several neighbors have the same minimum key */
+  tmost = same_key->data;
+  keymin = G_MAXDOUBLE;
+  i = same_key;
+  while (i) {
+    GtsTriangle * t1 = i->data;
+    GSList * j;
+    j = neighbors = triangle_neighbors_data (t1);
+    while (j) {
+      GtsTriangle * t2 = j->data;
+      gdouble key = ((GtsEHeapPair *) GTS_OBJECT (t2)->reserved)->key;
+      if (key < keymin) {
+	keymin = key;
+	tmost = t1;
+      }
+      j = j->next;
+    }
+    g_slist_free (neighbors);
+    i = i->next;
+  }
+  g_slist_free (same_key);
+  
+  return tmost;
+}
+
+/**
+ * gts_surface_strip:
+ * @s: a #GtsSurface.
+ *
+ * Decompose @s into triangle strips for fast-rendering.
+ *
+ * Returns: a list of triangle strips containing all the triangles of @s. 
+ * A triangle strip is itself a list of successive triangles having one edge
+ * in common.
+ */
+GSList * gts_surface_strip (GtsSurface * s)
+{
+  GtsEHeap * heap;
+  GtsTriangle * t;
+  GSList * strips = NULL;
+
+  g_return_val_if_fail (s != NULL, NULL);
+
+  heap = gts_eheap_new ((GtsKeyFunc) triangle_neighbors, s);
+  gts_eheap_freeze (heap);
+  gts_surface_foreach_face (s, (GtsFunc) create_triangle_heap, heap);
+  gts_eheap_thaw (heap);
+
+  while ((t = gts_eheap_remove_top (heap, NULL))) {
+    GSList * newstrip;
+    GtsTriangle * tstart, * tmost;
+    GTS_OBJECT (t)->reserved = NULL;
+    /* start new strip from t */
+    newstrip = g_slist_prepend (NULL, t);
+    tstart = t;
+    while ((tmost = most_isolated_neighbor (tstart, heap))) {
+      newstrip = g_slist_prepend (newstrip, tmost);
+      gts_eheap_remove (heap, GTS_OBJECT (tmost)->reserved);
+      GTS_OBJECT (tmost)->reserved = NULL;
+      tstart = tmost;
+    }
+    /* restart new strip from t (i.e. both ends) */
+    newstrip = g_slist_reverse (newstrip);
+    tstart = t;
+    while ((tmost = most_isolated_neighbor (tstart, heap))) {
+      newstrip = g_slist_prepend (newstrip, tmost);
+      gts_eheap_remove (heap, GTS_OBJECT (tmost)->reserved);
+      GTS_OBJECT (tmost)->reserved = NULL;
+      tstart = tmost;
+    }
+    strips = g_slist_prepend (strips, newstrip);
+  }
+    
+  return strips;
+}
diff --git a/src/surface.c b/src/surface.c
new file mode 100644
index 0000000..30c19c7
--- /dev/null
+++ b/src/surface.c
@@ -0,0 +1,2056 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#include "gts.h"
+
+static void destroy_foreach_face (GtsFace * f, GtsSurface * s)
+{
+  f->surfaces = g_slist_remove (f->surfaces, s);
+  if (!GTS_OBJECT_DESTROYED (f) &&
+      !gts_allow_floating_faces && f->surfaces == NULL)
+    gts_object_destroy (GTS_OBJECT (f));
+}
+
+static void surface_destroy (GtsObject * object)
+{
+  GtsSurface * surface = GTS_SURFACE (object);
+  
+  gts_surface_foreach_face (surface, (GtsFunc) destroy_foreach_face, surface);
+  g_hash_table_destroy (surface->faces);
+
+  (* GTS_OBJECT_CLASS (gts_surface_class ())->parent_class->destroy) (object);
+}
+
+static void surface_write (GtsObject * object, FILE * fptr)
+{
+  fprintf (fptr, " %s %s %s %s", 
+	   object->klass->info.name,
+	   GTS_OBJECT_CLASS (GTS_SURFACE (object)->face_class)->info.name,
+	   GTS_OBJECT_CLASS (GTS_SURFACE (object)->edge_class)->info.name,
+	   GTS_OBJECT_CLASS (GTS_SURFACE (object)->vertex_class)->info.name);
+}
+
+static void surface_class_init (GtsSurfaceClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->destroy = surface_destroy;
+  GTS_OBJECT_CLASS (klass)->write = surface_write;
+  klass->add_face = NULL;
+  klass->remove_face = NULL;
+}
+
+static void surface_init (GtsSurface * surface)
+{
+  surface->faces = g_hash_table_new (NULL, NULL);
+  surface->vertex_class = gts_vertex_class ();
+  surface->edge_class = gts_edge_class ();
+  surface->face_class = gts_face_class ();
+  surface->keep_faces = FALSE;
+}
+
+/**
+ * gts_surface_class:
+ *
+ * Returns: the #GtsSurfaceClass.
+ */
+GtsSurfaceClass * gts_surface_class (void)
+{
+  static GtsSurfaceClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo surface_info = {
+      "GtsSurface",
+      sizeof (GtsSurface),
+      sizeof (GtsSurfaceClass),
+      (GtsObjectClassInitFunc) surface_class_init,
+      (GtsObjectInitFunc) surface_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), &surface_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_surface_new:
+ * @klass: a #GtsSurfaceClass.
+ * @face_class: a #GtsFaceClass.
+ * @edge_class: a #GtsEdgeClass.
+ * @vertex_class: a #GtsVertexClass.
+ *
+ * Returns: a new empty #GtsSurface.
+ */
+GtsSurface * gts_surface_new (GtsSurfaceClass * klass,
+			      GtsFaceClass * face_class,
+			      GtsEdgeClass * edge_class,
+			      GtsVertexClass * vertex_class)
+{
+  GtsSurface * s;
+
+  s = GTS_SURFACE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  s->vertex_class = vertex_class;
+  s->edge_class = edge_class;
+  s->face_class = face_class;
+
+  return s;
+}
+
+/**
+ * gts_surface_add_face:
+ * @s: a #GtsSurface.
+ * @f: a #GtsFace.
+ *
+ * Adds face @f to surface @s.
+ */
+void gts_surface_add_face (GtsSurface * s, GtsFace * f)
+{
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (f != NULL);
+
+  g_assert (s->keep_faces == FALSE);
+
+  if (!g_hash_table_lookup (s->faces, f)) {
+    f->surfaces = g_slist_prepend (f->surfaces, s);
+    g_hash_table_insert (s->faces, f, f);
+  }
+
+  if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->add_face)
+    (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->add_face) (s, f);
+}
+
+/**
+ * gts_surface_remove_face:
+ * @s: a #GtsSurface.
+ * @f: a #GtsFace.
+ *
+ * Removes face @f from surface @s.
+ */
+void gts_surface_remove_face (GtsSurface * s, 
+			      GtsFace * f)
+{
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (f != NULL);
+
+  g_assert (s->keep_faces == FALSE);
+
+  g_hash_table_remove (s->faces, f);
+  f->surfaces = g_slist_remove (f->surfaces, s);
+
+  if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face)
+    (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (s, f);
+
+  if (!GTS_OBJECT_DESTROYED (f) &&
+      !gts_allow_floating_faces && 
+      f->surfaces == NULL)
+    gts_object_destroy (GTS_OBJECT (f));
+}
+
+/**
+ * gts_surface_read:
+ * @surface: a #GtsSurface.
+ * @fptr: a file pointer.
+ *
+ * Add to @surface the data read from @fptr. The format of the file pointed to
+ * by @fptr is as described in gts_surface_write().
+ *
+ * Returns: 0 if successful or the line number at which the parsing stopped in
+ * case of error.
+ */
+guint gts_surface_read (GtsSurface * surface, FILE * fptr)
+{
+  GtsVertex ** vertices;
+  GtsEdge ** edges;
+  guint n, nv, ne, nf, line_number = 1;
+  gboolean syntax_error = FALSE;
+  GString * buf;
+  gint delim;
+
+  g_return_val_if_fail (surface != NULL, 1);
+  g_return_val_if_fail (fptr != NULL, 1);
+
+  buf = g_string_new ("");
+
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return 1;
+  }
+  nv = atoi (buf->str);
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF || delim == '\n') {
+    g_string_free (buf, TRUE);
+    return 1;
+  }
+  ne = atoi (buf->str);
+  delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+  if (delim == EOF) {
+    g_string_free (buf, TRUE);
+    return 1;
+  }
+  nf = atoi (buf->str);
+  if (delim != '\n')
+    gts_get_newline (fptr);
+
+  if (nf <= 0) {
+    g_string_free (buf, TRUE);
+    return 0;
+  }
+
+  /* allocate nv + 1 just in case nv == 0 */
+  vertices = g_malloc ((nv + 1)*sizeof (GtsVertex *));
+  edges = g_malloc ((ne + 1)*sizeof (GtsEdge *));
+  
+  n = 0;
+  while (n < nv && !syntax_error) {
+    GtsObject * new_vertex =
+      gts_object_new (GTS_OBJECT_CLASS (surface->vertex_class));
+
+    line_number++;
+    delim = (*GTS_OBJECT_CLASS (surface->vertex_class)->read)
+      (&new_vertex, fptr);
+    if (delim == EOF)
+      syntax_error = TRUE;
+    else if (delim != '\n')
+      gts_get_newline (fptr);
+    vertices[n++] = GTS_VERTEX (new_vertex);
+  }
+  if (syntax_error)
+    nv = n;
+
+  n = 0;
+  while (n < ne && !syntax_error) {
+    guint p1, p2;
+
+    line_number++;
+    delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+    if (delim == EOF || delim == '\n')
+      syntax_error = TRUE;
+    else {
+      p1 = atoi (buf->str);
+      delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+      if (delim == EOF)
+	syntax_error = TRUE;
+      else {
+	p2 = atoi (buf->str);
+	if (p1 == 0 || p2 == 0 || p1 > nv || p2 > nv)
+	  syntax_error = TRUE;
+	else {
+	  GtsEdge * new_edge =
+	    gts_edge_new (surface->edge_class,
+			  vertices[p1 - 1], vertices[p2 - 1]);
+	  if (delim != '\n') {
+	    if (GTS_OBJECT_CLASS (surface->edge_class)->read)
+	      delim = (*GTS_OBJECT_CLASS (surface->edge_class)->read)
+		((GtsObject **) &new_edge, fptr);
+	    if (delim != '\n')
+	      gts_get_newline (fptr);
+	  }
+	  edges[n++] = new_edge;
+	}
+      }
+    }
+  }
+  if (syntax_error)
+    ne = n;
+
+  n = 0;
+  while (n < nf && !syntax_error) {
+    guint s1, s2, s3;
+
+    line_number++;
+    delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+    if (delim == EOF || delim == '\n')
+      syntax_error = TRUE;
+    else {
+      s1 = atoi (buf->str);
+      delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+      if (delim == EOF || delim == '\n')
+	syntax_error = TRUE;
+      else {
+	s2 = atoi (buf->str);
+	delim = gts_get_token (fptr, buf, " \t\n", GTS_COMMENTS);
+	if (delim == EOF)
+	  syntax_error = TRUE;
+	else {
+	  s3 = atoi (buf->str);
+	  if (s1 == 0 || s2 == 0 || s3 == 0 || s1 > ne || s2 > ne || s3 > ne)
+	    syntax_error = TRUE;
+	  else {
+	    GtsFace * new_face = gts_face_new (surface->face_class,
+					       edges[s1 - 1],
+					       edges[s2 - 1],
+					       edges[s3 - 1]);
+	    if (delim != '\n') {
+	      if (GTS_OBJECT_CLASS (surface->face_class)->read)
+		delim = (*GTS_OBJECT_CLASS (surface->face_class)->read)
+		  ((GtsObject **) &new_face, fptr);
+	      if (delim != '\n')
+		gts_get_newline (fptr);
+	    }
+	    gts_surface_add_face (surface, new_face);
+	    n++;
+	  }
+	}
+      }
+    }
+  }
+
+  if (syntax_error) {
+    gts_allow_floating_vertices = TRUE;
+    while (nv)
+      gts_object_destroy (GTS_OBJECT (vertices[nv-- - 1]));
+    gts_allow_floating_vertices = FALSE;
+    gts_object_destroy (GTS_OBJECT (surface));
+  }
+
+  g_free (vertices);
+  g_free (edges);
+  g_string_free (buf, TRUE);
+
+  if (syntax_error)
+    return line_number;
+  return 0;
+}
+
+static void sum_area (GtsFace * f, gdouble * area) {
+  *area += gts_triangle_area (GTS_TRIANGLE (f));
+}
+
+/**
+ * gts_surface_area:
+ * @s: a #GtsSurface.
+ *
+ * Returns: the area of @s obtained as the sum of the signed areas of its
+ * faces.
+ */
+gdouble gts_surface_area (GtsSurface * s)
+{  
+  gdouble area = 0.0;
+  gts_surface_foreach_face (s, (GtsFunc)sum_area, &area);
+  return area;
+}
+
+/**
+ * gts_range_init:
+ * @r: a #GtsRange.
+ *
+ * Initializes a #GtsRange.
+ */
+void gts_range_init (GtsRange * r)
+{
+  g_return_if_fail (r != NULL);
+
+  r->max = - G_MAXDOUBLE;
+  r->min = G_MAXDOUBLE;
+  r->mean = r->stddev = 0.0;
+  r->n = 0;
+}
+
+/**
+ * gts_range_reset:
+ * @r: a #GtsRange.
+ *
+ * Sets all the fields of @r to 0.
+ */
+void gts_range_reset (GtsRange * r)
+{
+  g_return_if_fail (r != NULL);
+
+  r->max = 0.0;
+  r->min = 0.0;
+  r->mean = r->stddev = 0.0;
+  r->n = 0;
+}
+
+/**
+ * gts_range_add_value:
+ * @r: a #GtsRange.
+ * @val: a value to add to @r.
+ *
+ * Adds @val to @r.
+ */
+void gts_range_add_value (GtsRange * r, gdouble val)
+{
+  g_return_if_fail (r != NULL);
+
+  if (val < r->min) r->min = val;
+  if (val > r->max) r->max = val;
+  r->mean += val;
+  r->stddev += val*val;
+  r->n++;
+}
+
+/**
+ * gts_range_update:
+ * @r: a #GtsRange.
+ * 
+ * Updates the fields of @r.
+ */
+void gts_range_update (GtsRange * r)
+{
+  g_return_if_fail (r != NULL);
+  if (r->n > 0) {
+    if (r->stddev - r->mean*r->mean/(gdouble)r->n >= 0.)
+      r->stddev = sqrt ((r->stddev - r->mean*r->mean/(gdouble)r->n)
+			/(gdouble)r->n);
+    else
+      r->stddev = 0.;
+    r->mean /= (gdouble)r->n;
+  }
+  else
+    r->min = r->max = 0.0;
+}
+
+/**
+ * gts_range_print:
+ * @r: a #GtsRange.
+ * @fptr: a file pointer.
+ * 
+ * Writes a text representation of @r in @fptr.
+ */
+void gts_range_print (GtsRange * r, FILE * fptr)
+{
+  g_return_if_fail (r != NULL);
+  g_return_if_fail (fptr != NULL);
+  fprintf (fptr, "min: %g mean: %g | %g max: %g", 
+	   r->min, r->mean, r->stddev, r->max);
+}
+
+static void stats_foreach_vertex (GtsVertex * v, GtsSurfaceStats * stats) 
+{
+  GSList * i = v->segments;
+  guint nedges = 0;
+
+  while (i) {
+    if (GTS_IS_EDGE (i->data) && 
+	gts_edge_has_parent_surface (i->data, stats->parent))
+      nedges++;
+    i = i->next;
+  }
+  gts_range_add_value (&stats->edges_per_vertex, nedges);
+}
+
+static void stats_foreach_edge (GtsEdge * e, GtsSurfaceStats * stats) 
+{
+  guint nt = gts_edge_face_number (e, stats->parent);
+
+  if (gts_segment_is_duplicate (GTS_SEGMENT (e)))
+    stats->n_duplicate_edges++;
+  if (nt == 1)
+    stats->n_boundary_edges++;
+  else if (nt > 2)
+    stats->n_non_manifold_edges++;
+  gts_range_add_value (&stats->faces_per_edge, nt);
+}
+
+static void stats_foreach_face (GtsTriangle * t, GtsSurfaceStats * stats)
+{
+  GSList * i;
+  gboolean incompatible = FALSE;
+
+  i = t->e1->triangles;
+  while (i && !incompatible) {
+    if (i->data != t &&
+	GTS_IS_FACE (i->data) &&
+	gts_face_has_parent_surface (i->data, stats->parent) &&
+	!gts_triangles_are_compatible (t, i->data, t->e1))
+      incompatible = TRUE;
+    i = i->next;
+  }
+  i = t->e2->triangles;
+  while (i && !incompatible) {
+    if (i->data != t &&
+	GTS_IS_FACE (i->data) &&
+	gts_face_has_parent_surface (i->data, stats->parent) &&
+	!gts_triangles_are_compatible (t, i->data, t->e2))
+      incompatible = TRUE;
+    i = i->next;
+  }
+  i = t->e3->triangles;
+  while (i && !incompatible) {
+    if (i->data != t &&
+	GTS_IS_FACE (i->data) &&
+	gts_face_has_parent_surface (i->data, stats->parent) &&
+	!gts_triangles_are_compatible (t, i->data, t->e3))
+      incompatible = TRUE;
+    i = i->next;
+  }
+  if (incompatible)
+    stats->n_incompatible_faces++;
+  if (gts_triangle_is_duplicate (t))
+    stats->n_duplicate_faces++;
+  stats->n_faces++;
+}
+
+/**
+ * gts_surface_stats:
+ * @s: a #GtsSurface.
+ * @stats: a #GtsSurfaceStats.
+ *
+ * Fills @stats with the statistics relevant to surface @s.
+ */
+void gts_surface_stats (GtsSurface * s, GtsSurfaceStats * stats)
+{
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (stats != NULL);
+
+  stats->parent = s;
+  stats->n_faces = 0;
+  stats->n_incompatible_faces = 0;
+  stats->n_duplicate_faces = 0;
+  stats->n_duplicate_edges = 0;
+  stats->n_boundary_edges = 0;
+  stats->n_non_manifold_edges = 0;
+  gts_range_init (&stats->edges_per_vertex);
+  gts_range_init (&stats->faces_per_edge);
+
+  gts_surface_foreach_vertex (s, (GtsFunc) stats_foreach_vertex, stats);
+  gts_surface_foreach_edge (s, (GtsFunc) stats_foreach_edge, stats);
+  gts_surface_foreach_face (s, (GtsFunc) stats_foreach_face, stats);
+
+  gts_range_update (&stats->edges_per_vertex);
+  gts_range_update (&stats->faces_per_edge);
+}
+
+static void quality_foreach_edge (GtsSegment * s,
+				  GtsSurfaceQualityStats * stats) 
+{
+  GSList * i = GTS_EDGE (s)->triangles;
+
+  gts_range_add_value (&stats->edge_length, 
+		   gts_point_distance (GTS_POINT (s->v1), 
+				       GTS_POINT (s->v2)));
+  while (i) {
+    GSList * j = i->next;
+    while (j) {
+      gts_range_add_value (&stats->edge_angle,
+			   fabs (gts_triangles_angle (i->data, j->data)));
+      j = j->next;
+    }
+    i = i->next;
+  }
+}
+
+static void quality_foreach_face (GtsTriangle * t,
+				  GtsSurfaceQualityStats * stats) 
+{
+  gts_range_add_value (&stats->face_quality, gts_triangle_quality (t));
+  gts_range_add_value (&stats->face_area, gts_triangle_area (t));
+}
+
+/**
+ * gts_surface_quality_stats:
+ * @s: a #GtsSurface.
+ * @stats: a #GtsSurfaceQualityStats.
+ *
+ * Fills @stats with quality statistics relevant to surface @s.
+ */
+void gts_surface_quality_stats (GtsSurface * s, GtsSurfaceQualityStats * stats)
+{
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (stats != NULL);
+
+  stats->parent = s;
+  gts_range_init (&stats->face_quality);
+  gts_range_init (&stats->face_area);
+  gts_range_init (&stats->edge_length);
+  gts_range_init (&stats->edge_angle);
+
+  gts_surface_foreach_edge (s, (GtsFunc) quality_foreach_edge, stats);  
+  gts_surface_foreach_face (s, (GtsFunc) quality_foreach_face, stats);
+
+  gts_range_update (&stats->face_quality);
+  gts_range_update (&stats->face_area);
+  gts_range_update (&stats->edge_length);
+  gts_range_update (&stats->edge_angle);
+}
+
+/**
+ * gts_surface_print_stats:
+ * @s: a #GtsSurface.
+ * @fptr: a file pointer.
+ *
+ * Writes in the file pointed to by @fptr the statistics for surface @s.
+ */
+void gts_surface_print_stats (GtsSurface * s, FILE * fptr)
+{
+  GtsSurfaceStats stats;
+  GtsSurfaceQualityStats qstats;
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  gts_surface_stats (s, &stats);
+  gts_surface_quality_stats (s, &qstats);
+
+  fprintf (fptr, 
+	   "# vertices: %u edges: %u faces: %u\n"
+	   "# Connectivity statistics\n"
+	   "#   incompatible faces: %u\n"
+	   "#   duplicate faces: %u\n"
+	   "#   boundary edges: %u\n"
+	   "#   duplicate edges: %u\n"
+	   "#   non-manifold edges: %u\n",
+	   stats.edges_per_vertex.n, 
+	   stats.faces_per_edge.n,
+	   stats.n_faces,
+	   stats.n_incompatible_faces,
+	   stats.n_duplicate_faces,
+	   stats.n_boundary_edges,
+	   stats.n_duplicate_edges,
+	   stats.n_non_manifold_edges);
+  fputs ("#   edges per vertex: ", fptr); 
+  gts_range_print (&stats.edges_per_vertex, fptr);
+  fputs ("\n#   faces per edge: ", fptr);
+  gts_range_print (&stats.faces_per_edge, fptr);
+  fputs ("\n# Geometric statistics\n#   face quality: ", fptr);
+  gts_range_print (&qstats.face_quality, fptr);
+  fputs ("\n#   face area  : ", fptr);
+  gts_range_print (&qstats.face_area, fptr);
+  fputs ("\n#   edge length : ", fptr);
+  gts_range_print (&qstats.edge_length, fptr);
+  fputc ('\n', fptr);
+}
+
+static void write_vertex (GtsPoint * p, gpointer * data)
+{
+  (*GTS_OBJECT (p)->klass->write) (GTS_OBJECT (p), (FILE *) data[0]);
+  fputc ('\n', (FILE *) data[0]);
+  GTS_OBJECT (p)->reserved = GUINT_TO_POINTER (++(*((guint *) data[1])));
+}
+
+static void write_edge (GtsSegment * s, gpointer * data) 
+{
+  fprintf ((FILE *) data[0], "%u %u",
+	   GPOINTER_TO_UINT (GTS_OBJECT (s->v1)->reserved),
+	   GPOINTER_TO_UINT (GTS_OBJECT (s->v2)->reserved));
+  if (GTS_OBJECT (s)->klass->write)
+    (*GTS_OBJECT (s)->klass->write) (GTS_OBJECT (s), (FILE *) data[0]);
+  fputc ('\n', (FILE *) data[0]);
+  GTS_OBJECT (s)->reserved = GUINT_TO_POINTER (++(*((guint *) data[1])));
+}
+
+static void write_face (GtsTriangle * t, FILE * fp)
+{
+  fprintf (fp, "%u %u %u",
+	   GPOINTER_TO_UINT (GTS_OBJECT (t->e1)->reserved),
+	   GPOINTER_TO_UINT (GTS_OBJECT (t->e2)->reserved),
+	   GPOINTER_TO_UINT (GTS_OBJECT (t->e3)->reserved));
+  if (GTS_OBJECT (t)->klass->write)
+    (*GTS_OBJECT (t)->klass->write) (GTS_OBJECT (t), fp);
+  fputc ('\n', fp);
+}
+
+static void reset_reserved (GtsTriangle * t)
+{
+  GtsSegment
+    * s1 = GTS_SEGMENT (t->e1), 
+    * s2 = GTS_SEGMENT (t->e2), 
+    * s3 = GTS_SEGMENT (t->e3);
+
+  GTS_OBJECT (s1)->reserved = NULL;
+  GTS_OBJECT (s2)->reserved = NULL;
+  GTS_OBJECT (s3)->reserved = NULL;
+  GTS_OBJECT (s1->v1)->reserved = GTS_OBJECT (s1->v2)->reserved = NULL;
+  GTS_OBJECT (s2->v1)->reserved = GTS_OBJECT (s2->v2)->reserved = NULL;
+  GTS_OBJECT (s3->v1)->reserved = GTS_OBJECT (s3->v2)->reserved = NULL;
+}
+
+/**
+ * gts_surface_write:
+ * @s: a #GtsSurface.
+ * @fptr: a file pointer.
+ * 
+ * Writes in the file @fptr an ASCII representation of @s. The file
+ * format is as follows. 
+ *
+ * All the lines beginning with #GTS_COMMENTS are ignored. The first line
+ * contains three unsigned integers separated by spaces. The first
+ * integer is the number of vertices, nv, the second is the number of
+ * edges, ne and the third is the number of faces, nf.
+ *
+ * Follows nv lines containing the x, y and z coordinates of the
+ * vertices.  Follows ne lines containing the two indices (starting
+ * from one) of the vertices of each edge. Follows nf lines containing
+ * the three ordered indices (also starting from one) of the edges of
+ * each face.  
+ *
+ * The format described above is the least common denominator to all
+ * GTS files.  Consistent with an object-oriented approach, the GTS
+ * file format is extensible. Each of the lines of the file can be
+ * extended with user-specific attributes accessible through the
+ * read() and write() virtual methods of each of the objects written
+ * (surface, vertices, edges or faces). When read with different
+ * object classes, these extra attributes are just ignored.  
+ */
+void gts_surface_write (GtsSurface * s, FILE * fptr)
+{
+  guint n;
+  gpointer data[2];
+  GtsSurfaceStats stats;
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  data[0] = fptr;
+  data[1] = &n;
+
+  gts_surface_stats (s, &stats);
+  fprintf (fptr, "%u %u %u", 
+	   stats.edges_per_vertex.n, 
+	   stats.faces_per_edge.n, 
+	   stats.n_faces);
+  if (GTS_OBJECT (s)->klass->write)
+    (*GTS_OBJECT (s)->klass->write) (GTS_OBJECT (s), fptr);
+  fputc ('\n', fptr);
+  n = 0;
+  gts_surface_foreach_vertex (s, (GtsFunc) write_vertex, data);
+  n = 0;
+  gts_surface_foreach_edge (s, (GtsFunc) write_edge, data);
+  gts_surface_foreach_face (s, (GtsFunc) write_face, fptr);
+  gts_surface_foreach_face (s, (GtsFunc) reset_reserved, NULL);
+}
+
+static void write_vertex_oogl (GtsPoint * p, gpointer * data)
+{
+  FILE * fp = data[0];
+
+  fprintf (fp, "%g %g %g", p->x, p->y, p->z);
+  if (GTS_OBJECT (p)->klass->color) {
+    GtsColor c = (* GTS_OBJECT (p)->klass->color) (GTS_OBJECT (p));
+    fprintf (fp, " %g %g %g 1.0\n", c.r, c.g, c.b);
+  }
+  else
+    fputc ('\n', fp);
+  GTS_OBJECT (p)->reserved = GUINT_TO_POINTER ((*((guint *) data[1]))++);
+}
+
+static void write_face_oogl (GtsTriangle * t, FILE * fp)
+{
+  GtsVertex * v1, * v2, * v3;
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+  fprintf (fp, "3 %u %u %u",
+	   GPOINTER_TO_UINT (GTS_OBJECT (v1)->reserved),
+	   GPOINTER_TO_UINT (GTS_OBJECT (v2)->reserved),
+	   GPOINTER_TO_UINT (GTS_OBJECT (v3)->reserved));
+  if (GTS_OBJECT (t)->klass->color) {
+    GtsColor c = (* GTS_OBJECT (t)->klass->color) (GTS_OBJECT (t));
+    fprintf (fp, " %g %g %g\n", c.r, c.g, c.b);
+  }
+  else
+    fputc ('\n', fp);
+}
+
+/**
+ * gts_surface_write_oogl:
+ * @s: a #GtsSurface.
+ * @fptr: a file pointer.
+ * 
+ * Writes in the file @fptr an OOGL (Geomview) representation of @s.
+ */
+void gts_surface_write_oogl (GtsSurface * s, FILE * fptr)
+{
+  guint n = 0;
+  gpointer data[2];
+  GtsSurfaceStats stats;
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  data[0] = fptr;
+  data[1] = &n;
+
+  gts_surface_stats (s, &stats);
+  if (GTS_OBJECT_CLASS (s->vertex_class)->color)
+    fputs ("COFF ", fptr);
+  else
+    fputs ("OFF ", fptr);
+  fprintf (fptr, "%u %u %u\n", 
+	   stats.edges_per_vertex.n, 
+	   stats.n_faces,
+	   stats.faces_per_edge.n);
+  gts_surface_foreach_vertex (s, (GtsFunc) write_vertex_oogl, data);
+  gts_surface_foreach_face (s, (GtsFunc) write_face_oogl, fptr);
+  gts_surface_foreach_vertex (s, (GtsFunc) gts_object_reset_reserved, NULL);
+}
+
+static void write_edge_oogl_boundary (GtsSegment * s, gpointer * data)
+{
+  if (!gts_edge_is_boundary (GTS_EDGE (s), data[1]))
+    return;
+
+  if (GTS_OBJECT (s)->klass->color) {
+    GtsColor c = (* GTS_OBJECT (s)->klass->color) (GTS_OBJECT (s));
+    fprintf (data[0], "VECT 1 2 1 2 1 %g %g %g %g %g %g %g %g %g 1.\n",
+	     GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v1)->z,
+	     GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y, GTS_POINT (s->v2)->z,
+	     c.r, c.g, c.b);
+  }
+  else
+    fprintf (data[0], "VECT 1 2 0 2 0 %g %g %g %g %g %g\n",
+	     GTS_POINT (s->v1)->x, GTS_POINT (s->v1)->y, GTS_POINT (s->v1)->z,
+	     GTS_POINT (s->v2)->x, GTS_POINT (s->v2)->y, GTS_POINT (s->v2)->z);
+}
+
+/**
+ * gts_surface_write_oogl_boundary:
+ * @s: a #GtsSurface.
+ * @fptr: a file pointer.
+ * 
+ * Writes in the file @fptr an OOGL (Geomview) representation of the
+ * boundary of @s.  
+ */
+void gts_surface_write_oogl_boundary (GtsSurface * s, FILE * fptr)
+{
+  gpointer data[2];
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  data[0] = fptr;
+  data[1] = s;
+  fputs ("LIST {\n", fptr);
+  gts_surface_foreach_edge (s, (GtsFunc) write_edge_oogl_boundary, data);
+  fputs ("}\n", fptr);
+}
+
+static void vertex_foreach_face (GtsTriangle * t,
+				 gpointer t_data,
+				 gpointer * info)
+{
+  GHashTable * hash = info[0];
+  gpointer data = info[1];
+  GtsFunc func = info[2];
+  GtsSegment 
+    * s1 = GTS_SEGMENT (t->e1);
+
+  if (!g_hash_table_lookup (hash, s1->v1)) {
+    (*func) (s1->v1, data);
+    g_hash_table_insert (hash, s1->v1, GINT_TO_POINTER (-1));
+  }
+  if (!g_hash_table_lookup (hash, s1->v2)) {
+    (*func) (s1->v2, data);
+    g_hash_table_insert (hash, s1->v2, GINT_TO_POINTER (-1));
+  }
+  if (!g_hash_table_lookup (hash, gts_triangle_vertex (t))) {
+    (*func) (gts_triangle_vertex (t), data);
+    g_hash_table_insert (hash, gts_triangle_vertex (t), 
+			 GINT_TO_POINTER (-1));
+  }
+}
+
+/**
+ * gts_surface_foreach_vertex:
+ * @s: a #GtsSurface.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func once for each vertex of @s.
+ */
+void gts_surface_foreach_vertex (GtsSurface * s, GtsFunc func, gpointer data)
+{
+  gpointer info[3];
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (func != NULL);
+
+  /* forbid removal of faces */
+  s->keep_faces = TRUE;
+  info[0] = g_hash_table_new (NULL, NULL);
+  info[1] = data;
+  info[2] = func;
+  g_hash_table_foreach (s->faces, (GHFunc) vertex_foreach_face, info);
+  g_hash_table_destroy (info[0]);
+  /* allow removal of faces */
+  s->keep_faces = FALSE;
+}
+
+static void edge_foreach_face (GtsTriangle * t,
+			       gpointer t_data, 
+			       gpointer * info)
+{
+  GHashTable * hash = info[0];
+  gpointer data = info[1];
+  GtsFunc func = info[2];
+
+  if (!g_hash_table_lookup (hash, t->e1)) {
+    (*func) (t->e1, data);
+    g_hash_table_insert (hash, t->e1, GINT_TO_POINTER (-1));
+  }
+  if (!g_hash_table_lookup (hash, t->e2)) {
+    (*func) (t->e2, data);
+    g_hash_table_insert (hash, t->e2, GINT_TO_POINTER (-1));
+  }
+  if (!g_hash_table_lookup (hash, t->e3)) {
+    (*func) (t->e3, data);
+    g_hash_table_insert (hash, t->e3, GINT_TO_POINTER (-1));
+  }
+}
+
+/**
+ * gts_surface_foreach_edge:
+ * @s: a #GtsSurface.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func once for each edge of @s.
+ */
+void gts_surface_foreach_edge (GtsSurface * s, GtsFunc func, gpointer data)
+{
+  gpointer info[3];
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (func != NULL);
+  
+  /* forbid removal of faces */
+  s->keep_faces = TRUE;
+  info[0] = g_hash_table_new (NULL, NULL);
+  info[1] = data;
+  info[2] = func;
+  g_hash_table_foreach (s->faces, (GHFunc)edge_foreach_face, info);
+  g_hash_table_destroy (info[0]);
+  /* allow removal of faces */
+  s->keep_faces = FALSE;
+}
+
+#if 0
+
+/* Due to an unkown reason g_hash_table_foreach does not allow to stop 
+ * the loop, hence the redefinition. I hope they don't change
+ * the GHashTable, GHashNode structures ... */
+typedef struct _GHashNode      GHashNode;
+
+struct _GHashNode
+{
+  gpointer key;
+  gpointer value;
+  GHashNode *next;
+};
+
+struct _GHashTable
+{
+  gint size;
+  gint nnodes;
+  guint frozen;
+  GHashNode **nodes;
+  GHashFunc hash_func;
+  GCompareFunc key_compare_func;
+};
+
+/**
+ * gts_surface_foreach_face:
+ * @s: a #GtsSurface.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func once for each face of @s.
+ */
+void gts_surface_foreach_face (GtsSurface * s,
+			       GtsFunc func, 
+			       gpointer data)
+{
+  guint i;
+  GHashNode * node;
+  gboolean stop = FALSE;
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (func != NULL);
+
+  /* forbid removal of faces */
+  s->keep_faces = TRUE;
+  for (i = 0; i < s->faces->size && !stop; i++)
+    for (node = s->faces->nodes[i]; node && !stop; node = node->next)
+      stop = !(* func) (node->key, data);
+  /* allow removal of faces */
+  s->keep_faces = FALSE;
+}
+
+#else
+
+static void foreach_face (GtsFace * f, 
+			  gpointer t_data,
+			  gpointer * info)
+{
+  (*((GtsFunc) info[0])) (f, info[1]);
+}
+
+/**
+ * gts_surface_foreach_face:
+ * @s: a #GtsSurface.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func once for each face of @s.
+ */
+void gts_surface_foreach_face (GtsSurface * s,
+			       GtsFunc func, 
+			       gpointer data)
+{
+  gpointer info[2];
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (func != NULL);
+
+  /* forbid removal of faces */
+  s->keep_faces = TRUE;
+  info[0] = func;
+  info[1] = data;
+  g_hash_table_foreach (s->faces, (GHFunc)foreach_face, info);
+  /* allow removal of faces */
+  s->keep_faces = FALSE;
+}
+
+#endif
+
+static gboolean foreach_face_remove (GtsFace * f,
+				     gpointer t_data,
+				     gpointer * info)
+{
+  if ((*((GtsFunc) info[0])) (f, info[1])) {
+    GtsSurface * s = info[2];
+
+    f->surfaces = g_slist_remove (f->surfaces, s);
+    if (!GTS_OBJECT_DESTROYED (f) &&
+	!gts_allow_floating_faces && 
+	f->surfaces == NULL)
+      gts_object_destroy (GTS_OBJECT (f));
+    
+    if (GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face)
+      (* GTS_SURFACE_CLASS (GTS_OBJECT (s)->klass)->remove_face) (s, f);
+
+    return TRUE;
+  }
+  return FALSE;
+}
+
+/**
+ * gts_surface_foreach_face_remove:
+ * @s: a #GtsSurface.
+ * @func: a #GtsFunc.
+ * @data: user data to be passed to @func.
+ *
+ * Calls @func once for each face of @s. If @func returns %TRUE the
+ * corresponding face is removed from @s (and destroyed if it does not
+ * belong to any other surface and #gts_allow_floating_faces is set to
+ * %FALSE).
+ *
+ * Returns: the number of faces removed from @s.  
+ */
+guint gts_surface_foreach_face_remove (GtsSurface * s,
+				       GtsFunc func, 
+				       gpointer data)
+{
+  gpointer info[3];
+  guint n;
+
+  g_return_val_if_fail (s != NULL, 0);
+  g_return_val_if_fail (func != NULL, 0);
+
+  /* forbid removal of faces */
+  s->keep_faces = TRUE;
+  info[0] = func;
+  info[1] = data;
+  info[2] = s;
+  n = g_hash_table_foreach_remove (s->faces, 
+				   (GHRFunc) foreach_face_remove, 
+				   info);
+  /* allow removal of faces */
+  s->keep_faces = FALSE;
+  
+  return n;
+}
+
+static void midvertex_insertion (GtsEdge * e,
+				 GtsSurface * surface,
+				 GtsHeap * heap,
+				 GtsVertexClass * vertex_class,
+				 GtsEdgeClass * edge_class)
+{
+  GtsVertex * midvertex;
+  GtsEdge * e1, * e2;
+  GSList * i;
+
+  midvertex = gts_segment_midvertex (GTS_SEGMENT (e), vertex_class);
+  e1 = gts_edge_new (edge_class, GTS_SEGMENT (e)->v1, midvertex);
+  gts_heap_insert (heap, e1);
+  e2 = gts_edge_new (edge_class, GTS_SEGMENT (e)->v2, midvertex);
+  gts_heap_insert (heap, e2);
+  
+  /* creates new faces and modifies old ones */
+  i = e->triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    GtsVertex * v1, * v2, * v3;
+    GtsEdge * te2, * te3, * ne, * tmp;
+
+    gts_triangle_vertices_edges (t, e, &v1, &v2, &v3, &e, &te2, &te3);
+    ne = gts_edge_new (edge_class, midvertex, v3);
+    gts_heap_insert (heap, ne);
+    if (GTS_SEGMENT (e1)->v1 == v2) {
+      tmp = e1; e1 = e2; e2 = tmp;
+    }
+    e1->triangles = g_slist_prepend (e1->triangles, t);
+    ne->triangles = g_slist_prepend (ne->triangles, t);
+    te2->triangles = g_slist_remove (te2->triangles, t);
+    t->e1 = e1; t->e2 = ne; t->e3 = te3;
+    gts_surface_add_face (surface, 
+			  gts_face_new (surface->face_class, e2, te2, ne));
+    i = i->next;
+  }
+  /* destroys edge */
+  g_slist_free (e->triangles);
+  e->triangles = NULL;
+  gts_object_destroy (GTS_OBJECT (e));
+}
+
+static gint edge_is_longer (GtsSegment * s1, GtsSegment * s2)
+{
+  if (gts_point_distance2 (GTS_POINT (s1->v1), GTS_POINT (s1->v2)) >
+      gts_point_distance2 (GTS_POINT (s2->v1), GTS_POINT (s2->v2)))
+    return -1;
+  return 1;
+}
+
+static void create_heap_refine (GtsEdge * e, GtsHeap * heap)
+{
+  gts_heap_insert (heap, e);
+}
+
+/**
+ * gts_surface_refine:
+ * @surface: a #GtsSurface.
+ * @compare_func: a GCompareFunc.
+ * @stop_func: a #GtsStopFunc.
+ * @data: user data to be passed to @stop_func.
+ *
+ * Refine @surface using a midvertex insertion technique. All the
+ * edges of @surface are ordered according to @compare_func. The edges
+ * are then processed in order until @stop_func returns %TRUE. Each
+ * edge is split in two and new edges and faces are created.
+ *
+ * If @compare_func is set to %NULL an internal function comparing the
+ * squared length of the edges is used.  
+ */
+void gts_surface_refine (GtsSurface * surface,
+			 GCompareFunc compare_func,
+			 GtsStopFunc stop_func,
+			 gpointer data)
+{
+  GtsHeap * heap;
+  GtsEdge * e;
+
+  g_return_if_fail (surface != NULL);
+  g_return_if_fail (stop_func != NULL);
+
+  if (compare_func == NULL)
+    compare_func = (GCompareFunc) edge_is_longer;
+
+  heap = gts_heap_new (compare_func);
+  gts_heap_freeze (heap);
+  gts_surface_foreach_edge (surface, (GtsFunc)create_heap_refine, heap);
+  gts_heap_thaw (heap);
+  while ((e = gts_heap_remove_top (heap)) &&
+	 !(*stop_func) (gts_point_distance (GTS_POINT (GTS_SEGMENT (e)->v1), 
+					    GTS_POINT (GTS_SEGMENT (e)->v2)),
+			gts_heap_size (heap) + 
+			gts_edge_face_number (e, surface) + 2,
+			data))
+    midvertex_insertion (e, surface, heap, 
+			 surface->vertex_class, surface->edge_class);
+  gts_heap_destroy (heap);
+}
+
+static GSList * edge_triangles (GtsEdge * e1, GtsEdge * e)
+{
+  GSList * i = e1->triangles;
+  GSList * triangles = NULL;
+  
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (t->e1 == e || t->e2 == e || t->e3 == e) {
+      GtsEdge * e2;
+      GSList * j;
+      if (t->e1 == e) {
+	if (t->e2 == e1)
+	  e2 = t->e3;
+	else
+	  e2 = t->e2;
+      }
+      else if (t->e2 == e) {
+	if (t->e3 == e1)
+	  e2 = t->e1;
+	else
+	  e2 = t->e3;
+      }
+      else {
+	if (t->e2 == e1)
+	  e2 = t->e1;
+	else
+	  e2 = t->e2;
+      }
+      j = e2->triangles;
+      while (j) {
+	GtsTriangle * t = j->data;
+	if (t->e1 != e && t->e2 != e && t->e3 != e)
+	  triangles = g_slist_prepend (triangles, t);
+	j = j->next;
+      }
+    }
+    else
+      triangles = g_slist_prepend (triangles, t);
+    i = i->next;
+  }
+  return triangles;
+}
+
+static void replace_vertex (GSList * i, GtsVertex * v1, GtsVertex * v)
+{
+  while (i) {
+    GtsSegment * s = i->data;
+    if (s->v1 == v1)
+      s->v1 = v;
+    else
+      s->v2 = v;
+    i = i->next;
+  }
+}
+
+/**
+ * gts_edge_collapse_creates_fold:
+ * @e: a #GtsEdge.
+ * @v: a #GtsVertex.
+ * @max:  the maximum value of the square of the cosine of the angle between
+ * two triangles.
+ *
+ * Returns: %TRUE if collapsing edge @e to vertex @v would create
+ * faces making an angle the cosine squared of which would be larger than max,
+ * %FALSE otherwise.  
+ */
+gboolean gts_edge_collapse_creates_fold (GtsEdge * e, 
+					 GtsVertex * v,
+					 gdouble max)
+{
+  GtsVertex * v1, * v2;
+  GtsSegment * s;
+  GSList * i;
+  gboolean folded = FALSE;
+
+  g_return_val_if_fail (e != NULL, TRUE);
+  g_return_val_if_fail (v != NULL, TRUE);
+
+  s = GTS_SEGMENT (e);
+  v1 = s->v1;
+  v2 = s->v2;
+  replace_vertex (v1->segments, v1, v);
+  replace_vertex (v2->segments, v2, v);
+
+  i = v1->segments;
+  while (i && !folded) {
+    GtsSegment * s = i->data;
+    if (GTS_IS_EDGE (s)) {
+      GtsEdge * e1 = GTS_EDGE (s);
+      if (e1 != e) {
+	GSList * triangles = edge_triangles (e1, e);
+	folded = gts_triangles_are_folded (triangles, s->v1, s->v2, max);
+	g_slist_free (triangles);
+      }
+    }
+    i = i->next;
+  }
+
+  i = v2->segments;
+  while (i && !folded) {
+    GtsSegment * s = i->data;
+    if (GTS_IS_EDGE (s)) {
+      GtsEdge * e1 = GTS_EDGE (s);
+      if (e1 != e) {
+	GSList * triangles = edge_triangles (e1, e);
+	folded = gts_triangles_are_folded (triangles, s->v1, s->v2, max);
+	g_slist_free (triangles);
+      }
+    }
+    i = i->next;
+  }
+#if 1
+  if (!folded) {
+    GSList * triangles = gts_vertex_triangles (v1, NULL);
+    i = triangles = gts_vertex_triangles (v2, triangles);
+    while (i && !folded) {
+      GtsTriangle * t = i->data;
+      if (t->e1 != e && t->e2 != e && t->e3 != e) {
+	GtsEdge * e1 = gts_triangle_edge_opposite (t, v);
+	g_assert (e1);
+	folded = gts_triangles_are_folded (e1->triangles, 
+					   GTS_SEGMENT (e1)->v1,
+					   GTS_SEGMENT (e1)->v2,
+					   max);
+      }
+      i = i->next;
+    }
+    g_slist_free (triangles);
+  }
+#endif
+  replace_vertex (v1->segments, v, v1);
+  replace_vertex (v2->segments, v, v2);
+  return folded;
+}
+
+/**
+ * gts_edge_collapse_is_valid:
+ * @e: a #GtsEdge.
+ *
+ * An implementation of the topological constraints described in the 
+ * "Mesh Optimization" article of Hoppe et al (1993).
+ *
+ * Returns: %TRUE if @e can be collapsed without violation of the topological
+ * constraints, %FALSE otherwise.
+ */
+gboolean gts_edge_collapse_is_valid (GtsEdge * e)
+{
+  GSList * i;
+
+  g_return_val_if_fail (e != NULL, FALSE);
+
+  i = GTS_SEGMENT (e)->v1->segments;
+  while (i) {
+    GtsEdge * e1 = i->data;
+    if (e1 != e && GTS_IS_EDGE (e1)) {
+      GtsEdge * e2 = NULL;
+      GSList * j = GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v1 ? 
+	GTS_SEGMENT (e1)->v2->segments : GTS_SEGMENT (e1)->v1->segments;
+      while (j && !e2) {
+	GtsEdge * e1 = j->data;
+	if (GTS_IS_EDGE (e1) && 
+	    (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e)->v2 || 
+	     GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e)->v2))
+	  e2 = e1;
+	j = j->next;
+      }
+      if (e2 && !gts_triangle_use_edges (e, e1, e2))
+	return FALSE;
+    }
+    i = i->next;
+  }
+
+  if (gts_edge_is_boundary (e, NULL)) {
+    GtsTriangle * t = e->triangles->data;
+    if (gts_edge_is_boundary (t->e1, NULL) &&
+	gts_edge_is_boundary (t->e2, NULL) &&
+	gts_edge_is_boundary (t->e3, NULL))
+      return FALSE;
+  }
+  else {
+    if (gts_vertex_is_boundary (GTS_SEGMENT (e)->v1, NULL) &&
+	gts_vertex_is_boundary (GTS_SEGMENT (e)->v2, NULL))
+      return FALSE;    
+    if (gts_edge_belongs_to_tetrahedron (e))
+      return FALSE;
+  }
+
+  return TRUE;
+}
+
+#define HEAP_INSERT_EDGE(h, e) (GTS_OBJECT (e)->reserved = gts_eheap_insert (h, e))
+#define HEAP_REMOVE_EDGE(h, e) (gts_eheap_remove (h, GTS_OBJECT (e)->reserved),\
+                                GTS_OBJECT (e)->reserved = NULL)
+
+static GtsVertex * edge_collapse (GtsEdge * e,
+				  GtsEHeap * heap,
+				  GtsCoarsenFunc coarsen_func,
+				  gpointer coarsen_data,
+				  GtsVertexClass * klass,
+				  gdouble maxcosine2)
+{
+  GSList * i;
+  GtsVertex  * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid;
+
+  /* if the edge is degenerate (i.e. v1 == v2), destroy and return */
+  if (v1 == v2) {
+    gts_object_destroy (GTS_OBJECT (e));
+    return NULL;
+  }
+
+  if (!gts_edge_collapse_is_valid (e)) {
+    GTS_OBJECT (e)->reserved = 
+      gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE);
+    return NULL;
+  }
+
+  mid = (*coarsen_func) (e, klass, coarsen_data);
+
+  if (gts_edge_collapse_creates_fold (e, mid, maxcosine2)) {
+    GTS_OBJECT (e)->reserved = 
+      gts_eheap_insert_with_key (heap, e, G_MAXDOUBLE);
+    gts_object_destroy (GTS_OBJECT (mid));
+    return NULL;
+  }
+
+  gts_object_destroy (GTS_OBJECT (e));
+
+  gts_vertex_replace (v1, mid);
+  gts_object_destroy (GTS_OBJECT (v1));
+  gts_vertex_replace (v2, mid);
+  gts_object_destroy (GTS_OBJECT (v2));
+
+  /* destroy duplicate edges */
+  i = mid->segments;
+  while (i) {
+    GtsEdge * e1 = i->data;
+    GtsEdge * duplicate;
+    while ((duplicate = gts_edge_is_duplicate (e1))) {
+      gts_edge_replace (duplicate, GTS_EDGE (e1));
+      HEAP_REMOVE_EDGE (heap, duplicate);
+      gts_object_destroy (GTS_OBJECT (duplicate));
+    }
+    i = i->next;
+    if (!e1->triangles) {
+      /* e1 is the result of the collapse of one edge of a pair of identical
+	 faces (it should not happen unless duplicate triangles are present in
+	 the initial surface) */
+      g_warning ("file %s: line %d (%s): probably duplicate triangle.",
+		 __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION);
+      HEAP_REMOVE_EDGE (heap, e1);
+      gts_object_destroy (GTS_OBJECT (e1));
+      if (i == NULL) /* mid has been destroyed */
+	mid = NULL;
+    }
+  }
+
+  return mid;
+}
+
+static void update_closest_neighbors (GtsVertex * v, GtsEHeap * heap)
+{
+  GSList * i = v->segments;
+  
+  while (i) {
+    GtsSegment * s = i->data;
+    if (GTS_IS_EDGE (s)) {
+      HEAP_REMOVE_EDGE (heap, GTS_EDGE (s));
+      HEAP_INSERT_EDGE (heap, GTS_EDGE (s));
+    }
+    i = i->next;
+  }
+}
+
+static void update_2nd_closest_neighbors (GtsVertex * v, GtsEHeap * heap)
+{
+  GSList * i = v->segments;
+  GSList * list = NULL;
+  
+  while (i) {
+    GtsSegment * s = i->data;
+    if (GTS_IS_EDGE (s)) {
+      GtsVertex * v1 = s->v1 == v ? s->v2 : s->v1;
+      GSList * j = v1->segments;
+      while (j) {
+	GtsSegment * s1 = j->data;
+	if (GTS_IS_EDGE (s1) && !g_slist_find (list, s1))
+	  list = g_slist_prepend (list, s1);
+	j = j->next;
+      }
+    }
+    i = i->next;
+  }
+
+  i = list;
+  while (i) {
+    GtsEdge * e = i->data;
+    HEAP_REMOVE_EDGE (heap, e);
+    HEAP_INSERT_EDGE (heap, e);
+    i = i->next;
+  }
+
+  g_slist_free (list);
+}
+
+static gdouble edge_length2 (GtsEdge * e)
+{
+  return gts_point_distance2 (GTS_POINT (GTS_SEGMENT (e)->v1), 
+			      GTS_POINT (GTS_SEGMENT (e)->v2));
+}
+
+static void create_heap_coarsen (GtsEdge * e, GtsEHeap * heap)
+{
+  HEAP_INSERT_EDGE (heap, e);
+}
+
+/**
+ * gts_surface_coarsen:
+ * @surface: a #GtsSurface.
+ * @cost_func: a function returning the cost for a given edge.
+ * @cost_data: user data to be passed to @cost_func.
+ * @coarsen_func: a #GtsCoarsenVertexFunc.
+ * @coarsen_data: user data to be passed to @coarsen_func.
+ * @stop_func: a #GtsStopFunc.
+ * @stop_data: user data to be passed to @stop_func.
+ * @minangle: minimum angle between two neighboring triangles.
+ *
+ * The edges of @surface are sorted according to @cost_func to 
+ * create a priority heap (a #GtsEHeap). The edges are extracted in
+ * turn from the top of the heap and collapsed (i.e. the vertices are
+ * replaced by the vertex returned by the @coarsen_func function)
+ * until the @stop_func functions returns %TRUE.
+ *
+ * If @cost_func is set to %NULL, the edges are sorted according 
+ * to their length squared (the shortest is on top).
+ *
+ * If @coarsen_func is set to %NULL gts_segment_midvertex() is used.
+ *
+ * The minimum angle is used to avoid introducing faces which would be folded.
+ */
+void gts_surface_coarsen (GtsSurface * surface,
+			  GtsKeyFunc cost_func,
+			  gpointer cost_data,
+			  GtsCoarsenFunc coarsen_func,
+			  gpointer coarsen_data,
+			  GtsStopFunc stop_func,
+			  gpointer stop_data,
+			  gdouble minangle)
+{
+  GtsEHeap * heap;
+  GtsEdge * e;
+  gdouble top_cost;
+  gdouble maxcosine2;
+
+  g_return_if_fail (surface != NULL);
+  g_return_if_fail (stop_func != NULL);
+
+  if (cost_func == NULL)
+    cost_func = (GtsKeyFunc) edge_length2;
+  if (coarsen_func == NULL)
+    coarsen_func = (GtsCoarsenFunc) gts_segment_midvertex;
+
+  heap = gts_eheap_new (cost_func, cost_data);
+  maxcosine2 = cos (minangle); maxcosine2 *= maxcosine2;
+
+  gts_eheap_freeze (heap);
+  gts_surface_foreach_edge (surface, (GtsFunc) create_heap_coarsen, heap);
+  gts_eheap_thaw (heap);
+  /* we want to control edge destruction manually */
+  gts_allow_floating_edges = TRUE;
+  while ((e = gts_eheap_remove_top (heap, &top_cost)) &&
+	 (top_cost < G_MAXDOUBLE) &&
+	 !(*stop_func) (top_cost, gts_eheap_size (heap) - 
+			gts_edge_face_number (e, surface), stop_data))
+    {
+      GtsVertex * v = edge_collapse (e, heap, coarsen_func, coarsen_data,
+				     surface->vertex_class, maxcosine2);
+      if (v != NULL)
+	update_2nd_closest_neighbors (v, heap);
+    }
+  gts_allow_floating_edges = FALSE;
+
+  /* set reserved field of remaining edges back to NULL */
+  if (e) GTS_OBJECT (e)->reserved = NULL;
+  gts_eheap_foreach (heap, (GFunc) gts_object_reset_reserved, NULL);
+
+  gts_eheap_destroy (heap);
+}
+
+/**
+ * gts_coarsen_stop_number:
+ * @cost: the cost of the edge collapse considered.
+ * @nedge: the current number of edges of the surface being simplified.
+ * @min_number: a pointer to the minimum number of edges desired for the 
+ * surface being simplified.
+ *
+ * This function is to be used as the @stop_func argument of 
+ * gts_surface_coarsen() or gts_psurface_new().
+ *
+ * Returns: %TRUE if the edge collapse would create a surface with a smaller 
+ * number of edges than given by @min_number, %FALSE otherwise.
+ */
+gboolean gts_coarsen_stop_number (gdouble cost, 
+				  guint nedge, 
+				  guint * min_number)
+{
+  g_return_val_if_fail (min_number != NULL, TRUE);
+
+  if (nedge < *min_number)
+    return TRUE;
+  return FALSE;
+}
+
+/**
+ * gts_coarsen_stop_cost:
+ * @cost: the cost of the edge collapse considered.
+ * @nedge: the current number of edges of the surface being simplified.
+ * @max_cost: a pointer to the maximum cost allowed for an edge collapse.
+ *
+ * This function is to be used as the @stop_func argument of 
+ * gts_surface_coarsen() or gts_psurface_new().
+ *
+ * Returns: %TRUE if the cost of the edge collapse considered is larger than
+ * given by @max_cost, %FALSE otherwise.
+ */
+gboolean gts_coarsen_stop_cost (gdouble cost, 
+				guint nedge, 
+				gdouble * max_cost)
+{
+  g_return_val_if_fail (max_cost != NULL, TRUE);
+
+  if (cost > *max_cost)
+    return TRUE;
+  return FALSE;
+}
+
+static void foreach_vertex_copy (GtsPoint * p, GtsVertexClass * klass)
+{
+  GTS_OBJECT (p)->reserved = gts_vertex_new (klass, p->x, p->y, p->z);
+}
+
+static void foreach_edge_copy (GtsSegment * s, GtsEdgeClass * klass)
+{
+  GTS_OBJECT (s)->reserved = gts_edge_new (klass,
+					   GTS_OBJECT (s->v1)->reserved, 
+					   GTS_OBJECT (s->v2)->reserved);
+}
+
+static void foreach_face_copy (GtsTriangle * t,
+			       GtsSurface * s)
+{
+  gts_surface_add_face (s, gts_face_new (s->face_class,
+					 GTS_OBJECT (t->e1)->reserved,
+					 GTS_OBJECT (t->e2)->reserved,
+					 GTS_OBJECT (t->e3)->reserved));
+}
+
+/**
+ * gts_surface_copy:
+ * @s1: a #GtsSurface.
+ * @s2: a #GtsSurface.
+ *
+ * Add a copy of all the faces, edges and vertices of @s2 to @s1.
+ *
+ * Returns: @s1.
+ */
+GtsSurface * gts_surface_copy (GtsSurface * s1, GtsSurface * s2)
+{
+  g_return_val_if_fail (s1 != NULL, NULL);
+  g_return_val_if_fail (s2 != NULL, NULL);
+  
+  gts_surface_foreach_vertex (s2, (GtsFunc) foreach_vertex_copy, 
+			      s1->vertex_class);
+  gts_surface_foreach_edge (s2, (GtsFunc) foreach_edge_copy, s1->edge_class);
+  gts_surface_foreach_face (s2, (GtsFunc) foreach_face_copy, s1);
+
+  gts_surface_foreach_vertex (s2, (GtsFunc) gts_object_reset_reserved, NULL);
+  gts_surface_foreach_edge (s2, (GtsFunc) gts_object_reset_reserved, NULL);
+  
+  return s1;
+}
+
+static void merge_foreach_face (GtsFace * f, 
+				GtsSurface * s)
+{
+  gts_surface_add_face (s, f);
+}
+
+/**
+ * gts_surface_merge:
+ * @s: a #GtsSurface.
+ * @with: another #GtsSurface.
+ *
+ * Adds all the faces of @with which do not already belong to @s
+ * to @s.
+ */
+void gts_surface_merge (GtsSurface * s, GtsSurface * with)
+{
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (with != NULL);
+  
+  gts_surface_foreach_face (with, (GtsFunc) merge_foreach_face, s);
+}
+
+static void manifold_foreach_edge (GtsEdge * e, gpointer * data)
+{
+  gboolean * is_manifold = data[0];
+
+  if (*is_manifold) {
+    if (gts_edge_face_number (e, data[1]) > 2)
+      *is_manifold = FALSE;
+  }
+}
+
+/**
+ * gts_surface_is_manifold:
+ * @s: a #GtsSurface.
+ *
+ * Returns: %TRUE if the surface is a manifold, %FALSE otherwise.
+ */
+gboolean gts_surface_is_manifold (GtsSurface * s)
+{
+  gboolean is_manifold = TRUE;
+  gpointer data[2];
+
+  g_return_val_if_fail (s != NULL, FALSE);
+
+  data[0] = &is_manifold;
+  data[1] = s;
+  gts_surface_foreach_edge (s, (GtsFunc) manifold_foreach_edge, data);
+  return is_manifold;
+}
+
+static void closed_foreach_edge (GtsEdge * e, gpointer * data)
+{
+  gboolean * is_closed = data[0];
+
+  if (*is_closed) {
+    if (gts_edge_face_number (e, data[1]) != 2)
+      *is_closed = FALSE;
+  }
+}
+
+/**
+ * gts_surface_is_closed:
+ * @s: a #GtsSurface.
+ *
+ * Returns: %TRUE if @s is a closed surface, %FALSE otherwise. Note that a
+ * closed surface is also a manifold.
+ */
+gboolean gts_surface_is_closed (GtsSurface * s)
+{
+  gboolean is_closed = TRUE;
+  gpointer data[2];
+
+  g_return_val_if_fail (s != NULL, FALSE);
+
+  data[0] = &is_closed;
+  data[1] = s;
+  gts_surface_foreach_edge (s, (GtsFunc) closed_foreach_edge, data);
+  return is_closed;
+}
+
+static void orientable_foreach_edge (GtsEdge * e, gpointer * data)
+{
+  gboolean * is_orientable = data[0];
+
+  if (*is_orientable) {
+    GtsSurface * surface = data[1];
+    GtsFace * f1 = NULL, * f2 = NULL;
+    GSList * i = e->triangles;
+    while (i && *is_orientable) {
+      GtsFace * f = i->data;
+      if (GTS_IS_FACE (f) && gts_face_has_parent_surface (f, surface)) {
+	if (!f1) f1 = f;
+	else if (!f2) f2 = f;
+	else *is_orientable = FALSE;
+      }
+      i = i->next;
+    }
+    if (f1 && f2 && !gts_triangles_are_compatible (GTS_TRIANGLE (f1), 
+						   GTS_TRIANGLE (f2), e))
+      *is_orientable = FALSE;
+  }
+}
+
+/**
+ * gts_surface_is_orientable:
+ * @s: a #GtsSurface.
+ *
+ * Returns: %TRUE if all the faces of @s have compatible orientation
+ * as checked by gts_faces_are_compatible(), %FALSE otherwise. Note that
+ * an orientable surface is also a manifold.
+ */
+gboolean gts_surface_is_orientable (GtsSurface * s)
+{
+  gboolean is_orientable = TRUE;
+  gpointer data[2];
+
+  g_return_val_if_fail (s != NULL, FALSE);
+
+  data[0] = &is_orientable;
+  data[1] = s;
+  gts_surface_foreach_edge (s, (GtsFunc) orientable_foreach_edge, data);
+  return is_orientable;
+}
+
+static void volume_foreach_face (GtsTriangle * t,
+				 gdouble * volume)
+{
+  GtsVertex * va, * vb, * vc;
+  GtsPoint * pa, * pb, * pc;
+
+  gts_triangle_vertices (t, &va, &vb, &vc);
+  pa = GTS_POINT (va);
+  pb = GTS_POINT (vb);
+  pc = GTS_POINT (vc);
+  
+  *volume += (pa->x * (pb->y * pc->z - pb->z * pc->y) +
+	      pb->x * (pc->y * pa->z - pc->z * pa->y) +
+	      pc->x * (pa->y * pb->z - pa->z * pb->y));
+}
+
+/**
+ * gts_surface_volume:
+ * @s: a #GtsSurface.
+ *
+ * Returns: the signed volume of the domain bounded by the surface @s. It
+ * makes sense only if @s is a closed and orientable manifold.
+ */
+gdouble gts_surface_volume (GtsSurface * s)
+{
+  gdouble volume = 0.0;
+
+  g_return_val_if_fail (s != NULL, 0.0);
+
+  gts_surface_foreach_face (s, (GtsFunc) volume_foreach_face, &volume);
+
+  return volume/6.;
+}
+
+static void number_foreach (gpointer data, guint * n)
+{
+  (*n)++;
+}
+
+/**
+ * gts_surface_vertex_number:
+ * @s: a #GtsSurface.
+ *
+ * Returns: the number of vertices of @s.
+ */
+guint gts_surface_vertex_number (GtsSurface * s)
+{
+  guint n = 0;
+
+  g_return_val_if_fail (s != NULL, 0);
+
+  gts_surface_foreach_vertex (s, (GtsFunc) number_foreach, &n);
+
+  return n;
+}
+
+/**
+ * gts_surface_edge_number:
+ * @s: a #GtsSurface.
+ *
+ * Returns: the number of edges of @s.
+ */
+guint gts_surface_edge_number (GtsSurface * s)
+{
+  guint n = 0;
+
+  g_return_val_if_fail (s != NULL, 0);
+
+  gts_surface_foreach_edge (s, (GtsFunc) number_foreach, &n);
+
+  return n;
+}
+
+/**
+ * gts_surface_face_number:
+ * @s: a #GtsSurface.
+ *
+ * Returns: the number of faces of @s
+ */
+guint gts_surface_face_number (GtsSurface * s)
+{
+  g_return_val_if_fail (s != NULL, 0);
+
+  return g_hash_table_size (s->faces);
+}
+
+static void build_list_face (GtsTriangle * t, GSList ** list)
+{
+  *list = g_slist_prepend (*list, gts_bbox_triangle (gts_bbox_class (), t));
+}
+
+static void build_list_boundary (GtsEdge * e, GSList ** list)
+{
+  if (gts_edge_is_boundary (e, NULL))
+    *list = g_slist_prepend (*list, gts_bbox_segment (gts_bbox_class (),
+						      GTS_SEGMENT (e)));
+}
+
+/**
+ * gts_surface_distance:
+ * @s1: a #GtsSurface.
+ * @s2: a #GtsSurface.
+ * @delta: a spatial increment defined as the percentage of the diagonal
+ * of the bounding box of @s2.
+ * @face_range: a #GtsRange.
+ * @boundary_range: a #GtsRange.
+ *
+ * Using the gts_bb_tree_surface_distance() and
+ * gts_bb_tree_surface_boundary_distance() functions fills @face_range
+ * and @boundary_range with the min, max and average Euclidean
+ * (minimum) distances between the faces of @s1 and the faces of @s2
+ * and between the boundary edges of @s1 and @s2.  
+ */
+void gts_surface_distance (GtsSurface * s1, GtsSurface * s2, gdouble delta,
+			   GtsRange * face_range, GtsRange * boundary_range)
+{
+  GNode * face_tree, * boundary_tree;
+  GSList * bboxes;
+
+  g_return_if_fail (s1 != NULL);
+  g_return_if_fail (s2 != NULL);
+  g_return_if_fail (delta > 0. && delta < 1.);
+  g_return_if_fail (face_range != NULL);
+  g_return_if_fail (boundary_range != NULL);
+
+  bboxes = NULL;
+  gts_surface_foreach_face (s2, (GtsFunc) build_list_face, &bboxes);
+  if (bboxes != NULL) {
+    face_tree = gts_bb_tree_new (bboxes);
+    g_slist_free (bboxes);
+    
+    gts_bb_tree_surface_distance (face_tree, s1, 
+			       (GtsBBoxDistFunc) gts_point_triangle_distance,
+				  delta, face_range);
+    gts_bb_tree_destroy (face_tree, TRUE);
+    
+    bboxes = NULL;
+    gts_surface_foreach_edge (s2, (GtsFunc) build_list_boundary, &bboxes);
+    if (bboxes != NULL) {
+      boundary_tree = gts_bb_tree_new (bboxes);
+      g_slist_free (bboxes);
+
+      gts_bb_tree_surface_boundary_distance (boundary_tree,
+	       s1, 
+	       (GtsBBoxDistFunc) gts_point_segment_distance,
+	       delta, boundary_range);
+      gts_bb_tree_destroy (boundary_tree, TRUE);
+    }
+    else
+      gts_range_reset (boundary_range);
+  }
+  else {
+    gts_range_reset (face_range);
+    gts_range_reset (boundary_range);
+  }
+}
+
+static void surface_boundary (GtsEdge * e, gpointer * data)
+{
+  GSList ** list = data[0];
+
+  if (gts_edge_is_boundary (e, data[1]))
+    *list = g_slist_prepend (*list, e);
+}
+
+/**
+ * gts_surface_boundary:
+ * @surface: a #GtsSurface.
+ *
+ * Returns: a list of #GtsEdge boundary of @surface.
+ */
+GSList * gts_surface_boundary (GtsSurface * surface)
+{
+  GSList * list = NULL;
+  gpointer data[2];
+
+  g_return_val_if_fail (surface != NULL, NULL);
+
+  data[0] = &list;
+  data[1] = surface;
+  gts_surface_foreach_edge (surface, (GtsFunc) surface_boundary, data);
+  
+  return list;
+}
+
+struct _GtsSurfaceTraverse {
+  GtsFifo * q;
+  GtsSurface * s;
+};
+
+/**
+ * gts_surface_traverse_new:
+ * @s: a #GtsSurface.
+ * @f: a #GtsFace belonging to @s.
+ *
+ * Returns: a new #GtsSurfaceTraverse, initialized to start traversing
+ * from face @f of surface @s.  
+ */
+GtsSurfaceTraverse * gts_surface_traverse_new (GtsSurface * s,
+					       GtsFace * f)
+{
+  GtsSurfaceTraverse * t;
+
+  g_return_val_if_fail (s != NULL, NULL);
+  g_return_val_if_fail (f != NULL, NULL);
+  g_return_val_if_fail (gts_face_has_parent_surface (f, s), NULL);
+  
+  t = g_malloc (sizeof (GtsSurfaceTraverse));
+  t->q = gts_fifo_new ();
+  t->s = s;
+  GTS_OBJECT (f)->reserved = GUINT_TO_POINTER (1);
+  gts_fifo_push (t->q, f);
+  return t;
+}
+
+static void push_neighbor (GtsFace * v, gpointer * data)
+{
+  if (!GTS_OBJECT (v)->reserved) {
+    GTS_OBJECT (v)->reserved = 
+      GUINT_TO_POINTER (GPOINTER_TO_UINT (GTS_OBJECT (data[1])->reserved) + 1);
+    gts_fifo_push (data[0], v);
+  }
+}
+
+/**
+ * gts_surface_traverse_next:
+ * @t: a #GtsSurfaceTraverse.
+ * @level: a pointer to a guint or %NULL.
+ *
+ * Returns: the next face of the traversal in breadth-first order or
+ * %NULL if no faces are left. If @level if not %NULL, it is filled
+ * with the level of the returned face (0 for the initial face, 1 for
+ * its neighbors and so on).  
+ */
+GtsFace * gts_surface_traverse_next (GtsSurfaceTraverse * t,
+				     guint * level)
+{
+  GtsFace * u;
+
+  g_return_val_if_fail (t != NULL, NULL);
+
+  u = gts_fifo_pop (t->q);
+  if (u) {
+    gpointer data[2];
+
+    if (level)
+      *level = GPOINTER_TO_UINT (GTS_OBJECT (u)->reserved);
+    data[0] = t->q;
+    data[1] = u;
+    gts_face_foreach_neighbor (u, t->s, (GtsFunc) push_neighbor, data);
+  }
+  return u;
+}
+
+/**
+ * gts_surface_traverse_destroy:
+ * @t: a #GtsSurfaceTraverse.
+ *
+ * Frees all the memory allocated for @t.
+ */
+void gts_surface_traverse_destroy (GtsSurfaceTraverse * t)
+{
+  g_return_if_fail (t != NULL);
+
+  gts_surface_foreach_face (t->s, (GtsFunc) gts_object_reset_reserved, NULL);
+  gts_fifo_destroy (t->q);
+  g_free (t);
+}
+
diff --git a/src/triangle.c b/src/triangle.c
new file mode 100644
index 0000000..72c13e8
--- /dev/null
+++ b/src/triangle.c
@@ -0,0 +1,1060 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include "gts.h"
+
+#ifndef PI
+#define PI 3.14159265359
+#endif
+
+static void triangle_destroy (GtsObject * object)
+{
+  GtsTriangle * triangle = GTS_TRIANGLE (object);
+  GtsEdge * e1 = triangle->e1;
+  GtsEdge * e2 = triangle->e2;
+  GtsEdge * e3 = triangle->e3;
+
+  e1->triangles = g_slist_remove (e1->triangles, triangle);
+  if (!GTS_OBJECT_DESTROYED (e1) &&
+      !gts_allow_floating_edges && e1->triangles == NULL)
+    gts_object_destroy (GTS_OBJECT (e1));
+  
+  e2->triangles = g_slist_remove (e2->triangles, triangle);
+  if (!GTS_OBJECT_DESTROYED (e2) &&
+      !gts_allow_floating_edges && e2->triangles == NULL)
+    gts_object_destroy (GTS_OBJECT (e2));
+  
+  e3->triangles = g_slist_remove (e3->triangles, triangle);
+  if (!GTS_OBJECT_DESTROYED (e3) &&
+      !gts_allow_floating_edges && e3->triangles == NULL)
+    gts_object_destroy (GTS_OBJECT (e3));
+
+  (* GTS_OBJECT_CLASS (gts_triangle_class ())->parent_class->destroy) (object);
+}
+
+static void triangle_class_init (GtsObjectClass * klass)
+{
+  klass->destroy = triangle_destroy;
+}
+
+static void triangle_init (GtsTriangle * triangle)
+{
+  triangle->e1 = triangle->e2 = triangle->e3 = NULL;
+}
+
+/**
+ * gts_triangle_class:
+ *
+ * Returns: the #GtsTriangleClass.
+ */
+GtsTriangleClass * gts_triangle_class (void)
+{
+  static GtsTriangleClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo triangle_info = {
+      "GtsTriangle",
+      sizeof (GtsTriangle),
+      sizeof (GtsTriangleClass),
+      (GtsObjectClassInitFunc) triangle_class_init,
+      (GtsObjectInitFunc) triangle_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (gts_object_class (), 
+				  &triangle_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_triangle_set:
+ * @triangle: a #GtsTriangle.
+ * @e1: a #GtsEdge.
+ * @e2: another #GtsEdge touching @e1.
+ * @e3: another #GtsEdge touching both @e1 and @e2.
+ *
+ * Sets the edge of @triangle to @e1, @e2 and @e3 while checking that they
+ * define a valid triangle.
+ */
+void gts_triangle_set (GtsTriangle * triangle, 
+		       GtsEdge * e1, 
+		       GtsEdge * e2,
+		       GtsEdge * e3)
+{
+  g_return_if_fail (e1 != NULL);
+  g_return_if_fail (e2 != NULL);
+  g_return_if_fail (e3 != NULL);
+  g_return_if_fail (e1 != e2 && e1 != e3 && e2 != e3);
+
+  triangle->e1 = e1;
+  triangle->e2 = e2;
+  triangle->e3 = e3;
+
+  if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v1)
+    g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), 
+					   GTS_SEGMENT (e1)->v2, 
+					   GTS_SEGMENT (e2)->v2));
+  else if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v1)
+    g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), 
+					   GTS_SEGMENT (e1)->v1, 
+					   GTS_SEGMENT (e2)->v2));
+  else if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v2)
+    g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), 
+					   GTS_SEGMENT (e1)->v1, 
+					   GTS_SEGMENT (e2)->v1));
+  else if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v2)
+    g_return_if_fail (gts_segment_connect (GTS_SEGMENT (e3), 
+					   GTS_SEGMENT (e1)->v2, 
+					   GTS_SEGMENT (e2)->v1));
+  else
+    g_assert_not_reached ();
+
+  e1->triangles = g_slist_prepend (e1->triangles, triangle);
+  e2->triangles = g_slist_prepend (e2->triangles, triangle);
+  e3->triangles = g_slist_prepend (e3->triangles, triangle);
+}
+
+/**
+ * gts_triangle_new:
+ * @klass: a #GtsTriangleClass.
+ * @e1: a #GtsEdge.
+ * @e2: another #GtsEdge touching @e1.
+ * @e3: another #GtsEdge touching both @e1 and @e2.
+ *
+ * Returns: a new #GtsTriangle having @e1, @e2 and @e3 as edges.
+ */
+GtsTriangle * gts_triangle_new (GtsTriangleClass * klass,
+				GtsEdge * e1,
+				GtsEdge * e2,
+				GtsEdge * e3)
+{
+  GtsTriangle * t;
+
+  t = GTS_TRIANGLE (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  gts_triangle_set (t, e1, e2, e3);
+  
+  return t;
+}
+
+/**
+ * gts_triangle_vertex_opposite:
+ * @t: a #GtsTriangle.
+ * @e: a #GtsEdge used by @t.
+ *
+ * This function fails if @e is not an edge of @t.
+ * 
+ * Returns: a #GtsVertex, vertex of @t which does not belong to @e.
+ */
+GtsVertex * gts_triangle_vertex_opposite (GtsTriangle * t, GtsEdge * e)
+{
+  g_return_val_if_fail (t != NULL, NULL);
+  g_return_val_if_fail (e != NULL, NULL);
+
+  if (t->e1 == e) {
+    GtsVertex * v = GTS_SEGMENT (t->e2)->v1;
+    if (v != GTS_SEGMENT (e)->v1 && v != GTS_SEGMENT (e)->v2)
+      return v;
+    return GTS_SEGMENT (t->e2)->v2;
+  }
+  if (t->e2 == e) {
+    GtsVertex * v = GTS_SEGMENT (t->e1)->v1;
+    if (v != GTS_SEGMENT (e)->v1 && v != GTS_SEGMENT (e)->v2)
+      return v;
+    return GTS_SEGMENT (t->e1)->v2;
+  }
+  if (t->e3 == e) {
+    GtsVertex * v = GTS_SEGMENT (t->e2)->v1;
+    if (v != GTS_SEGMENT (e)->v1 && v != GTS_SEGMENT (e)->v2)
+      return v;
+    return GTS_SEGMENT (t->e2)->v2;
+  }
+  g_assert_not_reached ();
+  return NULL;
+}
+
+/**
+ * gts_triangle_edge_opposite:
+ * @t: a #GtsTriangle.
+ * @v: a #GtsVertex of @t.
+ *
+ * Returns: the edge of @t opposite @v or %NULL if @v is not a vertice of @t.
+ */
+GtsEdge * gts_triangle_edge_opposite (GtsTriangle * t, GtsVertex * v)
+{
+  GtsSegment * s1, * s2, * s3;
+
+  g_return_val_if_fail (t != NULL, NULL);
+  g_return_val_if_fail (v != NULL, NULL);
+
+  s1 = GTS_SEGMENT (t->e1);
+  s2 = GTS_SEGMENT (t->e2);
+
+  if (s1->v1 != v && s1->v2 != v) {
+    if (s2->v1 != v && s2->v2 != v)
+      return NULL;
+    return t->e1;
+  }
+  if (s2->v1 != v && s2->v2 != v)
+    return t->e2;
+  s3 = GTS_SEGMENT (t->e3);
+  g_assert (s3->v1 != v && s3->v2 != v);
+  return t->e3;
+}
+
+/**
+ * gts_triangles_angle:
+ * @t1: a #GtsTriangle.
+ * @t2: a #GtsTriangle.
+ *
+ * Returns: the value (in radians) of the angle between @t1 and @t2.
+ */
+gdouble gts_triangles_angle (GtsTriangle * t1,
+			     GtsTriangle * t2)
+{
+  gdouble nx1, ny1, nz1, nx2, ny2, nz2;
+  gdouble pvx, pvy, pvz;
+  gdouble theta;
+
+  g_return_val_if_fail (t1 != NULL && t2 != NULL, 0.0);
+
+  gts_triangle_normal (t1, &nx1, &ny1, &nz1);
+  gts_triangle_normal (t2, &nx2, &ny2, &nz2);
+
+  pvx = ny1*nz2 - nz1*ny2;
+  pvy = nz1*nx2 - nx1*nz2;
+  pvz = nx1*ny2 - ny1*nx2;
+
+  theta = atan2 (sqrt (pvx*pvx + pvy*pvy + pvz*pvz), 
+		 nx1*nx2 + ny1*ny2 + nz1*nz2) - PI;
+  return theta < - PI ? theta + 2.*PI : theta;
+}
+
+/**
+ * gts_triangles_are_compatible:
+ * @t1: a #GtsTriangle.
+ * @t2: a #GtsTriangle.
+ * @e: a #GtsEdge used by both @t1 and @t2.
+ *
+ * Checks if @t1 and @t2 have compatible orientations i.e. if @t1 and
+ * @t2 can be part of the same surface without conflict in the surface
+ * normal orientation.
+ *
+ * Returns: %TRUE if @t1 and @t2 are compatible, %FALSE otherwise.
+ */
+gboolean gts_triangles_are_compatible (GtsTriangle * t1, 
+				       GtsTriangle * t2,
+				       GtsEdge * e)
+{
+  GtsEdge * e1 = NULL, * e2 = NULL;
+
+  g_return_val_if_fail (t1 != NULL, FALSE);
+  g_return_val_if_fail (t2 != NULL, FALSE);
+  g_return_val_if_fail (e != NULL, FALSE);
+
+  if (t1->e1 == e) e1 = t1->e2;
+  else if (t1->e2 == e) e1 = t1->e3;
+  else if (t1->e3 == e) e1 = t1->e1;
+  else
+    g_assert_not_reached ();
+  if (t2->e1 == e) e2 = t2->e2;
+  else if (t2->e2 == e) e2 = t2->e3;
+  else if (t2->e3 == e) e2 = t2->e1;
+  else
+    g_assert_not_reached ();
+  if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v1 || 
+      GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v2 || 
+      GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v1 || 
+      GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v2)
+    return FALSE;
+  return TRUE;
+}
+
+/**
+ * gts_triangle_area:
+ * @t: a #GtsTriangle.
+ *
+ * Returns: the area of the triangle @t.
+ */
+gdouble gts_triangle_area (GtsTriangle * t)
+{
+  gdouble x, y, z;
+  
+  g_return_val_if_fail (t != NULL, 0.0);
+  
+  gts_triangle_normal (t, &x, &y, &z);
+  
+  return sqrt (x*x + y*y + z*z)/2.;
+}
+
+/**
+ * gts_triangle_perimeter:
+ * @t: a #GtsTriangle.
+ *
+ * Returns: the perimeter of the triangle @t.
+ */
+gdouble gts_triangle_perimeter (GtsTriangle * t)
+{
+  GtsVertex * v;
+
+  g_return_val_if_fail (t != NULL, 0.0);
+
+  v = gts_triangle_vertex (t);
+  return 
+    gts_point_distance (GTS_POINT (GTS_SEGMENT (t->e1)->v1), 
+			GTS_POINT (GTS_SEGMENT (t->e1)->v2)) +
+    gts_point_distance (GTS_POINT (GTS_SEGMENT (t->e1)->v1), 
+			GTS_POINT (v)) +
+    gts_point_distance (GTS_POINT (GTS_SEGMENT (t->e1)->v2), 
+			GTS_POINT (v));
+}
+
+/* perimeter of the equilateral triangle of area unity */
+#define GOLDEN_PERIMETER 4.5590141139 
+
+/**
+ * gts_triangle_quality:
+ * @t: a #GtsTriangle.
+ *
+ * The quality of a triangle is defined as the ratio of its surface to 
+ * its perimeter relative to this same ratio for an equilateral
+ * triangle with the same area. The quality is then one for an
+ * equilateral triangle and tends to zero for a very stretched triangle.
+ *
+ * Returns: the quality of the triangle @t.
+ */
+gdouble gts_triangle_quality (GtsTriangle * t)
+{
+  gdouble perimeter;
+
+  g_return_val_if_fail (t != NULL, 0.0);
+
+  perimeter = gts_triangle_perimeter (t);
+  return perimeter > 0.0 ?
+    GOLDEN_PERIMETER*sqrt (gts_triangle_area (t))/perimeter :
+    0.0;
+}
+
+/**
+ * gts_triangle_normal:
+ * @t: a #GtsTriangle.
+ * @x: the x coordinate of the normal.
+ * @y: the y coordinate of the normal.
+ * @z: the z coordinate of the normal.
+ *
+ * Computes the coordinates of the oriented normal of @t as the
+ * cross-product of two edges, using the left-hand rule. The normal is
+ * not normalized.  If this triangle is part of a closed and oriented
+ * surface, the normal points to the outside of the surface.  
+ */
+void gts_triangle_normal (GtsTriangle * t, 
+			  gdouble * x, 
+			  gdouble * y, 
+			  gdouble * z)
+{
+  GtsVertex * v1, * v2 = NULL, * v3 = NULL;
+  GtsPoint * p1, * p2, * p3;
+  gdouble x1, y1, z1, x2, y2, z2;
+
+  g_return_if_fail (t != NULL);
+
+  v1 = GTS_SEGMENT (t->e1)->v1;
+  if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) {
+    v2 = GTS_SEGMENT (t->e2)->v2;
+    v3 = GTS_SEGMENT (t->e1)->v2;
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) {
+    v2 = GTS_SEGMENT (t->e1)->v2;
+    v3 = GTS_SEGMENT (t->e2)->v1;
+  }
+  else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) {
+    v2 = GTS_SEGMENT (t->e2)->v1;
+    v3 = GTS_SEGMENT (t->e1)->v2;
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) {
+    v2 = GTS_SEGMENT (t->e1)->v2;
+    v3 = GTS_SEGMENT (t->e2)->v2;
+  }
+  else {
+    fprintf (stderr, "t: %p t->e1: %p t->e2: %p t->e3: %p t->e1->v1: %p t->e1->v2: %p t->e2->v1: %p t->e2->v2: %p t->e3->v1: %p t->e3->v2: %p\n",
+	 t, t->e1, t->e2, 
+	 t->e3, GTS_SEGMENT (t->e1)->v1, GTS_SEGMENT (t->e1)->v2, 
+	 GTS_SEGMENT (t->e2)->v1, GTS_SEGMENT (t->e2)->v2, 
+	 GTS_SEGMENT (t->e3)->v1, GTS_SEGMENT (t->e3)->v2);
+    g_assert_not_reached ();
+  }
+
+  p1 = GTS_POINT (v1);
+  p2 = GTS_POINT (v2);
+  p3 = GTS_POINT (v3);
+
+  x1 = p2->x - p1->x;
+  y1 = p2->y - p1->y;
+  z1 = p2->z - p1->z;
+
+  x2 = p3->x - p1->x;
+  y2 = p3->y - p1->y;
+  z2 = p3->z - p1->z;
+
+  *x = y1*z2 - z1*y2;
+  *y = z1*x2 - x1*z2;
+  *z = x1*y2 - y1*x2;
+}
+
+/**
+ * gts_triangle_orientation:
+ * @t: a #GtsTriangle.
+ * 
+ * Checks for the orientation of the plane (x,y) projection of a
+ * triangle. See gts_point_orientation() for details. This function
+ * is geometrically robust.
+ *
+ * Returns: a number depending on the orientation of the vertices of @t.
+ */
+gdouble gts_triangle_orientation (GtsTriangle * t)
+{
+  GtsVertex * v1, * v2 = NULL, * v3 = NULL;
+
+  g_return_val_if_fail (t != NULL, 0.0);
+
+  v1 = GTS_SEGMENT (t->e1)->v1;
+  if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) {
+    v2 = GTS_SEGMENT (t->e2)->v2;
+    v3 = GTS_SEGMENT (t->e1)->v2;
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) {
+    v2 = GTS_SEGMENT (t->e1)->v2;
+    v3 = GTS_SEGMENT (t->e2)->v1;
+  }
+  else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) {
+    v2 = GTS_SEGMENT (t->e2)->v1;
+    v3 = GTS_SEGMENT (t->e1)->v2;
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) {
+    v2 = GTS_SEGMENT (t->e1)->v2;
+    v3 = GTS_SEGMENT (t->e2)->v2;
+  }
+  else
+    g_assert_not_reached ();
+  return gts_point_orientation (GTS_POINT (v1), 
+				GTS_POINT (v2), 
+				GTS_POINT (v3));
+}
+
+/**
+ * gts_triangle_revert:
+ * @t: a #GtsTriangle.
+ * 
+ * Changes the orientation of triangle @t, turning it inside out.
+ */
+void gts_triangle_revert (GtsTriangle * t)
+{
+  GtsEdge * e;
+
+  g_return_if_fail (t != NULL);
+
+  e = t->e1;
+  t->e1 = t->e2;
+  t->e2 = e;
+}
+
+/**
+ * gts_triangles_from_edges:
+ * @edges: a list of #GtsEdge.
+ *
+ * Builds a list of unique triangles which have one of their edges in @edges.
+ * 
+ * Returns: the list of triangles.
+ */
+GSList * gts_triangles_from_edges (GSList * edges)
+{
+  GHashTable * hash;
+  GSList * triangles = NULL, * i;
+
+  hash = g_hash_table_new (NULL, NULL);
+  i = edges;
+  while (i) {
+    GSList * j = GTS_EDGE (i->data)->triangles;
+    while (j) {
+      GtsTriangle * t = j->data;
+      if (g_hash_table_lookup (hash, t) == NULL) {
+	triangles = g_slist_prepend (triangles, t);
+	g_hash_table_insert (hash, t, i);
+      }
+      j = j->next;
+    }
+    i = i->next;
+  }
+  g_hash_table_destroy (hash);
+
+  return triangles;
+}
+
+/**
+ * gts_triangle_vertices_edges:
+ * @t: a #GtsTriangle.
+ * @e: a #GtsEdge belonging to the edges of @t or %NULL.
+ * @v1: a #GtsVertex used by @t.
+ * @v2: a #GtsVertex used by @t.
+ * @v3: a #GtsVertex used by @t.
+ * @e1: a #GtsEdge used by @t.
+ * @e2: a #GtsEdge used by @t.
+ * @e3: a #GtsEdge used by @t.
+ *
+ * Given @t and @e, returns @v1, @v2, @v3, @e1, @e2 and @e3. @e1
+ * has @v1 and @v2 as vertices, @e2 has @v2 and @v3 as vertices
+ * and @e3 has @v3 and @v1 as vertices. @v1, @v2 and @v3 respects
+ * the orientation of @t. If @e is not NULL, @e1 and @e are
+ * identical.
+ */
+void gts_triangle_vertices_edges (GtsTriangle * t, 
+				  GtsEdge * e,
+				  GtsVertex ** v1, 
+				  GtsVertex ** v2, 
+				  GtsVertex ** v3,
+				  GtsEdge ** e1,
+				  GtsEdge ** e2,
+				  GtsEdge ** e3)
+{
+  GtsEdge * ee1, * ee2;
+
+  g_return_if_fail (t != NULL);
+  
+  if (e == t->e1 || e == NULL) {
+    *e1 = ee1 = t->e1; *e2 = ee2 = t->e2; *e3 = t->e3;    
+  }
+  else if (e == t->e2) {
+    *e1 = ee1 = e; *e2 = ee2 = t->e3; *e3 = t->e1;
+  }
+  else if (e == t->e3) {
+    *e1 = ee1 = e; *e2 = ee2 = t->e1; *e3 = t->e2;
+  }
+  else {
+    g_assert_not_reached ();
+    ee1 = ee2 = NULL; /* to avoid complaints from the compiler */
+  }
+  if (GTS_SEGMENT (ee1)->v2 == GTS_SEGMENT (ee2)->v1) {
+    *v1 = GTS_SEGMENT (ee1)->v1; 
+    *v2 = GTS_SEGMENT (ee1)->v2; 
+    *v3 = GTS_SEGMENT (ee2)->v2;
+  }
+  else if (GTS_SEGMENT (ee1)->v2 == GTS_SEGMENT (ee2)->v2) {
+    *v1 = GTS_SEGMENT (ee1)->v1; 
+    *v2 = GTS_SEGMENT (ee1)->v2; 
+    *v3 = GTS_SEGMENT (ee2)->v1;
+  }
+  else if (GTS_SEGMENT (ee1)->v1 == GTS_SEGMENT (ee2)->v1) {
+    *v1 = GTS_SEGMENT (ee1)->v2; 
+    *v2 = GTS_SEGMENT (ee1)->v1; 
+    *v3 = GTS_SEGMENT (ee2)->v2;
+  }
+  else if (GTS_SEGMENT (ee1)->v1 == GTS_SEGMENT (ee2)->v2) {
+    *v1 = GTS_SEGMENT (ee1)->v2; 
+    *v2 = GTS_SEGMENT (ee1)->v1; 
+    *v3 = GTS_SEGMENT (ee2)->v1;
+  }
+  else
+    g_assert_not_reached ();
+}
+
+/* sqrt(3) */
+#define SQRT3 1.73205080757
+
+/**
+ * gts_triangle_enclosing:
+ * @klass: the class of the new triangle.
+ * @points: a list of #GtsPoint.
+ * @scale: a scaling factor (must be larger than one).
+ * 
+ * Builds a new triangle (including new vertices and edges) enclosing
+ * the plane projection of all the points in @points. This triangle is
+ * equilateral and encloses a rectangle defined by the maximum and
+ * minimum x and y coordinates of the points. @scale is an homothetic
+ * scaling factor. If equal to one, the triangle encloses exactly the
+ * enclosing rectangle.
+ * 
+ * Returns: a new #GtsTriangle.  
+ */
+GtsTriangle * gts_triangle_enclosing (GtsTriangleClass * klass,
+				      GSList * points, gdouble scale)
+{
+  gdouble xmax, xmin, ymax, ymin;
+  gdouble xo, yo, r;
+  GtsVertex * v1, * v2, * v3;
+  GtsEdge * e1, * e2, * e3;
+
+  if (points == NULL)
+    return NULL;
+  
+  xmax = xmin = GTS_POINT (points->data)->x;
+  ymax = ymin = GTS_POINT (points->data)->y;
+  points = points->next;
+  while (points) {
+    GtsPoint * p = points->data;
+    if (p->x > xmax) xmax = p->x;
+    else if (p->x < xmin) xmin = p->x;
+    if (p->y > ymax) ymax = p->y;
+    else if (p->y < ymin) ymin = p->y;    
+    points = points->next;
+  }
+  xo = (xmax + xmin)/2.;
+  yo = (ymax + ymin)/2.;
+  r = scale*sqrt((xmax - xo)*(xmax - xo) + (ymax - yo)*(ymax - yo));
+  if (r == 0.0) r = scale;
+  v1 = gts_vertex_new (gts_vertex_class (),
+		       xo + r*SQRT3, yo - r, 0.0);
+  v2 = gts_vertex_new (gts_vertex_class (),
+		       xo, yo + 2.*r, 0.0);
+  v3 = gts_vertex_new (gts_vertex_class (),
+		       xo - r*SQRT3, yo - r, 0.0);
+  e1 = gts_edge_new (gts_edge_class (), v1, v2);
+  e2 = gts_edge_new (gts_edge_class (), v2, v3);
+  e3 = gts_edge_new (gts_edge_class (), v3, v1);
+  return gts_triangle_new (gts_triangle_class (), e1, e2, e3);
+}
+
+/**
+ * gts_triangle_neighbor_number:
+ * @t: a #GtsTriangle.
+ *
+ * Returns: the number of triangles neighbors of @t.
+ */
+guint gts_triangle_neighbor_number (GtsTriangle * t)
+{
+  GSList * i;
+  guint nn = 0;
+  GtsEdge * ee[4], ** e = ee;
+  
+  g_return_val_if_fail (t != NULL, 0);
+
+  ee[0] = t->e1; ee[1] = t->e2; ee[2] = t->e3; ee[3] = NULL;
+  while (*e) {
+    i = (*e++)->triangles;
+    while (i) {
+      GtsTriangle * t1 = i->data;
+      if (t1 != t)
+	nn++;
+      i = i->next;
+    }
+  }
+  return nn;
+}
+
+/**
+ * gts_triangle_neighbors:
+ * @t: a #GtsTriangle.
+ *
+ * Returns: a list of #GtsTriangle neighbors of @t.
+ */
+GSList * gts_triangle_neighbors (GtsTriangle * t)
+{
+  GSList * i, * list = NULL;
+  GtsEdge * ee[4], ** e = ee;
+  
+  g_return_val_if_fail (t != NULL, NULL);
+
+  ee[0] = t->e1; ee[1] = t->e2; ee[2] = t->e3; ee[3] = NULL;
+  while (*e) {
+    i = (*e++)->triangles;
+    while (i) {
+      GtsTriangle * t1 = i->data;
+      if (t1 != t)
+	list = g_slist_prepend (list, t1);
+      i = i->next;
+    }
+  }
+  return list;
+}
+
+/**
+ * gts_triangles_common_edge:
+ * @t1: a #GtsTriangle.
+ * @t2: a #GtsTriangle.
+ *
+ * Returns: a #GtsEdge common to both @t1 and @t2 or %NULL if @t1 and @t2
+ * do not share any edge.
+ */
+GtsEdge * gts_triangles_common_edge (GtsTriangle * t1,
+				     GtsTriangle * t2)
+{
+  g_return_val_if_fail (t1 != NULL, NULL);
+  g_return_val_if_fail (t2 != NULL, NULL);
+
+  if (t1->e1 == t2->e1 || t1->e1 == t2->e2 || t1->e1 == t2->e3)
+    return t1->e1;
+  if (t1->e2 == t2->e1 || t1->e2 == t2->e2 || t1->e2 == t2->e3)
+    return t1->e2;
+  if (t1->e3 == t2->e1 || t1->e3 == t2->e2 || t1->e3 == t2->e3)
+    return t1->e3;
+  return NULL;
+}
+
+/**
+ * gts_triangle_is_duplicate:
+ * @t: a #GtsTriangle.
+ *
+ * Returns: a #GtsTriangle different from @t but sharing all its edges 
+ * with @t or %NULL if there is none.
+ */
+GtsTriangle * gts_triangle_is_duplicate (GtsTriangle * t)
+{
+  GSList * i;
+  GtsEdge * e2, * e3;
+
+  g_return_val_if_fail (t != NULL, NULL);
+
+  e2 = t->e2;
+  e3 = t->e3;
+  i = t->e1->triangles;
+  while (i) {
+    GtsTriangle * t1 = i->data;
+    if (t1 != t && 
+	(t1->e1 == e2 || t1->e2 == e2 || t1->e3 == e2) &&
+	(t1->e1 == e3 || t1->e2 == e3 || t1->e3 == e3))
+      return t1;
+    i = i->next;
+  }
+  
+  return NULL;
+}
+
+/**
+ * gts_triangle_use_edges:
+ * @e1: a #GtsEdge.
+ * @e2: a #GtsEdge.
+ * @e3: a #GtsEdge.
+ *
+ * Returns: a #GtsTriangle having @e1, @e2 and @e3 as edges or %NULL if @e1,
+ * @e2 and @e3 are not part of any triangle.
+ */
+GtsTriangle * gts_triangle_use_edges (GtsEdge * e1,
+				      GtsEdge * e2,
+				      GtsEdge * e3)
+{
+  GSList * i;
+  
+  g_return_val_if_fail (e1 != NULL, NULL);
+  g_return_val_if_fail (e2 != NULL, NULL);
+  g_return_val_if_fail (e3 != NULL, NULL);
+
+  i = e1->triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if ((t->e1 == e2 && (t->e2 == e3 || t->e3 == e3)) ||
+	(t->e2 == e2 && (t->e1 == e3 || t->e3 == e3)) ||
+	(t->e3 == e2 && (t->e1 == e3 || t->e2 == e3)))
+      return t;
+    i = i->next;
+  }
+  
+  return NULL;
+}
+
+/**
+ * gts_triangle_is_ok:
+ * @t: a #GtsTriangle.
+ *
+ * Returns: %TRUE if @t is a non-degenerate, non-duplicate triangle,
+ * %FALSE otherwise.
+ */
+gboolean gts_triangle_is_ok (GtsTriangle * t)
+{
+  g_return_val_if_fail (t != NULL, FALSE);
+  g_return_val_if_fail (t->e1 != NULL, FALSE);
+  g_return_val_if_fail (t->e2 != NULL, FALSE);
+  g_return_val_if_fail (t->e3 != NULL, FALSE);
+  g_return_val_if_fail (t->e1 != t->e2 && t->e1 != t->e3 && t->e2 != t->e3, 
+			FALSE);
+  g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e1), 
+					    GTS_SEGMENT (t->e2)),
+			FALSE);
+  g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e1), 
+					    GTS_SEGMENT (t->e3)), 
+			FALSE);
+  g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e2), 
+					    GTS_SEGMENT (t->e3)), 
+			FALSE);
+  g_return_val_if_fail (GTS_SEGMENT (t->e1)->v1 != GTS_SEGMENT (t->e1)->v2, 
+			FALSE);
+  g_return_val_if_fail (GTS_SEGMENT (t->e2)->v1 != GTS_SEGMENT (t->e2)->v2, 
+			FALSE);
+  g_return_val_if_fail (GTS_SEGMENT (t->e3)->v1 != GTS_SEGMENT (t->e3)->v2, 
+			FALSE);
+  g_return_val_if_fail (GTS_OBJECT (t)->reserved == NULL, FALSE);
+  g_return_val_if_fail (!gts_triangle_is_duplicate (t), FALSE);
+  return TRUE;
+}
+
+/**
+ * gts_triangle_vertices:
+ * @t: a #GtsTriangle.
+ * @v1: a pointer on a #GtsVertex.
+ * @v2: a pointer on a #GtsVertex.
+ * @v3: a pointer on a #GtsVertex.
+ *
+ * Fills @v1, @v2 and @v3 with the oriented set of vertices, summits of @t.
+ */
+void gts_triangle_vertices (GtsTriangle * t,
+			    GtsVertex ** v1, GtsVertex ** v2, GtsVertex ** v3)
+{
+  GtsSegment * e1, * e2;
+
+  g_return_if_fail (t != NULL);
+  g_return_if_fail (v1 != NULL && v2 != NULL && v3 != NULL);
+
+  e1 = GTS_SEGMENT (t->e1);
+  e2 = GTS_SEGMENT (t->e2);
+
+  if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v1) {
+    *v1 = GTS_SEGMENT (e1)->v1; 
+    *v2 = GTS_SEGMENT (e1)->v2; 
+    *v3 = GTS_SEGMENT (e2)->v2;
+  }
+  else if (GTS_SEGMENT (e1)->v2 == GTS_SEGMENT (e2)->v2) {
+    *v1 = GTS_SEGMENT (e1)->v1; 
+    *v2 = GTS_SEGMENT (e1)->v2; 
+    *v3 = GTS_SEGMENT (e2)->v1;
+  }
+  else if (GTS_SEGMENT (e1)->v1 == GTS_SEGMENT (e2)->v1) {
+    *v1 = GTS_SEGMENT (e1)->v2; 
+    *v2 = GTS_SEGMENT (e1)->v1; 
+    *v3 = GTS_SEGMENT (e2)->v2;
+  }
+  else {
+    *v1 = GTS_SEGMENT (e1)->v2; 
+    *v2 = GTS_SEGMENT (e1)->v1; 
+    *v3 = GTS_SEGMENT (e2)->v1;
+  }
+}
+
+/**
+ * gts_triangle_circumcircle_center:
+ * @t: a #GtsTriangle.
+ * @point_class: a #GtsPointClass.
+ *
+ * Returns: a new #GtsPoint, center of the circumscribing circle of @t or
+ * %NULL if the circumscribing circle is not defined.
+ */
+GtsPoint * gts_triangle_circumcircle_center (GtsTriangle * t,
+					     GtsPointClass * point_class)
+{
+  GtsVertex * v1, * v2, * v3;
+  gdouble xa, ya, xb, yb, xc, yc;
+  gdouble xd, yd, xe, ye;
+  gdouble xad, yad, xae, yae;
+  gdouble det;
+  
+  g_return_val_if_fail (t != NULL, NULL);
+  g_return_val_if_fail (point_class != NULL, NULL);
+
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+
+  xa = GTS_POINT (v1)->x; ya = GTS_POINT (v1)->y;
+  xb = GTS_POINT (v2)->x; yb = GTS_POINT (v2)->y;
+  xc = GTS_POINT (v3)->x; yc = GTS_POINT (v3)->y;
+  xd = (xa + xb)/2.; yd = (ya + yb)/2.;
+  xe = (xa + xc)/2.; ye = (ya + yc)/2.;
+  xad = xd - xa; yad = yd - ya;
+  xae = xe - xa; yae = ye - ya;
+  det = xad*yae - xae*yad;
+  if (det == 0.)
+    return NULL;
+  return gts_point_new (point_class,
+			(yae*yad*(yd - ye) + xad*yae*xd - xae*yad*xe)/det,
+			-(xae*xad*(xd - xe) + yad*xae*yd - yae*xad*ye)/det,
+			0.);
+}
+
+/* square of the maximum area ratio admissible */
+#define AREA_RATIO_MAX2 1e8
+
+static gboolean points_are_folded (GtsPoint * A,
+				   GtsPoint * B,
+				   GtsPoint * C,
+				   GtsPoint * D,
+				   gdouble max)
+{
+  GtsVector AB, AC, AD;
+  GtsVector n1, n2;
+  gdouble nn1, nn2, n1n2;
+
+  gts_vector_init (AB, A, B);
+  gts_vector_init (AC, A, C);
+  gts_vector_init (AD, A, D);
+  gts_vector_cross (n1, AB, AC);
+  gts_vector_cross (n2, AD, AB);
+
+  nn1 = gts_vector_scalar (n1, n1);
+  nn2 = gts_vector_scalar (n2, n2);
+  if (nn1 >= AREA_RATIO_MAX2*nn2 || nn2 >= AREA_RATIO_MAX2*nn1)
+    return TRUE;
+  n1n2 = gts_vector_scalar (n1, n2);
+  if (n1n2 > 0.)
+    return FALSE;
+  if (n1n2*n1n2/(nn1*nn2) > max)
+    return TRUE;
+  return FALSE;
+}
+
+static GtsVertex * triangle_use_vertices (GtsTriangle * t,
+					  GtsVertex * A, 
+					  GtsVertex * B)
+{
+  GtsVertex 
+    * v1 = GTS_SEGMENT (t->e1)->v1, 
+    * v2 = GTS_SEGMENT (t->e1)->v2, 
+    * v3 = gts_triangle_vertex (t);
+
+  if (v1 == A) {
+    if (v2 == B)
+      return v3;
+    g_assert (v3 == B);
+    return v2;
+  }
+  if (v2 == A) {
+    if (v1 == B)
+      return v3;
+    g_assert (v3 == B);
+    return v1;
+  }
+  if (v3 == A) {
+    if (v1 == B)
+      return v2;
+    g_assert (v2 == B);
+    return v1;
+  }
+  g_assert_not_reached ();
+  return NULL;
+}
+
+/**
+ * gts_triangles_are_folded:
+ * @triangles: a list of #GtsTriangle.
+ * @A: a #GtsVertex.
+ * @B: another #GtsVertex.
+ * @max: the maximum value of the square of the cosine of the angle between
+ * two triangles.
+ *
+ * Given a list of triangles sharing @A and @B as vertices, checks if any
+ * two triangles in the list make an angle larger than a given value defined
+ * by @max.
+ * 
+ * Returns: %TRUE if any pair of triangles in @triangles makes an angle larger 
+ * than the maximum value, %FALSE otherwise.
+ */
+gboolean gts_triangles_are_folded (GSList * triangles,
+				   GtsVertex * A, GtsVertex * B,
+				   gdouble max)
+{
+  GSList * i;
+
+  g_return_val_if_fail (A != NULL, TRUE);
+  g_return_val_if_fail (B != NULL, TRUE);
+
+  i = triangles;
+  while (i) {
+    GtsVertex * C = triangle_use_vertices (i->data, A, B);
+    GSList * j = i->next;    
+    while (j) {
+      GtsVertex * D = triangle_use_vertices (j->data, A, B);
+      if (points_are_folded (GTS_POINT (A), 
+			     GTS_POINT (B), 
+			     GTS_POINT (C), 
+			     GTS_POINT (D), 
+			     max))
+	return TRUE;
+      j = j->next;
+    }
+    i = i->next;
+  }
+  return FALSE;
+}
+
+/**
+ * gts_triangle_is_stabbed:
+ * @t: a #GtsTriangle.
+ * @p: a #GtsPoint.
+ * @orientation: a pointer or %NULL.
+ *
+ * Returns: one of the vertices of @t, one of the edges of @t or @t if
+ * any of these are stabbed by the ray starting at @p (included) and
+ * ending at (@p->x, @p->y, +infty), %NULL otherwise. If the ray is
+ * contained in the plane of the triangle %NULL is also returned. If
+ * @orientation is not %NULL, it is set to the value of the
+ * orientation of @p relative to @t (as given by
+ * gts_point_orientation_3d()).  
+ */
+GtsObject * gts_triangle_is_stabbed (GtsTriangle * t, 
+				     GtsPoint * p,
+				     gdouble * orientation)
+{
+  GtsVertex * v1, * v2, * v3, * inverted = NULL;
+  GtsEdge * e1, * e2, * e3, * tmp;
+  gdouble o, o1, o2, o3;
+
+  g_return_val_if_fail (t != NULL, NULL);
+  g_return_val_if_fail (p != NULL, NULL);
+
+  gts_triangle_vertices_edges (t, NULL, &v1, &v2, &v3, &e1, &e2, &e3);
+  o = gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), GTS_POINT (v3));
+  if (o == 0.)
+    return NULL;
+  if (o < 0.) {
+    inverted = v1;
+    v1 = v2;
+    v2 = inverted;
+    tmp = e2;
+    e2 = e3;
+    e3 = tmp;
+  }
+  o = gts_point_orientation_3d (GTS_POINT (v1),
+				GTS_POINT (v2), 
+				GTS_POINT (v3), 
+				p);
+  if (o < 0.)
+    return NULL;
+  o1 = gts_point_orientation (GTS_POINT (v1), GTS_POINT (v2), p);
+  if (o1 < 0.)
+    return NULL;
+  o2 = gts_point_orientation (GTS_POINT (v2), GTS_POINT (v3), p);
+  if (o2 < 0.)
+    return NULL;
+  o3 = gts_point_orientation (GTS_POINT (v3), GTS_POINT (v1), p);
+  if (o3 < 0.)
+    return NULL;  
+  if (orientation) *orientation = inverted ? -o : o;
+  if (o1 == 0.) {
+    if (o2 == 0.)
+      return GTS_OBJECT (v2);
+    if (o3 == 0.)
+      return GTS_OBJECT (v1);
+    return GTS_OBJECT (e1);
+  }
+  if (o2 == 0.) {
+    if (o3 == 0.)
+      return GTS_OBJECT (v3);
+    return GTS_OBJECT (e2);
+  }
+  if (o3 == 0.)
+    return GTS_OBJECT (e3);
+  return GTS_OBJECT (t);
+}
+
diff --git a/src/vertex.c b/src/vertex.c
new file mode 100644
index 0000000..9767ea8
--- /dev/null
+++ b/src/vertex.c
@@ -0,0 +1,648 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include "gts.h"
+
+gboolean gts_allow_floating_vertices = FALSE;
+
+static void vertex_destroy (GtsObject * object)
+{
+  GtsVertex * vertex = GTS_VERTEX (object);
+  GSList * i;
+
+  i = vertex->segments;
+  while (i) {
+    GTS_OBJECT_SET_FLAGS (i->data, GTS_DESTROYED);
+    i = i->next;
+  }
+  i = vertex->segments;
+  while (i) {
+    GSList * next = i->next;
+    gts_object_destroy (i->data);
+    i = next;
+  }
+  g_assert (vertex->segments == NULL);
+
+  (* GTS_OBJECT_CLASS (gts_vertex_class ())->parent_class->destroy) (object);
+}
+
+static void vertex_clone (GtsObject * clone, GtsObject * object)
+{
+  (* GTS_OBJECT_CLASS (gts_vertex_class ())->parent_class->clone) (clone, 
+								   object);
+  GTS_VERTEX (clone)->segments = NULL;
+}
+
+static void vertex_class_init (GtsVertexClass * klass)
+{
+  GTS_OBJECT_CLASS (klass)->clone = vertex_clone;
+  GTS_OBJECT_CLASS (klass)->destroy = vertex_destroy;
+}
+
+static void vertex_init (GtsVertex * vertex)
+{
+  vertex->segments = NULL;
+}
+
+/**
+ * gts_vertex_class:
+ *
+ * Returns: the #GtsVertexClass.
+ */
+GtsVertexClass * gts_vertex_class (void)
+{
+  static GtsVertexClass * klass = NULL;
+
+  if (klass == NULL) {
+    GtsObjectClassInfo vertex_info = {
+      "GtsVertex",
+      sizeof (GtsVertex),
+      sizeof (GtsVertexClass),
+      (GtsObjectClassInitFunc) vertex_class_init,
+      (GtsObjectInitFunc) vertex_init,
+      (GtsArgSetFunc) NULL,
+      (GtsArgGetFunc) NULL
+    };
+    klass = gts_object_class_new (GTS_OBJECT_CLASS (gts_point_class ()), 
+				  &vertex_info);
+  }
+
+  return klass;
+}
+
+/**
+ * gts_vertex_new:
+ * @klass: a #GtsVertexClass.
+ * @x: the x-coordinate of the vertex to create.
+ * @y: the y-coordinate of the vertex to create.
+ * @z: the y-coordinate of the vertex to create.
+ *
+ * Returns: a new #GtsVertex with @x, @y and @z as coordinates.
+ */
+GtsVertex * gts_vertex_new (GtsVertexClass * klass,
+			    gdouble x, gdouble y, gdouble z)
+{
+  GtsVertex * v;
+
+  v = GTS_VERTEX (gts_object_new (GTS_OBJECT_CLASS (klass)));
+  gts_point_set (GTS_POINT (v), x, y, z);
+
+  return v;
+}
+
+/**
+ * gts_vertex_replace:
+ * @v: a #GtsVertex.
+ * @with: another #GtsVertex.
+ *
+ * Replaces vertex @v with vertex @with. @v and @with must be
+ * different.  All the #GtsSegment which have @v has one of their
+ * vertices are updated.  The segments list of vertex @v is freed and
+ * @v->segments is set to %NULL.  
+ */
+void gts_vertex_replace (GtsVertex * v, GtsVertex * with)
+{
+  GSList * i;
+
+  g_return_if_fail (v != NULL);
+  g_return_if_fail (with != NULL);
+  g_return_if_fail (v != with);
+
+  i = v->segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    if (s->v1 != with && s->v2 != with)
+      with->segments = g_slist_prepend (with->segments, s);
+    if (s->v1 == v) s->v1 = with;
+    if (s->v2 == v) s->v2 = with;
+    i = i->next;
+  }
+  g_slist_free (v->segments);
+  v->segments = NULL;
+}
+
+/**
+ * gts_vertex_is_unattached:
+ * @v: a #GtsVertex.
+ *
+ * Returns: %TRUE if @v is not the endpoint of any #GtsSegment, 
+ * %FALSE otherwise.
+ */
+gboolean gts_vertex_is_unattached (GtsVertex * v)
+{
+  g_return_val_if_fail (v != NULL, FALSE);
+  if (v->segments == NULL)
+    return TRUE;
+  return FALSE;
+}
+
+/**
+ * gts_vertices_are_connected:
+ * @v1: a #GtsVertex.
+ * @v2: another #GtsVertex.
+ *
+ * Returns: if @v1 and @v2 are the vertices of the same #GtsSegment
+ * this segment else %NULL.
+ */
+GtsSegment * gts_vertices_are_connected (GtsVertex * v1, GtsVertex * v2)
+{
+  GSList * i;
+  
+  g_return_val_if_fail (v1 != NULL, FALSE);
+  g_return_val_if_fail (v2 != NULL, FALSE);
+  
+  i = v1->segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    if (s->v1 == v2 || s->v2 == v2)
+      return s;
+    i = i->next;
+  }
+  return NULL;
+}
+
+/**
+ * gts_vertices_from_segments:
+ * @segments: a list of #GtsSegment.
+ *
+ * Returns: a list of #GtsVertex, vertices of a #GtsSegment in @segments.
+ * Each element in the list is unique (no duplicates).
+ */
+GSList * gts_vertices_from_segments (GSList * segments)
+{
+  GHashTable * hash;
+  GSList * vertices = NULL, * i;
+  
+  hash = g_hash_table_new (NULL, NULL);
+  i = segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    if (g_hash_table_lookup (hash, s->v1) == NULL) {
+      vertices = g_slist_prepend (vertices, s->v1);
+      g_hash_table_insert (hash, s->v1, s);
+    }
+    if (g_hash_table_lookup (hash, s->v2) == NULL) {
+      vertices = g_slist_prepend (vertices, s->v2);
+      g_hash_table_insert (hash, s->v2, s);
+    }
+    i = i->next;
+  }
+  g_hash_table_destroy (hash);
+  return vertices;
+}
+
+/**
+ * gts_vertex_triangles:
+ * @v: a #GtsVertex.
+ * @list: a list of #GtsTriangle.
+ *
+ * Adds all the #GtsTriangle which share @v as a vertex and do not
+ * already belong to @list.
+ *
+ * Returns: the new list of unique #GtsTriangle which share @v as a
+ * vertex.  
+ */
+GSList * gts_vertex_triangles (GtsVertex * v, 
+			       GSList * list)
+{
+  GSList * i;
+
+  g_return_val_if_fail (v != NULL, NULL);
+
+  i = v->segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    if (GTS_IS_EDGE (s)) {
+      GSList * j = GTS_EDGE (s)->triangles;
+      while (j) {
+	if (!g_slist_find (list, j->data))
+	  list = g_slist_prepend (list, j->data);
+	j = j->next;
+      }
+    }
+    i = i->next;
+  }
+  return list;
+}
+
+/**
+ * gts_vertex_faces:
+ * @v: a #GtsVertex.
+ * @surface: a #GtsSurface or %NULL.
+ * @list: a list of #GtsFace.
+ *
+ * Adds all the #GtsFace belonging to @surface (if not %NULL) which share 
+ * @v as a vertex and do not already belong to @list.
+ *
+ * Returns: the new list of unique #GtsFace belonging to @surface 
+ * which share @v as a vertex.
+ */
+GSList * gts_vertex_faces (GtsVertex * v, 
+			   GtsSurface * surface, 
+			   GSList * list)
+{
+  GSList * i;
+
+  g_return_val_if_fail (v != NULL, NULL);
+
+  i = v->segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    if (GTS_IS_EDGE (s)) {
+      GSList * j = GTS_EDGE (s)->triangles;
+      while (j) {
+	GtsTriangle * t = j->data;
+	if (GTS_IS_FACE (t) 
+	    && 
+	    (!surface || gts_face_has_parent_surface (GTS_FACE (t), surface)) 
+	    &&
+	    !g_slist_find (list, t))
+	  list = g_slist_prepend (list, t);
+	j = j->next;
+      }
+    }
+    i = i->next;
+  }
+  return list;
+}
+
+/**
+ * gts_vertex_neighbors:
+ * @v: a #GtsVertex.
+ * @list: a list of #GtsVertex.
+ * @surface: a #GtsSurface or %NULL.
+ *
+ * Adds to @list all the #GtsVertex connected to @v by a #GtsSegment and not
+ * already in @list. If @surface is not %NULL only the vertices connected to
+ * @v by an edge belonging to @surface are considered.
+ *
+ * Returns: the new list of unique #GtsVertex.
+ */
+GSList * gts_vertex_neighbors (GtsVertex * v, 
+			       GSList * list,
+			       GtsSurface * surface)
+{
+  GSList * i;
+
+  g_return_val_if_fail (v != NULL, NULL);
+
+  i = v->segments;
+  while (i) {
+    GtsSegment * s = i->data;
+    GtsVertex * v1 = s->v1 == v ? s->v2 : s->v1;
+    if (v1 != v && 
+	(!surface || 
+	 (GTS_IS_EDGE (s) && 
+	  gts_edge_has_parent_surface (GTS_EDGE (s), surface))) &&
+	!g_slist_find (list, v1))
+      list = g_slist_prepend (list, v1);
+    i = i->next;
+  }
+  return list;
+}
+
+/**
+ * gts_vertex_is_boundary:
+ * @v: a #GtsVertex.
+ * @surface: a #GtsSurface or %NULL.
+ * 
+ * Returns: %TRUE if @v is used by a #GtsEdge boundary of @surface as
+ * determined by gts_edge_is_boundary(), %FALSE otherwise.
+ */
+gboolean gts_vertex_is_boundary (GtsVertex * v, GtsSurface * surface)
+{
+  GSList * i;
+
+  g_return_val_if_fail (v != NULL, FALSE);
+  
+  i = v->segments;
+  while (i) {
+    if (GTS_IS_EDGE (i->data) && 
+	gts_edge_is_boundary (i->data, surface))
+      return TRUE;
+    i = i->next;
+  }
+
+  return FALSE;
+}
+
+/**
+ * gts_vertices_merge:
+ * @vertices: a list of #GtsVertex.
+ * @epsilon: half the size of the bounding box to consider for each vertex.
+ *
+ * For each vertex v in @vertices look if there are any vertex of
+ * @vertices contained in a box centered on v of size 2*@epsilon. If
+ * there are, replace them with v (using gts_vertex_replace()),
+ * destroy them and remove them from list.  This is done efficiently
+ * using Kd-Trees.
+ *
+ * Returns: the updated list of vertices.  
+ */
+GList * gts_vertices_merge (GList * vertices, gdouble epsilon)
+{
+  GPtrArray * array;
+  GList * i;
+  GNode * kdtree;
+
+  g_return_val_if_fail (vertices != NULL, 0);
+
+  array = g_ptr_array_new ();
+  i = vertices;
+  while (i) {
+    g_ptr_array_add (array, i->data);
+    i = i->next;
+  }
+  kdtree = gts_kdtree_new (array, NULL);
+  g_ptr_array_free (array, TRUE);
+  
+  i = vertices;
+  while (i) {
+    GtsVertex * v = i->data;
+    if (!GTS_OBJECT (v)->reserved) { /* Do something only if v is active */
+      GtsBBox * bbox;
+      GSList * selected, * j;
+
+      /* build bounding box */
+      bbox = gts_bbox_new (gts_bbox_class (),
+			   v, 
+			   GTS_POINT (v)->x - epsilon,
+			   GTS_POINT (v)->y - epsilon,
+			   GTS_POINT (v)->z - epsilon,
+			   GTS_POINT (v)->x + epsilon,
+			   GTS_POINT (v)->y + epsilon,
+			   GTS_POINT (v)->z + epsilon);
+
+      /* select vertices which are inside bbox using kdtree */
+      j = selected = gts_kdtree_range (kdtree, bbox, NULL);
+      while (j) {
+	GtsVertex * sv = j->data;
+	if (sv != v && !GTS_OBJECT (sv)->reserved) {
+	  /* sv is not v and is active */
+	  gts_vertex_replace (sv, v);
+	  GTS_OBJECT (sv)->reserved = sv; /* mark sv as inactive */
+	}
+	j = j->next;
+      }
+      g_slist_free (selected);
+      gts_object_destroy (GTS_OBJECT (bbox));
+    }
+    i = i->next;
+  }
+
+  gts_kdtree_destroy (kdtree);
+
+  /* destroy inactive vertices and removes them from list */
+
+  /* we want to control vertex destruction */
+  gts_allow_floating_vertices = TRUE;
+
+  i = vertices;
+  while (i) {
+    GtsVertex * v = i->data;
+    GList * next = i->next;
+    if (GTS_OBJECT (v)->reserved) { /* v is inactive */
+      gts_object_destroy (GTS_OBJECT (v));
+      vertices = g_list_remove_link (vertices, i);
+      g_list_free_1 (i);
+    }
+    i = next;
+  }
+  gts_allow_floating_vertices = FALSE; 
+
+  return vertices;
+}
+
+/* returns the list of edges belonging to @surface turning around @v */
+static GSList * edge_fan_list (GtsVertex * v,
+			       GtsSurface * surface,
+			       GtsFace * f, 
+			       GtsEdge * e,
+			       GtsFace * first)
+{
+  GSList * i = e->triangles;
+  GtsFace * neighbor = NULL;
+  GtsEdge * next = NULL, * enext = NULL;
+
+  while (i) {
+    GtsFace * f1 = i->data;
+    if (GTS_IS_FACE (f1) &&
+	f1 != f &&
+	gts_face_has_parent_surface (f1, surface)) {
+      g_return_val_if_fail (neighbor == NULL, NULL); /* non-manifold edge */
+      neighbor = f1;
+    }
+    i = i->next;
+  }
+  if (neighbor == NULL || neighbor == first) /* end of fan */
+    return NULL;
+
+  if (GTS_TRIANGLE (neighbor)->e1 == e) {
+    next = GTS_TRIANGLE (neighbor)->e2;
+    enext = GTS_TRIANGLE (neighbor)->e3;
+  }
+  else if (GTS_TRIANGLE (neighbor)->e2 == e) {
+    next = GTS_TRIANGLE (neighbor)->e3;
+    enext = GTS_TRIANGLE (neighbor)->e1;
+  }
+  else if (GTS_TRIANGLE (neighbor)->e3 == e) {
+    next = GTS_TRIANGLE (neighbor)->e1;
+    enext = GTS_TRIANGLE (neighbor)->e2;
+  }
+  else
+    g_assert_not_reached ();
+
+  /* checking for correct orientation */
+  g_return_val_if_fail (GTS_SEGMENT (enext)->v1 == v ||
+			GTS_SEGMENT (enext)->v2 == v, NULL);
+
+  return g_slist_prepend (edge_fan_list (v, surface, neighbor, enext, first), 
+			  next);
+}
+
+/**
+ * gts_vertex_fan_oriented:
+ * @v: a #GtsVertex.
+ * @surface: a #GtsSurface.
+ *
+ * Returns: a list of #GtsEdge describing in counterclockwise order the 
+ * boundary of the fan of summit @v, the faces of the fan belonging to 
+ * @surface.
+ */
+GSList * gts_vertex_fan_oriented (GtsVertex * v, GtsSurface * surface)
+{
+  GtsFace * f = NULL;
+  guint d = 2;
+  GSList * i;
+  GtsVertex * v1, * v2, * v3;
+  GtsEdge * e1, * e2, * e3;
+
+  g_return_val_if_fail (v != NULL, NULL);
+  g_return_val_if_fail (surface != NULL, NULL);
+
+  i = v->segments;
+  while (i) {
+    GtsEdge * e = i->data;
+    if (GTS_IS_EDGE (e)) {
+      GSList * j = e->triangles;
+      GtsFace * f1 = NULL;
+      guint degree = 0;
+      while (j) {
+	if (GTS_IS_FACE (j->data) &&
+	    gts_face_has_parent_surface (j->data, surface)) {
+	  f1 = j->data;
+	  degree++;
+	}
+	j = j->next;
+      }
+      if (f1 != NULL) {
+	g_return_val_if_fail (degree <= 2, NULL); /* non-manifold edge */
+	if (degree == 1) {
+	  gts_triangle_vertices_edges (GTS_TRIANGLE (f1), NULL,
+				       &v1, &v2, &v3, &e1, &e2, &e3);
+	  if (v == v2) {
+	    e2 = e3;
+	    e3 = e1;
+	  }
+	  else if (v == v3) {
+	    e3 = e2;
+	    e2 = e1;
+	  }
+	  if (e3 != e) {
+	    d = 1;
+	    f = f1;
+	  }
+	}
+	else if (degree <= d)
+	  f = f1;
+      }
+    }
+    i = i->next;
+  }
+
+  if (f == NULL)
+    return NULL;
+
+  gts_triangle_vertices_edges (GTS_TRIANGLE (f), NULL,
+			       &v1, &v2, &v3, &e1, &e2, &e3);
+  if (v == v2) {
+    e2 = e3;
+    e3 = e1;
+  }
+  else if (v == v3) {
+    e3 = e2;
+    e2 = e1;
+  }
+
+  return g_slist_prepend (edge_fan_list (v, surface, f, e3, f), e2);
+}
+
+#define edge_use_vertex(e, v) (GTS_SEGMENT(e)->v1 == v ||\
+			       GTS_SEGMENT(e)->v2 == v)
+
+static GtsEdge * replace_vertex (GtsTriangle * t, 
+				 GtsEdge * e1,
+				 GtsVertex * v, 
+				 GtsVertex * with)
+{
+  GtsEdge * e = NULL;
+
+  if (t->e1 != e1 && edge_use_vertex (t->e1, v))
+    e = t->e1;
+  else if (t->e2 != e1 && edge_use_vertex (t->e2, v))
+    e = t->e2;
+  else if (t->e3 != e1 && edge_use_vertex (t->e3, v))
+    e = t->e3;
+  else
+    return NULL;
+
+  if (with != v) {
+    GtsSegment * s = GTS_SEGMENT (e);
+    if (s->v1 == v) s->v1 = with;
+    if (s->v2 == v) s->v2 = with;
+    with->segments = g_slist_prepend (with->segments, s);
+    v->segments = g_slist_remove (v->segments, s);
+  }
+
+  return e;
+}
+
+static void triangle_next (GtsEdge * e, GtsVertex * v, GtsVertex * with)
+{
+  GSList * i;
+
+  if (e == NULL)
+    return;
+    
+  i = e->triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (GTS_OBJECT (t)->reserved) {
+      GTS_OBJECT (t)->reserved = NULL;
+      triangle_next (replace_vertex (t, e, v, with), v, with);
+    }
+    i = i->next;
+  }
+}
+
+/** 
+ * gts_vertex_is_contact: 
+ * @v: a #GtsVertex.  
+ * @sever: if %TRUE and if @v is a contact vertex between two or more
+ * sets of connected triangles replaces it with as many vertices,
+ * clones of @v.
+ *
+ * Returns: the number of sets of connected triangles sharing @v as a
+ * contact vertex.  
+ */
+guint gts_vertex_is_contact (GtsVertex * v, gboolean sever)
+{
+  GSList * triangles, * i;
+  GtsVertex * with = v;
+  guint ncomponent = 0;
+
+  g_return_val_if_fail (v != NULL, 0);
+
+  triangles = gts_vertex_triangles (v, NULL);
+  i = triangles;
+  while (i) {
+    GTS_OBJECT (i->data)->reserved = i;
+    i = i->next;
+  }
+
+  i = triangles;
+  while (i) {
+    GtsTriangle * t = i->data;
+    if (GTS_OBJECT (t)->reserved) {
+      GtsEdge * e;
+      if (ncomponent && sever)
+	with = GTS_VERTEX (gts_object_clone (GTS_OBJECT (v)));
+      GTS_OBJECT (t)->reserved = NULL;
+      e = replace_vertex (t, NULL, v, with);
+      triangle_next (e, v, with);
+      triangle_next (replace_vertex (t, e, v, with), v, with);
+      ncomponent++;
+    }
+    i = i->next;
+  }
+  g_slist_free (triangles);
+
+  return ncomponent;
+}
diff --git a/src/vopt.c b/src/vopt.c
new file mode 100644
index 0000000..3cfe2f7
--- /dev/null
+++ b/src/vopt.c
@@ -0,0 +1,515 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "gts.h"
+
+/* #define DEBUG_VOPT */
+
+/* compute the normal (nx, ny, nz) as the cross-product of the first two 
+   oriented edges and the norm nt = |t| as (v1xv2).v3 */
+static void triangle_normal (GtsTriangle * t, 
+			     gdouble * nx, 
+			     gdouble * ny, 
+			     gdouble * nz,
+			     gdouble * nt)
+{
+  GtsPoint * p1, * p2 = NULL, * p3 = NULL;
+  gdouble x1, y1, z1, x2, y2, z2;
+
+  g_return_if_fail (t != NULL);
+
+  p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1);
+  if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v1);
+  }
+  else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v1);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v2);
+  }
+  else
+    g_assert_not_reached ();
+
+  x1 = p2->x - p1->x;
+  y1 = p2->y - p1->y;
+  z1 = p2->z - p1->z;
+
+  x2 = p3->x - p1->x;
+  y2 = p3->y - p1->y;
+  z2 = p3->z - p1->z;
+
+  *nt = ((p1->y*p2->z - p1->z*p2->y)*p3->x + 
+	 (p1->z*p2->x - p1->x*p2->z)*p3->y + 
+	 (p1->x*p2->y - p1->y*p2->x)*p3->z);
+  *nx = y1*z2 - z1*y2;
+  *ny = z1*x2 - x1*z2;
+  *nz = x1*y2 - y1*x2;
+}
+
+static void boundary_preservation (GtsEdge * edge,
+				   GtsFace * f,
+				   GtsVector e1, GtsVector e2,
+				   GtsMatrix * H, GtsVector c)
+{
+  GtsTriangle * t = GTS_TRIANGLE (f);
+  GtsEdge * edge2;
+  GtsVertex * v1 = GTS_SEGMENT (edge)->v1, * v2 = GTS_SEGMENT (edge)->v2;
+  GtsPoint * p1, * p2;
+  GtsVector e, e3;
+
+  /* find orientation of segment */
+  edge2 = edge == t->e1 ? t->e2 : edge == t->e2 ? t->e3 : t->e1;
+  if (v2 != GTS_SEGMENT (edge2)->v1 && v2 != GTS_SEGMENT (edge2)->v2) {
+    v2 = v1; v1 = GTS_SEGMENT (edge)->v2;
+  }
+  p1 = GTS_POINT (v1);
+  p2 = GTS_POINT (v2);
+
+  e[0] = p2->x - p1->x;
+  e[1] = p2->y - p1->y;
+  e[2] = p2->z - p1->z;
+
+  e1[0] += e[0];
+  e1[1] += e[1];
+  e1[2] += e[2];
+
+  e3[0] = p2->y*p1->z - p2->z*p1->y;
+  e3[1] = p2->z*p1->x - p2->x*p1->z;
+  e3[2] = p2->x*p1->y - p2->y*p1->x;
+
+  e2[0] += e3[0];
+  e2[1] += e3[1];
+  e2[2] += e3[2];
+
+  H[0][0] += e[1]*e[1] + e[2]*e[2];
+  H[0][1] -= e[0]*e[1];
+  H[0][2] -= e[0]*e[2];
+  H[1][0] = H[0][1];
+  H[1][1] += e[0]*e[0] + e[2]*e[2];
+  H[1][2] -= e[1]*e[2];
+  H[2][0] = H[0][2];
+  H[2][1] = H[1][2];
+  H[2][2] += e[0]*e[0] + e[1]*e[1];
+
+  c[0] += e[1]*e3[2] - e[2]*e3[1];
+  c[1] += e[2]*e3[0] - e[0]*e3[2];
+  c[2] += e[0]*e3[1] - e[1]*e3[0];
+}
+
+static gdouble boundary_cost (GtsEdge * edge, 
+			      GtsFace * f,
+			      GtsVertex * v)
+{
+  GtsTriangle * t = GTS_TRIANGLE (f);
+  GtsEdge * edge2;
+  GtsVertex * v1 = GTS_SEGMENT (edge)->v1, * v2 = GTS_SEGMENT (edge)->v2;
+  GtsPoint * p1, * p2;
+  GtsVector e;
+  GtsPoint * p = GTS_POINT (v);
+
+  /* find orientation of segment */
+  edge2 = edge == t->e1 ? t->e2 : edge == t->e2 ? t->e3 : t->e1;
+  if (v2 != GTS_SEGMENT (edge2)->v1 && v2 != GTS_SEGMENT (edge2)->v2) {
+    v2 = v1; v1 = GTS_SEGMENT (edge)->v2;
+  }
+  p1 = GTS_POINT (v1);
+  p2 = GTS_POINT (v2);  
+
+  e[0] = (p2->y - p1->y)*(p->z - p2->z) - (p2->z - p1->z)*(p->y - p2->y);
+  e[1] = (p2->z - p1->z)*(p->x - p2->x) - (p2->x - p1->x)*(p->z - p2->z);
+  e[2] = (p2->x - p1->x)*(p->y - p2->y) - (p2->y - p1->y)*(p->x - p2->x);
+
+  return e[0]*e[0] + e[1]*e[1] + e[2]*e[2];
+}
+
+static gdouble edge_boundary_cost (GtsEdge * e, GtsVertex * v)
+{
+  gdouble cost = 0.;
+  GSList * i;
+
+  i = GTS_SEGMENT (e)->v1->segments;
+  while (i) {
+    GtsFace * f;
+    if (GTS_IS_EDGE (i->data) && 
+	(f = gts_edge_is_boundary (i->data, NULL)))
+      cost += boundary_cost (i->data, f, v);
+    i = i->next;
+  }
+  i = GTS_SEGMENT (e)->v2->segments;
+  while (i) {
+    GtsFace * f;
+    if (i->data != e && 
+	GTS_IS_EDGE (i->data) && 
+	(f = gts_edge_is_boundary (i->data, NULL)))
+      cost += boundary_cost (i->data, f, v);
+    i = i->next;
+  }
+
+  return cost/4.;
+}
+
+static gdouble edge_volume_cost (GtsEdge * e, GtsVertex * v)
+{
+  GSList * i, * triangles;
+  gdouble n1, n2, n3, nt;
+  gdouble cost = 0.0, a;
+
+  triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL);
+  triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles);
+
+  i = triangles;
+  while (i) {
+    if (GTS_IS_FACE (i->data)) {
+      triangle_normal (i->data, &n1, &n2, &n3, &nt);
+      a = GTS_POINT (v)->x*n1 + 
+	GTS_POINT (v)->y*n2 + 
+	GTS_POINT (v)->z*n3 - nt;
+      cost += a*a;
+    }
+    i = i->next;
+  }
+  g_slist_free (triangles);
+
+  return cost/36.;
+}
+
+static gdouble edge_shape_cost (GtsEdge * e, GtsVertex * v)
+{
+  GSList * list, * i;
+  GtsVertex 
+    * v1 = GTS_SEGMENT (e)->v1,
+    * v2 = GTS_SEGMENT (e)->v2;
+  gdouble cost = 0.;
+
+  list = gts_vertex_neighbors (v1, NULL, NULL);
+  list = gts_vertex_neighbors (v2, list, NULL);
+  i = list;
+  while (i) {
+    GtsPoint * p = i->data;
+    if (p != GTS_POINT (v1) && p != GTS_POINT (v2))
+      cost += gts_point_distance2 (p, GTS_POINT (v));
+    i = i->next;
+  }
+  g_slist_free (list);
+
+  return cost;
+}
+
+/**
+ * gts_volume_optimized_vertex:
+ * @edge: a #GtsEdge.
+ * @klass: a #GtsVertexClass to be used for the new vertex.
+ * @params: a #GtsVolumeOptimizedParms.
+ *
+ * Returns: a #GtsVertex which can be used to replace @edge for an
+ * edge collapse operation. The position of the vertex is optimized in
+ * order to minimize the changes in area and volume for the surface
+ * using @edge. The volume enclosed by the surface is locally
+ * preserved. For more details see "Fast and memory efficient
+ * polygonal simplification" (1998) and "Evaluation of memoryless
+ * simplification" (1999) by Lindstrom and Turk.  
+ */
+GtsVertex * gts_volume_optimized_vertex (GtsEdge * edge,
+					 GtsVertexClass * klass,
+					 GtsVolumeOptimizedParams * params)
+{
+  GSList * triangles, * i;
+  gdouble sn1 = 0., sn2 = 0., sn3 = 0.;
+  gdouble sn11 = 0., sn22 = 0., sn33 = 0.;
+  gdouble sn12 = 0., sn13 = 0., sn23 = 0.;
+  gdouble st = 0., stn1 = 0., stn2 = 0., stn3 = 0.;
+  gdouble n1, n2, n3, nt;
+  GtsMatrix * A, * Ai;
+  GtsVector A1, b;
+  GtsVector e1 = {0., 0., 0.}, e2 = {0., 0., 0.};
+  GtsMatrix * Hb;
+  GtsVector cb = {0., 0., 0.};
+  GtsVertex * v;
+  GtsVertex * v1, * v2;
+  guint n = 0, nb = 0;
+#ifdef DEBUG_VOPT
+  guint nold = 0;
+#endif
+
+  g_return_val_if_fail (edge != NULL, NULL);
+  g_return_val_if_fail (klass != NULL, NULL);
+  g_return_val_if_fail (params != NULL, NULL);
+
+  A = gts_matrix_new (0., 0., 0., 0., 0., 0., 0., 0., 0.);
+  Hb = gts_matrix_new (0., 0., 0., 0., 0., 0., 0., 0., 0.);
+  v1 = GTS_SEGMENT (edge)->v1;
+  v2 = GTS_SEGMENT (edge)->v2;
+
+  /* boundary preservation */
+  i = v1->segments;
+  while (i) {
+    GtsEdge * edge1 = i->data;
+    GtsFace * f;
+    if (GTS_IS_EDGE (edge1) &&
+	(f = gts_edge_is_boundary (edge1, NULL))) {
+      boundary_preservation (edge1, f, e1, e2, Hb, cb);
+      nb++;
+    }
+    i = i->next;
+  }
+  i = v2->segments;
+  while (i) {
+    GtsEdge * edge1 = i->data;
+    GtsFace * f;
+    if (edge1 != edge && 
+	GTS_IS_EDGE (edge1) &&
+	(f = gts_edge_is_boundary (edge1, NULL))) {
+      boundary_preservation (edge1, f, e1, e2, Hb, cb);
+      nb++;
+    }
+    i = i->next;
+  }
+  if (nb > 0) {
+    GtsMatrix * H = gts_matrix_new (
+	       e1[2]*e1[2] + e1[1]*e1[1], - e1[0]*e1[1], - e1[0]*e1[2],
+	     - e1[0]*e1[1], e1[2]*e1[2] + e1[0]*e1[0], - e1[1]*e1[2],
+	     - e1[0]*e1[2], - e1[1]*e1[2], e1[1]*e1[1] + e1[0]*e1[0]);
+    GtsVector c = { e1[1]*e2[2] - e1[2]*e2[1],
+		    e1[2]*e2[0] - e1[0]*e2[2],
+		    e1[0]*e2[1] - e1[1]*e2[0] };
+    n = gts_matrix_quadratic_optimization (A, b, n, H, c);
+    gts_matrix_destroy (H);
+  }
+
+  g_assert (n <= 2);
+
+#ifdef DEBUG_VOPT
+  if (n != nold) {
+    fprintf (stderr, "--- boundary preservation ---\n");
+    gts_matrix_print (A, stderr);
+    gts_vector_print (b, stderr);
+    nold = n;
+  }
+#endif
+
+  /* volume preservation */
+  triangles = gts_vertex_triangles (v1, NULL);
+  triangles = gts_vertex_triangles (v2, triangles);
+
+  i = triangles;
+  while (i) {
+    if (GTS_IS_FACE (i->data)) {
+      triangle_normal (i->data, &n1, &n2, &n3, &nt);
+      sn1 += n1; sn2 += n2; sn3 += n3;
+      sn11 += n1*n1; sn22 += n2*n2; sn33 += n3*n3;
+      sn12 += n1*n2; sn13 += n1*n3; sn23 += n2*n3;
+      st += nt; stn1 += nt*n1; stn2 += nt*n2; stn3 += nt*n3;
+    }
+    i = i->next;
+  }
+  g_slist_free (triangles);
+
+  A1[0] = sn1; A1[1] = sn2; A1[2] = sn3;
+  n = gts_matrix_compatible_row (A, b, n, A1, st);
+
+#ifdef DEBUG_VOPT
+  if (n != nold) {
+    fprintf (stderr, "--- volume preservation ---\n");
+    gts_matrix_print (A, stderr);
+    gts_vector_print (b, stderr);
+    nold = n;
+  }
+#endif
+
+#if 1 /* Weighted average of volume and boundary optimization */
+  if (n < 3) {
+    /* volume optimization and boundary optimization */
+    GtsMatrix * H = gts_matrix_new (sn11, sn12, sn13,
+				    sn12, sn22, sn23,
+				    sn13, sn23, sn33);
+    GtsVector c = { - stn1, - stn2, - stn3};
+    gdouble le = 9.*params->boundary_weight*
+      gts_point_distance2 (GTS_POINT (v1), 
+			   GTS_POINT (v2));
+    guint i, j;
+
+    if (nb > 0)
+      for (i = 0; i < 3; i++) {
+	for (j = 0; j < 3; j++)
+	  H[i][j] = params->volume_weight*H[i][j] + le*Hb[i][j];
+	c[i] = params->volume_weight*c[i] + le*cb[i];
+      }
+    n = gts_matrix_quadratic_optimization (A, b, n, H, c);
+    gts_matrix_destroy (H);
+  }
+
+#ifdef DEBUG_VOPT
+  if (n != nold) {
+    fprintf (stderr, "--- volume and boundary optimization ---\n");
+    gts_matrix_print (A, stderr);
+    gts_vector_print (b, stderr);
+    nold = n;
+  }
+#endif
+
+  if (n < 3) {
+    /* triangle shape optimization */
+    gdouble nv = 0.0;
+    GtsMatrix * H;
+    GtsVector c = {0., 0., 0.};
+    GSList * list, * i;
+
+    list = gts_vertex_neighbors (v1, NULL, NULL);
+    list = gts_vertex_neighbors (v2, list, NULL);
+
+    i = list;
+    while (i) {
+      GtsPoint * p1 = i->data;
+      if (p1 != GTS_POINT (v1) && p1 != GTS_POINT (v2)) {
+	nv += 1.0;
+	c[0] -= p1->x;
+	c[1] -= p1->y;
+	c[2] -= p1->z;
+      }
+      i = i->next;
+    }
+    g_slist_free (list);
+    
+    H = gts_matrix_new (nv, 0., 0.,
+			0., nv, 0.,
+			0., 0., nv);
+    n = gts_matrix_quadratic_optimization (A, b, n, H, c);
+    gts_matrix_destroy (H);
+  }
+
+#ifdef DEBUG_VOPT
+  if (n != nold) {
+    fprintf (stderr, "--- triangle shape optimization ---\n");
+    gts_matrix_print (A, stderr);
+    gts_vector_print (b, stderr);
+    nold = n;
+  }
+#endif
+#else /* Weighted average of volume, boundary and shape optimization */
+  if (n < 3) {
+    /* volume optimization, boundary and shape optimization */
+    GtsMatrix * H; 
+    GtsVector c;
+    gdouble l2 = gts_point_distance2 (GTS_POINT (v1), 
+				      GTS_POINT (v2));
+    gdouble wv = params->volume_weight/32.;
+    gdouble wb = params->boundary_weight/4.*l2;
+    gdouble ws = params->shape_weight*l2*l2;
+    
+    gdouble nv = 0.0;
+    GtsVector cs = {0., 0., 0.};
+    GSList * list, * i;
+
+    list = gts_vertex_neighbors (v1, NULL, NULL);
+    list = gts_vertex_neighbors (v2, list, NULL);
+
+    i = list;
+    while (i) {
+      GtsPoint * p1 = i->data;
+      if (p1 != GTS_POINT (v1) && p1 != GTS_POINT (v2)) {
+	nv += 1.0;
+	cs[0] -= p1->x;
+	cs[1] -= p1->y;
+	cs[2] -= p1->z;
+      }
+      i = i->next;
+    }
+    g_slist_free (list);
+
+    H = gts_matrix_new (wv*sn11 + wb*Hb[0][0] + ws*nv, 
+			wv*sn12 + wb*Hb[0][1], 
+			wv*sn13 + wb*Hb[0][2],
+			wv*sn12 + wb*Hb[1][0], 
+			wv*sn22 + wb*Hb[1][1] + ws*nv, 
+			wv*sn23 + wb*Hb[1][2],
+			wv*sn13 + wb*Hb[2][0], 
+			wv*sn23 + wb*Hb[2][1], 
+			wv*sn33 + wb*Hb[2][2] + ws*nv);
+
+    c[0] = - wv*stn1 + wb*cb[0] + ws*cs[0];
+    c[1] = - wv*stn2 + wb*cb[1] + ws*cs[1];
+    c[2] = - wv*stn3 + wb*cb[2] + ws*cs[2];
+
+    n = gts_matrix_quadratic_optimization (A, b, n, H, c);
+    gts_matrix_destroy (H);
+  }
+
+#ifdef DEBUG_VOPT
+  if (n != nold) {
+    fprintf (stderr, "--- volume, boundary and shape optimization ---\n");
+    gts_matrix_print (A, stderr);
+    gts_vector_print (b, stderr);
+    nold = n;
+  }
+#endif
+#endif /* Weighted average of volume, boundary and shape optimization */
+
+  g_assert (n == 3);
+  g_assert ((Ai = gts_matrix_inverse (A)));
+
+  v = gts_vertex_new (klass,
+		      Ai[0][0]*b[0] + Ai[0][1]*b[1] + Ai[0][2]*b[2],
+		      Ai[1][0]*b[0] + Ai[1][1]*b[1] + Ai[1][2]*b[2],
+		      Ai[2][0]*b[0] + Ai[2][1]*b[1] + Ai[2][2]*b[2]);
+
+  gts_matrix_destroy (A);
+  gts_matrix_destroy (Ai);
+  gts_matrix_destroy (Hb);
+  
+  return v;
+}
+
+/**
+ * gts_volume_optimized_cost:
+ * @e: a #GtsEdge.
+ * @params: a #GtsVolumeOptimizedParams.
+ * 
+ * Returns: the cost for the collapse of @e as minimized by the function
+ * gts_volume_optimized_vertex().
+ */
+gdouble gts_volume_optimized_cost (GtsEdge * e, 
+				   GtsVolumeOptimizedParams * params)
+{
+  GtsVertex * v;
+  gdouble cost;
+  gdouble length2;
+
+  g_return_val_if_fail (e != NULL, G_MAXDOUBLE);
+  g_return_val_if_fail (params != NULL, G_MAXDOUBLE);
+
+  v = gts_volume_optimized_vertex (e, gts_vertex_class (), params);
+
+  length2 = gts_point_distance2 (GTS_POINT (GTS_SEGMENT (e)->v1), 
+				 GTS_POINT (GTS_SEGMENT (e)->v2));
+  cost = 
+    params->volume_weight*edge_volume_cost (e, v) +
+    params->boundary_weight*length2*edge_boundary_cost (e, v) +
+    params->shape_weight*length2*length2*edge_shape_cost (e, v);
+  gts_object_destroy (GTS_OBJECT (v));
+
+  return cost;
+}
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..9be37c2
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,3 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = boolean delaunay coarsen
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644
index 0000000..8e260e2
--- /dev/null
+++ b/test/Makefile.in
@@ -0,0 +1,301 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+SUBDIRS = boolean delaunay coarsen
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+ at SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive  \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+	  rev="$$subdir $$rev"; \
+	  test "$$subdir" = "." && dot_seen=yes; \
+	done; \
+	test "$$dot_seen" = "no" && rev=". $$rev"; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+   if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+   fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = test
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    chmod 777 $(distdir)/$$subdir; \
+	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile
+all-redirect: all-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am:  clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am:  distclean-tags distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-recursive
+
+maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+
+.PHONY: install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/boolean/1.gts b/test/boolean/1.gts
new file mode 100644
index 0000000..f70fe7c
--- /dev/null
+++ b/test/boolean/1.gts
@@ -0,0 +1,7233 @@
+1207 3615 2410
+0.000139 3.702301 -4.076366
+0.000191 6.453524 0.000648
+0.000189 6.403917 0.000653
+-9.998696 -0.157139 -2.855559
+-9.998923 -0.143823 -2.870679
+0.000060 1.559853 -1.778870
+0.200214 9.997995 -100.000000
+0.374673 9.992979 -100.000000
+4.324851 4.721829 -99.999001
+9.880870 1.538961 0.000000
+9.906224 1.366281 0.000000
+9.906224 1.366281 -100.000000
+8.001794 5.997609 -100.000000
+8.105246 5.857047 -100.000000
+8.001794 5.997609 0.000000
+0.000161 5.452029 0.000729
+3.182867 5.556020 0.001000
+0.000160 5.412415 0.000731
+5.172388 8.558410 -100.000000
+5.320966 8.466838 -100.000000
+5.172388 8.558410 0.000000
+-3.231376 9.463520 -10.387163
+-3.231376 9.463520 -100.000000
+-3.226210 9.465235 -10.387268
+0.000144 4.840078 0.000752
+0.000143 4.826258 0.000752
+-9.262182 3.769877 -100.000000
+-9.194978 3.930951 -100.000000
+-3.396046 9.405683 -10.381069
+-3.396046 9.405683 -100.000000
+-3.391016 9.407450 -10.381255
+-9.122947 4.095245 -7.058693
+-9.124973 4.090826 -100.000000
+-9.119832 4.102033 -7.064491
+-6.825686 7.307889 -9.454682
+-6.916147 7.222486 -9.400959
+-6.801169 7.331037 -100.000000
+0.000062 2.049540 0.000707
+0.000060 1.973274 0.000704
+-7.857990 6.184685 -8.705426
+-7.864263 6.176841 -100.000000
+-7.854770 6.188712 -8.708243
+4.825609 -8.758624 0.000000
+4.672013 -8.841509 0.000000
+4.672013 -8.841509 -100.000000
+-9.906549 -1.363775 -1.448151
+-9.906224 -1.366281 -100.000000
+-9.928559 -1.193185 -100.000000
+0.000263 7.063034 -7.378944
+-7.406743 6.718509 -9.072204
+-7.403501 6.722028 -9.074549
+0.000103 3.445934 0.000750
+0.000101 3.395541 0.000749
+0.000221 7.494859 0.000504
+0.000219 7.418353 0.000516
+-6.838752 -7.295989 -100.000000
+-6.965043 -7.175524 -100.000000
+-6.838752 -7.295989 0.000000
+-3.499120 -0.916010 0.000418
+-8.206232 -5.714698 0.000000
+-3.305774 -0.865176 0.000430
+-9.555504 2.948279 -100.000000
+-9.502595 3.114597 -100.000000
+-7.755264 6.313152 -8.795284
+1.538961 -9.880870 0.000000
+1.366281 -9.906224 0.000000
+1.366281 -9.906224 -100.000000
+-1.244192 -9.922297 0.000000
+-1.417172 -9.899072 0.000000
+-1.417172 -9.899072 -100.000000
+-0.200214 -9.997995 -100.000000
+-0.374673 -9.992979 -100.000000
+9.984918 -0.549018 -100.000000
+9.973815 -0.723194 -100.000000
+9.665876 2.563363 -100.000000
+9.709141 2.394278 -100.000000
+9.665876 2.563363 0.000000
+9.928559 1.193185 0.000000
+0.000306 8.221130 -8.440147
+-6.531766 7.571923 -9.609806
+-6.528392 7.574790 -9.611441
+9.652575 -2.613003 0.000000
+9.605503 -2.781064 0.000000
+8.558410 -5.172388 0.000000
+8.466838 -5.320966 0.000000
+-7.643902 6.447538 -8.888225
+-7.745461 6.324982 -8.803466
+-0.828235 9.965502 -10.183933
+-0.671932 9.977401 -100.000000
+-0.671932 9.977401 -10.152991
+5.714698 -8.206232 -100.000000
+5.570608 -8.304716 -100.000000
+9.872832 -1.589719 0.000000
+9.843583 -1.761781 0.000000
+9.555504 -2.948279 0.000000
+9.502595 -3.114597 0.000000
+9.502595 -3.114597 -100.000000
+9.928559 1.193185 -100.000000
+9.947871 1.019728 -100.000000
+9.145875 4.043881 0.000000
+9.215057 3.883647 0.000000
+0.000026 0.778664 0.000650
+0.000022 0.666653 0.000644
+-7.523026 6.588042 -8.984190
+-7.519790 6.591680 -8.986646
+-3.559680 9.344980 -100.000000
+2.053977 -9.786785 0.000000
+1.882860 -9.821142 0.000000
+1.882860 -9.821142 -100.000000
+7.448616 6.672190 0.000000
+7.563929 6.541175 0.000000
+7.563929 6.541175 -100.000000
+-1.001975 9.949535 -10.215985
+-0.845957 9.964154 -100.000000
+-0.845957 9.964154 -10.187443
+-9.984918 0.549018 -100.000000
+-9.973815 0.723194 -100.000000
+-8.168208 5.768711 -8.402502
+-8.176756 5.756795 -100.000000
+-8.075040 5.898622 -100.000000
+6.838752 7.295989 0.000000
+6.965043 7.175524 0.000000
+6.965043 7.175524 -100.000000
+-7.563929 -6.541175 -100.000000
+-7.676936 -6.408171 -100.000000
+-9.073906 -4.202882 -100.000000
+-9.145875 -4.043881 -100.000000
+-6.447538 -7.643902 0.000000
+-6.579959 -7.530214 0.000000
+-6.579959 -7.530214 -100.000000
+-7.864263 6.176841 -8.699941
+-8.459240 5.332824 -8.069088
+-8.466838 5.320966 -100.000000
+-8.372684 5.467923 -100.000000
+9.388106 -3.444336 0.000000
+9.326566 -3.607656 0.000000
+-5.320966 -8.466838 -100.000000
+-5.467923 -8.372684 -100.000000
+-5.320966 -8.466838 0.000000
+0.000012 0.307478 0.000626
+0.000008 0.179256 0.000619
+-4.512758 8.923800 -10.263165
+-4.516995 8.921700 -100.000000
+-4.360604 8.999174 -100.000000
+9.405683 3.396046 -100.000000
+9.463520 3.231376 -100.000000
+7.295989 -6.838752 0.000000
+7.175524 -6.965043 0.000000
+0.000168 5.693738 0.000715
+0.000169 5.711062 0.000713
+-9.842004 1.770184 -4.899440
+-9.843583 1.761781 -100.000000
+-9.843583 1.761781 -4.891043
+-6.710379 -7.414231 -100.000000
+-9.999907 0.031050 -3.068635
+-9.999967 0.025694 -100.000000
+-9.997995 0.200214 -100.000000
+6.541175 -7.563929 -100.000000
+6.408171 -7.676936 -100.000000
+1.193185 -9.928559 -100.000000
+1.019728 -9.947871 -100.000000
+-4.186486 9.081328 -10.311906
+-4.043881 9.145875 -100.000000
+-4.198445 9.075914 -10.310428
+-7.288203 6.846914 -9.157717
+-7.295989 6.838752 -100.000000
+-7.284955 6.850320 -9.159956
+-9.049885 4.254254 -7.194469
+-9.052189 4.249455 -100.000000
+-9.046749 4.260784 -7.200007
+9.696710 -2.444142 0.000000
+9.652575 -2.613003 -100.000000
+9.326566 -3.607656 -100.000000
+9.262182 -3.769877 -100.000000
+7.052875 -7.089214 0.000000
+6.928077 -7.211223 0.000000
+6.928077 -7.211223 -100.000000
+-2.781064 -9.605503 0.000000
+-2.948279 -9.555504 0.000000
+-2.948279 -9.555504 -100.000000
+-0.122871 -0.028322 0.000604
+-5.022235 -8.647378 0.000000
+-0.028847 -0.003600 0.000609
+0.000022 0.519028 -0.602425
+0.025694 9.999967 -5.378673
+0.000362 9.999811 -8.784371
+0.000343 9.999811 -6.449280
+-5.987275 8.009399 -9.851478
+-6.122756 7.906274 -9.796412
+8.841509 4.672013 -100.000000
+8.921700 4.516995 -100.000000
+-9.958985 0.904118 -4.010990
+-9.942501 1.070836 -100.000000
+-9.956397 0.930292 -4.038787
+0.000100 2.621056 -2.936966
+0.000110 3.688524 0.000755
+0.000109 3.641173 0.000754
+0.000310 9.999810 -2.024125
+0.000291 8.968504 -3.570602
+0.000221 5.923634 -6.297699
+0.000156 5.255214 0.000738
+0.000155 5.216143 0.000740
+-9.555104 2.949534 -6.036401
+-9.555504 2.948279 -6.035238
+8.176756 -5.756795 -100.000000
+8.075040 -5.898622 -100.000000
+8.176756 -5.756795 0.000000
+0.140517 9.207457 -3.874863
+0.200214 9.997995 -5.210624
+0.209289 9.997735 -5.201606
+-9.605283 2.781799 -5.880026
+-9.605503 2.781064 -100.000000
+-9.605503 2.781064 -5.879342
+0.000038 1.196312 0.000670
+0.000040 1.289713 0.000674
+0.000100 3.344461 0.000748
+2.563363 -9.665876 0.000000
+2.394278 -9.709141 0.000000
+-9.897878 1.425026 -4.551945
+-9.899072 1.417172 -100.000000
+-9.899072 1.417172 -4.544015
+2.899136 -9.570528 0.000000
+2.731665 -9.619668 0.000000
+2.731665 -9.619668 -100.000000
+-9.999967 0.025694 -3.062600
+0.549018 9.984918 -4.858659
+0.383440 9.992573 -5.028286
+-9.811336 1.933306 -100.000000
+-9.776102 2.104243 -100.000000
+3.065722 -9.518474 -100.000000
+2.899136 -9.570528 -100.000000
+-2.274539 -9.737887 -100.000000
+-2.444142 -9.696710 -100.000000
+6.273214 -7.787604 0.000000
+6.136346 -7.895901 0.000000
+6.136346 -7.895901 -100.000000
+-7.211223 -6.928077 -100.000000
+-7.331037 -6.801169 -100.000000
+-7.643902 6.447538 -100.000000
+0.000349 9.397575 -9.480972
+-8.565605 -2.232899 0.000079
+-9.518474 -3.065722 0.000000
+-9.570528 -2.899136 0.000000
+2.274539 9.737887 0.000000
+2.444142 9.696710 0.000000
+2.444142 9.696710 -100.000000
+9.999967 -0.025694 -100.000000
+9.997995 -0.200214 -100.000000
+-5.114643 8.592898 -10.134728
+-5.113075 8.593816 -10.135122
+8.304716 5.570608 0.000000
+8.400671 5.424824 0.000000
+8.400671 5.424824 -100.000000
+-0.374673 -9.992979 0.000000
+-0.549018 -9.984918 0.000000
+0.000180 4.803276 -5.196724
+-9.262182 3.769877 -6.777987
+-9.322288 3.618437 -6.646017
+0.000298 9.999810 -0.490231
+0.000299 9.999810 -0.627502
+0.025694 9.999967 0.000000
+0.000142 4.787031 0.000753
+-8.584878 -5.128340 -100.000000
+-8.673072 -4.977731 -100.000000
+-8.584878 -5.128340 0.000000
+-4.717387 -8.817384 0.000000
+-4.870554 -8.733710 0.000000
+0.000019 0.550932 0.000638
+0.000015 0.431286 0.000632
+-2.224467 9.749449 -100.000000
+-2.053977 9.786785 -100.000000
+-9.984514 0.555354 -3.637934
+-7.295989 6.838752 -9.152349
+4.717387 8.817384 0.000000
+4.870554 8.733710 0.000000
+4.870554 8.733710 -100.000000
+2.613003 9.652575 -100.000000
+-4.602296 -1.206051 0.000348
+-9.852798 -1.709403 -1.026920
+-9.852507 -1.711171 -1.024760
+0.000192 6.504005 0.000642
+0.000115 3.872789 0.000757
+0.000114 3.827451 0.000756
+-7.530214 6.579959 -100.000000
+-9.921281 1.251762 -4.376159
+1.589719 9.872832 0.000000
+1.761781 9.843583 0.000000
+-4.027326 9.153023 -10.331285
+-4.039337 9.147837 -10.330014
+7.864263 -6.176841 -100.000000
+7.755264 -6.313152 -100.000000
+7.864263 -6.176841 0.000000
+9.446789 -3.279965 0.000000
+9.388106 -3.444336 -100.000000
+-8.066176 5.910535 -8.508962
+-7.970867 6.038652 -100.000000
+-8.022676 5.969009 -8.552460
+-6.273214 7.787604 -9.731593
+-6.395114 7.687644 -9.675702
+-6.273214 7.787604 -100.000000
+9.709141 2.394278 0.000000
+0.000223 7.574248 0.000490
+5.467923 8.372684 -100.000000
+5.613212 8.275980 -100.000000
+9.852507 1.711171 -100.000000
+9.880870 1.538961 -100.000000
+-3.722230 9.281434 -10.360727
+-3.722230 9.281434 -100.000000
+-3.717455 9.283301 -10.361066
+-9.463520 -3.231376 -100.000000
+-9.518474 -3.065722 -100.000000
+-9.463520 -3.231376 0.000000
+-3.279965 -9.446789 -100.000000
+-3.444336 -9.388106 -100.000000
+-9.619668 -2.731665 -100.000000
+-9.665876 -2.563363 -100.000000
+-9.931086 1.168788 -4.291569
+6.579959 7.530214 0.000000
+6.710379 7.414231 0.000000
+6.710379 7.414231 -100.000000
+-1.175414 9.930538 -10.245371
+-1.019728 9.947871 -100.000000
+-1.019728 9.947871 -10.219234
+-9.749592 -2.223814 -0.383152
+-9.749449 -2.224467 -100.000000
+-9.786785 -2.053977 -100.000000
+7.089214 7.052875 -100.000000
+7.211223 6.928077 -100.000000
+7.089214 7.052875 0.000000
+-9.984918 0.549018 -3.631138
+6.838752 7.295989 -100.000000
+-8.653363 5.011720 -7.817884
+-8.647378 5.022235 -100.000000
+-8.647378 5.022235 -7.826213
+-0.218945 -0.053583 0.000600
+-5.172388 -8.558410 0.000000
+-8.951217 4.457471 -7.366511
+-8.970907 4.418232 -7.333470
+8.999174 4.360604 -100.000000
+9.073906 4.202882 -100.000000
+8.999174 4.360604 0.000000
+0.000124 4.178580 0.000759
+0.000123 4.136007 0.000758
+-6.965043 -7.175524 0.000000
+9.124973 -4.090826 -100.000000
+9.052189 -4.249455 -100.000000
+-7.167445 6.973223 -9.240705
+-7.164188 6.976521 -9.242845
+-0.897152 -9.959674 0.000000
+-1.070836 -9.942501 0.000000
+-2.563363 9.665876 -10.384322
+-2.394278 9.709141 -100.000000
+-2.563363 9.665876 -100.000000
+-9.959674 0.897152 -100.000000
+-9.977401 -0.671932 -2.267256
+-9.977633 -0.667973 -2.271800
+-8.921700 -4.516995 -100.000000
+-8.999174 -4.360604 -100.000000
+3.930951 9.194978 0.000000
+4.090826 9.124973 0.000000
+4.090826 9.124973 -100.000000
+0.000188 6.355132 0.000659
+0.000186 6.307115 0.000663
+-9.326566 3.607656 -100.000000
+1.933306 9.811336 0.000000
+2.104243 9.776102 0.000000
+2.104243 9.776102 -100.000000
+-9.852507 -1.711171 -100.000000
+-9.880870 -1.538961 -100.000000
+3.883647 -9.215057 0.000000
+3.722230 -9.281434 0.000000
+0.000053 1.733217 0.000694
+0.000051 1.649139 0.000690
+9.994773 0.323315 -100.000000
+9.998893 0.148833 -100.000000
+0.200214 9.997995 0.000000
+0.374673 9.992979 0.000000
+-8.673072 -4.977731 0.000000
+-8.758624 -4.825609 0.000000
+-8.758624 -4.825609 -100.000000
+-1.693404 9.855433 -10.317444
+-1.538961 9.880870 -100.000000
+-1.704574 9.853594 -10.318810
+-9.749449 -2.224467 -0.382315
+-9.696710 2.444142 -100.000000
+-9.652575 2.613003 -100.000000
+9.997995 -0.200214 0.000000
+9.992979 -0.374673 0.000000
+0.000197 6.661287 0.000624
+0.000195 6.607822 0.000630
+-2.053977 9.786785 -10.353634
+-2.047726 9.788041 -10.353062
+9.811336 -1.933306 0.000000
+9.776102 -2.104243 0.000000
+-7.706069 -2.010205 0.000139
+-9.405683 -3.396046 0.000000
+-9.821399 -1.881460 -0.815798
+-9.821142 -1.882860 -100.000000
+-9.821142 -1.882860 -0.814079
+0.000305 9.448096 -3.570565
+-8.122426 -2.118077 0.000110
+7.787604 6.273214 0.000000
+7.895901 6.136346 0.000000
+7.895901 6.136346 -100.000000
+0.000048 1.562863 0.000686
+0.000046 1.474280 0.000682
+-7.125653 7.015534 -9.268142
+4.562784 8.898371 -100.000000
+4.717387 8.817384 -100.000000
+-0.305741 9.995187 -10.071882
+-0.148833 9.998893 -100.000000
+-0.315214 9.994964 -10.074184
+-0.131329 9.999000 -10.029273
+0.025694 9.999967 -100.000000
+-0.140535 9.998943 -10.031647
+0.000107 3.593262 0.000753
+7.676936 6.408171 -100.000000
+7.787604 6.273214 -100.000000
+0.000300 9.185430 -3.968307
+0.000300 9.183615 -3.965111
+-3.542706 9.351277 -10.373169
+-3.503781 9.365717 -10.375267
+0.000309 9.590956 -3.570555
+-1.012399 9.948558 -10.217893
+0.000335 9.999811 -5.402313
+6.313152 7.755264 0.000000
+6.447538 7.643902 0.000000
+6.447538 7.643902 -100.000000
+-0.025694 -9.999967 -100.000000
+-0.025694 -9.999967 0.000000
+-4.127337 -1.081178 0.000379
+-8.494069 -5.277384 0.000000
+-3.909357 -1.023868 0.000393
+-4.249455 -9.052189 0.000000
+-4.406791 -8.976648 0.000000
+-9.080162 4.188488 -7.138330
+-3.065722 9.518474 -100.000000
+-0.417625 -0.105821 0.000591
+-5.467923 -8.372684 0.000000
+-0.317164 -0.079407 0.000595
+8.206232 5.714698 -100.000000
+8.105246 5.857047 0.000000
+9.998893 0.148833 0.000000
+-9.602557 2.790910 -5.888521
+3.559680 -9.344980 0.000000
+3.396046 -9.405683 0.000000
+3.396046 -9.405683 -100.000000
+8.841509 4.672013 0.000000
+8.921700 4.516995 0.000000
+-7.748685 6.321090 -8.800774
+9.899072 -1.417172 -100.000000
+9.872832 -1.589719 -100.000000
+7.530214 -6.579959 0.000000
+7.414231 -6.710379 0.000000
+0.000182 6.167233 0.000677
+0.000181 6.121855 0.000681
+6.801169 -7.331037 0.000000
+6.672190 -7.448616 0.000000
+0.000271 9.206396 0.000174
+0.000266 9.038260 0.000210
+7.211223 6.928077 0.000000
+9.922297 -1.244192 -100.000000
+9.922297 -1.244192 0.000000
+9.843583 -1.761781 -100.000000
+9.811336 -1.933306 -100.000000
+-8.811030 4.729017 -7.593073
+-8.817384 4.717387 -100.000000
+-8.733710 4.870554 -100.000000
+-9.942501 1.070836 -4.188052
+-4.825609 8.758624 -100.000000
+-4.672013 8.841509 -100.000000
+0.000301 9.192965 -3.981575
+0.000301 9.191033 -3.978174
+9.959674 -0.897152 -100.000000
+9.942501 -1.070836 -100.000000
+-7.044604 7.097299 -9.321085
+-3.930951 -9.194978 0.000000
+-4.090826 -9.124973 0.000000
+-9.906224 -1.366281 -1.445116
+-9.881185 -1.536824 -1.237725
+0.000194 6.555418 0.000636
+7.970867 -6.038652 -100.000000
+8.898371 -4.562784 0.000000
+8.817384 -4.717387 0.000000
+8.817384 -4.717387 -100.000000
+-8.462449 5.327815 -8.065219
+5.714698 -8.206232 0.000000
+5.570608 -8.304716 0.000000
+6.313152 7.755264 -100.000000
+5.128340 -8.584878 0.000000
+4.977731 -8.673072 0.000000
+4.977731 -8.673072 -100.000000
+-9.752307 -2.211413 -0.399049
+-7.314071 -1.908643 0.000166
+-1.761781 -9.843583 0.000000
+-1.933306 -9.811336 0.000000
+-8.372684 5.467923 -8.173430
+-1.186044 9.929355 -10.247154
+-1.193185 9.928559 -10.248354
+-7.755264 6.313152 -100.000000
+9.749449 2.224467 0.000000
+9.786785 2.053977 0.000000
+9.786785 2.053977 -100.000000
+0.000226 7.656765 0.000477
+-0.838438 9.964726 -10.185954
+0.000162 5.466427 0.000728
+0.000162 5.487802 0.000727
+8.673072 4.977731 0.000000
+8.758624 4.825609 0.000000
+8.758624 4.825609 -100.000000
+0.000121 4.049820 0.000758
+0.000119 4.006173 0.000758
+-9.947871 -1.019728 -1.863703
+-9.948175 -1.016482 -1.867597
+0.000140 4.708262 0.000754
+0.000139 4.668693 0.000755
+-8.400671 -5.424824 -100.000000
+-8.494069 -5.277384 -100.000000
+-9.872832 1.589719 -4.718222
+-9.871449 1.597851 -4.726390
+-9.570528 -2.899136 -100.000000
+5.022235 8.647378 -100.000000
+9.737887 -2.274539 -100.000000
+9.696710 -2.444142 -100.000000
+4.516995 -8.921700 -100.000000
+4.360604 -8.999174 -100.000000
+4.516995 -8.921700 0.000000
+-7.637017 6.455557 -8.893705
+-6.541175 7.563929 -100.000000
+-6.408171 7.676936 -100.000000
+5.424824 -8.400671 -100.000000
+5.277384 -8.494069 -100.000000
+0.000170 5.734880 0.000712
+9.964154 0.845957 0.000000
+9.977401 0.671932 0.000000
+-1.359324 9.907122 -10.273735
+-1.348501 9.908518 -10.272080
+0.557342 9.984386 -4.779279
+0.549018 9.984918 0.000000
+0.549018 9.984918 -4.761214
+-0.625698 -0.160529 0.000581
+-5.756795 -8.176756 0.000000
+-0.520434 -0.132852 0.000586
+-1.193185 9.928559 -100.000000
+-6.919445 7.219372 -9.399000
+-6.928077 7.211223 -9.393873
+-7.041240 7.100588 -9.323186
+-6.038652 -7.970867 -100.000000
+-6.176841 -7.864263 -100.000000
+3.722230 -9.281434 -100.000000
+3.559680 -9.344980 -100.000000
+0.000289 9.800036 0.000045
+0.000293 9.924306 0.000017
+-1.589719 -9.872832 0.000000
+-1.761781 -9.843583 -100.000000
+-7.414231 6.710379 -100.000000
+-2.131427 -0.556420 0.000500
+-7.331037 -6.801169 0.000000
+-1.985055 -0.517936 0.000508
+4.360604 -8.999174 0.000000
+4.202882 -9.073906 0.000000
+-9.786992 -2.052947 -0.602189
+0.000262 8.881948 0.000243
+0.000258 8.736074 0.000273
+9.281434 3.722230 -100.000000
+9.344980 3.559680 -100.000000
+9.073906 4.202882 0.000000
+9.145875 4.043881 -100.000000
+8.976648 -4.406791 -100.000000
+8.898371 -4.562784 -100.000000
+8.976648 -4.406791 0.000000
+-5.898622 -8.075040 0.000000
+-5.898622 -8.075040 -100.000000
+-9.446789 3.279965 -100.000000
+-9.388106 3.444336 -100.000000
+2.563363 -9.665876 -100.000000
+0.000147 4.943479 0.000749
+0.000145 4.904468 0.000750
+-4.354710 -1.140957 0.000364
+-8.976648 4.406791 -100.000000
+-0.897152 -9.959674 -100.000000
+-1.070836 -9.942501 -100.000000
+0.845957 -9.964154 -100.000000
+0.671932 -9.977401 -100.000000
+-8.730247 4.876637 -7.710889
+-8.727049 4.882256 -7.715340
+1.193185 -9.928559 0.000000
+1.019728 -9.947871 0.000000
+-4.562784 -8.898371 -100.000000
+-4.717387 -8.817384 -100.000000
+-5.983760 8.011987 -9.852828
+-5.857047 8.105246 -100.000000
+-5.905177 8.069822 -9.883016
+-4.249455 -9.052189 -100.000000
+-9.281434 -3.722230 0.000000
+-9.344980 -3.559680 0.000000
+-9.344980 -3.559680 -100.000000
+-7.175524 6.965043 -100.000000
+-7.175524 6.965043 -9.235402
+-0.733535 -0.188882 0.000575
+-6.038652 -7.970867 0.000000
+-6.263323 7.795430 -9.735876
+0.000106 3.544768 0.000752
+4.043881 -9.145875 -100.000000
+3.883647 -9.215057 -100.000000
+4.043881 -9.145875 0.000000
+-2.893681 9.572128 -10.391119
+-2.899136 9.570528 -10.391186
+-3.048414 9.523884 -10.390604
+-9.811336 1.933306 -5.062429
+2.781064 9.605503 -100.000000
+2.948279 9.555504 -100.000000
+2.781064 9.605503 0.000000
+0.000254 8.599451 0.000300
+0.000250 8.471066 0.000326
+-9.215057 -3.883647 -100.000000
+-9.281434 -3.722230 -100.000000
+9.992979 -0.374673 -100.000000
+4.249455 9.052189 0.000000
+4.406791 8.976648 0.000000
+9.518474 3.065722 0.000000
+9.570528 2.899136 0.000000
+-8.895501 4.568261 -7.459764
+-8.898371 4.562784 -100.000000
+-8.892324 4.574324 -7.464832
+9.605503 -2.781064 -100.000000
+9.555504 -2.948279 -100.000000
+3.231376 -9.463520 -100.000000
+3.231376 -9.463520 0.000000
+-1.843166 -0.480630 0.000516
+-7.089214 -7.052875 0.000000
+-1.705526 -0.444442 0.000524
+-9.194978 3.930951 -6.917435
+-9.193217 3.934973 -6.920894
+-2.714180 9.624469 -10.388618
+-2.224467 9.749449 -10.366580
+-2.218383 9.750782 -10.366117
+0.000277 9.388021 0.000135
+0.000283 9.585105 0.000092
+-6.659685 7.459622 -9.544603
+-6.541175 7.563929 -9.605245
+2.948279 9.555504 0.000000
+3.114597 9.502595 0.000000
+1.070836 9.942501 -100.000000
+1.244192 9.922297 -100.000000
+1.070836 9.942501 0.000000
+-1.876438 9.822315 -10.337291
+-1.865114 9.824383 -10.336079
+-5.613212 -8.275980 -100.000000
+5.467923 8.372684 0.000000
+5.613212 8.275980 0.000000
+5.997609 -8.001794 0.000000
+5.857047 -8.105246 0.000000
+5.857047 -8.105246 -100.000000
+0.000043 1.383272 0.000678
+0.000133 4.468420 0.000758
+0.000132 4.427780 0.000758
+-7.290828 6.844163 -9.155908
+0.000301 9.196949 -3.988591
+0.000301 9.194935 -3.985045
+7.331037 6.801169 0.000000
+7.448616 6.672190 -100.000000
+-9.927155 -1.204070 -1.641486
+-3.700139 -0.968861 0.000406
+9.619668 2.731665 -100.000000
+9.619668 2.731665 0.000000
+-3.866943 9.221926 -10.347958
+8.647378 -5.022235 0.000000
+8.558410 -5.172388 -100.000000
+9.977401 0.671932 -100.000000
+9.987607 0.497698 -100.000000
+3.279965 9.446789 0.000000
+3.444336 9.388106 0.000000
+7.643902 -6.447538 -100.000000
+7.530214 -6.579959 -100.000000
+8.206232 5.714698 0.000000
+-1.933306 -9.811336 -100.000000
+-2.104243 -9.776102 -100.000000
+0.000194 6.576080 0.000634
+-9.445985 3.282218 -6.343815
+-9.446789 3.279965 -6.341752
+9.821142 1.882860 -100.000000
+9.821142 1.882860 0.000000
+-9.462327 3.233923 -6.299331
+-9.443063 3.290405 -6.351312
+9.776102 -2.104243 -100.000000
+0.000151 5.099229 0.000744
+0.000151 5.084531 0.000745
+-8.643608 5.028598 -7.831212
+0.000311 9.651976 -3.570550
+0.000310 9.598662 -3.570554
+0.000228 7.742690 0.000462
+5.756795 8.176756 -100.000000
+5.898622 8.075040 -100.000000
+-2.731665 9.619668 -10.389116
+-2.726059 9.621207 -10.388956
+0.000231 7.832326 0.000446
+-8.206232 -5.714698 -100.000000
+-8.304716 -5.570608 -100.000000
+-2.899136 9.570528 -100.000000
+1.244192 9.922297 0.000000
+-5.997609 8.001794 -100.000000
+-9.325302 3.610841 -6.639398
+-7.052875 7.089214 -100.000000
+-6.928077 7.211223 -100.000000
+0.000056 1.815202 0.000697
+0.323315 -9.994773 -100.000000
+0.148833 -9.998893 -100.000000
+-9.797267 -2.001771 -0.667501
+-0.148833 9.998893 -10.033785
+-1.589719 -9.872832 -100.000000
+4.825609 -8.758624 -100.000000
+2.613003 9.652575 0.000000
+-6.313152 -7.755264 -100.000000
+-6.447538 -7.643902 -100.000000
+-8.921700 -4.516995 0.000000
+-8.999174 -4.360604 0.000000
+7.175524 -6.965043 -100.000000
+7.052875 -7.089214 -100.000000
+-2.206795 9.753318 -10.365237
+-4.656144 8.849721 -10.237601
+-4.516995 8.921700 -10.262486
+0.000173 5.860217 0.000703
+0.000172 5.818095 0.000706
+-8.275980 5.613212 -100.000000
+-6.126230 7.903622 -9.794993
+-6.136346 7.895901 -100.000000
+-6.136346 7.895901 -9.790863
+2.274539 9.737887 -100.000000
+-7.787604 -6.273214 0.000000
+-7.895901 -6.136346 0.000000
+-7.895901 -6.136346 -100.000000
+8.466838 -5.320966 -100.000000
+8.372684 -5.467923 -100.000000
+-1.366281 9.906224 -10.274797
+2.053977 -9.786785 -100.000000
+-8.898371 4.562784 -7.455186
+0.000321 9.999811 -3.570524
+-1.571909 -0.409311 0.000531
+-5.570608 8.304716 -100.000000
+-5.424824 8.400671 -100.000000
+-1.442112 -0.375185 0.000538
+-6.710379 -7.414231 0.000000
+-5.556021 8.314319 -10.006105
+-5.424824 8.400671 -10.047477
+8.733710 -4.870554 0.000000
+0.382343 9.992623 -4.399525
+0.374673 9.992979 -4.382880
+0.000073 2.406308 0.000721
+0.000071 2.337992 0.000718
+0.000118 3.962130 0.000758
+0.000117 3.917675 0.000757
+1.417172 9.899072 -100.000000
+0.000317 9.576268 -4.656517
+0.000301 9.206537 -4.005475
+0.000104 3.493946 0.000751
+3.607656 9.326566 -100.000000
+3.769877 9.262182 -100.000000
+3.607656 9.326566 0.000000
+0.000203 6.887244 0.000595
+0.000202 6.828773 0.000603
+-8.171428 5.764221 -8.399129
+0.000152 5.138165 0.000743
+-6.259887 7.798149 -9.737365
+-4.202882 9.073906 -100.000000
+0.032046 9.999896 -3.639367
+0.025694 9.999967 -3.625584
+-4.562784 -8.898371 0.000000
+0.000166 5.612272 0.000720
+0.000165 5.571905 0.000722
+-8.814221 4.723176 -7.588409
+0.000065 2.124069 0.000710
+-9.405683 -3.396046 -100.000000
+-4.500942 8.929653 -10.265057
+-4.344374 9.006865 -10.289828
+-4.356269 9.001228 -10.288143
+-8.640408 5.034001 -7.835457
+6.579959 7.530214 -100.000000
+-2.781064 -9.605503 -100.000000
+0.000150 5.060307 0.000745
+-6.944255 -1.812828 0.000192
+-6.594698 -1.722262 0.000216
+9.987607 0.497698 0.000000
+0.497698 -9.987607 0.000000
+0.323315 -9.994773 0.000000
+0.000067 2.196940 0.000713
+-3.607656 -9.326566 -100.000000
+-3.769877 -9.262182 -100.000000
+6.038652 7.970867 -100.000000
+6.176841 7.864263 -100.000000
+6.038652 7.970867 0.000000
+5.997609 -8.001794 -100.000000
+8.584878 5.128340 0.000000
+-6.792271 7.339149 -9.473416
+-6.801169 7.331037 -9.468616
+8.275980 -5.613212 -100.000000
+8.275980 -5.613212 0.000000
+-0.323315 9.994773 -10.076151
+0.000295 9.999810 0.000000
+3.114597 9.502595 -100.000000
+3.279965 9.446789 -100.000000
+0.549018 9.984918 -100.000000
+1.417172 9.899072 0.000000
+1.589719 9.872832 -100.000000
+0.000167 5.652875 0.000718
+8.494069 5.277384 0.000000
+8.584878 5.128340 -100.000000
+0.000175 5.902716 0.000699
+-3.554781 9.346798 -10.372519
+9.984918 -0.549018 0.000000
+-2.104243 -9.776102 0.000000
+-3.930951 -9.194978 -100.000000
+-4.090826 -9.124973 -100.000000
+-9.973274 0.729848 -3.825035
+-9.959674 0.897152 -4.003591
+-0.654248 9.978436 -10.149226
+-0.497698 9.987607 -100.000000
+-0.664221 9.977853 -10.151350
+-7.211223 -6.928077 0.000000
+0.000332 9.919160 -5.260298
+-5.822892 -1.522295 0.000268
+-0.090930 9.999249 -10.018862
+-6.408171 7.676936 -9.669714
+6.672190 -7.448616 -100.000000
+6.408171 -7.676936 0.000000
+6.273214 -7.787604 -100.000000
+9.947871 1.019728 0.000000
+5.320966 8.466838 0.000000
+1.711171 -9.852507 -100.000000
+8.075040 -5.898622 0.000000
+0.000164 5.531755 0.000725
+0.000029 0.887170 0.000655
+-7.961688 6.050550 -8.610638
+-7.964904 6.046381 -8.607690
+7.331037 6.801169 -100.000000
+0.000092 3.077720 0.000742
+0.000091 3.021878 0.000740
+-9.375534 3.477702 -6.522643
+-9.352166 3.539714 -6.577032
+-1.711171 9.852507 -100.000000
+0.723194 9.973815 -100.000000
+-9.709207 -2.394000 -0.164003
+-9.709141 -2.394278 -100.000000
+0.207227 9.997794 -4.019516
+0.000232 7.852854 0.000443
+-9.038429 -2.355401 0.000045
+-8.001794 -5.997609 -100.000000
+-8.105246 -5.857047 -100.000000
+-8.001794 -5.997609 0.000000
+-9.992700 0.380687 -3.449740
+-9.992979 0.374673 -100.000000
+-5.128340 8.584878 -100.000000
+-4.977731 8.673072 -100.000000
+0.000300 9.189136 -3.974833
+0.000300 9.187269 -3.971546
+0.000069 2.268225 0.000715
+0.000128 4.304421 0.000758
+0.000127 4.262771 0.000759
+-9.619668 -2.731665 0.000000
+-8.078895 5.893245 -8.496060
+-6.663031 7.456677 -9.542892
+-6.788948 7.342177 -9.475209
+1.538961 -9.880870 -100.000000
+9.262182 -3.769877 0.000000
+9.446789 -3.279965 -100.000000
+-3.279965 -9.446789 0.000000
+-3.444336 -9.388106 0.000000
+-9.124973 4.090826 -7.054919
+-3.114597 -9.502595 -100.000000
+-0.549018 -9.984918 -100.000000
+-0.723194 -9.973815 -100.000000
+0.000205 6.947190 0.000587
+0.000003 0.003986 0.000610
+-9.633163 2.682307 -5.786737
+0.000082 2.728183 0.000732
+0.000080 2.666253 0.000730
+9.999967 -0.025694 0.000000
+9.964154 0.845957 -100.000000
+0.000150 5.058632 0.000746
+-8.367987 5.474979 -8.178833
+-8.364771 5.479810 -8.182531
+-3.607656 -9.326566 0.000000
+-3.769877 -9.262182 0.000000
+8.494069 5.277384 -100.000000
+-4.870554 -8.733710 -100.000000
+-9.709141 -2.394278 -0.163644
+0.557465 9.984378 -4.849744
+0.897152 9.959674 -100.000000
+0.723194 9.973815 0.000000
+0.000163 5.491803 0.000727
+-8.069396 5.906208 -8.505742
+-8.075040 5.898622 -8.500099
+1.761781 9.843583 -100.000000
+1.933306 9.811336 -100.000000
+7.755264 -6.313152 0.000000
+0.000077 2.538831 0.000725
+0.000075 2.473235 0.000723
+-9.785274 2.059743 -5.188097
+-9.809549 1.941975 -5.071044
+6.541175 -7.563929 0.000000
+6.176841 7.864263 0.000000
+4.406791 8.976648 -100.000000
+-9.731060 2.302659 -5.428330
+-9.735660 2.283715 -5.409703
+6.801169 -7.331037 -100.000000
+-8.841509 -4.672013 -100.000000
+-1.711171 9.852507 -10.319616
+-9.997995 0.200214 -3.254354
+-9.999421 0.074016 -3.117055
+0.000178 6.032749 0.000689
+0.000179 6.042590 0.000688
+9.194978 -3.930951 -100.000000
+9.194978 -3.930951 0.000000
+-9.665876 -2.563363 0.000000
+-2.881733 9.575633 -10.390970
+0.000094 3.132685 0.000743
+0.000086 2.848720 0.000735
+0.000084 2.788990 0.000733
+0.000122 4.093093 0.000758
+-0.200214 -9.997995 0.000000
+-4.406791 -8.976648 -100.000000
+3.769877 9.262182 0.000000
+-8.304716 -5.570608 0.000000
+-9.649878 2.622633 -5.730781
+0.897152 9.959674 0.000000
+0.000113 3.781642 0.000756
+0.000111 3.735340 0.000755
+-8.558410 5.172388 -100.000000
+-8.563922 5.163087 -7.936871
+-9.652575 2.613003 -5.721750
+-9.652526 2.613179 -5.721915
+9.405683 3.396046 0.000000
+9.463520 3.231376 0.000000
+-7.414231 6.710379 -9.066785
+9.124973 -4.090826 0.000000
+9.052189 -4.249455 0.000000
+-5.703971 8.213563 -9.956467
+-5.842944 8.115252 -9.906592
+-5.714698 8.206232 -9.952844
+-2.731665 9.619668 -100.000000
+-9.786785 -2.053977 -0.600874
+-2.274539 -9.737887 0.000000
+-2.444142 -9.696710 0.000000
+-7.448616 -6.672190 -100.000000
+-9.872832 1.589719 -100.000000
+0.000237 8.024174 0.000411
+0.000234 7.926025 0.000429
+0.000130 4.386910 0.000758
+-7.970867 6.038652 -8.602224
+5.277384 -8.494069 0.000000
+5.128340 -8.584878 -100.000000
+-7.448616 -6.672190 0.000000
+-7.563929 -6.541175 0.000000
+-2.557602 9.667351 -10.384067
+0.000240 8.127215 0.000392
+0.000177 5.988952 0.000693
+-5.022235 -8.647378 -100.000000
+-5.172388 -8.558410 -100.000000
+9.899072 -1.417172 0.000000
+0.000148 4.982446 0.000748
+0.000097 3.240125 0.000746
+0.000095 3.186810 0.000745
+0.000004 0.046343 0.000612
+9.518474 3.065722 -100.000000
+9.570528 2.899136 -100.000000
+2.394278 -9.709141 -100.000000
+2.224467 -9.749449 -100.000000
+-3.378950 9.411687 -10.381701
+0.000098 3.292665 0.000747
+7.643902 -6.447538 0.000000
+0.000207 7.008718 0.000578
+9.215057 3.883647 -100.000000
+9.281434 3.722230 0.000000
+9.344980 3.559680 0.000000
+-4.838886 -1.267349 0.000333
+5.424824 -8.400671 0.000000
+-9.544109 -2.486416 0.000009
+0.000104 3.495668 0.000751
+2.224467 -9.749449 0.000000
+-7.089214 -7.052875 -100.000000
+-2.394278 9.709141 -10.376809
+-2.545806 9.670369 -10.383543
+-7.787604 -6.273214 -100.000000
+-5.997609 8.001794 -9.847507
+-1.244192 -9.922297 -100.000000
+-2.940228 -0.769068 0.000453
+-2.767181 -0.723571 0.000463
+0.579230 9.982992 -4.826776
+0.000149 5.021384 0.000747
+-0.013538 9.999726 -9.998918
+5.022235 8.647378 0.000000
+-9.774098 2.113168 -5.241149
+-9.737887 2.274539 -100.000000
+9.737887 -2.274539 0.000000
+8.733710 -4.870554 -100.000000
+-8.733710 4.870554 -7.706071
+8.372684 -5.467923 0.000000
+0.000125 4.220829 0.000759
+-9.694250 2.453550 -5.571378
+-0.497698 9.987607 -10.115890
+-0.489793 9.987932 -10.114088
+1.711171 -9.852507 0.000000
+-9.941652 1.078110 -4.195739
+-5.651395 -1.477862 0.000279
+-5.367535 -1.404317 0.000298
+4.562784 8.898371 0.000000
+-9.977401 -0.671932 -100.000000
+-9.987607 -0.497698 -100.000000
+7.295989 -6.838752 -100.000000
+-5.413754 8.407684 -10.050725
+-5.410003 8.410060 -10.051826
+0.000157 5.294359 0.000737
+9.852507 1.711171 0.000000
+0.845957 -9.964154 0.000000
+-0.480065 9.988333 -10.111872
+-0.723194 -9.973815 0.000000
+-3.705387 9.288018 -10.361921
+-5.756795 -8.176756 -100.000000
+-4.043881 9.145875 -10.329534
+7.414231 -6.710379 -100.000000
+3.065722 -9.518474 0.000000
+4.249455 9.052189 -100.000000
+0.671932 -9.977401 0.000000
+-9.676770 -2.520787 0.000000
+-5.613212 -8.275980 0.000000
+0.000176 5.945618 0.000696
+0.000141 4.747704 0.000754
+-9.928879 -1.190309 -1.658129
+-9.928559 -1.193185 -1.654663
+7.970867 -6.038652 0.000000
+-9.257621 3.780810 -6.787452
+-9.987607 -0.497698 -2.467274
+5.756795 8.176756 0.000000
+-3.114597 -9.502595 0.000000
+0.000217 7.344504 0.000528
+0.000215 7.273113 0.000539
+-8.841509 -4.672013 0.000000
+9.973815 -0.723194 0.000000
+9.959674 -0.897152 0.000000
+0.000198 6.715881 0.000617
+-2.613003 -9.652575 0.000000
+0.000144 4.865399 0.000751
+0.000144 4.864045 0.000751
+-6.176841 -7.864263 0.000000
+-6.313152 -7.755264 0.000000
+-9.992979 0.374673 -3.443259
+-8.105246 -5.857047 0.000000
+0.000246 8.350050 0.000350
+-3.119622 -0.816234 0.000442
+-5.714698 8.206232 -100.000000
+-8.275980 5.613212 -8.284648
+-8.270968 5.620463 -8.290147
+-4.813993 8.764894 -10.206625
+-4.825609 8.758624 -10.204181
+-4.962256 8.681776 -10.172674
+-9.073906 -4.202882 0.000000
+9.749449 2.224467 -100.000000
+-9.400101 3.410740 -6.461510
+7.676936 6.408171 0.000000
+5.898622 8.075040 0.000000
+-5.277384 8.494069 -100.000000
+0.000185 6.259822 0.000668
+0.000184 6.213209 0.000672
+0.000180 6.077038 0.000685
+-7.052875 7.089214 -9.315919
+-2.613003 -9.652575 -100.000000
+0.000158 5.333597 0.000735
+-5.846508 8.112723 -9.905307
+-3.961238 9.181557 -10.338276
+-3.878989 9.216972 -10.346895
+3.444336 9.388106 -100.000000
+-8.466838 5.320966 -8.059929
+-1.882860 9.821142 -10.337978
+-9.696710 2.444142 -5.562506
+-8.558410 5.172388 -7.944178
+-2.376659 9.713324 -10.375748
+-6.672190 7.448616 -100.000000
+0.374673 9.992979 -5.037267
+-5.949706 -1.555151 0.000259
+-4.592153 -1.203384 0.000349
+-0.323315 9.994773 -100.000000
+-4.667868 8.843654 -10.235502
+-7.044515 7.097386 -9.321140
+0.148833 -9.998893 0.000000
+8.673072 4.977731 -100.000000
+8.304716 5.570608 -100.000000
+0.200214 9.997995 -4.004298
+-9.388106 3.444336 -6.492276
+0.000134 4.508845 0.000757
+0.000300 9.181055 -3.960604
+0.000300 9.178287 -3.955523
+0.000200 6.771683 0.000610
+-4.202882 9.073906 -10.309879
+-9.994883 -0.318653 -2.671847
+-9.994773 -0.323315 -100.000000
+-9.994773 -0.323315 -2.666544
+0.035065 9.999862 -5.369649
+-9.600060 2.799265 -5.896311
+-9.947871 -1.019728 -100.000000
+-4.672013 8.841509 -10.234761
+0.000153 5.177132 0.000741
+0.000038 1.193473 0.000670
+-9.964429 -0.842354 -2.070711
+-9.964154 -0.845957 -2.066555
+-0.844070 -0.217945 0.000570
+-9.776102 2.104243 -5.232326
+0.000087 2.907418 0.000737
+0.000135 4.549071 0.000757
+-8.400671 -5.424824 0.000000
+0.497698 -9.987607 -100.000000
+-5.266159 8.500908 -10.093796
+-5.277384 8.494069 -10.090742
+0.000129 4.345796 0.000758
+0.000371 9.999811 -9.995333
+4.202882 -9.073906 -100.000000
+-1.882860 9.821142 -100.000000
+-9.552306 2.958332 -6.044556
+-9.502595 3.114597 -6.189391
+-9.880870 -1.538961 -1.235126
+-4.811144 8.766431 -10.207225
+0.000032 0.992358 0.000660
+-9.922297 1.244192 -100.000000
+-5.097028 -1.334231 0.000316
+-8.189076 5.738966 -8.380028
+-8.176756 5.756795 -8.393551
+-9.987784 -0.493387 -2.472200
+-2.388358 9.710546 -10.376452
+3.930951 9.194978 -100.000000
+-0.957434 -0.247751 0.000564
+-9.190129 3.942025 -6.926958
+-9.384106 3.454954 -6.501940
+-6.136720 7.895606 -9.790702
+8.647378 -5.022235 -100.000000
+-2.282542 -0.596151 0.000491
+-9.998893 -0.148833 -2.865006
+-9.014022 4.328950 -7.257820
+-9.260675 3.773488 -6.781114
+-9.973815 0.723194 -3.817934
+-8.551126 5.184206 -7.953385
+-9.499136 3.124848 -6.198836
+0.000078 2.603153 0.000727
+-5.700349 8.216038 -9.957689
+0.000137 4.628980 0.000756
+-8.554329 5.179010 -7.949337
+-1.366281 9.906224 -100.000000
+-9.737887 2.274539 -5.400681
+-4.809930 8.767086 -10.207465
+-9.387077 3.447067 -6.494762
+-1.073767 -0.278338 0.000558
+-6.398518 7.684853 -9.674141
+-1.538961 9.880870 -10.298554
+-9.922297 1.244192 -4.368477
+0.000058 1.895190 0.000701
+-3.883647 9.215057 -100.000000
+-4.966233 8.679540 -10.171758
+0.000035 1.094404 0.000665
+-9.145875 -4.043881 0.000000
+-9.326566 3.607656 -6.636622
+0.000171 5.776324 0.000709
+-7.955727 6.058277 -8.616102
+-1.193215 -0.309744 0.000552
+-2.438670 -0.637200 0.000482
+-4.977731 8.673072 -10.169106
+-9.502002 3.116358 -6.191014
+-9.215057 -3.883647 0.000000
+-6.263687 -1.636501 0.000238
+-2.036263 9.790342 -10.352013
+0.000136 4.589111 0.000756
+0.000213 7.203997 0.000550
+0.000211 7.136990 0.000560
+9.942501 -1.070836 0.000000
+-3.883647 9.215057 -10.346484
+-7.530214 6.579959 -8.978733
+9.994773 0.323315 0.000000
+-2.600110 -0.679645 0.000473
+-7.676936 -6.408171 0.000000
+-5.570608 8.304716 -10.001505
+-1.315942 -0.342011 0.000545
+0.000243 8.235651 0.000372
+-5.262338 8.503236 -10.094835
+-1.521182 9.883481 -10.296108
+-1.532185 9.881866 -10.297622
+-8.267751 5.625120 -8.293679
+-9.964154 -0.845957 -100.000000
+-9.052189 4.249455 -7.190400
+0.000089 2.965123 0.000739
+-9.998893 -0.148833 -100.000000
+-5.116971 8.591535 -10.134144
+-4.360604 8.999174 -10.287528
+-5.128340 8.584878 -10.131289
+-3.060414 9.520132 -10.390556
+-5.559704 8.311894 -10.004944
+-5.857047 8.105246 -9.901505
+-7.633788 6.459319 -8.896276
+-8.974063 4.411943 -7.328175
+-8.976648 4.406791 -7.323837
+-6.672190 7.448616 -9.538204
+0.000209 7.071943 0.000569
+-3.214169 9.469229 -10.387513
+-9.951344 -0.982676 -1.908155
+-3.559680 9.344980 -10.372255
+-3.065722 9.518474 -10.390535
+-8.827816 4.697472 -7.567764
+-8.817384 4.717387 -7.583787
+0.000300 9.178152 -3.955278
+-9.997832 0.205902 -3.260514
+0.000159 5.372943 0.000733
+1 2
+3 2
+1 3
+4 5
+6 5
+4 6
+7 8
+9 7
+9 8
+10 11
+12 10
+11 12
+13 14
+14 15
+15 13
+16 17
+18 17
+18 16
+19 20
+20 21
+21 19
+22 23
+24 23
+24 22
+25 17
+26 17
+26 25
+27 28
+9 27
+9 28
+29 30
+31 30
+31 29
+32 33
+34 33
+34 32
+35 36
+36 37
+37 35
+38 17
+39 17
+39 38
+40 41
+42 41
+42 40
+43 44
+45 43
+44 45
+46 47
+47 48
+46 48
+49 50
+51 50
+49 51
+52 17
+53 17
+53 52
+1 54
+55 54
+1 55
+56 57
+57 58
+58 56
+59 60
+59 61
+61 60
+62 63
+9 62
+9 63
+49 64
+49 42
+64 42
+65 66
+67 65
+66 67
+68 69
+70 68
+69 70
+71 72
+9 71
+9 72
+73 74
+9 73
+9 74
+75 76
+76 77
+77 75
+11 78
+17 78
+17 11
+79 80
+81 80
+79 81
+82 83
+17 83
+17 82
+84 85
+17 85
+17 84
+49 86
+49 87
+86 87
+88 89
+90 89
+90 88
+91 92
+9 91
+9 92
+93 94
+17 94
+17 93
+95 96
+97 95
+96 97
+98 99
+9 98
+9 99
+100 101
+17 101
+17 100
+102 17
+103 17
+103 102
+49 104
+105 104
+49 105
+106 30
+9 106
+9 30
+107 108
+109 107
+108 109
+110 111
+112 110
+111 112
+113 114
+115 114
+115 113
+116 117
+9 116
+9 117
+118 119
+119 120
+118 120
+121 122
+123 121
+122 123
+124 125
+9 124
+9 125
+126 127
+9 126
+9 127
+128 129
+130 128
+129 130
+40 131
+131 41
+132 133
+133 134
+132 134
+135 136
+17 136
+17 135
+137 138
+138 139
+139 137
+140 17
+141 17
+141 140
+142 143
+143 144
+142 144
+145 146
+9 145
+9 146
+147 148
+17 148
+17 147
+149 150
+17 150
+149 17
+151 152
+151 153
+153 152
+130 154
+9 130
+9 154
+155 156
+156 157
+155 157
+158 159
+9 158
+9 159
+160 161
+9 160
+9 161
+162 163
+162 164
+164 163
+165 166
+167 166
+167 165
+168 169
+170 169
+170 168
+171 82
+172 171
+82 172
+173 174
+9 173
+9 174
+175 176
+177 175
+176 177
+178 179
+180 178
+179 180
+181 182
+181 183
+183 182
+184 140
+184 141
+185 186
+185 187
+187 186
+79 188
+79 189
+188 189
+190 191
+9 190
+9 191
+192 193
+193 194
+194 192
+195 196
+197 196
+195 197
+198 199
+198 200
+200 199
+201 17
+202 17
+202 201
+203 62
+203 204
+204 62
+205 206
+206 207
+207 205
+208 209
+210 209
+208 210
+211 212
+211 213
+213 212
+214 215
+214 184
+184 215
+6 53
+216 53
+6 216
+217 218
+17 218
+17 217
+219 220
+219 221
+221 220
+222 223
+224 222
+223 224
+155 225
+225 156
+208 226
+208 227
+226 227
+228 229
+9 228
+9 229
+230 231
+9 230
+9 231
+232 233
+9 232
+9 233
+234 235
+236 234
+235 236
+237 238
+9 237
+9 238
+87 239
+86 239
+240 115
+240 113
+241 242
+242 243
+241 243
+244 245
+246 244
+245 246
+247 248
+9 247
+9 248
+249 240
+250 249
+240 250
+251 252
+253 251
+252 253
+254 255
+17 255
+17 254
+256 257
+256 258
+257 258
+259 260
+260 261
+259 261
+262 17
+262 26
+263 264
+264 265
+265 263
+266 267
+17 267
+17 266
+268 17
+269 17
+269 268
+270 271
+9 270
+9 271
+272 116
+272 117
+49 273
+273 51
+274 275
+276 274
+275 276
+246 277
+9 246
+9 277
+278 279
+278 280
+279 280
+1 281
+2 281
+282 17
+283 17
+283 282
+239 284
+9 239
+9 284
+285 220
+221 285
+286 287
+17 287
+17 286
+162 288
+162 289
+288 289
+290 291
+291 292
+292 290
+293 135
+294 293
+135 294
+295 296
+296 297
+297 295
+298 299
+299 300
+298 300
+77 301
+301 76
+1 302
+54 302
+303 304
+9 303
+9 304
+305 306
+9 305
+9 306
+307 308
+309 308
+309 307
+310 311
+311 312
+312 310
+313 314
+9 313
+9 314
+315 316
+9 315
+9 316
+317 285
+195 285
+317 195
+318 319
+320 318
+319 320
+321 322
+323 322
+323 321
+256 32
+256 34
+324 325
+325 326
+324 326
+327 328
+328 329
+329 327
+272 330
+330 116
+320 331
+9 320
+9 331
+332 333
+334 333
+334 332
+335 336
+335 181
+181 336
+337 256
+256 338
+337 338
+339 340
+340 341
+341 339
+342 17
+343 17
+343 342
+58 344
+344 57
+345 346
+9 345
+9 346
+49 347
+348 347
+49 348
+349 350
+17 350
+17 349
+351 352
+351 353
+353 352
+354 193
+9 354
+9 193
+184 355
+356 355
+184 356
+357 358
+9 357
+9 358
+308 106
+309 106
+359 360
+361 359
+360 361
+362 17
+363 17
+363 362
+258 364
+364 27
+258 27
+365 366
+367 365
+366 367
+279 368
+368 369
+279 369
+370 371
+17 371
+17 370
+6 372
+373 372
+6 373
+374 375
+9 374
+9 375
+376 377
+17 377
+17 376
+378 379
+380 378
+379 380
+381 382
+381 383
+383 382
+324 384
+384 325
+385 386
+9 385
+9 386
+33 169
+9 33
+9 169
+387 388
+17 388
+17 387
+389 17
+390 17
+390 389
+240 391
+392 391
+240 392
+393 394
+17 394
+17 393
+395 396
+396 312
+395 312
+397 398
+397 399
+399 398
+198 400
+400 199
+241 401
+401 242
+402 403
+404 402
+403 404
+405 17
+406 17
+406 405
+407 348
+49 407
+408 409
+9 408
+9 409
+410 411
+410 412
+412 411
+413 414
+413 415
+415 414
+416 197
+195 416
+417 418
+9 417
+9 418
+200 419
+420 419
+200 420
+184 269
+140 269
+421 30
+422 30
+422 421
+423 400
+400 208
+423 208
+113 424
+424 114
+425 187
+425 185
+426 427
+428 426
+427 428
+429 71
+71 430
+430 429
+431 432
+431 433
+433 432
+434 435
+17 435
+17 434
+436 34
+256 436
+23 437
+9 23
+9 437
+438 439
+438 440
+440 439
+280 397
+397 368
+280 368
+14 441
+441 442
+442 14
+375 247
+247 443
+443 375
+1 211
+444 211
+1 444
+445 446
+447 445
+446 447
+448 449
+17 449
+17 448
+450 64
+49 450
+451 452
+9 451
+9 452
+453 454
+17 454
+17 453
+455 17
+456 17
+456 455
+457 458
+17 458
+17 457
+256 459
+460 459
+256 460
+329 461
+461 328
+462 451
+451 463
+463 462
+464 465
+465 94
+94 464
+466 467
+467 468
+466 468
+469 194
+469 193
+470 471
+9 470
+9 471
+200 472
+473 472
+200 473
+474 475
+9 474
+9 475
+476 49
+476 79
+49 79
+477 478
+17 478
+17 477
+278 479
+278 480
+479 480
+1 481
+281 481
+482 290
+9 482
+9 290
+483 484
+485 483
+484 485
+486 133
+132 486
+487 488
+17 488
+17 487
+489 428
+426 489
+490 491
+492 490
+491 492
+493 395
+493 494
+395 494
+34 169
+495 496
+17 496
+17 495
+200 497
+200 132
+497 132
+498 322
+498 499
+499 322
+41 500
+42 500
+501 502
+503 501
+502 503
+1 504
+302 504
+88 505
+505 89
+195 506
+195 507
+506 507
+508 509
+510 508
+509 510
+511 17
+512 17
+512 511
+184 513
+514 513
+184 514
+192 354
+515 17
+516 17
+516 515
+517 518
+9 517
+9 518
+195 519
+520 519
+195 520
+521 315
+9 521
+276 522
+522 275
+523 524
+9 523
+9 524
+525 526
+526 527
+527 525
+528 239
+528 86
+81 529
+529 530
+81 530
+531 532
+9 531
+9 532
+533 17
+150 533
+534 535
+17 535
+17 534
+240 536
+537 536
+240 537
+210 8
+209 8
+538 539
+540 539
+540 538
+541 542
+541 543
+543 542
+499 544
+544 322
+545 546
+547 545
+546 547
+436 169
+548 549
+9 548
+9 549
+550 551
+9 550
+9 551
+552 261
+552 553
+261 553
+468 333
+9 468
+9 333
+554 495
+555 554
+495 555
+105 284
+284 556
+105 556
+557 558
+557 559
+559 558
+560 561
+17 561
+17 560
+411 414
+9 411
+9 414
+562 326
+326 398
+562 398
+563 17
+564 17
+564 563
+565 566
+9 565
+9 566
+567 100
+568 567
+100 568
+278 46
+46 479
+569 570
+570 571
+571 569
+542 572
+573 542
+572 573
+574 575
+9 574
+9 575
+224 576
+576 223
+577 17
+578 17
+578 577
+579 265
+265 378
+579 378
+169 580
+9 580
+581 582
+582 349
+349 581
+583 584
+9 583
+9 584
+200 585
+586 585
+200 586
+587 588
+17 588
+17 587
+198 423
+9 364
+589 590
+9 589
+9 590
+591 592
+593 592
+593 591
+478 434
+594 478
+434 594
+595 596
+597 595
+596 597
+167 598
+599 598
+599 167
+600 572
+572 601
+600 601
+299 602
+602 298
+603 416
+195 603
+184 335
+184 181
+604 605
+605 606
+606 604
+607 608
+609 607
+608 609
+195 610
+195 151
+610 151
+611 612
+612 613
+613 611
+614 17
+615 17
+615 614
+616 617
+9 616
+9 617
+104 284
+618 73
+9 618
+619 620
+17 620
+17 619
+621 622
+17 622
+17 621
+623 624
+625 624
+625 623
+626 627
+627 83
+83 626
+628 230
+230 629
+629 628
+630 631
+630 632
+632 631
+341 567
+567 340
+256 633
+634 633
+256 634
+635 353
+351 635
+636 271
+637 271
+637 636
+638 639
+639 17
+638 17
+640 529
+641 529
+641 640
+642 643
+17 643
+17 642
+644 645
+645 646
+646 644
+240 647
+648 647
+240 648
+138 649
+649 439
+439 138
+650 651
+17 651
+17 650
+652 653
+654 652
+653 654
+9 308
+209 7
+184 655
+215 655
+195 656
+657 656
+195 657
+9 47
+9 48
+49 658
+165 658
+49 165
+200 659
+660 659
+200 660
+661 110
+662 661
+110 662
+663 433
+663 664
+433 664
+665 75
+75 666
+666 665
+195 219
+519 219
+309 667
+307 667
+405 373
+6 405
+668 84
+669 668
+84 669
+670 671
+9 670
+9 671
+672 673
+17 673
+17 672
+674 675
+9 674
+9 675
+442 676
+676 441
+677 678
+9 677
+9 678
+624 467
+625 467
+17 301
+17 77
+1 679
+481 679
+9 156
+9 157
+680 574
+680 681
+681 574
+682 305
+305 683
+683 682
+684 685
+684 680
+685 680
+686 523
+9 686
+634 28
+633 28
+687 17
+688 17
+688 687
+580 624
+9 624
+332 689
+689 334
+198 690
+198 691
+690 691
+296 41
+9 296
+9 41
+1 692
+504 692
+693 694
+9 693
+9 694
+277 611
+9 611
+240 695
+696 695
+240 696
+697 17
+692 17
+692 697
+698 699
+9 698
+9 699
+184 6
+6 655
+609 700
+608 700
+646 701
+17 701
+17 646
+702 592
+9 702
+9 592
+187 79
+186 79
+703 364
+258 703
+704 705
+9 704
+9 705
+240 424
+6 706
+372 706
+707 708
+9 707
+9 708
+399 709
+278 399
+709 278
+710 411
+710 414
+70 711
+711 69
+492 712
+712 491
+245 713
+17 713
+17 245
+714 715
+9 714
+9 715
+716 717
+358 716
+717 358
+718 719
+719 148
+148 718
+720 271
+720 637
+721 142
+722 721
+142 722
+723 17
+724 17
+724 723
+725 119
+9 725
+9 119
+726 727
+726 728
+728 727
+729 246
+244 729
+730 731
+732 730
+731 732
+733 734
+9 733
+9 734
+240 735
+536 735
+736 109
+9 736
+9 109
+623 737
+737 624
+198 738
+738 690
+632 344
+632 739
+739 344
+740 741
+9 740
+9 741
+742 743
+743 58
+742 58
+437 700
+9 700
+744 741
+745 741
+745 744
+746 668
+17 668
+17 746
+182 336
+747 377
+748 377
+748 747
+6 749
+750 749
+6 750
+195 751
+752 751
+195 752
+645 753
+9 645
+9 753
+754 200
+755 754
+200 755
+756 6
+52 756
+6 52
+757 758
+758 759
+759 757
+760 17
+761 17
+761 760
+762 119
+118 762
+74 474
+763 17
+687 763
+195 221
+573 548
+548 572
+602 300
+764 300
+764 602
+494 596
+596 396
+494 396
+144 765
+9 144
+9 765
+352 270
+9 352
+654 91
+91 653
+766 261
+767 261
+767 766
+768 266
+17 768
+769 17
+770 17
+770 769
+771 467
+466 771
+17 461
+17 329
+772 17
+38 772
+597 773
+773 596
+17 223
+17 222
+774 775
+774 776
+775 776
+332 777
+777 689
+778 320
+318 778
+685 574
+184 268
+9 492
+9 712
+779 180
+9 779
+9 180
+780 17
+780 688
+781 595
+781 782
+782 595
+535 783
+17 783
+784 785
+707 784
+785 707
+12 98
+98 11
+282 752
+195 282
+6 786
+772 786
+6 772
+787 788
+9 787
+9 788
+789 790
+790 791
+791 789
+236 792
+792 235
+49 599
+347 599
+722 143
+793 508
+17 508
+17 793
+29 422
+35 794
+795 35
+794 795
+796 205
+205 797
+797 796
+240 798
+412 798
+240 412
+553 799
+799 261
+200 623
+200 625
+800 801
+9 800
+9 801
+123 327
+327 122
+8 802
+9 802
+803 286
+804 803
+286 804
+805 17
+769 805
+401 312
+401 395
+806 793
+807 806
+793 807
+808 17
+723 808
+372 17
+373 17
+421 809
+809 30
+388 810
+73 388
+810 73
+319 121
+17 121
+17 319
+496 811
+17 811
+112 417
+417 111
+447 628
+628 446
+812 813
+9 812
+9 813
+273 166
+658 166
+658 273
+814 354
+815 354
+815 814
+816 817
+816 818
+818 817
+238 819
+819 237
+820 208
+208 754
+754 820
+821 709
+821 562
+709 562
+240 413
+822 413
+240 822
+823 530
+823 81
+824 158
+9 824
+825 234
+826 825
+234 826
+78 827
+17 827
+21 828
+828 20
+109 829
+829 108
+207 830
+830 206
+831 17
+831 770
+832 17
+102 832
+45 525
+525 44
+297 833
+297 834
+833 834
+1 390
+679 390
+328 835
+9 328
+9 835
+6 836
+837 836
+6 837
+838 256
+839 838
+256 839
+28 33
+840 382
+9 840
+9 382
+17 676
+17 442
+226 841
+226 802
+802 841
+842 843
+843 325
+842 325
+844 377
+844 748
+845 256
+845 1
+1 256
+1 697
+846 842
+384 842
+846 384
+503 682
+682 502
+847 848
+848 849
+849 847
+850 851
+851 116
+850 116
+250 852
+852 853
+250 853
+854 208
+855 208
+855 854
+192 815
+856 750
+6 856
+195 857
+858 857
+195 858
+316 859
+859 315
+49 860
+860 295
+49 295
+756 195
+6 195
+294 173
+173 135
+701 803
+17 803
+79 861
+79 862
+861 862
+829 863
+9 829
+9 863
+136 864
+17 864
+97 865
+865 96
+866 867
+17 867
+17 866
+32 868
+868 33
+180 869
+869 179
+870 871
+9 870
+9 871
+872 17
+760 872
+267 873
+17 873
+183 873
+184 183
+873 184
+739 58
+874 212
+213 874
+6 875
+876 875
+6 876
+877 387
+17 877
+878 670
+670 534
+534 878
+879 17
+879 780
+880 134
+881 134
+881 880
+72 870
+870 254
+254 72
+882 883
+17 883
+17 882
+253 884
+884 252
+30 23
+590 885
+885 266
+266 590
+443 877
+877 247
+842 886
+886 843
+17 403
+17 402
+887 226
+887 841
+841 888
+888 889
+889 841
+890 17
+890 831
+479 47
+891 120
+891 892
+892 120
+591 188
+79 591
+893 894
+9 893
+9 894
+292 895
+895 291
+653 487
+487 91
+6 896
+897 896
+6 897
+898 195
+195 899
+898 899
+900 825
+17 825
+17 900
+240 818
+240 816
+791 901
+901 790
+902 408
+9 902
+3 17
+362 3
+869 313
+9 869
+903 1
+1 904
+903 904
+177 905
+905 176
+553 259
+799 259
+494 781
+781 596
+256 639
+256 638
+380 906
+906 379
+907 382
+383 907
+493 241
+493 401
+337 200
+256 200
+240 323
+240 321
+908 909
+157 909
+908 157
+256 614
+256 615
+223 217
+217 576
+256 563
+256 564
+910 17
+910 911
+911 17
+912 345
+345 913
+913 912
+886 914
+843 914
+240 915
+695 915
+916 17
+836 17
+836 916
+134 725
+881 725
+6 917
+918 917
+6 918
+184 103
+268 103
+195 919
+511 919
+195 511
+430 920
+920 71
+594 921
+921 434
+759 922
+922 758
+699 517
+517 923
+923 699
+579 431
+431 265
+924 386
+386 212
+924 212
+925 646
+644 925
+926 17
+927 17
+927 926
+777 928
+929 928
+929 777
+1 930
+931 930
+1 931
+195 283
+932 933
+17 933
+17 932
+934 105
+934 556
+6 38
+935 936
+17 936
+17 935
+937 938
+939 938
+937 939
+700 940
+608 940
+208 887
+941 493
+326 493
+941 326
+99 878
+9 878
+942 943
+17 943
+17 942
+35 862
+35 79
+238 944
+9 944
+520 945
+519 945
+896 17
+897 17
+256 946
+947 946
+256 947
+556 166
+9 556
+9 166
+907 840
+600 541
+541 572
+657 17
+948 17
+948 657
+367 729
+729 366
+834 296
+834 949
+949 296
+950 490
+951 950
+490 951
+952 953
+124 952
+953 124
+240 351
+954 351
+240 954
+304 693
+67 160
+160 66
+235 652
+652 792
+257 27
+955 17
+946 17
+946 955
+956 17
+956 910
+957 958
+9 957
+9 958
+695 353
+696 353
+1 808
+1 723
+959 93
+452 959
+93 452
+960 17
+577 960
+961 17
+962 17
+962 961
+240 710
+240 410
+710 410
+963 17
+963 141
+964 965
+9 964
+9 965
+338 624
+624 337
+966 967
+9 966
+9 967
+968 23
+968 31
+31 23
+216 17
+969 17
+969 216
+606 370
+370 605
+788 812
+659 208
+660 208
+174 912
+9 912
+1 389
+970 453
+17 970
+971 17
+872 971
+972 565
+9 972
+973 974
+17 974
+17 973
+212 62
+9 212
+428 778
+778 427
+709 975
+975 278
+921 589
+9 921
+459 17
+460 17
+306 12
+10 306
+488 976
+531 488
+976 531
+977 886
+977 842
+518 263
+9 263
+978 603
+195 978
+206 482
+482 830
+790 489
+9 790
+9 489
+184 440
+440 335
+17 509
+9 134
+979 107
+17 107
+17 979
+57 980
+980 344
+240 981
+240 982
+981 982
+125 983
+9 983
+663 184
+184 664
+340 568
+9 340
+9 568
+189 702
+984 702
+984 189
+582 985
+9 582
+9 985
+66 587
+587 160
+986 731
+986 987
+987 731
+988 208
+988 887
+989 17
+960 989
+69 554
+554 711
+822 414
+990 414
+990 822
+172 626
+626 82
+275 991
+991 522
+992 229
+229 993
+992 993
+83 95
+95 627
+994 171
+17 171
+17 994
+485 995
+995 484
+200 996
+200 466
+996 466
+5 156
+225 5
+571 483
+483 570
+476 407
+85 997
+17 997
+591 702
+998 17
+342 998
+197 17
+416 17
+154 56
+9 56
+848 698
+9 848
+154 129
+458 900
+1 999
+930 999
+982 352
+981 352
+860 120
+892 860
+314 787
+240 1000
+1001 1000
+240 1001
+108 1002
+1002 829
+184 438
+183 267
+267 182
+631 819
+237 631
+862 794
+117 354
+295 120
+120 296
+195 469
+1003 469
+195 1003
+60 923
+59 923
+524 994
+994 523
+1004 717
+1004 1005
+1005 717
+1006 274
+17 274
+17 1006
+656 17
+356 1007
+1007 1008
+356 1008
+1009 718
+718 147
+147 1009
+312 242
+242 311
+148 175
+175 719
+976 950
+17 950
+17 976
+568 972
+972 100
+1010 741
+1011 741
+1011 1010
+184 102
+491 43
+17 43
+17 491
+195 1012
+201 1012
+195 201
+1013 10
+17 10
+17 1013
+926 283
+195 926
+860 891
+295 891
+588 1014
+583 588
+1014 583
+20 303
+303 828
+981 270
+240 1015
+798 1015
+255 1016
+17 1016
+184 543
+543 438
+9 665
+9 75
+662 112
+1017 667
+1017 309
+80 529
+191 339
+9 339
+415 710
+9 326
+9 398
+663 431
+446 629
+17 629
+17 446
+649 1018
+9 649
+9 1018
+1019 162
+289 1019
+828 650
+650 303
+200 486
+1020 1009
+9 1020
+9 1009
+355 1007
+1021 222
+17 1021
+361 1022
+1022 360
+678 232
+629 1021
+1021 230
+1014 1023
+17 1023
+17 1014
+1024 977
+977 914
+1024 914
+200 880
+200 881
+543 1025
+438 1025
+732 847
+847 731
+998 858
+195 998
+1 1026
+808 1026
+195 262
+1027 262
+195 1027
+663 1028
+1029 663
+1028 1029
+1030 292
+17 292
+17 1030
+1031 28
+633 1031
+96 293
+293 865
+1032 1008
+1032 356
+651 1033
+693 651
+1033 693
+991 21
+19 991
+179 1034
+1034 869
+17 652
+17 235
+1035 17
+1036 17
+1036 1035
+379 1037
+1037 906
+906 357
+357 1037
+1038 1039
+17 1039
+17 1038
+1 1040
+389 1040
+1041 178
+17 178
+17 1041
+737 337
+49 167
+371 445
+17 445
+377 539
+17 539
+545 705
+546 705
+1042 17
+1043 17
+1043 1042
+1044 1045
+714 1044
+1045 714
+613 642
+642 612
+79 36
+555 677
+677 495
+166 598
+9 598
+300 727
+764 727
+850 1046
+1046 851
+94 393
+393 465
+585 468
+586 468
+773 310
+310 396
+396 773
+683 1013
+1013 305
+195 805
+195 769
+849 1047
+1047 848
+473 208
+854 473
+195 512
+9 1007
+9 1008
+493 781
+493 782
+291 674
+674 895
+240 499
+499 537
+350 582
+184 541
+176 457
+457 905
+671 374
+566 145
+867 882
+787 867
+882 787
+1048 17
+1048 615
+664 923
+664 59
+797 207
+1049 849
+1049 1047
+663 579
+17 567
+17 341
+601 548
+938 592
+592 1050
+938 1050
+200 1051
+1052 1051
+200 1052
+502 683
+17 683
+17 502
+1053 1054
+1055 1053
+1054 1055
+905 824
+824 457
+717 1056
+1004 1056
+635 696
+240 635
+471 143
+9 143
+200 332
+200 777
+127 616
+76 1057
+9 76
+9 1057
+685 575
+1058 575
+1058 685
+1059 402
+17 1059
+404 13
+9 404
+9 13
+1033 1060
+17 1060
+17 1033
+741 1061
+1011 1061
+1062 17
+1063 17
+1063 1062
+889 925
+925 888
+1064 17
+911 1064
+407 704
+1065 704
+1065 407
+287 365
+17 365
+826 236
+188 702
+605 550
+550 370
+977 859
+977 846
+846 859
+794 37
+862 37
+873 963
+439 1025
+1025 649
+48 663
+663 46
+749 897
+9 12
+233 1066
+9 1066
+480 47
+627 97
+316 843
+9 843
+9 467
+249 79
+79 240
+44 527
+6 356
+1067 17
+1012 17
+1012 1067
+394 994
+523 394
+49 934
+50 934
+1068 592
+938 1068
+1051 881
+61 1047
+61 1049
+974 932
+145 974
+932 145
+681 684
+574 684
+667 1069
+1070 1069
+667 1070
+669 733
+733 84
+943 1041
+184 832
+909 6
+6 155
+909 155
+195 960
+195 577
+522 19
+1071 757
+9 1071
+9 757
+195 342
+200 1072
+486 1072
+643 672
+947 17
+358 126
+126 717
+1073 840
+647 840
+647 1073
+195 948
+195 927
+1 1074
+999 1074
+865 294
+493 846
+846 324
+493 324
+886 1024
+79 726
+189 726
+1000 816
+1075 928
+1075 929
+184 600
+240 636
+240 1076
+636 1076
+1002 65
+17 65
+17 1002
+350 68
+17 68
+37 1077
+862 1077
+208 1078
+227 1078
+1079 1056
+1079 821
+1056 821
+620 1006
+159 900
+900 158
+311 521
+521 242
+92 487
+719 177
+54 17
+55 17
+663 1080
+1080 579
+17 21
+17 991
+1078 8
+1078 210
+1000 1081
+1001 1081
+189 727
+1082 471
+1082 143
+461 661
+17 661
+79 547
+79 1083
+547 1083
+260 198
+261 198
+576 966
+966 217
+17 111
+17 110
+785 1084
+17 1084
+17 785
+931 386
+924 931
+805 149
+243 521
+414 7
+807 1085
+1085 793
+1 956
+1026 956
+463 959
+959 451
+441 1086
+9 441
+9 1086
+766 376
+766 1087
+1087 376
+1088 575
+1088 1058
+195 26
+510 190
+9 510
+78 98
+195 1089
+656 1089
+111 1059
+1059 417
+1090 208
+1091 208
+1091 1090
+6 406
+146 964
+188 984
+1 1092
+1040 1092
+496 677
+1093 775
+775 765
+1093 765
+713 613
+17 613
+1094 1095
+1094 1096
+1096 1095
+675 1020
+208 1097
+209 1097
+161 587
+524 172
+9 172
+484 746
+746 995
+9 627
+9 97
+162 775
+164 775
+1 204
+1 1098
+204 1098
+1028 1099
+513 1099
+513 1028
+6 225
+734 796
+9 796
+1100 471
+1082 1100
+1101 17
+1101 202
+79 545
+36 545
+804 893
+893 286
+184 1028
+1022 902
+902 619
+619 1022
+1102 17
+1102 214
+17 214
+715 130
+252 806
+806 884
+74 810
+9 120
+452 464
+464 93
+240 774
+240 721
+721 774
+184 1103
+184 1104
+1103 1104
+845 947
+136 173
+809 106
+184 1105
+1105 600
+218 979
+346 569
+9 569
+919 17
+919 343
+1034 866
+17 1034
+992 1106
+1106 229
+1107 17
+917 17
+917 1107
+663 278
+278 1080
+9 865
+9 294
+1108 17
+1089 17
+1089 1108
+200 929
+883 477
+811 942
+923 1109
+664 1109
+584 1110
+9 1110
+9 719
+9 177
+101 972
+164 1093
+1111 1061
+1111 1112
+1112 1061
+366 244
+9 447
+9 628
+712 45
+9 45
+195 1113
+857 1113
+1080 379
+379 278
+535 670
+1114 240
+240 990
+1114 990
+64 500
+895 970
+970 674
+255 870
+267 885
+1115 604
+9 1115
+9 604
+299 530
+530 300
+9 1050
+666 77
+17 666
+1073 1116
+1116 840
+159 826
+9 826
+1117 63
+1118 63
+1118 1117
+562 941
+344 631
+631 980
+1049 986
+986 849
+1029 48
+278 1119
+1119 279
+617 597
+9 597
+1120 1055
+1120 1053
+711 555
+360 619
+603 17
+231 1021
+233 942
+942 232
+698 1047
+184 1121
+832 1121
+1027 17
+549 714
+1044 549
+1053 470
+470 1120
+9 500
+1025 542
+913 935
+935 345
+196 927
+200 1090
+200 1091
+1003 1122
+1122 317
+317 1003
+709 1123
+1123 975
+1057 503
+9 503
+1124 762
+1125 1124
+762 1125
+240 90
+240 88
+6 1126
+1096 1126
+6 1096
+1127 981
+240 1127
+922 359
+1128 922
+359 1128
+264 380
+9 264
+9 380
+72 920
+184 1129
+1129 1105
+965 665
+758 1128
+1037 716
+716 357
+475 462
+9 462
+1130 28
+1130 33
+6 962
+916 962
+6 916
+101 973
+333 928
+9 928
+1098 444
+838 1058
+1131 1058
+838 1131
+614 564
+1132 764
+1132 727
+1133 669
+9 1133
+9 669
+465 686
+686 393
+195 149
+818 90
+6 969
+1134 952
+1134 557
+557 952
+427 318
+9 682
+1 910
+208 1087
+208 844
+1087 844
+1135 4
+5 1135
+195 25
+256 1136
+1136 338
+195 1108
+9 1061
+1137 27
+1137 257
+1138 117
+1138 272
+1139 929
+200 1139
+1140 574
+684 1140
+480 369
+369 47
+684 1
+1 1140
+290 1030
+1030 482
+1141 876
+6 1141
+1142 1050
+1050 740
+1142 740
+198 256
+90 817
+830 1030
+1109 517
+1143 17
+1143 516
+9 851
+1144 928
+1144 1075
+526 1115
+1115 560
+560 526
+1097 7
+1 761
+1092 761
+128 715
+9 529
+9 530
+256 1058
+708 785
+673 759
+17 759
+382 1145
+9 1145
+9 852
+9 853
+1035 55
+1026 17
+306 1013
+240 607
+915 607
+240 421
+240 422
+256 685
+1 1146
+904 1146
+709 1005
+1005 1123
+240 1147
+721 1147
+6 1032
+1148 575
+1148 1088
+918 17
+863 67
+9 67
+184 1149
+1149 1129
+347 598
+127 1056
+1056 126
+871 581
+9 581
+901 426
+17 426
+17 901
+704 476
+476 1065
+552 17
+639 552
+193 1122
+9 1122
+449 341
+1150 530
+1150 823
+1151 382
+1151 381
+6 815
+6 814
+508 1085
+753 804
+9 804
+801 1071
+409 1006
+1006 408
+1152 317
+285 1152
+1128 361
+705 37
+9 37
+1076 1127
+694 789
+9 789
+1145 544
+9 544
+114 89
+9 114
+9 89
+1153 17
+706 17
+706 1153
+9 662
+9 112
+1120 240
+1147 1120
+894 367
+9 367
+655 406
+79 938
+79 593
+938 593
+256 1137
+288 1154
+1069 1154
+1069 288
+975 379
+975 1037
+227 802
+1028 48
+48 1099
+1016 349
+1147 470
+1147 471
+570 485
+9 570
+9 485
+640 1077
+1077 529
+9 940
+398 368
+331 123
+9 123
+122 329
+17 122
+250 1055
+250 1155
+1055 1155
+837 17
+394 686
+9 758
+9 1128
+765 163
+9 163
+506 17
+507 17
+231 224
+9 224
+184 1156
+1121 1156
+612 800
+800 642
+444 62
+1098 62
+150 1
+1 533
+904 385
+385 903
+1056 1157
+1157 127
+9 205
+9 206
+703 1158
+1158 364
+195 343
+559 819
+559 630
+630 819
+489 901
+1020 453
+454 1020
+1159 17
+1159 724
+433 1109
+1109 432
+184 963
+403 15
+17 15
+304 650
+1092 17
+1040 17
+332 586
+9 361
+1005 716
+1123 716
+49 131
+49 1160
+131 1160
+709 1004
+558 952
+731 849
+475 1039
+1039 474
+735 544
+536 544
+184 1161
+1161 1149
+9 428
+1010 744
+1010 745
+195 879
+195 780
+125 953
+860 118
+1086 253
+9 253
+751 17
+751 512
+532 976
+1162 953
+1162 1134
+1134 953
+248 877
+792 654
+9 792
+9 654
+961 969
+409 276
+9 276
+277 245
+1155 1163
+1163 250
+593 1068
+982 954
+551 447
+684 256
+9 841
+1164 63
+1140 63
+1140 1164
+782 1165
+782 1166
+1166 1165
+9 300
+827 534
+871 255
+1 911
+884 807
+301 501
+17 501
+195 578
+1042 578
+195 1042
+240 1073
+240 1167
+1073 1167
+195 1168
+1108 1168
+820 185
+820 425
+99 78
+418 1059
+1169 17
+1170 17
+1170 1169
+1152 1122
+1 203
+1117 203
+1 1117
+17 207
+17 797
+936 571
+17 571
+1039 1171
+1171 475
+1070 1154
+1070 1172
+1172 1154
+191 448
+448 190
+240 498
+321 498
+1 760
+945 152
+9 945
+9 152
+584 1014
+104 1173
+1173 284
+1052 725
+1051 725
+783 1174
+17 1174
+937 1050
+1142 937
+435 921
+299 1150
+788 882
+655 17
+940 353
+9 353
+6 1138
+6 272
+899 229
+229 898
+17 830
+549 601
+194 195
+195 192
+1175 1176
+1175 1162
+1162 1176
+418 404
+607 940
+1161 128
+1161 129
+1153 39
+954 352
+458 824
+1148 1058
+1 1118
+1164 1118
+1 1164
+1171 463
+17 463
+17 1171
+174 136
+1177 740
+1177 1142
+184 1178
+1178 1161
+857 17
+858 17
+258 839
+703 839
+256 1179
+955 1179
+256 955
+888 644
+17 527
+17 44
+79 937
+721 143
+721 1082
+9 525
+9 526
+371 550
+695 940
+1084 430
+17 430
+9 1077
+586 333
+9 19
+9 20
+9 1099
+240 968
+422 968
+618 387
+388 618
+49 40
+331 319
+953 1176
+915 940
+195 770
+1131 364
+364 838
+1113 948
+547 704
+547 705
+146 932
+240 609
+864 913
+17 913
+920 254
+9 711
+9 555
+676 251
+17 251
+1131 1148
+315 243
+240 383
+240 381
+151 228
+610 228
+561 1115
+819 558
+558 238
+1076 270
+636 270
+1031 1137
+256 1031
+281 17
+2 17
+958 137
+137 336
+336 958
+983 732
+9 732
+1168 17
+985 70
+9 70
+876 17
+1141 17
+694 1033
+611 713
+713 277
+79 1111
+1180 1111
+79 1180
+951 492
+9 951
+184 1102
+1156 1102
+767 198
+1174 443
+17 443
+422 31
+195 831
+195 890
+1083 476
+581 1016
+835 662
+898 1
+195 1
+1074 903
+1074 385
+240 1181
+735 1181
+480 1119
+1119 369
+218 966
+1082 1147
+85 733
+1085 510
+9 1085
+1003 193
+184 742
+742 1178
+617 1165
+1165 616
+240 1151
+1182 1151
+240 1182
+9 137
+9 138
+933 621
+9 368
+1183 725
+1183 1052
+419 208
+420 208
+208 748
+208 747
+432 265
+957 267
+182 957
+6 1046
+6 850
+488 92
+863 1002
+17 96
+17 95
+9 14
+875 17
+590 768
+768 589
+1 1064
+139 439
+195 1143
+1168 1143
+514 1099
+1099 1184
+514 1184
+6 39
+6 1153
+9 57
+774 142
+168 436
+1185 436
+168 1185
+561 606
+17 606
+51 166
+215 17
+944 124
+810 1038
+1038 74
+538 988
+208 538
+1000 817
+620 902
+844 376
+49 1173
+1 872
+6 1186
+1107 1186
+6 1107
+63 574
+691 208
+691 423
+967 736
+1095 1187
+9 1095
+9 1187
+1018 573
+9 573
+518 1109
+432 518
+15 442
+585 996
+996 468
+313 1034
+17 176
+17 175
+728 1132
+699 60
+60 698
+1117 62
+240 1017
+1017 421
+752 17
+474 1038
+51 556
+79 1188
+249 1188
+184 739
+739 742
+622 666
+640 861
+79 640
+563 460
+17 252
+92 531
+22 968
+187 820
+9 327
+1113 17
+17 275
+1127 270
+980 237
+17 244
+17 366
+643 800
+1189 774
+774 144
+1189 144
+1185 169
+1106 898
+17 293
+1133 746
+668 1133
+195 815
+440 139
+588 161
+995 1133
+943 233
+49 118
+813 594
+9 594
+355 1103
+1183 119
+997 797
+9 995
+50 556
+1083 704
+846 243
+846 241
+1188 852
+1188 1190
+1190 852
+708 429
+9 429
+157 851
+80 640
+80 641
+1017 809
+17 484
+17 483
+161 583
+1071 672
+673 1071
+885 957
+675 970
+833 41
+1160 41
+1160 833
+999 386
+930 386
+1066 779
+240 1191
+609 1191
+539 889
+17 889
+1139 133
+1072 133
+1072 1139
+1192 1142
+1192 1177
+786 856
+671 535
+783 671
+825 159
+240 907
+907 648
+1110 707
+889 988
+841 988
+1193 592
+1193 593
+1023 784
+17 784
+150 195
+738 767
+1126 1032
+978 17
+184 632
+784 1110
+1 724
+929 1144
+1139 1144
+1165 595
+1079 1157
+958 182
+950 532
+261 376
+17 261
+9 884
+9 807
+17 69
+121 331
+1151 1145
+1182 1145
+1163 853
+1178 129
+129 743
+1178 743
+1 456
+1064 456
+49 528
+1194 528
+49 1194
+743 154
+195 516
+949 297
+651 304
+565 101
+753 701
+701 645
+17 234
+821 941
+493 821
+1130 634
+256 1130
+79 1112
+1080 378
+1181 1182
+1 971
+398 709
+1047 60
+287 893
+330 850
+263 432
+1023 584
+240 415
+17 318
+17 427
+734 85
+164 765
+9 291
+697 845
+17 845
+184 630
+1060 791
+17 791
+9 310
+9 311
+314 866
+867 314
+256 170
+170 436
+348 598
+598 704
+348 704
+79 1010
+79 1011
+1195 580
+1195 1196
+1196 580
+859 914
+337 623
+391 1116
+392 1116
+1019 163
+387 248
+9 847
+419 855
+17 920
+1186 17
+1186 837
+1197 862
+1197 1077
+17 490
+678 496
+1198 17
+971 1198
+79 764
+764 726
+933 146
+812 883
+883 788
+454 147
+827 99
+1146 993
+1146 992
+9 325
+17 108
+79 602
+391 271
+271 1116
+219 945
+1008 1095
+449 191
+1131 575
+575 364
+532 951
+1192 740
+744 740
+744 1192
+346 935
+989 879
+195 989
+240 1199
+1199 1191
+6 908
+813 477
+477 812
+967 218
+497 134
+9 605
+184 559
+1124 200
+200 1183
+1124 1183
+821 1004
+803 753
+1191 437
+1191 700
+158 458
+222 231
+864 174
+17 179
+1126 1095
+9 729
+455 1063
+750 17
+856 17
+551 371
+196 17
+589 435
+1176 125
+648 840
+1136 170
+1060 694
+1156 17
+1121 17
+163 1154
+9 1154
+378 264
+256 1048
+1179 1048
+715 1045
+1 455
+520 152
+79 299
+195 1043
+25 1043
+195 515
+894 287
+985 350
+1 1159
+274 409
+1 1198
+153 520
+335 139
+17 360
+17 359
+115 89
+505 115
+754 49
+49 820
+914 316
+795 37
+9 778
+195 1101
+763 1101
+195 763
+868 1130
+6 961
+444 212
+9 993
+1184 1007
+9 1184
+119 1124
+1104 1200
+1184 1200
+1104 1184
+87 450
+184 557
+1009 454
+9 464
+9 465
+944 558
+1055 470
+1054 470
+36 705
+566 973
+974 566
+171 524
+375 1174
+1174 374
+899 228
+240 24
+1199 24
+338 580
+1129 1044
+1129 1045
+1172 1069
+17 653
+9 236
+1201 1017
+1017 106
+1201 106
+861 1077
+9 888
+9 644
+79 1150
+538 889
+1179 17
+1149 128
+1018 1025
+878 827
+17 554
+798 411
+1167 1116
+1167 392
+243 859
+1136 580
+1196 1136
+402 418
+1122 220
+9 220
+9 626
+896 1141
+478 813
+1202 437
+1191 1202
+809 1201
+1136 1195
+338 1195
+1124 118
+1124 49
+374 783
+24 968
+256 260
+898 992
+553 256
+256 552
+184 1134
+256 868
+1203 771
+1204 1203
+771 1204
+601 1044
+1150 81
+965 621
+621 964
+777 333
+1205 208
+199 208
+199 1205
+936 346
+187 49
+1066 943
+1041 1066
+912 864
+240 637
+1057 301
+9 522
+504 17
+302 17
+9 718
+414 1114
+1206 157
+1206 851
+6 330
+9 369
+690 208
+6 1094
+4 1094
+928 133
+9 133
+1 1063
+515 1027
+1103 1007
+880 497
+735 1145
+1 874
+211 874
+1154 308
+833 296
+1200 184
+1200 514
+459 638
+736 979
+107 736
+1 1170
+1198 1170
+500 239
+79 1190
+983 1176
+776 144
+776 765
+904 993
+240 1055
+9 612
+595 617
+1061 852
+195 18
+1207 18
+195 1207
+604 561
+493 1079
+17 925
+1105 601
+814 117
+240 775
+801 643
+195 687
+9 576
+472 208
+993 385
+553 260
+184 1162
+1105 1044
+1103 1184
+17 66
+537 544
+9 980
+152 228
+776 1189
+240 720
+798 1081
+1081 411
+952 944
+727 702
+9 727
+408 620
+811 678
+232 811
+1090 420
+659 755
+755 208
+1126 1008
+622 965
+814 1138
+1125 119
+1 924
+874 924
+56 743
+839 364
+1158 839
+17 828
+1181 1145
+79 744
+278 397
+779 1041
+178 779
+297 1160
+297 49
+1100 1147
+195 688
+757 673
+6 1206
+1046 1206
+1045 128
+9 1116
+322 114
+9 322
+493 1166
+1166 1079
+424 323
+323 114
+184 1175
+65 863
+16 506
+1203 466
+1203 200
+1062 363
+339 449
+208 185
+1097 185
+1139 928
+1084 708
+747 539
+1 1062
+665 622
+9 773
+13 403
+472 660
+240 667
+1203 625
+1 1169
+1068 1193
+1180 1061
+200 854
+445 551
+195 202
+1078 802
+501 1057
+1190 1180
+1180 852
+453 675
+852 249
+835 461
+17 922
+17 756
+756 978
+190 509
+184 987
+987 1175
+964 933
+997 734
+17 895
+866 313
+987 730
+1175 730
+899 610
+1132 726
+1016 871
+5 1187
+1135 1187
+450 500
+285 1122
+87 500
+17 810
+208 540
+747 540
+17 959
+462 1171
+1031 27
+200 49
+43 712
+689 333
+9 905
+391 720
+9 906
+1173 1194
+667 308
+1070 308
+1166 1157
+616 1157
+240 505
+1206 908
+184 986
+1086 676
+527 560
+817 1081
+979 967
+1199 437
+24 437
+786 17
+185 414
+185 7
+195 153
+200 855
+853 470
+220 945
+195 16
+1 363
+661 835
+509 448
+1207 17
+17 806
+672 801
+9 885
+336 139
+240 288
+240 162
+1 1036
+1169 1036
+1194 239
+1194 284
+68 985
+973 565
+939 1050
+248 618
+533 1159
+184 1049
+1187 156
+1202 1199
+9 1081
+1123 1037
+365 894
+195 1067
+289 1154
+796 997
+170 580
+251 1086
+79 1142
+1205 1091
+542 1018
+89 817
+9 817
+184 61
+1094 1187
+1187 4
+435 768
+289 163
+569 936
+1 362
+1157 1165
+9 1022
+1176 730
+1 1035
+1055 853
+749 17
+999 385
+730 983
+1112 1011
+690 767
+184 59
+1015 1001
+240 1069
+429 1084
+1110 1023
+481 17
+679 17
+79 1192
+1067 1207
+467 1203
+200 1205
+186 240
+185 1114
+507 890
+1149 1045
+861 1197
+208 766
+1155 853
+1204 467
+875 918
+1 992
+1015 1081
+186 1114
+208 767
+789 1060
+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
+43 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 170 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
+189 272 273
+274 275 276
+277 278 279
+280 281 282
+283 284 285
+286 287 288
+289 290 291
+102 292 293
+294 295 138
+296 297 298
+299 300 301
+302 303 304
+305 306 307
+308 309 310
+311 312 313
+314 315 316
+317 318 319
+26 320 321
+322 323 324
+325 326 327
+328 329 330
+331 332 333
+334 139 335
+336 54 337
+338 339 340
+341 342 343
+344 345 346
+347 348 1
+349 350 351
+352 353 354
+355 268 356
+357 358 359
+360 361 362
+363 364 365
+366 367 368
+369 370 371
+372 373 374
+375 86 376
+377 378 58
+379 380 381
+382 383 384
+385 386 387
+388 389 390
+391 392 393
+394 395 396
+397 398 399
+400 401 402
+403 404 405
+406 36 407
+408 409 410
+411 412 413
+334 414 415
+416 417 418
+419 420 421
+422 423 424
+425 426 427
+428 429 430
+431 432 433
+434 62 435
+436 437 438
+439 440 441
+442 443 444
+445 446 447
+448 449 450
+451 452 453
+454 455 456
+386 457 458
+459 460 461
+462 463 464
+465 466 467
+468 469 470
+471 472 473
+474 475 476
+477 478 479
+480 481 482
+483 484 485
+486 487 488
+489 490 491
+408 492 493
+494 495 496
+497 498 499
+500 501 502
+503 504 505
+506 507 508
+509 510 511
+512 513 514
+515 516 517
+518 239 519
+296 520 521
+522 523 524
+525 526 527
+441 528 529
+530 531 532
+533 534 535
+536 537 538
+238 539 540
+541 542 543
+544 545 546
+547 548 222
+549 550 551
+552 553 554
+136 555 556
+557 225 558
+559 560 561
+562 563 564
+565 566 567
+568 569 570
+407 571 572
+573 574 575
+576 577 578
+579 580 581
+582 583 584
+585 586 587
+588 589 590
+591 592 593
+594 595 596
+70 597 598
+599 600 601
+602 603 604
+605 606 607
+608 609 610
+611 612 613
+614 412 615
+616 617 618
+619 620 621
+622 623 624
+625 234 626
+627 628 629
+630 631 632
+633 634 635
+636 637 638
+639 640 641
+642 643 644
+645 646 347
+647 648 649
+650 651 652
+653 159 654
+655 656 657
+658 560 659
+660 661 662
+663 664 665
+35 497 666
+667 668 669
+670 671 672
+673 674 675
+44 676 677
+678 679 680
+681 682 377
+103 683 684
+685 686 687
+688 689 690
+691 692 693
+694 695 696
+697 448 233
+698 699 700
+701 702 703
+704 705 706
+707 708 395
+709 710 340
+711 712 713
+714 715 716
+717 718 293
+719 720 721
+722 723 724
+725 181 726
+727 728 729
+730 731 732
+733 252 734
+735 736 737
+738 739 740
+741 742 675
+743 744 745
+666 746 571
+747 748 749
+750 751 752
+753 754 755
+756 757 758
+759 760 761
+762 763 764
+765 766 767
+768 769 770
+771 772 773
+774 775 776
+777 778 779
+780 781 782
+783 784 785
+786 642 787
+788 789 790
+791 792 793
+794 795 796
+797 798 271
+799 800 801
+802 803 804
+805 499 806
+807 808 809
+810 811 812
+813 814 815
+816 817 818
+819 518 552
+466 820 29
+821 822 823
+824 825 826
+827 828 829
+830 831 832
+833 834 835
+836 837 838
+839 372 840
+540 841 842
+843 844 423
+845 846 847
+848 849 850
+851 852 853
+854 855 856
+857 858 859
+860 861 862
+863 762 125
+864 865 83
+866 867 868
+869 870 871
+872 873 874
+875 876 877
+878 879 880
+881 882 883
+884 429 885
+886 887 888
+889 446 890
+891 892 893
+894 895 896
+897 898 899
+900 901 902
+903 904 905
+906 907 908
+909 910 911
+912 913 914
+915 916 917
+457 918 128
+919 7 734
+920 921 259
+922 923 924
+50 925 926
+927 928 929
+930 931 932
+933 934 935
+936 937 938
+939 940 941
+704 942 943
+944 945 387
+479 946 947
+948 949 950
+951 952 953
+954 955 956
+957 958 959
+960 583 961
+962 963 964
+873 965 966
+375 967 968
+969 970 645
+190 971 972
+973 974 975
+976 977 978
+979 980 981
+982 983 712
+984 887 985
+986 987 988
+989 806 990
+991 421 992
+993 994 995
+996 997 998
+999 1000 681
+1001 1002 1003
+1004 343 1005
+1006 1007 1008
+1009 1010 1011
+1012 1013 1014
+920 1015 1016
+850 1017 1018
+1019 1020 1021
+1022 1023 1024
+226 1025 1026
+1027 465 1028
+1029 1030 1031
+1032 555 295
+1033 1034 477
+1035 1036 1037
+1038 1039 1040
+1041 771 1042
+1043 1044 78
+1045 1046 662
+1047 1048 1049
+1050 1051 1052
+1053 1054 1055
+1056 1057 1058
+1059 1060 892
+1061 1062 1063
+1064 1065 1066
+1067 1068 1069
+1070 1071 1072
+1073 300 1074
+1075 1076 1077
+1078 1079 1080
+1081 1082 730
+1083 1084 1085
+872 1086 1087
+1088 993 1089
+1090 1091 1092
+1093 1094 1095
+1096 1097 1098
+1099 575 1100
+1101 1102 1103
+1104 1105 1106
+219 1107 424
+1108 1109 1110
+1111 1112 1113
+1114 1115 1116
+1117 1118 1119
+1120 1121 1122
+1123 1124 1125
+471 346 581
+1126 1127 1128
+1129 1130 1131
+1132 142 1133
+1134 84 634
+1135 986 1136
+1137 398 356
+1138 1139 793
+1140 1141 1142
+1143 1144 1145
+1146 1147 1148
+1149 1150 332
+1151 1152 917
+1153 1154 1155
+1156 327 1157
+1158 1159 1160
+1161 622 1162
+614 1163 1164
+1165 40 1166
+1167 1168 832
+269 1169 1170
+1171 1172 1173
+1174 991 1175
+1176 401 1177
+973 1178 981
+1179 330 547
+1045 1180 1181
+1182 1183 1184
+1185 1186 987
+1187 1188 1189
+1190 1191 728
+1192 1193 1194
+1195 1196 12
+1116 1197 1198
+1199 1200 1201
+1202 1203 1204
+1205 1206 1207
+1208 1209 288
+1210 1211 439
+1212 171 1063
+1213 1214 1215
+550 31 1216
+1217 1218 1219
+1220 1221 1222
+1223 1224 1225
+1226 1227 755
+1228 874 1229
+1230 1231 1232
+1233 1234 147
+1235 9 1236
+1237 1238 1239
+1240 1158 1241
+1242 1243 514
+1244 1245 1246
+1247 1064 1248
+1249 1250 478
+549 1251 1252
+1253 1254 1255
+1256 1257 1258
+1259 1260 668
+1261 1262 135
+1263 1264 593
+1265 1266 1267
+1268 1269 1270
+1271 1272 1273
+1274 1275 1276
+289 1277 1278
+1279 1280 1281
+1282 1283 1284
+1285 1286 1287
+721 1288 1289
+512 665 1145
+1290 1291 193
+1292 1293 1294
+1295 1296 89
+1297 20 1298
+1299 1300 132
+1301 249 1302
+1159 1303 1304
+1305 121 1306
+1307 1308 48
+1309 1310 1311
+1312 1313 969
+1314 1315 1316
+1317 1318 1319
+1320 1321 1322
+1323 30 498
+1324 1325 1326
+960 1327 1328
+1329 1330 1331
+1332 1333 1334
+1335 1336 1109
+1337 1338 1339
+1340 1011 999
+1341 1342 1343
+1344 1345 680
+1346 1347 1348
+1349 1350 1351
+1352 1353 1354
+1355 1356 1357
+697 1358 1272
+1113 1359 1360
+1361 1362 1363
+394 1364 1365
+1366 1367 1368
+1369 1123 1370
+1371 1372 368
+1373 1374 1020
+1375 1376 1377
+1378 1379 1380
+1381 1382 163
+1383 1384 114
+1385 1386 1387
+34 1388 1389
+1390 1391 218
+1392 1393 1394
+1395 1129 1396
+326 1397 1398
+1399 1400 1401
+1402 434 1092
+1403 256 1404
+1405 1406 1407
+1408 502 1409
+1410 1411 1412
+1185 1413 1414
+1415 1416 1417
+1418 1419 1420
+1421 1422 1423
+1424 1425 310
+1426 129 574
+1427 1428 1429
+1430 586 1431
+1332 1432 1433
+522 1434 1435
+1436 1329 1437
+1438 1439 1440
+1303 1441 1442
+49 787 1443
+1444 1445 1446
+227 1447 1448
+1449 1450 1451
+1452 364 1453
+1454 1152 1455
+1456 1457 1458
+1459 1460 1461
+1462 1463 1464
+1465 1275 1466
+1467 1206 1468
+1469 1470 531
+1471 462 1472
+1473 1474 392
+1475 1476 1477
+1478 1479 215
+1480 1481 1226
+1143 1482 1483
+1484 894 1485
+1486 1487 488
+1488 491 1489
+1490 1491 520
+425 1492 1493
+1494 1495 405
+1496 1497 1498
+1499 859 1500
+1501 798 1502
+1503 779 1504
+1505 1506 1507
+1508 1509 1510
+1511 1512 1433
+1006 1513 1514
+1515 1516 1517
+1416 1518 1519
+1520 1521 1522
+1523 1524 1179
+1525 1526 1527
+1528 563 1529
+1530 1531 829
+1532 1127 1533
+1534 1535 1536
+802 1537 1538
+1539 1540 1541
+1542 1543 905
+1544 1545 1546
+1547 1548 1549
+844 1400 220
+1550 1551 1552
+1198 351 1553
+1554 1555 1556
+1557 764 1558
+1201 1166 1559
+1560 1561 1562
+1563 1564 1565
+1018 1566 1567
+274 1436 1568
+1569 1570 1571
+1572 117 1573
+1574 1575 1576
+1577 1376 1578
+1579 291 1580
+1581 705 1582
+1583 1584 1457
+1585 1586 1587
+1588 1589 1590
+1488 1591 1324
+836 1592 1593
+1594 1595 1596
+1597 1598 470
+1599 1600 1601
+1602 1603 1604
+1605 1606 1607
+1608 1609 1610
+1611 381 1002
+1612 1613 75
+1614 1209 1615
+467 1616 316
+1617 1618 1619
+1505 1620 1621
+1622 1623 1624
+1625 1626 1007
+1627 1248 1628
+1629 1630 1631
+1632 799 1633
+1634 1635 1636
+1637 1638 1639
+169 1640 1641
+1642 1643 1644
+1645 1646 427
+1647 1648 1649
+1650 1651 1652
+1653 1654 1655
+1656 846 1657
+1658 1204 1266
+1659 1660 931
+1661 212 1662
+1663 505 1312
+1664 604 1665
+1666 1395 1667
+1668 1669 781
+1670 1671 1672
+1673 1674 68
+1675 1676 561
+1677 1040 1678
+1679 1680 822
+612 1681 1682
+1683 11 1684
+1685 1686 1687
+1688 1432 1689
+1690 703 1691
+842 1692 1693
+1694 1695 1302
+1696 1697 1698
+1699 843 1700
+688 1701 1214
+1518 1702 1068
+1703 1704 1705
+1225 534 1638
+1706 1707 435
+1708 1709 1710
+1711 150 1712
+937 1713 1714
+1715 1716 1717
+1718 1719 1720
+1721 1722 1723
+1724 1613 1725
+1726 1727 1728
+1729 1568 1730
+1731 1632 1732
+1733 1044 1734
+1735 1736 1737
+1738 1739 209
+1740 710 1741
+1742 1743 1744
+1745 876 1746
+1747 1748 1749
+1750 1751 652
+1752 1753 1754
+1755 273 1756
+1757 789 1758
+1759 636 529
+1760 1761 98
+1762 1022 824
+1763 431 1764
+1765 1766 539
+1767 188 1768
+1769 1770 1013
+186 1771 156
+1772 1464 609
+1550 1773 1774
+1775 1776 1710
+1777 1446 1778
+1779 393 1203
+1780 1781 1782
+1783 1300 1784
+1785 1699 577
+1786 1787 221
+1788 1789 1278
+1577 1217 1790
+1791 141 449
+1792 1793 369
+1794 1795 1796
+64 1797 1798
+711 1799 1800
+1801 1802 1803
+1804 1805 1806
+1807 1594 923
+1808 1809 1810
+1811 1812 1813
+1814 389 1815
+1816 1057 1817
+1818 1819 1820
+1821 1822 785
+1823 1824 1825
+1826 123 1523
+1827 1828 1829
+1830 1831 1832
+1833 1834 1835
+1553 1836 1837
+1367 1838 1839
+1840 1841 1842
+1843 1844 1298
+1776 1149 1845
+1223 1846 1847
+1848 1849 312
+1850 1785 1851
+939 1852 1853
+1854 134 935
+350 1544 1836
+1855 944 1856
+1857 719 92
+1858 232 1859
+538 1860 1042
+775 1861 1862
+1863 936 566
+1864 1865 1866
+1867 1868 1869
+361 1870 1871
+1872 1844 1873
+1874 654 671
+1875 1876 1877
+1808 452 1878
+1879 1170 1880
+1881 1882 461
+1883 964 284
+1884 879 1885
+1886 1887 1888
+1889 1890 1891
+1892 1417 1893
+1894 1851 1895
+1896 1897 1077
+1363 1898 1899
+1900 1901 1627
+1902 1903 1904
+1905 1906 1907
+1908 1909 1910
+1911 985 1912
+1445 1838 1778
+1913 1384 1914
+1810 1915 1916
+1917 1918 1919
+1920 1921 21
+1922 1391 1923
+1614 1924 1925
+1926 1927 1928
+1929 1487 1930
+1931 1932 1930
+1933 1934 1935
+1936 1937 1663
+533 1041 1639
+1938 1939 1940
+336 1270 927
+1941 1646 1087
+1210 1942 835
+1943 1944 475
+1945 1946 484
+1947 743 1948
+1949 1950 1951
+1952 1953 1954
+1955 855 1956
+1578 1957 37
+1958 1959 761
+1960 1590 1961
+1141 1962 1963
+1349 1964 1965
+1966 620 1967
+1968 1969 814
+1970 1971 1972
+1973 977 1974
+1975 1241 1976
+1977 1347 1978
+1979 1355 1980
+1527 693 1981
+1809 1982 1983
+1984 1985 1188
+1986 1987 1453
+1988 732 1989
+442 808 1990
+1991 1850 739
+1992 1479 1993
+1994 953 481
+1995 782 175
+1996 1997 1998
+858 1999 2000
+2001 2002 1798
+2003 1221 250
+2004 1977 2005
+2006 1863 1537
+884 2007 2008
+837 1139 2009
+2010 2011 2012
+2013 2014 2015
+2016 2017 2018
+2019 2020 2021
+2022 2023 1993
+1801 2024 2025
+1008 2026 2027
+2028 629 2029
+2030 1174 2031
+2032 153 861
+2033 2034 2035
+2036 2037 2038
+2039 1435 2040
+2041 2042 2043
+2044 2045 2046
+1824 2047 2048
+2049 2050 2051
+2052 1439 2053
+2054 1507 2055
+2056 2057 2058
+2059 2060 358
+2061 287 1294
+2062 1762 1447
+2063 2064 1657
+2065 2066 2067
+2068 2069 1790
+1640 1398 2070
+2071 910 2072
+51 2073 2074
+1458 2075 1111
+1683 384 2076
+2077 285 2078
+644 2079 1443
+2080 113 1746
+2081 396 2082
+965 990 2083
+2084 305 2085
+2086 1308 716
+2087 1015 453
+2088 2089 2090
+2091 2092 1800
+2093 2094 52
+2095 2010 2096
+2013 1893 2097
+2098 2099 2005
+2100 2101 2102
+2103 2104 975
+2105 2106 2107
+2108 2109 950
+2110 1940 1575
+2111 1306 1826
+2112 2113 2114
+2115 1633 2116
+2117 1921 1741
+2118 2119 2120
+1899 1764 2121
+2122 2123 1874
+2124 956 901
+1618 2125 1586
+2126 2127 1055
+1144 1168 1972
+2128 2129 2130
+924 1596 2131
+2089 242 1831
+1837 1546 2132
+1773 2133 2134
+2135 367 1914
+2136 2137 2138
+1688 1889 2139
+2140 2141 228
+1780 1466 2142
+1548 2143 2144
+2145 1991 1592
+2146 2147 2148
+2149 2150 2151
+2152 2153 443
+1140 840 374
+2069 2154 2155
+2156 2157 275
+2158 2159 2160
+2161 1806 867
+192 2162 2163
+2164 2165 1815
+106 2166 1455
+2167 214 1817
+2168 2169 59
+2170 2006 2171
+1920 2172 2173
+733 2174 2175
+2176 2177 1781
+1070 2178 2141
+2179 2028 2180
+2181 2182 1163
+2183 2184 2185
+318 2186 2187
+2188 2189 1502
+133 2190 2191
+2192 2193 2194
+2195 1539 2196
+182 1240 2197
+297 2165 2198
+2199 773 8
+2200 2201 1246
+2202 2203 1900
+2204 617 2205
+2206 2207 2208
+2209 2210 2211
+2037 2212 2213
+2214 321 1902
+2215 2216 231
+88 1196 2217
+2218 2219 922
+2220 1262 2221
+2222 2223 2224
+947 527 2225
+2226 176 1643
+229 1720 2227
+2228 2229 1936
+667 1959 2230
+2231 2232 2233
+2234 2235 1048
+2236 2237 2238
+2239 959 1876
+251 2240 2241
+195 2242 1725
+2243 713 2244
+2245 1751 2246
+2080 2247 2248
+199 2249 2250
+2251 2252 2253
+2254 2255 2256
+2257 272 2113
+2258 1080 2259
+2260 2179 2261
+243 2262 2263
+2264 2265 1957
+2266 2267 1239
+694 2268 2256
+2269 2270 2271
+2272 2273 2274
+2275 1052 187
+2276 1425 2277
+82 2278 1255
+143 1069 2279
+2280 2281 1631
+2282 2283 2284
+2285 2286 2287
+1337 1587 2288
+162 1372 2289
+2290 127 1252
+2291 2145 2292
+2293 1705 264
+2294 438 2295
+432 2296 2297
+2298 1387 2299
+1742 2300 2301
+2302 2303 2304
+2305 2170 2306
+2135 2307 2308
+2309 2310 2311
+2312 2031 1549
+2313 641 1422
+2314 1576 1260
+2001 2315 2316
+2317 812 2318
+2167 2319 2320
+118 1822 2321
+2250 2231 2322
+2323 2324 2325
+2326 1598 1074
+1263 2327 2328
+2329 1181 2330
+1250 525 946
+2264 2183 744
+2331 2332 1361
+2333 2334 2306
+727 1411 2335
+2336 2337 2338
+72 677 2339
+2340 1987 2341
+311 1419 2342
+325 1428 2343
+2344 2345 2346
+2347 2348 373
+2011 1024 2349
+2350 968 2351
+2128 2352 2353
+2354 194 2355
+2356 2357 2358
+774 2359 1571
+2360 1707 2361
+2004 2362 2363
+1906 2073 2364
+2365 344 2366
+2367 862 2368
+2369 2020 2370
+2371 760 1734
+2305 786 2074
+2372 1882 2271
+1766 2373 841
+280 2374 1885
+283 2375 2376
+1769 2377 1978
+2378 2379 2111
+320 2380 1903
+2381 1953 2382
+1090 2360 883
+2257 5 1756
+2383 2384 2370
+676 998 2385
+1894 2386 740
+2387 1509 2388
+2132 2389 236
+2390 2224 2391
+2392 2393 2394
+2395 1677 2396
+2397 2035 2398
+2399 2400 2401
+2402 2403 105
+2404 2405 2406
+1708 2407 2408
+2409 2410 2411
+2412 2413 2414
+79 2415 1529
+2416 2291 2417
+2418 1644 1852
+2419 2410 1533
+2420 1932 2421
+2422 635 2423
+2424 1323 2425
+2426 2427 2428
+2429 1672 119
+2430 758 2431
+590 2432 2252
+2433 2434 2435
+778 857 2436
+2437 1963 2438
+2439 2440 2441
+2442 2443 1967
+2444 2197 1975
+2402 2445 1465
+513 1971 390
+2428 1517 1317
+262 1655 2446
+2447 2448 2449
+980 2103 974
+2450 1676 1177
+1344 2398 2451
+2452 1621 2202
+2453 2454 2455
+4 2456 2457
+2458 27 2214
+2459 2460 426
+2461 2311 2218
+2047 1095 2462
+2463 2464 1616
+335 2465 2466
+2312 2467 2468
+2469 2104 2470
+2471 2472 2079
+2473 2474 2470
+647 2475 2476
+1407 2477 2478
+2479 2480 2481
+2482 1493 240
+2483 1276 2445
+2484 1695 2476
+2315 1535 2485
+699 2486 2487
+1350 2488 140
+2489 2490 2143
+2491 2492 2493
+2241 2494 919
+2495 2496 2228
+2275 155 2497
+94 1739 877
+720 2498 2499
+2433 1320 2500
+1035 2501 1194
+2502 2503 955
+2504 1326 2505
+1353 2506 2507
+2169 1926 2508
+2509 1247 1901
+382 2510 1974
+2511 2512 1513
+2513 551 2514
+2500 2515 2038
+2516 2517 1476
+2518 2395 2519
+2283 2520 2521
+2087 1916 2522
+2523 2524 2212
+2303 2525 1521
+2526 1380 2527
+2528 2416 2529
+2530 1211 834
+151 2531 2532
+2533 1394 2534
+2535 2536 2537
+2057 2538 2539
+2540 895 2541
+2542 450 2543
+2544 2008 595
+177 1812 1058
+2545 2546 1288
+489 2547 2548
+2549 2550 1273
+1213 2201 2551
+2552 1119 2553
+2554 1232 2119
+530 2555 2556
+397 2557 2558
+2559 460 2411
+2560 1031 2561
+2408 2562 2147
+2563 1003 2564
+2565 2505 2566
+2567 2568 2569
+410 1570 2138
+1905 2268 1713
+2570 2571 2572
+1854 2573 2574
+2575 2576 2520
+2577 1451 2578
+2225 2579 1016
+2580 2581 2582
+314 2464 2583
+2584 2585 2586
+2587 1929 2588
+276 2589 1330
+2590 2591 2254
+2592 444 1849
+2593 627 2594
+2595 2596 2597
+2598 2599 897
+1566 1100 2600
+515 2601 580
+2602 418 2603
+2604 1164 2605
+2606 2607 2608
+1516 2609 1318
+509 2443 2610
+2419 2611 2612
+2613 1148 2614
+2615 687 2616
+2617 282 2618
+2619 2620 2378
+2621 2622 1956
+2623 2624 2432
+2625 2626 726
+2627 2628 1477
+2629 2531 2630
+248 2631 2632
+1027 2633 2634
+2121 433 2635
+2636 2637 2638
+1696 2639 1468
+602 2640 2641
+1065 2642 2643
+2644 2645 567
+223 1641 2646
+2647 2648 1434
+379 2649 1873
+2650 2651 2229
+2030 815 2652
+2559 2612 2653
+2654 2519 2655
+2656 2657 2658
+2659 2518 1802
+765 2660 2449
+2661 1897 1348
+633 2662 2663
+2664 2665 1082
+2666 2528 2667
+658 1698 2668
+2093 126 1557
+2669 1103 2670
+2671 2672 1414
+148 2673 1607
+2674 144 1777
+2675 2208 2676
+692 2677 2678
+722 2679 1687
+2680 2681 2682
+2590 1907 2364
+302 2683 1431
+2684 2685 2686
+2296 691 1526
+1654 1634 2687
+2688 532 2689
+341 2690 301
+2691 2607 2692
+2582 2693 2096
+1610 2694 1709
+2695 752 2327
+979 2515 2696
+1331 1236 2697
+2698 2699 2700
+2701 2702 2703
+2348 2499 2704
+2705 729 1296
+1392 2706 2342
+2310 1807 2219
+2707 1506 2452
+2708 1245 2277
+2709 2710 967
+2711 2712 2713
+2714 2715 2716
+2717 2718 2461
+109 2281 621
+2719 2720 558
+115 2721 2217
+541 2722 2221
+2723 2724 2725
+2557 2393 2726
+2727 2728 2729
+2003 2730 2731
+2732 2733 1561
+2734 2662 2735
+2736 2737 2738
+230 2739 2740
+2741 2742 1495
+2743 1131 2495
+2587 1678 2334
+2744 2745 2746
+810 2747 1842
+863 2748 2749
+2750 2014 2751
+623 2083 757
+2752 2753 1191
+2754 2479 2755
+568 1531 2756
+2545 2347 2757
+1202 2758 1998
+526 2759 2579
+2760 2600 2761
+2762 2763 2466
+2764 2765 1461
+2484 1910 2766
+747 2767 2009
+2768 2769 235
+1341 2066 1689
+2770 2771 2772
+2773 543 2042
+2774 848 1567
+929 203 1942
+2775 154 2776
+41 2570 2777
+1775 2694 2778
+2024 2127 2532
+608 2023 2779
+85 1853 2034
+2780 2213 2524
+2781 2782 2783
+2784 2785 2786
+210 2787 2289
+2481 2788 2789
+2790 2666 2791
+2792 2793 1362
+2794 2795 1028
+2796 2797 2798
+2799 1543 2053
+2086 2800 2801
+2802 2580 1563
+2803 2804 2180
+714 2805 2806
+474 2064 2807
+1625 2808 2760
+2809 2810 2193
+1491 663 1243
+2599 2811 2498
+1969 756 2812
+19 2813 2814
+2591 926 2815
+2816 2514 2817
+500 2818 2819
+2820 45 71
+416 2821 402
+2680 2822 2772
+1514 2823 2808
+1976 1160 2824
+2825 2826 2435
+1504 2436 1499
+2131 2827 2331
+2828 1029 2829
+174 2830 2102
+2511 2831 849
+599 1630 2205
+2832 2833 1382
+2834 2415 1420
+2371 2835 2836
+2837 2838 1327
+2780 2839 2434
+454 1054 2421
+707 2840 2198
+2841 490 2842
+1786 1399 1397
+2843 2844 853
+2251 246 2727
+768 2492 2845
+2846 1277 2847
+2148 2848 2849
+2583 2850 2851
+2852 2853 348
+2854 2855 2856
+2857 1712 2858
+2859 2309 2718
+2860 1723 2861
+2862 2863 2477
+1001 2864 1919
+1004 2865 2866
+329 168 548
+2867 2868 2869
+2870 2871 1180
+2872 2873 2619
+1154 2187 2874
+2875 2876 2753
+33 2877 1216
+2878 1442 2879
+637 2880 2184
+2592 2881 809
+2882 1316 2573
+1459 2883 2884
+2885 2628 2886
+1081 2887 2888
+2471 2889 2890
+263 2189 2891
+2521 2892 2804
+97 2109 2893
+2894 2895 2216
+2896 2542 2392
+2897 2790 2898
+860 2899 2900
+399 1796 2394
+2901 2902 2903
+165 2904 2905
+2906 871 1555
+2601 1862 2907
+2750 2908 2909
+2910 2911 545
+2912 2913 1110
+565 2914 1538
+1787 2915 2916
+10 90 1834
+2917 1964 2918
+2139 1891 1511
+655 2166 2919
+1378 2920 1784
+112 2921 2922
+13 2043 2923
+2924 2862 1406
+821 2925 2926
+2644 938 2316
+2927 2055 2707
+2116 801 2711
+2928 166 911
+2929 2930 2717
+2931 2932 2933
+2934 2777 2935
+61 1768 2936
+2284 1061 2937
+2938 2939 2940
+2941 2942 769
+2943 1268 337
+2944 2274 257
+2945 1580 149
+322 1691 2413
+2946 2278 2947
+2948 2949 1729
+1274 2950 2142
+866 2270 2951
+1335 483 2952
+2953 2748 124
+2954 1396 2743
+2955 2956 2957
+2958 69 795
+554 2959 2960
+2961 1649 1084
+2962 2963 2964
+2965 1869 2966
+2645 2967 2968
+2969 1328 2648
+1968 2970 2971
+1473 2972 1923
+213 2973 2974
+2438 1072 2975
+1012 2976 2977
+2978 67 2356
+2513 2979 2980
+2677 2981 1115
+1134 2982 2947
+2983 1588 2943
+2969 14 584
+2084 2984 2985
+2986 2897 2987
+2988 2351 870
+1375 2989 2990
+613 2991 1503
+308 2992 2838
+2993 1686 2919
+2994 1650 22
+2995 557 2720
+411 2996 1315
+2997 2792 2332
+338 2998 1805
+2848 2562 2999
+3000 1789 2361
+2326 3001 3002
+900 2622 3003
+3004 3005 3006
+204 2940 3007
+3008 2765 2301
+2593 2576 2384
+2901 2842 2548
+366 164 3009
+1104 3010 3011
+3012 1370 2549
+3013 2928 578
+816 2242 3014
+3015 3010 2246
+1574 2375 3016
+1366 3017 2674
+3018 1267 3019
+451 2285 3020
+2908 1067 3021
+3022 2731 1761
+1981 2678 1114
+3015 3023 2440
+3024 2983 53
+3025 2828 2185
+3026 3027 298
+3028 3029 3030
+3031 1037 3032
+3033 972 2488
+3034 899 3035
+562 3032 80
+2980 3036 1251
+650 3037 3038
+3039 1841 3014
+954 3040 3041
+3042 2915 2343
+957 3043 2341
+1047 2690 2866
+3044 3045 3046
+3047 3048 1774
+3049 2078 1183
+3050 3051 2831
+3052 3053 1946
+3054 3055 3056
+2635 2297 1525
+3057 2789 3058
+1360 3059 1199
+1190 3060 3061
+1462 2162 3062
+3063 908 3064
+3065 2318 1036
+1440 3066 3067
+825 3068 3069
+3070 3071 1887
+3072 180 2444
+3073 2874 1088
+2522 3074 2404
+2373 3075 1692
+3076 2986 1091
+46 2801 1828
+3065 1193 3077
+1628 1066 3078
+2467 3079 3080
+2701 3081 1189
+2158 2629 3082
+1622 3083 2916
+1818 2679 3084
+3085 485 3086
+2708 3087 3088
+701 2967 2485
+76 3089 2153
+864 1254 2819
+1256 2821 3090
+2798 1619 1585
+3091 3092 2902
+2692 1354 3093
+428 1859 1716
+3094 3095 3096
+2699 2958 2469
+2651 503 1937
+3005 2937 173
+3097 3098 2927
+3099 3100 3101
+3095 1771 3102
+3103 2487 2929
+3104 370 1601
+1608 2027 890
+912 2649 3105
+1668 3106 2321
+1117 3107 3108
+286 1925 3109
+1569 3110 3111
+888 3112 3113
+1019 904 3108
+3114 2324 2867
+3115 486 2333
+2903 3116 2887
+3117 1667 2954
+1178 794 2036
+1038 3118 517
+56 1653 261
+2098 3119 66
+145 2605 1257
+357 2267 3120
+1351 415 3121
+1690 3122 2968
+1886 2747 3123
+582 2923 2207
+3124 537 1285
+982 2092 2610
+2450 3125 3126
+2759 2944 921
+1078 3127 2893
+2233 3128 2322
+363 649 3129
+2698 2782 2357
+3130 3131 1009
+1151 2686 107
+3132 3076 882
+207 96 1748
+3133 3134 2045
+388 3135 3136
+1385 3137 3138
+1283 3110 2359
+3139 572 3140
+2952 2211 2455
+3141 3142 3143
+3144 1825 3145
+2486 2859 2930
+3146 3147 3148
+2065 3149 1890
+3150 1941 1086
+3151 3152 507
+1870 198 3153
+1408 2683 3154
+1346 3155 1770
+1356 2910 3156
+2156 253 2175
+2834 313 3157
+2609 3158 3159
+3160 2155 3161
+660 1829 3162
+962 3163 2230
+3164 1666 3165
+1287 1737 2337
+2140 3166 3167
+1554 2830 3168
+1595 2997 2827
+1658 3169 3170
+3143 2056 528
+3171 179 603
+1295 2721 3172
+1744 3173 3174
+409 3175 1861
+130 3176 1704
+3177 1142 3166
+3151 3178 3179
+3180 1582 943
+3181 1983 2963
+1319 3159 2955
+594 2739 3182
+3183 3184 2825
+3185 724 2871
+3186 3187 3188
+436 3189 2388
+3140 2938 206
+2671 3190 3191
+2154 2561 2811
+1156 2925 1429
+585 482 303
+591 1866 1944
+3050 3192 3193
+2112 1496 3194
+1265 3195 3196
+245 2978 2728
+1647 3197 2891
+1125 57 260
+161 3198 672
+845 2346 3199
+3200 3132 2637
+1612 2527 196
+3201 3202 3203
+2025 2160 3204
+1373 3107 3205
+3206 1099 3207
+1290 3208 2779
+2062 2227 1719
+1879 2374 3209
+1381 2787 3210
+216 3211 1939
+3212 2238 2405
+201 928 1269
+1242 1814 521
+1073 3213 342
+468 3002 2060
+2050 605 3214
+3215 3216 1359
+750 3217 2807
+3218 1765 237
+1679 3219 2756
+2822 2673 3220
+3221 1591 3064
+3139 3222 2459
+2044 2864 3223
+3224 3225 2620
+3226 2614 3227
+258 2273 2872
+951 3060 2335
+803 323 3228
+1797 2976 1536
+3229 3230 2796
+1050 3231 1954
+3232 607 3097
+1581 2744 3233
+3177 3234 839
+3235 3236 2458
+678 2018 2710
+3237 700 3103
+1449 3238 3120
+1721 3239 1990
+3078 2643 3240
+886 2851 1912
+1205 2564 1697
+1804 2555 3241
+3242 3165 3117
+3233 185 3243
+1833 2510 1684
+3013 1700 3244
+459 3245 3246
+3247 684 3248
+1281 3249 3250
+2768 625 1794
+3149 1364 3251
+2068 1219 3252
+1176 3253 417
+559 3126 2536
+3254 3255 3256
+2425 1389 3257
+2446 2687 3258
+1793 2279 997
+3259 1673 2623
+1611 1918 3105
+2209 3085 1153
+1743 279 3260
+3261 3262 1982
+3021 3263 3203
+827 570 640
+3264 3265 3266
+598 3267 101
+3268 3200 766
+3024 2094 1558
+319 1227 1481
+1843 2814 380
+1875 3269 2641
+1282 2659 3204
+619 3270 3271
+1579 3272 2847
+2021 3273 3274
+1947 3275 2265
+1670 3276 3277
+3025 2880 2538
+1747 1799 3278
+480 3279 3280
+3281 277 2764
+1338 3130 1340
+3012 1358 2769
+776 3118 1284
+3282 3283 3192
+2480 2349 1094
+3284 989 1645
+3285 1952 3286
+2106 3287 2737
+2993 108 723
+915 3288 1924
+1208 3289 2685
+3290 3291 3292
+3293 2598 2989
+2799 3294 3295
+2262 1135 3255
+3296 2757 3234
+3297 3052 735
+3298 1617 2797
+2775 2667 3299
+1867 3300 2072
+1992 610 2973
+1572 3301 3172
+759 669 3302
+3303 535 1224
+3304 3305 3152
+3306 2840 1365
+3307 3148 3308
+2039 2722 3309
+3310 2543 3311
+875 3312 2247
+1726 2661 2363
+783 120 2007
+2478 3313 1456
+624 2971 1754
+639 3195 3314
+3315 3206 3316
+2290 3317 3292
+788 2295 2596
+1475 2885 2133
+2460 3318 3319
+3320 3017 3321
+1994 3322 3061
+3282 2816 3323
+1908 2475 365
+1195 2076 116
+2482 2186 3324
+3094 2791 2776
+3325 3008 2300
+3326 754 3327
+1779 1997 3138
+2781 2729 2358
+3184 796 820
+3328 3268 2448
+3329 3113 3257
+3330 3331 3332
+3333 2767 2382
+3334 1289 2546
+2823 2512 2774
+1642 3335 3336
+1545 3218 2389
+3337 2430 1547
+3338 3339 3340
+1560 3189 3341
+1448 826 2581
+3342 638 1025
+3091 2547 2504
+2110 3343 3344
+1661 3345 3210
+2146 893 3346
+2033 3347 376
+616 2423 600
+709 2689 3348
+3349 3350 682
+984 2424 3112
+1056 3351 2319
+1736 3352 2338
+2625 3072 2884
+3353 3033 3354
+878 2328 281
+3355 414 2763
+2472 3356 925
+2959 3357 995
+6 3358 3359
+3360 2431 3361
+3362 3214 3232
+2817 2877 1651
+191 1497 2114
+3320 2399 1133
+1904 3363 3237
+3364 1878 3020
+670 3365 1892
+1772 3208 2163
+3221 907 2129
+3039 197 811
+1421 2758 3170
+2664 3366 2565
+588 3367 3368
+3369 3227 918
+1599 3370 1311
+315 1322 2794
+3371 696 3372
+933 2191 2182
+1485 3373 611
+1703 3374 3375
+3376 3377 3242
+606 2054 3098
+3378 2385 353
+891 2849 331
+2195 1551 3048
+3379 3029 2984
+2999 2407 1845
+1711 3380 3220
+3381 1146 3382
+3383 2517 3173
+3384 307 2606
+854 1005 3385
+2164 3136 708
+3081 2899 3386
+3387 2462 2506
+3388 3389 3390
+2344 3391 2845
+1017 3051 3207
+3230 1999 3298
+3392 3111 2159
+976 2451 383
+3318 3308 3147
+1542 1021 3393
+3394 2292 838
+3395 1791 1271
+3396 2282 1171
+1230 3397 3003
+3256 1136 3398
+797 2618 3399
+3400 1979 631
+3401 3260 495
+807 2534 1722
+1371 2308 211
+3402 317 1480
+3403 3328 2681
+3285 2417 3404
+3405 3261 3364
+73 3406 2150
+2933 3265 3372
+3407 741 1989
+1126 2120 2611
+3000 3408 290
+536 1735 1286
+1730 1437 3067
+3409 2746 278
+3381 3410 3006
+3346 1060 3411
+3370 996 3044
+3247 137 2567
+3303 3412 3413
+2660 3272 3414
+3415 3416 1023
+1469 3417 2951
+1259 3163 3418
+3275 2560 38
+1883 3419 3418
+2911 2222 3420
+3421 3422 1659
+3423 3181 3212
+869 3335 3424
+3395 3425 2465
+2400 3263 3426
+3026 3306 2067
+3427 3428 3367
+1620 2509 2203
+1292 3109 1463
+1767 3429 3102
+1454 657 3288
+2957 2304 1520
+2354 1293 3062
+909 2905 1868
+3405 2287 3266
+1444 1792 1839
+3297 2948 3066
+3430 2634 3431
+1297 3432 2172
+1299 1085 1379
+3433 3116 3092
+2571 1249 1034
+3144 3434 2669
+3435 1039 516
+1938 3436 3437
+3339 553 519
+3438 2657 3439
+3440 2594 2260
+1122 3421 930
+948 99 1105
+3398 988 3441
+2372 868 3245
+122 328 1524
+2118 3442 3041
+2656 157 2820
+2917 3443 3444
+3186 3058 2788
+3445 3231 2497
+3179 333 3446
+3447 3448 2568
+3449 3392 3450
+3128 2613 200
+1682 777 2991
+1083 131 3375
+3423 3074 1915
+1130 2650 2496
+556 3451 3452
+3453 3403 2771
+3383 3401 2627
+3368 1404 255
+2149 2920 3454
+16 3455 2615
+2313 3169 3196
+3456 1753 3457
+3290 3317 3036
+1995 2101 3277
+1390 1184 1474
+2636 2846 767
+463 2049 3458
+2995 3250 3342
+1933 2982 2663
+2762 3425 2550
+508 3305 2715
+3438 1309 3046
+889 2026 1626
+1858 3459 3182
+3460 3461 2240
+3462 3360 3054
+2192 2501 3463
+2442 3271 983
+1740 2173 2998
+3464 1945 1108
+3465 2051 3362
+2418 3466 3424
+1167 2368 3467
+2041 3468 524
+1261 2574 542
+3158 2302 2956
+1182 217 3437
+1438 2697 3294
+1660 3400 3469
+2490 3079 2144
+3456 3330 1162
+3470 1855 2979
+3457 1229 3471
+3472 2725 3376
+3473 2693 3069
+2234 2865 856
+2161 3417 2556
+1383 2248 2307
+1745 2922 95
+1301 2766 2730
+2081 1512 3251
+2323 3474 2868
+632 1980 3475
+1220 2259 2631
+1943 3217 3476
+1501 265 1169
+2863 1583 3313
+1832 244 3477
+2489 3462 3080
+2174 1235 3478
+2397 679 3479
+3480 3481 3030
+1664 3043 3482
+3329 1388 406
+3028 3483 2985
+3146 3284 3319
+1314 3484 615
+1532 3485 2503
+3075 3486 3487
+2215 3488 690
+2654 1053 1803
+2232 1173 3382
+3489 3453 3490
+2226 3491 3168
+2896 1795 626
+1760 3127 3492
+1452 3493 1909
+2298 2972 3494
+3495 3490 3496
+1724 818 3406
+3281 3497 2844
+3498 2975 1071
+1816 2974 178
+1848 2706 3499
+2369 2575 3384
+932 3469 630
+1307 2330 2805
+3355 2918 3121
+1000 1010 3349
+1138 2966 748
+1233 2603 2996
+1097 3429 63
+3500 2457 3501
+3502 597 2339
+3503 3310 355
+2795 3431 2633
+1043 2861 2835
+1352 306 3483
+3504 3378 292
+1253 3505 501
+3506 3507 2913
+1629 111 3508
+2422 3509 2735
+1552 2196 3427
+202 1960 833
+1913 3009 2921
+3510 28 1911
+3201 3321 3511
+3150 1228 1492
+1827 1046 3512
+1635 1515 2427
+1656 476 2942
+3513 3337 1175
+851 3497 1460
+2239 2640 3482
+1478 2320 3514
+2935 2572 1033
+2314 3419 2376
+506 3411 3515
+1132 2401 3426
+1486 2414 3516
+3477 2263 3254
+2953 3101 3517
+2624 247 2253
+183 3409 2843
+3518 2107 3519
+3520 3450 3082
+2095 3473 3068
+32 1426 1652
+1343 492 2137
+2032 3521 2630
+3291 1856 458
+294 3248 3522
+1694 2632 648
+2015 2909 3202
+2585 2738 3287
+3443 3194 3523
+3524 3489 1727
+2206 3525 961
+447 2761 1150
+2350 940 87
+800 1949 2712
+3526 770 2800
+2176 2950 3527
+3513 992 420
+763 354 1589
+2293 3197 3528
+2136 1490 3027
+753 3086 2540
+3529 3283 3530
+3216 3531 3059
+1333 2082 3175
+3532 2199 3533
+3534 184 852
+3535 3156 544
+3536 2507 628
+2383 2019 3274
+2077 3343 3016
+3475 1357 3535
+2243 208 3278
+266 3537 3180
+746 3007 2939
+3264 2286 3371
+1597 2578 3213
+3538 18 3388
+1310 3104 1600
+1121 1280 3422
+3539 3458 3465
+2181 3484 3540
+3541 596 1701
+3464 3507 736
+17 3542 3389
+2803 1212 1062
+1237 359 1374
+1244 1215 3543
+2124 3397 3544
+2533 2881 3499
+1427 823 3545
+2602 146 3090
+2494 3461 3533
+403 2742 673
+3546 2855 167
+3547 3548 360
+3549 3550 3472
+3518 385 945
+3551 352 3552
+2152 3239 3553
+3327 2541 1484
+2429 3106 3554
+1872 914 3432
+2439 949 3011
+2688 339 3241
+1823 2670 1102
+1970 3467 3135
+2012 3555 1564
+1821 1717 1669
+1675 2668 3253
+1120 3511 3249
+1857 3035 898
+3433 3366 2888
+3556 2818 3154
+1986 3129 958
+2642 725 3557
+1410 1573 952
+3558 3524 2362
+1124 3486 55
+2353 3446 1325
+1418 81 1393
+1534 1014 702
+994 819 2960
+1931 3516 455
+1494 3451 1032
+3559 2964 971
+3560 3529 3315
+3413 3561 772
+1706 2936 3408
+1402 2987 1098
+3562 2420 2655
+2059 3238 3563
+3564 2090 1830
+1738 2244 3312
+1733 3302 3089
+1884 1880 1865
+2584 362 3565
+2258 3566 3492
+1602 3162 1819
+2063 3199 751
+1415 3365 3198
+3567 3307 3222
+1508 1662 437
+2675 309 3568
+2802 2755 3569
+1424 2676 3087
+1430 1409 2876
+3548 3396 2249
+299 1049 3001
+2223 3338 3570
+3562 2396 2588
+1811 1877 3351
+2386 3300 3571
+1192 2194 3071
+3171 3269 1813
+254 3259 589
+3531 1165 1200
+3572 2569 3573
+3522 683 2403
+664 1984 1482
+2530 3141 440
+2783 2700 2474
+3574 3558 2099
+3575 3576 3359
+2329 47 3512
+2178 3415 1718
+3577 3219 2926
+2860 77 3553
+3115 2171 804
+2097 1519 2751
+2853 1471 2
+2412 487 3228
+1528 3157 2810
+1530 3019 1680
+2535 2639 659
+3578 3226 3565
+400 1258 3125
+205 805 3567
+1715 784 885
+2294 3579 3341
+1500 2000 3229
+2617 270 3209
+1955 902 2235
+881 1788 2638
+2022 3514 1291
+2552 1238 3205
+3495 1075 1728
+3580 464 3539
+3581 3521 2900
+1881 2653 3582
+3191 1732 2115
+3452 404 3447
+1973 1835 2017
+1541 1403 3428
+3240 3557 2626
+3394 3333 3404
+1757 3038 2733
+2770 3583 3496
+25 3236 1950
+2793 1763 1898
+3119 2377 2977
+3584 1928 3549
+3585 3536 3273
+3586 3215 1112
+2812 419 2652
+3587 494 3047
+1107 3083 2856
+3474 3387 3481
+2245 1106 3037
+3153 3578 1871
+2604 1234 413
+2091 1749 510
+3063 1489 2841
+2736 3369 3519
+2544 3459 430
+3583 3380 3588
+2048 2325 3589
+3503 2558 2726
+742 2566 3448
+1467 2537 3134
+2912 1336 2454
+1962 2704 3416
+1966 511 110
+1089 3590 3073
+2272 3224 2873
+1750 2597 3023
+2236 2962 3575
+3591 3574 65
+2577 469 3563
+1059 3178 3515
+1782 3592 1846
+2965 792 3571
+3470 3593 2105
+2526 74 3454
+2809 3594 564
+1218 39 3252
+3587 2134 2886
+2914 3122 324
+3534 706 3243
+3070 3595 3077
+3556 304 865
+3596 970 3597
+2875 3279 587
+3547 2586 3593
+3517 3552 2749
+3598 3188 3434
+2695 592 3476
+3542 2088 3599
+2892 3440 2261
+2473 2696 1339
+1559 42 2934
+2108 2441 1079
+2773 523 3309
+3049 3436 3344
+3390 3599 3564
+2705 3301 1412
+1958 2836 963
+2483 104 3572
+3304 2352 2716
+1334 493 1342
+2409 3246 3485
+3185 1603 3084
+1988 674 2741
+966 3600 3471
+3225 1305 2379
+1896 2858 3155
+2732 3579 790
+1321 2826 3430
+3520 3581 2703
+91 2990 3034
+2621 3385 1231
+2932 2815 3262
+3323 2994 24
+1401 2646 2070
+3042 3545 1623
+3601 3340 241
+1540 496 1674
+1026 2085 3602
+1137 267 942
+717 3551 3100
+2589 2157 3478
+2870 661 1604
+1752 2970 813
+2931 695 2255
+2523 3183 2839
+3502 3504 3267
+2204 3508 2785
+2832 3345 1510
+3373 896 1681
+2367 831 3386
+1714 3591 2002
+2122 2468 3056
+2554 3040 3544
+3532 3603 3352
+2709 3347 3479
+1441 2616 3604
+3605 3445 3299
+2647 3468 15
+1377 3160 3606
+2317 3595 3123
+2453 2210 3607
+3608 2691 3093
+1161 3332 3609
+1096 2898 3096
+3598 3569 3057
+2061 2355 3289
+3506 2949 737
+2525 2924 3610
+3045 158 2658
+685 3455 3538
+3608 3585 2608
+3354 1965 3444
+546 3420 2390
+2595 651 1758
+3577 1157 569
+3018 828 3314
+1864 1264 880
+3 1472 3580
+3325 3611 2883
+1522 3610 1405
+160 3361 1702
+2380 698 3363
+3031 3594 3463
+2894 689 2551
+3527 3573 3561
+2945 1606 3414
+2126 456 152
+60 2508 3584
+3498 3167 2437
+3612 3592 2177
+2220 2040 2190
+1759 2058 2539
+3407 731 2665
+422 3546 3244
+472 2907 3356
+3296 93 3334
+391 3137 3494
+100 718 3099
+2879 3604 686
+3142 1961 1030
+1685 1820 656
+504 3597 1313
+3596 2852 646
+2684 916 1615
+1783 2151 3176
+3293 3606 3161
+2463 3510 2850
+1369 1693 3487
+2381 749 1051
+2882 934 3540
+3258 1636 2426
+2100 1556 1671
+2734 2786 1934
+1187 830 1483
+2941 3391 847
+2266 2553 1450
+2269 3582 1470
+445 2778 1609
+2502 3442 1128
+3537 3311 2745
+2456 3576 3501
+3541 3488 2740
+3402 3326 3324
+2366 473 2890
+2052 3393 3053
+3114 3145 3589
+2857 1076 3588
+3379 2869 3480
+2391 3570 3601
+2714 2130 906
+172 2029 1147
+1840 1888 817
+3353 3523 1498
+1985 3449 2702
+1996 1423 1386
+1922 2299 3211
+3602 2336 3613
+1637 1860 3124
+1584 3586 2075
+2824 1304 2878
+2125 3131 2288
+345 3435 579
+738 791 1593
+2946 1935 3505
+2724 3164 3377
+3590 3357 3614
+2188 3399 1648
+2981 349 1197
+3526 715 2493
+2988 3466 941
+3607 1155 3614
+3500 3559 1755
+3605 2529 3286
+2784 3509 618
+378 3350 2168
+2406 2237 3358
+2906 3491 3336
+3612 3412 1847
+2516 3611 3174
+3235 2713 1951
+653 2123 3055
+1917 2046 913
+2752 3322 3280
+3133 3615 1207
+1172 3004 3410
+23 573 3530
+3316 3193 3560
+903 3295 1118
+1731 3190 1413
+2829 1948 745
+3187 1093 1101
+2016 1345 978
+3022 3566 1222
+3603 224 3613
+3331 3600 3609
+2854 1624 2904
+2387 1562 2833
+2447 1605 2682
+2340 1665 3493
+2200 3088 2895
+2117 3348 2813
+2276 3543 2992
+2837 3525 3568
+2280 601 3270
+576 2071 1895
+2491 2806 2345
+2563 3615 3223
+3441 1186 2672
+2754 1565 3555
+643 2365 2889
+2961 3374 3528
+3439 1368 371
+2719 3460 1279
+1927 2723 3550
+780 3276 3554
diff --git a/test/boolean/2.gts b/test/boolean/2.gts
new file mode 100644
index 0000000..b664aaf
--- /dev/null
+++ b/test/boolean/2.gts
@@ -0,0 +1,25550 @@
+722 2160 1440
+-50.000004 68.442886 118.442886
+-50.000004 70.188126 118.427658
+-50.000004 71.932838 118.381966
+-50.000004 73.676483 118.305840
+-50.000004 75.418533 118.199295
+-50.000004 77.158463 118.062355
+-50.000004 78.895737 117.895073
+-50.000004 80.629822 117.697502
+-50.000004 82.360199 117.469696
+-50.000004 84.086334 117.211723
+-50.000004 85.807709 116.923660
+-50.000004 87.523788 116.605606
+-50.000004 89.234055 116.257645
+-50.000004 90.937988 115.879890
+-50.000004 92.635078 115.472458
+-50.000004 94.324791 115.035469
+-50.000004 96.006622 114.569054
+-50.000004 97.680054 114.073364
+-50.000004 99.344589 113.548538
+-50.000004 100.999702 112.994743
+-50.000004 102.644897 112.412148
+-50.000004 104.279678 111.800926
+-50.000004 105.903549 111.161270
+-50.000004 107.515999 110.493370
+-50.000004 109.116547 109.797432
+-50.000004 110.704712 109.073662
+-50.000004 112.279999 108.322289
+-50.000004 113.841934 107.543541
+-50.000004 115.390045 106.737648
+-50.000004 116.923843 105.904854
+-50.000004 118.442886 105.045425
+-50.000004 119.946693 104.159615
+-50.000004 121.434814 103.247696
+-50.000004 122.906792 102.309944
+-50.000004 124.362175 101.346642
+-50.000004 125.800529 100.358093
+-50.000004 127.221413 99.344589
+-50.000004 128.624390 98.306435
+-50.000004 130.009033 97.243965
+-50.000004 131.374924 96.157486
+-50.000004 132.721649 95.047333
+-50.000004 134.048798 93.913841
+-50.000004 135.355957 92.757370
+-50.000004 136.642731 91.578255
+-50.000004 137.908722 90.376869
+-50.000004 139.153564 89.153564
+-50.000004 140.376862 87.908722
+-50.000004 141.578247 86.642723
+-50.000004 142.757370 85.355949
+-50.000004 143.913849 84.048790
+-50.000004 145.047333 82.721649
+-50.000004 146.157486 81.374924
+-50.000004 147.243958 80.009033
+-50.000004 148.306427 78.624390
+-50.000004 149.344589 77.221405
+-50.000004 150.358093 75.800522
+-50.000004 151.346649 74.362167
+-50.000004 152.309937 72.906784
+-50.000004 153.247696 71.434814
+-50.000004 154.159607 69.946686
+-50.000004 155.045425 68.442886
+-50.000004 155.904846 66.923843
+-50.000004 156.737640 65.390038
+-50.000004 157.543549 63.841934
+-50.000004 158.322296 62.279999
+-50.000000 159.073669 60.704708
+-50.000000 159.797424 59.116547
+-50.000000 160.493378 57.515995
+-50.000000 161.161270 55.903542
+-50.000000 161.800934 54.279678
+-50.000000 162.412140 52.644897
+-50.000000 162.994751 50.999699
+-50.000000 163.548538 49.344582
+-50.000000 164.073364 47.680054
+-50.000000 164.569061 46.006622
+-50.000000 165.035461 44.324791
+-50.000000 165.472458 42.635075
+-50.000000 165.879883 40.937988
+-50.000000 166.257645 39.234055
+-50.000000 166.605606 37.523785
+-50.000000 166.923660 35.807701
+-50.000000 167.211731 34.086330
+-50.000000 167.469696 32.360195
+-50.000000 167.697510 30.629818
+-50.000000 167.895081 28.895731
+-50.000000 168.062347 27.158459
+-50.000000 168.199295 25.418531
+-50.000000 168.305847 23.676479
+-50.000000 168.381958 21.932835
+-50.000000 168.427658 20.188126
+-50.000000 168.442886 18.442884
+-50.000000 168.427658 16.697643
+-50.000000 168.381958 14.952934
+-50.000000 168.305847 13.209288
+-50.000000 168.199295 11.467237
+-50.000000 168.062347 9.727310
+-50.000000 167.895081 7.990038
+-50.000000 167.697510 6.255950
+-50.000000 167.469696 4.525575
+-50.000000 167.211731 2.799438
+-50.000000 166.923660 1.078066
+-50.000000 166.605606 -0.638016
+-50.000000 166.257645 -2.348284
+-50.000000 165.879883 -4.052221
+-50.000000 165.472458 -5.749306
+-50.000000 165.035461 -7.439020
+-50.000000 164.569061 -9.120852
+-50.000000 164.073364 -10.794287
+-50.000000 163.548538 -12.458815
+-50.000000 162.994751 -14.113934
+-50.000000 162.412140 -15.759132
+-50.000000 161.800934 -17.393913
+-50.000000 161.161270 -19.017776
+-50.000000 160.493378 -20.630230
+-50.000000 159.797424 -22.230782
+-50.000000 159.073669 -23.818943
+-49.999996 158.322296 -25.394234
+-49.999996 157.543549 -26.956169
+-49.999996 156.737640 -28.504272
+-49.999996 155.904846 -30.038078
+-49.999996 155.045425 -31.557117
+-49.999996 154.159607 -33.060925
+-49.999996 153.247696 -34.549046
+-49.999996 152.309937 -36.021023
+-49.999996 151.346649 -37.476406
+-49.999996 150.358093 -38.914761
+-49.999996 149.344589 -40.335644
+-49.999996 148.306427 -41.738621
+-49.999996 147.243958 -43.123264
+-49.999996 146.157486 -44.489155
+-49.999996 145.047333 -45.835876
+-49.999996 143.913849 -47.163017
+-49.999996 142.757370 -48.470177
+-49.999996 141.578247 -49.756950
+-49.999996 140.376862 -51.022949
+-49.999996 139.153564 -52.267792
+-49.999996 137.908722 -53.491096
+-49.999996 136.642731 -54.692482
+-49.999996 135.355957 -55.871597
+-49.999996 134.048798 -57.028069
+-49.999996 132.721649 -58.161560
+-49.999996 131.374924 -59.271713
+-49.999996 130.009033 -60.358192
+-49.999996 128.624390 -61.420662
+-49.999996 127.221413 -62.458817
+-49.999996 125.800529 -63.472321
+-49.999996 124.362175 -64.460869
+-49.999996 122.906792 -65.424171
+-49.999996 121.434814 -66.361923
+-49.999996 119.946693 -67.273842
+-49.999996 118.442886 -68.159653
+-49.999996 116.923843 -69.019081
+-49.999996 115.390045 -69.851875
+-49.999996 113.841934 -70.657768
+-49.999996 112.279999 -71.436516
+-49.999996 110.704712 -72.187889
+-49.999996 109.116547 -72.911659
+-49.999996 107.515999 -73.607597
+-49.999996 105.903549 -74.275497
+-49.999996 104.279678 -74.915154
+-49.999996 102.644897 -75.526375
+-49.999996 100.999702 -76.108971
+-49.999996 99.344589 -76.662766
+-49.999996 97.680054 -77.187592
+-49.999996 96.006622 -77.683281
+-49.999996 94.324791 -78.149696
+-49.999996 92.635078 -78.586685
+-49.999996 90.937988 -78.994118
+-49.999996 89.234055 -79.371872
+-49.999996 87.523788 -79.719833
+-49.999996 85.807709 -80.037888
+-49.999996 84.086334 -80.325951
+-49.999996 82.360199 -80.583923
+-49.999996 80.629822 -80.811729
+-49.999996 78.895737 -81.009300
+-49.999996 77.158463 -81.176582
+-49.999996 75.418533 -81.313522
+-49.999996 73.676483 -81.420067
+-49.999996 71.932838 -81.496193
+-49.999996 70.188126 -81.541885
+-49.999996 68.442886 -81.557114
+-49.999996 66.697647 -81.541885
+-49.999996 64.952934 -81.496193
+-49.999996 63.209290 -81.420067
+-49.999996 61.467239 -81.313522
+-49.999996 59.727310 -81.176582
+-49.999996 57.990040 -81.009300
+-49.999996 56.255951 -80.811729
+-49.999996 54.525578 -80.583923
+-49.999996 52.799438 -80.325951
+-49.999996 51.078068 -80.037888
+-49.999996 49.361984 -79.719833
+-49.999996 47.651718 -79.371872
+-49.999996 45.947781 -78.994118
+-49.999996 44.250694 -78.586685
+-49.999996 42.560982 -78.149696
+-49.999996 40.879150 -77.683281
+-49.999996 39.205715 -77.187592
+-49.999996 37.541187 -76.662766
+-49.999996 35.886070 -76.108971
+-49.999996 34.240871 -75.526375
+-49.999996 32.606091 -74.915154
+-49.999996 30.982227 -74.275497
+-49.999996 29.369774 -73.607597
+-49.999996 27.769222 -72.911659
+-49.999996 26.181061 -72.187889
+-49.999996 24.605770 -71.436516
+-49.999996 23.043835 -70.657768
+-49.999996 21.495731 -69.851875
+-49.999996 19.961926 -69.019081
+-49.999996 18.442886 -68.159653
+-49.999996 16.939079 -67.273842
+-49.999996 15.450958 -66.361923
+-49.999996 13.978981 -65.424171
+-49.999996 12.523598 -64.460869
+-49.999996 11.085243 -63.472321
+-49.999996 9.664360 -62.458817
+-49.999996 8.261383 -61.420662
+-49.999996 6.876740 -60.358192
+-49.999996 5.510849 -59.271713
+-49.999996 4.164124 -58.161560
+-49.999996 2.836983 -57.028069
+-49.999996 1.529823 -55.871597
+-49.999996 0.243050 -54.692482
+-49.999996 -1.022949 -53.491096
+-49.999996 -2.267792 -52.267792
+-49.999996 -3.491096 -51.022949
+-49.999996 -4.692482 -49.756950
+-49.999996 -5.871597 -48.470177
+-49.999996 -7.028069 -47.163017
+-49.999996 -8.161560 -45.835876
+-49.999996 -9.271713 -44.489155
+-49.999996 -10.358192 -43.123264
+-49.999996 -11.420662 -41.738621
+-49.999996 -12.458817 -40.335644
+-49.999996 -13.472321 -38.914761
+-49.999996 -14.460869 -37.476406
+-49.999996 -15.424171 -36.021023
+-49.999996 -16.361923 -34.549046
+-49.999996 -17.273842 -33.060925
+-49.999996 -18.159653 -31.557117
+-49.999996 -19.019081 -30.038078
+-49.999996 -19.851875 -28.504272
+-49.999996 -20.657768 -26.956169
+-49.999996 -21.436516 -25.394234
+-50.000000 -22.187889 -23.818943
+-50.000000 -22.911659 -22.230782
+-50.000000 -23.607597 -20.630230
+-50.000000 -24.275497 -19.017776
+-50.000000 -24.915154 -17.393913
+-50.000000 -25.526375 -15.759132
+-50.000000 -26.108971 -14.113934
+-50.000000 -26.662766 -12.458815
+-50.000000 -27.187592 -10.794287
+-50.000000 -27.683281 -9.120852
+-50.000000 -28.149696 -7.439020
+-50.000000 -28.586685 -5.749306
+-50.000000 -28.994118 -4.052221
+-50.000000 -29.371872 -2.348284
+-50.000000 -29.719833 -0.638016
+-50.000000 -30.037888 1.078066
+-50.000000 -30.325951 2.799438
+-50.000000 -30.583923 4.525575
+-50.000000 -30.811729 6.255950
+-50.000000 -31.009300 7.990038
+-50.000000 -31.176582 9.727310
+-50.000000 -31.313522 11.467237
+-50.000000 -31.420067 13.209288
+-50.000000 -31.496193 14.952934
+-50.000000 -31.541885 16.697643
+-50.000000 -31.557114 18.442884
+-50.000000 -31.541885 20.188126
+-50.000000 -31.496193 21.932835
+-50.000000 -31.420067 23.676479
+-50.000000 -31.313522 25.418531
+-50.000000 -31.176582 27.158459
+-50.000000 -31.009300 28.895731
+-50.000000 -30.811729 30.629818
+-50.000000 -30.583923 32.360195
+-50.000000 -30.325951 34.086330
+-50.000000 -30.037888 35.807701
+-50.000000 -29.719833 37.523785
+-50.000000 -29.371872 39.234055
+-50.000000 -28.994118 40.937988
+-50.000000 -28.586685 42.635075
+-50.000000 -28.149696 44.324791
+-50.000000 -27.683281 46.006622
+-50.000000 -27.187592 47.680054
+-50.000000 -26.662766 49.344582
+-50.000000 -26.108971 50.999699
+-50.000000 -25.526375 52.644897
+-50.000000 -24.915154 54.279678
+-50.000000 -24.275497 55.903542
+-50.000000 -23.607597 57.515995
+-50.000000 -22.911659 59.116547
+-50.000000 -22.187889 60.704708
+-50.000004 -21.436516 62.279999
+-50.000004 -20.657768 63.841934
+-50.000004 -19.851875 65.390038
+-50.000004 -19.019081 66.923843
+-50.000004 -18.159653 68.442886
+-50.000004 -17.273842 69.946686
+-50.000004 -16.361923 71.434814
+-50.000004 -15.424171 72.906784
+-50.000004 -14.460869 74.362167
+-50.000004 -13.472321 75.800522
+-50.000004 -12.458817 77.221405
+-50.000004 -11.420662 78.624390
+-50.000004 -10.358192 80.009033
+-50.000004 -9.271713 81.374924
+-50.000004 -8.161560 82.721649
+-50.000004 -7.028069 84.048790
+-50.000004 -5.871597 85.355949
+-50.000004 -4.692482 86.642723
+-50.000004 -3.491096 87.908722
+-50.000004 -2.267792 89.153564
+-50.000004 -1.022949 90.376869
+-50.000004 0.243050 91.578255
+-50.000004 1.529823 92.757370
+-50.000004 2.836983 93.913841
+-50.000004 4.164124 95.047333
+-50.000004 5.510849 96.157486
+-50.000004 6.876740 97.243965
+-50.000004 8.261383 98.306435
+-50.000004 9.664360 99.344589
+-50.000004 11.085243 100.358093
+-50.000004 12.523598 101.346642
+-50.000004 13.978981 102.309944
+-50.000004 15.450958 103.247696
+-50.000004 16.939079 104.159615
+-50.000004 18.442886 105.045425
+-50.000004 19.961926 105.904854
+-50.000004 21.495731 106.737648
+-50.000004 23.043835 107.543541
+-50.000004 24.605770 108.322289
+-50.000004 26.181061 109.073662
+-50.000004 27.769222 109.797432
+-50.000004 29.369774 110.493370
+-50.000004 30.982227 111.161270
+-50.000004 32.606091 111.800926
+-50.000004 34.240871 112.412148
+-50.000004 35.886070 112.994743
+-50.000004 37.541187 113.548538
+-50.000004 39.205715 114.073364
+-50.000004 40.879150 114.569054
+-50.000004 42.560982 115.035469
+-50.000004 44.250694 115.472458
+-50.000004 45.947781 115.879890
+-50.000004 47.651718 116.257645
+-50.000004 49.361984 116.605606
+-50.000004 51.078068 116.923660
+-50.000004 52.799438 117.211723
+-50.000004 54.525578 117.469696
+-50.000004 56.255951 117.697502
+-50.000004 57.990040 117.895073
+-50.000004 59.727310 118.062355
+-50.000004 61.467239 118.199295
+-50.000004 63.209290 118.305840
+-50.000004 64.952934 118.381966
+-50.000004 66.697647 118.427658
+-0.000004 68.442886 108.442886
+-0.000004 70.013603 108.429176
+-0.000004 71.583839 108.388062
+-0.000004 73.153122 108.319542
+-0.000004 74.720970 108.223648
+-0.000004 76.286903 108.100410
+-0.000004 77.850449 107.949860
+-0.000004 79.411125 107.772041
+-0.000004 80.968468 107.567009
+-0.000004 82.521988 107.334839
+-0.000004 84.071220 107.075584
+-0.000004 85.615692 106.789330
+-0.000004 87.154938 106.476173
+-0.000004 88.688477 106.136192
+-0.000004 90.215858 105.769501
+-0.000004 91.736603 105.376213
+-0.000004 93.250244 104.956436
+-0.000004 94.756340 104.510315
+-0.000004 96.254417 104.037971
+-0.000004 97.744019 103.539558
+-0.000004 99.224701 103.015221
+-0.000004 100.695999 102.465126
+-0.000004 102.157478 101.889435
+-0.000004 103.608688 101.288322
+-0.000004 105.049179 100.661980
+-0.000004 106.478531 100.010590
+-0.000004 107.896286 99.334351
+-0.000004 109.302032 98.633476
+-0.000003 110.695328 97.908173
+-0.000003 112.075752 97.158661
+-0.000003 113.442886 96.385170
+-0.000003 114.796310 95.587944
+-0.000003 116.135620 94.767212
+-0.000003 117.460403 93.923241
+-0.000003 118.770248 93.056267
+-0.000003 120.064766 92.166573
+-0.000003 121.343559 91.254417
+-0.000003 122.606239 90.320084
+-0.000003 123.852417 89.363853
+-0.000003 125.081726 88.386024
+-0.000003 126.293770 87.386887
+-0.000003 127.488197 86.366745
+-0.000003 128.664642 85.325920
+-0.000003 129.822739 84.264717
+-0.000003 130.962143 83.183472
+-0.000003 132.082489 82.082497
+-0.000003 133.183472 80.962143
+-0.000003 134.264709 79.822739
+-0.000003 135.325928 78.664642
+-0.000003 136.366745 77.488197
+-0.000003 137.386887 76.293770
+-0.000002 138.386017 75.081726
+-0.000002 139.363861 73.852417
+-0.000002 140.320084 72.606239
+-0.000002 141.254425 71.343559
+-0.000002 142.166565 70.064766
+-0.000002 143.056274 68.770248
+-0.000002 143.923248 67.460403
+-0.000002 144.767212 66.135620
+-0.000002 145.587952 64.796310
+-0.000002 146.385162 63.442886
+-0.000002 147.158661 62.075752
+-0.000002 147.908173 60.695328
+-0.000002 148.633484 59.302032
+-0.000002 149.334351 57.896290
+-0.000002 150.010590 56.478531
+-0.000002 150.661987 55.049183
+-0.000002 151.288330 53.608688
+-0.000001 151.889435 52.157478
+-0.000001 152.465118 50.696003
+-0.000001 153.015228 49.224701
+-0.000001 153.539551 47.744019
+-0.000001 154.037964 46.254417
+-0.000001 154.510315 44.756340
+-0.000001 154.956436 43.250248
+-0.000001 155.376221 41.736603
+-0.000001 155.769501 40.215858
+-0.000001 156.136200 38.688480
+-0.000001 156.476166 37.154938
+-0.000001 156.789337 35.615696
+-0.000001 157.075592 34.071220
+-0.000001 157.334839 32.521988
+-0.000001 157.567017 30.968466
+-0.000000 157.772034 29.411127
+-0.000000 157.949860 27.850449
+-0.000000 158.100403 26.286903
+-0.000000 158.223648 24.720970
+-0.000000 158.319550 23.153122
+-0.000000 158.388062 21.583841
+-0.000000 158.429169 20.013603
+0.000000 158.442886 18.442886
+0.000000 158.429169 16.872169
+0.000000 158.388062 15.301931
+0.000000 158.319550 13.732651
+0.000000 158.223648 12.164804
+0.000000 158.100403 10.598869
+0.000000 157.949860 9.035325
+0.000000 157.772034 7.474646
+0.000001 157.567017 5.917307
+0.000001 157.334839 4.363785
+0.000001 157.075592 2.814550
+0.000001 156.789337 1.270077
+0.000001 156.476166 -0.269165
+0.000001 156.136200 -1.802708
+0.000001 155.769501 -3.330084
+0.000001 155.376221 -4.850828
+0.000001 154.956436 -6.364475
+0.000001 154.510315 -7.870567
+0.000001 154.037964 -9.368643
+0.000001 153.539551 -10.858248
+0.000001 153.015228 -12.338926
+0.000001 152.465118 -13.810230
+0.000001 151.889435 -15.271706
+0.000002 151.288330 -16.722916
+0.000002 150.661987 -18.163410
+0.000002 150.010590 -19.592758
+0.000002 149.334351 -21.010517
+0.000002 148.633484 -22.416260
+0.000002 147.908173 -23.809555
+0.000002 147.158661 -25.189980
+0.000002 146.385162 -26.557114
+0.000002 145.587952 -27.910542
+0.000002 144.767212 -29.249847
+0.000002 143.923248 -30.574627
+0.000002 143.056274 -31.884476
+0.000002 142.166565 -33.178993
+0.000002 141.254425 -34.457787
+0.000002 140.320084 -35.720467
+0.000002 139.363861 -36.966648
+0.000002 138.386017 -38.195950
+0.000003 137.386887 -39.407997
+0.000003 136.366745 -40.602425
+0.000003 135.325928 -41.778870
+0.000003 134.264709 -42.936966
+0.000003 133.183472 -44.076366
+0.000003 132.082489 -45.196724
+0.000003 130.962143 -46.297699
+0.000003 129.822739 -47.378944
+0.000003 128.664642 -48.440147
+0.000003 127.488197 -49.480972
+0.000003 126.293770 -50.501114
+0.000003 125.081726 -51.500252
+0.000003 123.852417 -52.478081
+0.000003 122.606239 -53.434311
+0.000003 121.343559 -54.368645
+0.000003 120.064766 -55.280800
+0.000003 118.770248 -56.170494
+0.000003 117.460403 -57.037468
+0.000003 116.135620 -57.881439
+0.000003 114.796310 -58.702171
+0.000003 113.442886 -59.499397
+0.000003 112.075752 -60.272888
+0.000003 110.695328 -61.022400
+0.000004 109.302032 -61.747704
+0.000004 107.896286 -62.448578
+0.000004 106.478531 -63.124817
+0.000004 105.049179 -63.776207
+0.000004 103.608688 -64.402550
+0.000004 102.157478 -65.003662
+0.000004 100.695999 -65.579353
+0.000004 99.224701 -66.129448
+0.000004 97.744019 -66.653786
+0.000004 96.254417 -67.152199
+0.000004 94.756340 -67.624542
+0.000004 93.250244 -68.070663
+0.000004 91.736603 -68.490440
+0.000004 90.215858 -68.883728
+0.000004 88.688477 -69.250420
+0.000004 87.154938 -69.590401
+0.000004 85.615692 -69.903557
+0.000004 84.071220 -70.189812
+0.000004 82.521988 -70.449066
+0.000004 80.968468 -70.681236
+0.000004 79.411125 -70.886269
+0.000004 77.850449 -71.064087
+0.000004 76.286903 -71.214638
+0.000004 74.720970 -71.337875
+0.000004 73.153122 -71.433769
+0.000004 71.583839 -71.502289
+0.000004 70.013603 -71.543404
+0.000004 68.442886 -71.557114
+0.000004 66.872169 -71.543404
+0.000004 65.301933 -71.502289
+0.000004 63.732651 -71.433769
+0.000004 62.164803 -71.337875
+0.000004 60.598869 -71.214638
+0.000004 59.035324 -71.064087
+0.000004 57.474648 -70.886269
+0.000004 55.917305 -70.681236
+0.000004 54.363785 -70.449066
+0.000004 52.814552 -70.189812
+0.000004 51.270077 -69.903557
+0.000004 49.730835 -69.590401
+0.000004 48.197292 -69.250420
+0.000004 46.669914 -68.883728
+0.000004 45.149170 -68.490440
+0.000004 43.635525 -68.070663
+0.000004 42.129433 -67.624542
+0.000004 40.631355 -67.152199
+0.000004 39.141754 -66.653786
+0.000004 37.661072 -66.129448
+0.000004 36.189770 -65.579353
+0.000004 34.728294 -65.003662
+0.000004 33.277084 -64.402550
+0.000004 31.836590 -63.776207
+0.000004 30.407242 -63.124817
+0.000004 28.989483 -62.448578
+0.000004 27.583740 -61.747704
+0.000003 26.190445 -61.022400
+0.000003 24.810020 -60.272888
+0.000003 23.442886 -59.499397
+0.000003 22.089458 -58.702171
+0.000003 20.750153 -57.881439
+0.000003 19.425373 -57.037468
+0.000003 18.115524 -56.170494
+0.000003 16.821007 -55.280800
+0.000003 15.542213 -54.368645
+0.000003 14.279533 -53.434311
+0.000003 13.033352 -52.478081
+0.000003 11.804050 -51.500252
+0.000003 10.592003 -50.501114
+0.000003 9.397575 -49.480972
+0.000003 8.221130 -48.440147
+0.000003 7.063034 -47.378944
+0.000003 5.923634 -46.297699
+0.000003 4.803276 -45.196724
+0.000003 3.702301 -44.076366
+0.000003 2.621056 -42.936966
+0.000003 1.559853 -41.778870
+0.000003 0.519028 -40.602425
+0.000003 -0.501114 -39.407997
+0.000002 -1.500252 -38.195950
+0.000002 -2.478081 -36.966648
+0.000002 -3.434311 -35.720467
+0.000002 -4.368645 -34.457787
+0.000002 -5.280800 -33.178993
+0.000002 -6.170494 -31.884476
+0.000002 -7.037468 -30.574627
+0.000002 -7.881439 -29.249847
+0.000002 -8.702171 -27.910542
+0.000002 -9.499397 -26.557114
+0.000002 -10.272888 -25.189980
+0.000002 -11.022400 -23.809555
+0.000002 -11.747704 -22.416260
+0.000002 -12.448578 -21.010517
+0.000002 -13.124817 -19.592758
+0.000002 -13.776207 -18.163410
+0.000002 -14.402550 -16.722916
+0.000001 -15.003662 -15.271706
+0.000001 -15.579353 -13.810230
+0.000001 -16.129448 -12.338926
+0.000001 -16.653786 -10.858248
+0.000001 -17.152199 -9.368643
+0.000001 -17.624542 -7.870567
+0.000001 -18.070663 -6.364475
+0.000001 -18.490440 -4.850828
+0.000001 -18.883728 -3.330084
+0.000001 -19.250420 -1.802708
+0.000001 -19.590401 -0.269165
+0.000001 -19.903557 1.270077
+0.000001 -20.189812 2.814550
+0.000001 -20.449066 4.363785
+0.000001 -20.681236 5.917307
+0.000000 -20.886269 7.474646
+0.000000 -21.064087 9.035325
+0.000000 -21.214638 10.598869
+0.000000 -21.337875 12.164804
+0.000000 -21.433769 13.732651
+0.000000 -21.502289 15.301931
+0.000000 -21.543404 16.872169
+0.000000 -21.557114 18.442886
+-0.000000 -21.543404 20.013603
+-0.000000 -21.502289 21.583841
+-0.000000 -21.433769 23.153122
+-0.000000 -21.337875 24.720970
+-0.000000 -21.214638 26.286903
+-0.000000 -21.064087 27.850449
+-0.000000 -20.886269 29.411127
+-0.000001 -20.681236 30.968466
+-0.000001 -20.449066 32.521988
+-0.000001 -20.189812 34.071220
+-0.000001 -19.903557 35.615696
+-0.000001 -19.590401 37.154938
+-0.000001 -19.250420 38.688480
+-0.000001 -18.883728 40.215858
+-0.000001 -18.490440 41.736603
+-0.000001 -18.070663 43.250248
+-0.000001 -17.624542 44.756340
+-0.000001 -17.152199 46.254417
+-0.000001 -16.653786 47.744019
+-0.000001 -16.129448 49.224701
+-0.000001 -15.579353 50.696003
+-0.000001 -15.003662 52.157478
+-0.000002 -14.402550 53.608688
+-0.000002 -13.776207 55.049183
+-0.000002 -13.124817 56.478531
+-0.000002 -12.448578 57.896290
+-0.000002 -11.747704 59.302032
+-0.000002 -11.022400 60.695328
+-0.000002 -10.272888 62.075752
+-0.000002 -9.499397 63.442886
+-0.000002 -8.702171 64.796310
+-0.000002 -7.881439 66.135620
+-0.000002 -7.037468 67.460403
+-0.000002 -6.170494 68.770248
+-0.000002 -5.280800 70.064766
+-0.000002 -4.368645 71.343559
+-0.000002 -3.434311 72.606239
+-0.000002 -2.478081 73.852417
+-0.000002 -1.500252 75.081726
+-0.000003 -0.501114 76.293770
+-0.000003 0.519028 77.488197
+-0.000003 1.559853 78.664642
+-0.000003 2.621056 79.822739
+-0.000003 3.702301 80.962143
+-0.000003 4.803276 82.082497
+-0.000003 5.923634 83.183472
+-0.000003 7.063034 84.264717
+-0.000003 8.221130 85.325920
+-0.000003 9.397575 86.366745
+-0.000003 10.592003 87.386887
+-0.000003 11.804050 88.386024
+-0.000003 13.033352 89.363853
+-0.000003 14.279533 90.320084
+-0.000003 15.542213 91.254417
+-0.000003 16.821007 92.166573
+-0.000003 18.115524 93.056267
+-0.000003 19.425373 93.923241
+-0.000003 20.750153 94.767212
+-0.000003 22.089458 95.587944
+-0.000003 23.442886 96.385170
+-0.000003 24.810020 97.158661
+-0.000003 26.190445 97.908173
+-0.000004 27.583740 98.633476
+-0.000004 28.989483 99.334351
+-0.000004 30.407242 100.010590
+-0.000004 31.836590 100.661980
+-0.000004 33.277084 101.288322
+-0.000004 34.728294 101.889435
+-0.000004 36.189770 102.465126
+-0.000004 37.661072 103.015221
+-0.000004 39.141754 103.539558
+-0.000004 40.631355 104.037971
+-0.000004 42.129433 104.510315
+-0.000004 43.635525 104.956436
+-0.000004 45.149170 105.376213
+-0.000004 46.669914 105.769501
+-0.000004 48.197292 106.136192
+-0.000004 49.730835 106.476173
+-0.000004 51.270077 106.789330
+-0.000004 52.814552 107.075584
+-0.000004 54.363785 107.334839
+-0.000004 55.917305 107.567009
+-0.000004 57.474648 107.772041
+-0.000004 59.035324 107.949860
+-0.000004 60.598869 108.100410
+-0.000004 62.164803 108.223648
+-0.000004 63.732651 108.319542
+-0.000004 65.301933 108.388062
+-0.000004 66.872169 108.429176
+-50.000999 73.442886 22.442884
+-0.001000 72.442886 23.442886
+2 1
+721 1
+1 361
+362 361
+722 361
+361 2
+3 2
+721 2
+2 362
+363 362
+722 362
+362 3
+4 3
+721 3
+3 363
+364 363
+722 363
+363 4
+5 4
+721 4
+4 364
+365 364
+722 364
+364 5
+6 5
+721 5
+5 365
+366 365
+722 365
+365 6
+7 6
+721 6
+6 366
+367 366
+722 366
+366 7
+8 7
+721 7
+7 367
+368 367
+722 367
+367 8
+9 8
+721 8
+8 368
+369 368
+722 368
+368 9
+10 9
+721 9
+9 369
+370 369
+722 369
+369 10
+11 10
+721 10
+10 370
+371 370
+722 370
+370 11
+12 11
+721 11
+11 371
+372 371
+722 371
+371 12
+13 12
+721 12
+12 372
+373 372
+722 372
+372 13
+14 13
+721 13
+13 373
+374 373
+722 373
+373 14
+15 14
+721 14
+14 374
+375 374
+722 374
+374 15
+16 15
+721 15
+15 375
+376 375
+722 375
+375 16
+17 16
+721 16
+16 376
+377 376
+722 376
+376 17
+18 17
+721 17
+17 377
+378 377
+722 377
+377 18
+19 18
+721 18
+18 378
+379 378
+722 378
+378 19
+20 19
+721 19
+19 379
+380 379
+722 379
+379 20
+21 20
+721 20
+20 380
+381 380
+722 380
+380 21
+22 21
+721 21
+21 381
+382 381
+722 381
+381 22
+23 22
+721 22
+22 382
+383 382
+722 382
+382 23
+24 23
+721 23
+23 383
+384 383
+722 383
+383 24
+25 24
+721 24
+24 384
+385 384
+722 384
+384 25
+26 25
+721 25
+25 385
+386 385
+722 385
+385 26
+27 26
+721 26
+26 386
+387 386
+722 386
+386 27
+28 27
+721 27
+27 387
+388 387
+722 387
+387 28
+29 28
+721 28
+28 388
+389 388
+722 388
+388 29
+30 29
+721 29
+29 389
+390 389
+722 389
+389 30
+31 30
+721 30
+30 390
+391 390
+722 390
+390 31
+32 31
+721 31
+31 391
+392 391
+722 391
+391 32
+33 32
+721 32
+32 392
+393 392
+722 392
+392 33
+34 33
+721 33
+33 393
+394 393
+722 393
+393 34
+35 34
+721 34
+34 394
+395 394
+722 394
+394 35
+36 35
+721 35
+35 395
+396 395
+722 395
+395 36
+37 36
+721 36
+36 396
+397 396
+722 396
+396 37
+38 37
+721 37
+37 397
+398 397
+722 397
+397 38
+39 38
+721 38
+38 398
+399 398
+722 398
+398 39
+40 39
+721 39
+39 399
+400 399
+722 399
+399 40
+41 40
+721 40
+40 400
+401 400
+722 400
+400 41
+42 41
+721 41
+41 401
+402 401
+722 401
+401 42
+43 42
+721 42
+42 402
+403 402
+722 402
+402 43
+44 43
+721 43
+43 403
+404 403
+722 403
+403 44
+45 44
+721 44
+44 404
+405 404
+722 404
+404 45
+46 45
+721 45
+45 405
+406 405
+722 405
+405 46
+47 46
+721 46
+46 406
+407 406
+722 406
+406 47
+48 47
+721 47
+47 407
+408 407
+722 407
+407 48
+49 48
+721 48
+48 408
+409 408
+722 408
+408 49
+50 49
+721 49
+49 409
+410 409
+722 409
+409 50
+51 50
+721 50
+50 410
+411 410
+722 410
+410 51
+52 51
+721 51
+51 411
+412 411
+722 411
+411 52
+53 52
+721 52
+52 412
+413 412
+722 412
+412 53
+54 53
+721 53
+53 413
+414 413
+722 413
+413 54
+55 54
+721 54
+54 414
+415 414
+722 414
+414 55
+56 55
+721 55
+55 415
+416 415
+722 415
+415 56
+57 56
+721 56
+56 416
+417 416
+722 416
+416 57
+58 57
+721 57
+57 417
+418 417
+722 417
+417 58
+59 58
+721 58
+58 418
+419 418
+722 418
+418 59
+60 59
+721 59
+59 419
+420 419
+722 419
+419 60
+61 60
+721 60
+60 420
+421 420
+722 420
+420 61
+62 61
+721 61
+61 421
+422 421
+722 421
+421 62
+63 62
+721 62
+62 422
+423 422
+722 422
+422 63
+64 63
+721 63
+63 423
+424 423
+722 423
+423 64
+65 64
+721 64
+64 424
+425 424
+722 424
+424 65
+66 65
+721 65
+65 425
+426 425
+722 425
+425 66
+67 66
+721 66
+66 426
+427 426
+722 426
+426 67
+68 67
+721 67
+67 427
+428 427
+722 427
+427 68
+69 68
+721 68
+68 428
+429 428
+722 428
+428 69
+70 69
+721 69
+69 429
+430 429
+722 429
+429 70
+71 70
+721 70
+70 430
+431 430
+722 430
+430 71
+72 71
+721 71
+71 431
+432 431
+722 431
+431 72
+73 72
+721 72
+72 432
+433 432
+722 432
+432 73
+74 73
+721 73
+73 433
+434 433
+722 433
+433 74
+75 74
+721 74
+74 434
+435 434
+722 434
+434 75
+76 75
+721 75
+75 435
+436 435
+722 435
+435 76
+77 76
+721 76
+76 436
+437 436
+722 436
+436 77
+78 77
+721 77
+77 437
+438 437
+722 437
+437 78
+79 78
+721 78
+78 438
+439 438
+722 438
+438 79
+80 79
+721 79
+79 439
+440 439
+722 439
+439 80
+81 80
+721 80
+80 440
+441 440
+722 440
+440 81
+82 81
+721 81
+81 441
+442 441
+722 441
+441 82
+83 82
+721 82
+82 442
+443 442
+722 442
+442 83
+84 83
+721 83
+83 443
+444 443
+722 443
+443 84
+85 84
+721 84
+84 444
+445 444
+722 444
+444 85
+86 85
+721 85
+85 445
+446 445
+722 445
+445 86
+87 86
+721 86
+86 446
+447 446
+722 446
+446 87
+88 87
+721 87
+87 447
+448 447
+722 447
+447 88
+89 88
+721 88
+88 448
+449 448
+722 448
+448 89
+90 89
+721 89
+89 449
+450 449
+722 449
+449 90
+91 90
+721 90
+90 450
+451 450
+722 450
+450 91
+92 91
+721 91
+91 451
+452 451
+722 451
+451 92
+93 92
+721 92
+92 452
+453 452
+722 452
+452 93
+94 93
+721 93
+93 453
+454 453
+722 453
+453 94
+95 94
+721 94
+94 454
+455 454
+722 454
+454 95
+96 95
+721 95
+95 455
+456 455
+722 455
+455 96
+97 96
+721 96
+96 456
+457 456
+722 456
+456 97
+98 97
+721 97
+97 457
+458 457
+722 457
+457 98
+99 98
+721 98
+98 458
+459 458
+722 458
+458 99
+100 99
+721 99
+99 459
+460 459
+722 459
+459 100
+101 100
+721 100
+100 460
+461 460
+722 460
+460 101
+102 101
+721 101
+101 461
+462 461
+722 461
+461 102
+103 102
+721 102
+102 462
+463 462
+722 462
+462 103
+104 103
+721 103
+103 463
+464 463
+722 463
+463 104
+105 104
+721 104
+104 464
+465 464
+722 464
+464 105
+106 105
+721 105
+105 465
+466 465
+722 465
+465 106
+107 106
+721 106
+106 466
+467 466
+722 466
+466 107
+108 107
+721 107
+107 467
+468 467
+722 467
+467 108
+109 108
+721 108
+108 468
+469 468
+722 468
+468 109
+110 109
+721 109
+109 469
+470 469
+722 469
+469 110
+111 110
+721 110
+110 470
+471 470
+722 470
+470 111
+112 111
+721 111
+111 471
+472 471
+722 471
+471 112
+113 112
+721 112
+112 472
+473 472
+722 472
+472 113
+114 113
+721 113
+113 473
+474 473
+722 473
+473 114
+115 114
+721 114
+114 474
+475 474
+722 474
+474 115
+116 115
+721 115
+115 475
+476 475
+722 475
+475 116
+117 116
+721 116
+116 476
+477 476
+722 476
+476 117
+118 117
+721 117
+117 477
+478 477
+722 477
+477 118
+119 118
+721 118
+118 478
+479 478
+722 478
+478 119
+120 119
+721 119
+119 479
+480 479
+722 479
+479 120
+121 120
+721 120
+120 480
+481 480
+722 480
+480 121
+122 121
+721 121
+121 481
+482 481
+722 481
+481 122
+123 122
+721 122
+122 482
+483 482
+722 482
+482 123
+124 123
+721 123
+123 483
+484 483
+722 483
+483 124
+125 124
+721 124
+124 484
+485 484
+722 484
+484 125
+126 125
+721 125
+125 485
+486 485
+722 485
+485 126
+127 126
+721 126
+126 486
+487 486
+722 486
+486 127
+128 127
+721 127
+127 487
+488 487
+722 487
+487 128
+129 128
+721 128
+128 488
+489 488
+722 488
+488 129
+130 129
+721 129
+129 489
+490 489
+722 489
+489 130
+131 130
+721 130
+130 490
+491 490
+722 490
+490 131
+132 131
+721 131
+131 491
+492 491
+722 491
+491 132
+133 132
+721 132
+132 492
+493 492
+722 492
+492 133
+134 133
+721 133
+133 493
+494 493
+722 493
+493 134
+135 134
+721 134
+134 494
+495 494
+722 494
+494 135
+136 135
+721 135
+135 495
+496 495
+722 495
+495 136
+137 136
+721 136
+136 496
+497 496
+722 496
+496 137
+138 137
+721 137
+137 497
+498 497
+722 497
+497 138
+139 138
+721 138
+138 498
+499 498
+722 498
+498 139
+140 139
+721 139
+139 499
+500 499
+722 499
+499 140
+141 140
+721 140
+140 500
+501 500
+722 500
+500 141
+142 141
+721 141
+141 501
+502 501
+722 501
+501 142
+143 142
+721 142
+142 502
+503 502
+722 502
+502 143
+144 143
+721 143
+143 503
+504 503
+722 503
+503 144
+145 144
+721 144
+144 504
+505 504
+722 504
+504 145
+146 145
+721 145
+145 505
+506 505
+722 505
+505 146
+147 146
+721 146
+146 506
+507 506
+722 506
+506 147
+148 147
+721 147
+147 507
+508 507
+722 507
+507 148
+149 148
+721 148
+148 508
+509 508
+722 508
+508 149
+150 149
+721 149
+149 509
+510 509
+722 509
+509 150
+151 150
+721 150
+150 510
+511 510
+722 510
+510 151
+152 151
+721 151
+151 511
+512 511
+722 511
+511 152
+153 152
+721 152
+152 512
+513 512
+722 512
+512 153
+154 153
+721 153
+153 513
+514 513
+722 513
+513 154
+155 154
+721 154
+154 514
+515 514
+722 514
+514 155
+156 155
+721 155
+155 515
+516 515
+722 515
+515 156
+157 156
+721 156
+156 516
+517 516
+722 516
+516 157
+158 157
+721 157
+157 517
+518 517
+722 517
+517 158
+159 158
+721 158
+158 518
+519 518
+722 518
+518 159
+160 159
+721 159
+159 519
+520 519
+722 519
+519 160
+161 160
+721 160
+160 520
+521 520
+722 520
+520 161
+162 161
+721 161
+161 521
+522 521
+722 521
+521 162
+163 162
+721 162
+162 522
+523 522
+722 522
+522 163
+164 163
+721 163
+163 523
+524 523
+722 523
+523 164
+165 164
+721 164
+164 524
+525 524
+722 524
+524 165
+166 165
+721 165
+165 525
+526 525
+722 525
+525 166
+167 166
+721 166
+166 526
+527 526
+722 526
+526 167
+168 167
+721 167
+167 527
+528 527
+722 527
+527 168
+169 168
+721 168
+168 528
+529 528
+722 528
+528 169
+170 169
+721 169
+169 529
+530 529
+722 529
+529 170
+171 170
+721 170
+170 530
+531 530
+722 530
+530 171
+172 171
+721 171
+171 531
+532 531
+722 531
+531 172
+173 172
+721 172
+172 532
+533 532
+722 532
+532 173
+174 173
+721 173
+173 533
+534 533
+722 533
+533 174
+175 174
+721 174
+174 534
+535 534
+722 534
+534 175
+176 175
+721 175
+175 535
+536 535
+722 535
+535 176
+177 176
+721 176
+176 536
+537 536
+722 536
+536 177
+178 177
+721 177
+177 537
+538 537
+722 537
+537 178
+179 178
+721 178
+178 538
+539 538
+722 538
+538 179
+180 179
+721 179
+179 539
+540 539
+722 539
+539 180
+181 180
+721 180
+180 540
+541 540
+722 540
+540 181
+182 181
+721 181
+181 541
+542 541
+722 541
+541 182
+183 182
+721 182
+182 542
+543 542
+722 542
+542 183
+184 183
+721 183
+183 543
+544 543
+722 543
+543 184
+185 184
+721 184
+184 544
+545 544
+722 544
+544 185
+186 185
+721 185
+185 545
+546 545
+722 545
+545 186
+187 186
+721 186
+186 546
+547 546
+722 546
+546 187
+188 187
+721 187
+187 547
+548 547
+722 547
+547 188
+189 188
+721 188
+188 548
+549 548
+722 548
+548 189
+190 189
+721 189
+189 549
+550 549
+722 549
+549 190
+191 190
+721 190
+190 550
+551 550
+722 550
+550 191
+192 191
+721 191
+191 551
+552 551
+722 551
+551 192
+193 192
+721 192
+192 552
+553 552
+722 552
+552 193
+194 193
+721 193
+193 553
+554 553
+722 553
+553 194
+195 194
+721 194
+194 554
+555 554
+722 554
+554 195
+196 195
+721 195
+195 555
+556 555
+722 555
+555 196
+197 196
+721 196
+196 556
+557 556
+722 556
+556 197
+198 197
+721 197
+197 557
+558 557
+722 557
+557 198
+199 198
+721 198
+198 558
+559 558
+722 558
+558 199
+200 199
+721 199
+199 559
+560 559
+722 559
+559 200
+201 200
+721 200
+200 560
+561 560
+722 560
+560 201
+202 201
+721 201
+201 561
+562 561
+722 561
+561 202
+203 202
+721 202
+202 562
+563 562
+722 562
+562 203
+204 203
+721 203
+203 563
+564 563
+722 563
+563 204
+205 204
+721 204
+204 564
+565 564
+722 564
+564 205
+206 205
+721 205
+205 565
+566 565
+722 565
+565 206
+207 206
+721 206
+206 566
+567 566
+722 566
+566 207
+208 207
+721 207
+207 567
+568 567
+722 567
+567 208
+209 208
+721 208
+208 568
+569 568
+722 568
+568 209
+210 209
+721 209
+209 569
+570 569
+722 569
+569 210
+211 210
+721 210
+210 570
+571 570
+722 570
+570 211
+212 211
+721 211
+211 571
+572 571
+722 571
+571 212
+213 212
+721 212
+212 572
+573 572
+722 572
+572 213
+214 213
+721 213
+213 573
+574 573
+722 573
+573 214
+215 214
+721 214
+214 574
+575 574
+722 574
+574 215
+216 215
+721 215
+215 575
+576 575
+722 575
+575 216
+217 216
+721 216
+216 576
+577 576
+722 576
+576 217
+218 217
+721 217
+217 577
+578 577
+722 577
+577 218
+219 218
+721 218
+218 578
+579 578
+722 578
+578 219
+220 219
+721 219
+219 579
+580 579
+722 579
+579 220
+221 220
+721 220
+220 580
+581 580
+722 580
+580 221
+222 221
+721 221
+221 581
+582 581
+722 581
+581 222
+223 222
+721 222
+222 582
+583 582
+722 582
+582 223
+224 223
+721 223
+223 583
+584 583
+722 583
+583 224
+225 224
+721 224
+224 584
+585 584
+722 584
+584 225
+226 225
+721 225
+225 585
+586 585
+722 585
+585 226
+227 226
+721 226
+226 586
+587 586
+722 586
+586 227
+228 227
+721 227
+227 587
+588 587
+722 587
+587 228
+229 228
+721 228
+228 588
+589 588
+722 588
+588 229
+230 229
+721 229
+229 589
+590 589
+722 589
+589 230
+231 230
+721 230
+230 590
+591 590
+722 590
+590 231
+232 231
+721 231
+231 591
+592 591
+722 591
+591 232
+233 232
+721 232
+232 592
+593 592
+722 592
+592 233
+234 233
+721 233
+233 593
+594 593
+722 593
+593 234
+235 234
+721 234
+234 594
+595 594
+722 594
+594 235
+236 235
+721 235
+235 595
+596 595
+722 595
+595 236
+237 236
+721 236
+236 596
+597 596
+722 596
+596 237
+238 237
+721 237
+237 597
+598 597
+722 597
+597 238
+239 238
+721 238
+238 598
+599 598
+722 598
+598 239
+240 239
+721 239
+239 599
+600 599
+722 599
+599 240
+241 240
+721 240
+240 600
+601 600
+722 600
+600 241
+242 241
+721 241
+241 601
+602 601
+722 601
+601 242
+243 242
+721 242
+242 602
+603 602
+722 602
+602 243
+244 243
+721 243
+243 603
+604 603
+722 603
+603 244
+245 244
+721 244
+244 604
+605 604
+722 604
+604 245
+246 245
+721 245
+245 605
+606 605
+722 605
+605 246
+247 246
+721 246
+246 606
+607 606
+722 606
+606 247
+248 247
+721 247
+247 607
+608 607
+722 607
+607 248
+249 248
+721 248
+248 608
+609 608
+722 608
+608 249
+250 249
+721 249
+249 609
+610 609
+722 609
+609 250
+251 250
+721 250
+250 610
+611 610
+722 610
+610 251
+252 251
+721 251
+251 611
+612 611
+722 611
+611 252
+253 252
+721 252
+252 612
+613 612
+722 612
+612 253
+254 253
+721 253
+253 613
+614 613
+722 613
+613 254
+255 254
+721 254
+254 614
+615 614
+722 614
+614 255
+256 255
+721 255
+255 615
+616 615
+722 615
+615 256
+257 256
+721 256
+256 616
+617 616
+722 616
+616 257
+258 257
+721 257
+257 617
+618 617
+722 617
+617 258
+259 258
+721 258
+258 618
+619 618
+722 618
+618 259
+260 259
+721 259
+259 619
+620 619
+722 619
+619 260
+261 260
+721 260
+260 620
+621 620
+722 620
+620 261
+262 261
+721 261
+261 621
+622 621
+722 621
+621 262
+263 262
+721 262
+262 622
+623 622
+722 622
+622 263
+264 263
+721 263
+263 623
+624 623
+722 623
+623 264
+265 264
+721 264
+264 624
+625 624
+722 624
+624 265
+266 265
+721 265
+265 625
+626 625
+722 625
+625 266
+267 266
+721 266
+266 626
+627 626
+722 626
+626 267
+268 267
+721 267
+267 627
+628 627
+722 627
+627 268
+269 268
+721 268
+268 628
+629 628
+722 628
+628 269
+270 269
+721 269
+269 629
+630 629
+722 629
+629 270
+271 270
+721 270
+270 630
+631 630
+722 630
+630 271
+272 271
+721 271
+271 631
+632 631
+722 631
+631 272
+273 272
+721 272
+272 632
+633 632
+722 632
+632 273
+274 273
+721 273
+273 633
+634 633
+722 633
+633 274
+275 274
+721 274
+274 634
+635 634
+722 634
+634 275
+276 275
+721 275
+275 635
+636 635
+722 635
+635 276
+277 276
+721 276
+276 636
+637 636
+722 636
+636 277
+278 277
+721 277
+277 637
+638 637
+722 637
+637 278
+279 278
+721 278
+278 638
+639 638
+722 638
+638 279
+280 279
+721 279
+279 639
+640 639
+722 639
+639 280
+281 280
+721 280
+280 640
+641 640
+722 640
+640 281
+282 281
+721 281
+281 641
+642 641
+722 641
+641 282
+283 282
+721 282
+282 642
+643 642
+722 642
+642 283
+284 283
+721 283
+283 643
+644 643
+722 643
+643 284
+285 284
+721 284
+284 644
+645 644
+722 644
+644 285
+286 285
+721 285
+285 645
+646 645
+722 645
+645 286
+287 286
+721 286
+286 646
+647 646
+722 646
+646 287
+288 287
+721 287
+287 647
+648 647
+722 647
+647 288
+289 288
+721 288
+288 648
+649 648
+722 648
+648 289
+290 289
+721 289
+289 649
+650 649
+722 649
+649 290
+291 290
+721 290
+290 650
+651 650
+722 650
+650 291
+292 291
+721 291
+291 651
+652 651
+722 651
+651 292
+293 292
+721 292
+292 652
+653 652
+722 652
+652 293
+294 293
+721 293
+293 653
+654 653
+722 653
+653 294
+295 294
+721 294
+294 654
+655 654
+722 654
+654 295
+296 295
+721 295
+295 655
+656 655
+722 655
+655 296
+297 296
+721 296
+296 656
+657 656
+722 656
+656 297
+298 297
+721 297
+297 657
+658 657
+722 657
+657 298
+299 298
+721 298
+298 658
+659 658
+722 658
+658 299
+300 299
+721 299
+299 659
+660 659
+722 659
+659 300
+301 300
+721 300
+300 660
+661 660
+722 660
+660 301
+302 301
+721 301
+301 661
+662 661
+722 661
+661 302
+303 302
+721 302
+302 662
+663 662
+722 662
+662 303
+304 303
+721 303
+303 663
+664 663
+722 663
+663 304
+305 304
+721 304
+304 664
+665 664
+722 664
+664 305
+306 305
+721 305
+305 665
+666 665
+722 665
+665 306
+307 306
+721 306
+306 666
+667 666
+722 666
+666 307
+308 307
+721 307
+307 667
+668 667
+722 667
+667 308
+309 308
+721 308
+308 668
+669 668
+722 668
+668 309
+310 309
+721 309
+309 669
+670 669
+722 669
+669 310
+311 310
+721 310
+310 670
+671 670
+722 670
+670 311
+312 311
+721 311
+311 671
+672 671
+722 671
+671 312
+313 312
+721 312
+312 672
+673 672
+722 672
+672 313
+314 313
+721 313
+313 673
+674 673
+722 673
+673 314
+315 314
+721 314
+314 674
+675 674
+722 674
+674 315
+316 315
+721 315
+315 675
+676 675
+722 675
+675 316
+317 316
+721 316
+316 676
+677 676
+722 676
+676 317
+318 317
+721 317
+317 677
+678 677
+722 677
+677 318
+319 318
+721 318
+318 678
+679 678
+722 678
+678 319
+320 319
+721 319
+319 679
+680 679
+722 679
+679 320
+321 320
+721 320
+320 680
+681 680
+722 680
+680 321
+322 321
+721 321
+321 681
+682 681
+722 681
+681 322
+323 322
+721 322
+322 682
+683 682
+722 682
+682 323
+324 323
+721 323
+323 683
+684 683
+722 683
+683 324
+325 324
+721 324
+324 684
+685 684
+722 684
+684 325
+326 325
+721 325
+325 685
+686 685
+722 685
+685 326
+327 326
+721 326
+326 686
+687 686
+722 686
+686 327
+328 327
+721 327
+327 687
+688 687
+722 687
+687 328
+329 328
+721 328
+328 688
+689 688
+722 688
+688 329
+330 329
+721 329
+329 689
+690 689
+722 689
+689 330
+331 330
+721 330
+330 690
+691 690
+722 690
+690 331
+332 331
+721 331
+331 691
+692 691
+722 691
+691 332
+333 332
+721 332
+332 692
+693 692
+722 692
+692 333
+334 333
+721 333
+333 693
+694 693
+722 693
+693 334
+335 334
+721 334
+334 694
+695 694
+722 694
+694 335
+336 335
+721 335
+335 695
+696 695
+722 695
+695 336
+337 336
+721 336
+336 696
+697 696
+722 696
+696 337
+338 337
+721 337
+337 697
+698 697
+722 697
+697 338
+339 338
+721 338
+338 698
+699 698
+722 698
+698 339
+340 339
+721 339
+339 699
+700 699
+722 699
+699 340
+341 340
+721 340
+340 700
+701 700
+722 700
+700 341
+342 341
+721 341
+341 701
+702 701
+722 701
+701 342
+343 342
+721 342
+342 702
+703 702
+722 702
+702 343
+344 343
+721 343
+343 703
+704 703
+722 703
+703 344
+345 344
+721 344
+344 704
+705 704
+722 704
+704 345
+346 345
+721 345
+345 705
+706 705
+722 705
+705 346
+347 346
+721 346
+346 706
+707 706
+722 706
+706 347
+348 347
+721 347
+347 707
+708 707
+722 707
+707 348
+349 348
+721 348
+348 708
+709 708
+722 708
+708 349
+350 349
+721 349
+349 709
+710 709
+722 709
+709 350
+351 350
+721 350
+350 710
+711 710
+722 710
+710 351
+352 351
+721 351
+351 711
+712 711
+722 711
+711 352
+353 352
+721 352
+352 712
+713 712
+722 712
+712 353
+354 353
+721 353
+353 713
+714 713
+722 713
+713 354
+355 354
+721 354
+354 714
+715 714
+722 714
+714 355
+356 355
+721 355
+355 715
+716 715
+722 715
+715 356
+357 356
+721 356
+356 716
+717 716
+722 716
+716 357
+358 357
+721 357
+357 717
+718 717
+722 717
+717 358
+359 358
+721 358
+358 718
+719 718
+722 718
+718 359
+360 359
+721 359
+359 719
+720 719
+722 719
+719 360
+1 360
+721 360
+360 720
+361 720
+722 720
+720 1
+2 1 8
+6 1 3
+11 4 5
+6 4 9
+8 7 14
+12 7 9
+17 10 11
+12 10 15
+14 13 20
+18 13 15
+23 16 17
+18 16 21
+20 19 26
+24 19 21
+29 22 23
+24 22 27
+26 25 32
+30 25 27
+35 28 29
+30 28 33
+32 31 38
+36 31 33
+41 34 35
+36 34 39
+38 37 44
+42 37 39
+47 40 41
+42 40 45
+44 43 50
+48 43 45
+53 46 47
+48 46 51
+50 49 56
+54 49 51
+59 52 53
+54 52 57
+56 55 62
+60 55 57
+65 58 59
+60 58 63
+62 61 68
+66 61 63
+71 64 65
+66 64 69
+68 67 74
+72 67 69
+77 70 71
+72 70 75
+74 73 80
+78 73 75
+83 76 77
+78 76 81
+80 79 86
+84 79 81
+89 82 83
+84 82 87
+86 85 92
+90 85 87
+95 88 89
+90 88 93
+92 91 98
+96 91 93
+101 94 95
+96 94 99
+98 97 104
+102 97 99
+107 100 101
+102 100 105
+104 103 110
+108 103 105
+113 106 107
+108 106 111
+110 109 116
+114 109 111
+119 112 113
+114 112 117
+116 115 122
+120 115 117
+125 118 119
+120 118 123
+122 121 128
+126 121 123
+131 124 125
+126 124 129
+128 127 134
+132 127 129
+137 130 131
+132 130 135
+134 133 140
+138 133 135
+143 136 137
+138 136 141
+140 139 146
+144 139 141
+149 142 143
+144 142 147
+146 145 152
+150 145 147
+155 148 149
+150 148 153
+152 151 158
+156 151 153
+161 154 155
+156 154 159
+158 157 164
+162 157 159
+167 160 161
+162 160 165
+164 163 170
+168 163 165
+173 166 167
+168 166 171
+170 169 176
+174 169 171
+179 172 173
+174 172 177
+176 175 182
+180 175 177
+185 178 179
+180 178 183
+182 181 188
+186 181 183
+191 184 185
+186 184 189
+188 187 194
+192 187 189
+197 190 191
+192 190 195
+194 193 200
+198 193 195
+203 196 197
+198 196 201
+200 199 206
+204 199 201
+209 202 203
+204 202 207
+206 205 212
+210 205 207
+215 208 209
+210 208 213
+212 211 218
+216 211 213
+221 214 215
+216 214 219
+218 217 224
+222 217 219
+227 220 221
+222 220 225
+224 223 230
+228 223 225
+233 226 227
+228 226 231
+230 229 236
+234 229 231
+239 232 233
+234 232 237
+236 235 242
+240 235 237
+245 238 239
+240 238 243
+242 241 248
+246 241 243
+251 244 245
+246 244 249
+248 247 254
+252 247 249
+257 250 251
+252 250 255
+254 253 260
+258 253 255
+263 256 257
+258 256 261
+260 259 266
+264 259 261
+269 262 263
+264 262 267
+266 265 272
+270 265 267
+275 268 269
+270 268 273
+272 271 278
+276 271 273
+281 274 275
+276 274 279
+278 277 284
+282 277 279
+287 280 281
+282 280 285
+284 283 290
+288 283 285
+293 286 287
+288 286 291
+290 289 296
+294 289 291
+299 292 293
+294 292 297
+296 295 302
+300 295 297
+305 298 299
+300 298 303
+302 301 308
+306 301 303
+311 304 305
+306 304 309
+308 307 314
+312 307 309
+317 310 311
+312 310 315
+314 313 320
+318 313 315
+323 316 317
+318 316 321
+320 319 326
+324 319 321
+329 322 323
+324 322 327
+326 325 332
+330 325 327
+335 328 329
+330 328 333
+332 331 338
+336 331 333
+341 334 335
+336 334 339
+338 337 344
+342 337 339
+347 340 341
+342 340 345
+344 343 350
+348 343 345
+353 346 347
+348 346 351
+350 349 356
+354 349 351
+359 352 353
+354 352 357
+356 355 362
+360 355 357
+365 358 359
+360 358 363
+362 361 368
+366 361 363
+371 364 365
+366 364 369
+368 367 374
+372 367 369
+377 370 371
+372 370 375
+374 373 380
+378 373 375
+383 376 377
+378 376 381
+380 379 386
+384 379 381
+389 382 383
+384 382 387
+386 385 392
+390 385 387
+395 388 389
+390 388 393
+392 391 398
+396 391 393
+401 394 395
+396 394 399
+398 397 404
+402 397 399
+407 400 401
+402 400 405
+404 403 410
+408 403 405
+413 406 407
+408 406 411
+410 409 416
+414 409 411
+419 412 413
+414 412 417
+416 415 422
+420 415 417
+425 418 419
+420 418 423
+422 421 428
+426 421 423
+431 424 425
+426 424 429
+428 427 434
+432 427 429
+437 430 431
+432 430 435
+434 433 440
+438 433 435
+443 436 437
+438 436 441
+440 439 446
+444 439 441
+449 442 443
+444 442 447
+446 445 452
+450 445 447
+455 448 449
+450 448 453
+452 451 458
+456 451 453
+461 454 455
+456 454 459
+458 457 464
+462 457 459
+467 460 461
+462 460 465
+464 463 470
+468 463 465
+473 466 467
+468 466 471
+470 469 476
+474 469 471
+479 472 473
+474 472 477
+476 475 482
+480 475 477
+485 478 479
+480 478 483
+482 481 488
+486 481 483
+491 484 485
+486 484 489
+488 487 494
+492 487 489
+497 490 491
+492 490 495
+494 493 500
+498 493 495
+503 496 497
+498 496 501
+500 499 506
+504 499 501
+509 502 503
+504 502 507
+506 505 512
+510 505 507
+515 508 509
+510 508 513
+512 511 518
+516 511 513
+521 514 515
+516 514 519
+518 517 524
+522 517 519
+527 520 521
+522 520 525
+524 523 530
+528 523 525
+533 526 527
+528 526 531
+530 529 536
+534 529 531
+539 532 533
+534 532 537
+536 535 542
+540 535 537
+545 538 539
+540 538 543
+542 541 548
+546 541 543
+551 544 545
+546 544 549
+548 547 554
+552 547 549
+557 550 551
+552 550 555
+554 553 560
+558 553 555
+563 556 557
+558 556 561
+560 559 566
+564 559 561
+569 562 563
+564 562 567
+566 565 572
+570 565 567
+575 568 569
+570 568 573
+572 571 578
+576 571 573
+581 574 575
+576 574 579
+578 577 584
+582 577 579
+587 580 581
+582 580 585
+584 583 590
+588 583 585
+593 586 587
+588 586 591
+590 589 596
+594 589 591
+599 592 593
+594 592 597
+596 595 602
+600 595 597
+605 598 599
+600 598 603
+602 601 608
+606 601 603
+611 604 605
+606 604 609
+608 607 614
+612 607 609
+617 610 611
+612 610 615
+614 613 620
+618 613 615
+623 616 617
+618 616 621
+620 619 626
+624 619 621
+629 622 623
+624 622 627
+626 625 632
+630 625 627
+635 628 629
+630 628 633
+632 631 638
+636 631 633
+641 634 635
+636 634 639
+638 637 644
+642 637 639
+647 640 641
+642 640 645
+644 643 650
+648 643 645
+653 646 647
+648 646 651
+650 649 656
+654 649 651
+659 652 653
+654 652 657
+656 655 662
+660 655 657
+665 658 659
+660 658 663
+662 661 668
+666 661 663
+671 664 665
+666 664 669
+668 667 674
+672 667 669
+677 670 671
+672 670 675
+674 673 680
+678 673 675
+683 676 677
+678 676 681
+680 679 686
+684 679 681
+689 682 683
+684 682 687
+686 685 692
+690 685 687
+695 688 689
+690 688 693
+692 691 698
+696 691 693
+701 694 695
+696 694 699
+698 697 704
+702 697 699
+707 700 701
+702 700 705
+704 703 710
+708 703 705
+713 706 707
+708 706 711
+710 709 716
+714 709 711
+719 712 713
+714 712 717
+716 715 722
+720 715 717
+725 718 719
+720 718 723
+722 721 728
+726 721 723
+731 724 725
+726 724 729
+728 727 734
+732 727 729
+737 730 731
+732 730 735
+734 733 740
+738 733 735
+743 736 737
+738 736 741
+740 739 746
+744 739 741
+749 742 743
+744 742 747
+746 745 752
+750 745 747
+755 748 749
+750 748 753
+752 751 758
+756 751 753
+761 754 755
+756 754 759
+758 757 764
+762 757 759
+767 760 761
+762 760 765
+764 763 770
+768 763 765
+773 766 767
+768 766 771
+770 769 776
+774 769 771
+779 772 773
+774 772 777
+776 775 782
+780 775 777
+785 778 779
+780 778 783
+782 781 788
+786 781 783
+791 784 785
+786 784 789
+788 787 794
+792 787 789
+797 790 791
+792 790 795
+794 793 800
+798 793 795
+803 796 797
+798 796 801
+800 799 806
+804 799 801
+809 802 803
+804 802 807
+806 805 812
+810 805 807
+815 808 809
+810 808 813
+812 811 818
+816 811 813
+821 814 815
+816 814 819
+818 817 824
+822 817 819
+827 820 821
+822 820 825
+824 823 830
+828 823 825
+833 826 827
+828 826 831
+830 829 836
+834 829 831
+839 832 833
+834 832 837
+836 835 842
+840 835 837
+845 838 839
+840 838 843
+842 841 848
+846 841 843
+851 844 845
+846 844 849
+848 847 854
+852 847 849
+857 850 851
+852 850 855
+854 853 860
+858 853 855
+863 856 857
+858 856 861
+860 859 866
+864 859 861
+869 862 863
+864 862 867
+866 865 872
+870 865 867
+875 868 869
+870 868 873
+872 871 878
+876 871 873
+881 874 875
+876 874 879
+878 877 884
+882 877 879
+887 880 881
+882 880 885
+884 883 890
+888 883 885
+893 886 887
+888 886 891
+890 889 896
+894 889 891
+899 892 893
+894 892 897
+896 895 902
+900 895 897
+905 898 899
+900 898 903
+902 901 908
+906 901 903
+911 904 905
+906 904 909
+908 907 914
+912 907 909
+917 910 911
+912 910 915
+914 913 920
+918 913 915
+923 916 917
+918 916 921
+920 919 926
+924 919 921
+929 922 923
+924 922 927
+926 925 932
+930 925 927
+935 928 929
+930 928 933
+932 931 938
+936 931 933
+941 934 935
+936 934 939
+938 937 944
+942 937 939
+947 940 941
+942 940 945
+944 943 950
+948 943 945
+953 946 947
+948 946 951
+950 949 956
+954 949 951
+959 952 953
+954 952 957
+956 955 962
+960 955 957
+965 958 959
+960 958 963
+962 961 968
+966 961 963
+971 964 965
+966 964 969
+968 967 974
+972 967 969
+977 970 971
+972 970 975
+974 973 980
+978 973 975
+983 976 977
+978 976 981
+980 979 986
+984 979 981
+989 982 983
+984 982 987
+986 985 992
+990 985 987
+995 988 989
+990 988 993
+992 991 998
+996 991 993
+1001 994 995
+996 994 999
+998 997 1004
+1002 997 999
+1007 1000 1001
+1002 1000 1005
+1004 1003 1010
+1008 1003 1005
+1013 1006 1007
+1008 1006 1011
+1010 1009 1016
+1014 1009 1011
+1019 1012 1013
+1014 1012 1017
+1016 1015 1022
+1020 1015 1017
+1025 1018 1019
+1020 1018 1023
+1022 1021 1028
+1026 1021 1023
+1031 1024 1025
+1026 1024 1029
+1028 1027 1034
+1032 1027 1029
+1037 1030 1031
+1032 1030 1035
+1034 1033 1040
+1038 1033 1035
+1043 1036 1037
+1038 1036 1041
+1040 1039 1046
+1044 1039 1041
+1049 1042 1043
+1044 1042 1047
+1046 1045 1052
+1050 1045 1047
+1055 1048 1049
+1050 1048 1053
+1052 1051 1058
+1056 1051 1053
+1061 1054 1055
+1056 1054 1059
+1058 1057 1064
+1062 1057 1059
+1067 1060 1061
+1062 1060 1065
+1064 1063 1070
+1068 1063 1065
+1073 1066 1067
+1068 1066 1071
+1070 1069 1076
+1074 1069 1071
+1079 1072 1073
+1074 1072 1077
+1076 1075 1082
+1080 1075 1077
+1085 1078 1079
+1080 1078 1083
+1082 1081 1088
+1086 1081 1083
+1091 1084 1085
+1086 1084 1089
+1088 1087 1094
+1092 1087 1089
+1097 1090 1091
+1092 1090 1095
+1094 1093 1100
+1098 1093 1095
+1103 1096 1097
+1098 1096 1101
+1100 1099 1106
+1104 1099 1101
+1109 1102 1103
+1104 1102 1107
+1106 1105 1112
+1110 1105 1107
+1115 1108 1109
+1110 1108 1113
+1112 1111 1118
+1116 1111 1113
+1121 1114 1115
+1116 1114 1119
+1118 1117 1124
+1122 1117 1119
+1127 1120 1121
+1122 1120 1125
+1124 1123 1130
+1128 1123 1125
+1133 1126 1127
+1128 1126 1131
+1130 1129 1136
+1134 1129 1131
+1139 1132 1133
+1134 1132 1137
+1136 1135 1142
+1140 1135 1137
+1145 1138 1139
+1140 1138 1143
+1142 1141 1148
+1146 1141 1143
+1151 1144 1145
+1146 1144 1149
+1148 1147 1154
+1152 1147 1149
+1157 1150 1151
+1152 1150 1155
+1154 1153 1160
+1158 1153 1155
+1163 1156 1157
+1158 1156 1161
+1160 1159 1166
+1164 1159 1161
+1169 1162 1163
+1164 1162 1167
+1166 1165 1172
+1170 1165 1167
+1175 1168 1169
+1170 1168 1173
+1172 1171 1178
+1176 1171 1173
+1181 1174 1175
+1176 1174 1179
+1178 1177 1184
+1182 1177 1179
+1187 1180 1181
+1182 1180 1185
+1184 1183 1190
+1188 1183 1185
+1193 1186 1187
+1188 1186 1191
+1190 1189 1196
+1194 1189 1191
+1199 1192 1193
+1194 1192 1197
+1196 1195 1202
+1200 1195 1197
+1205 1198 1199
+1200 1198 1203
+1202 1201 1208
+1206 1201 1203
+1211 1204 1205
+1206 1204 1209
+1208 1207 1214
+1212 1207 1209
+1217 1210 1211
+1212 1210 1215
+1214 1213 1220
+1218 1213 1215
+1223 1216 1217
+1218 1216 1221
+1220 1219 1226
+1224 1219 1221
+1229 1222 1223
+1224 1222 1227
+1226 1225 1232
+1230 1225 1227
+1235 1228 1229
+1230 1228 1233
+1232 1231 1238
+1236 1231 1233
+1241 1234 1235
+1236 1234 1239
+1238 1237 1244
+1242 1237 1239
+1247 1240 1241
+1242 1240 1245
+1244 1243 1250
+1248 1243 1245
+1253 1246 1247
+1248 1246 1251
+1250 1249 1256
+1254 1249 1251
+1259 1252 1253
+1254 1252 1257
+1256 1255 1262
+1260 1255 1257
+1265 1258 1259
+1260 1258 1263
+1262 1261 1268
+1266 1261 1263
+1271 1264 1265
+1266 1264 1269
+1268 1267 1274
+1272 1267 1269
+1277 1270 1271
+1272 1270 1275
+1274 1273 1280
+1278 1273 1275
+1283 1276 1277
+1278 1276 1281
+1280 1279 1286
+1284 1279 1281
+1289 1282 1283
+1284 1282 1287
+1286 1285 1292
+1290 1285 1287
+1295 1288 1289
+1290 1288 1293
+1292 1291 1298
+1296 1291 1293
+1301 1294 1295
+1296 1294 1299
+1298 1297 1304
+1302 1297 1299
+1307 1300 1301
+1302 1300 1305
+1304 1303 1310
+1308 1303 1305
+1313 1306 1307
+1308 1306 1311
+1310 1309 1316
+1314 1309 1311
+1319 1312 1313
+1314 1312 1317
+1316 1315 1322
+1320 1315 1317
+1325 1318 1319
+1320 1318 1323
+1322 1321 1328
+1326 1321 1323
+1331 1324 1325
+1326 1324 1329
+1328 1327 1334
+1332 1327 1329
+1337 1330 1331
+1332 1330 1335
+1334 1333 1340
+1338 1333 1335
+1343 1336 1337
+1338 1336 1341
+1340 1339 1346
+1344 1339 1341
+1349 1342 1343
+1344 1342 1347
+1346 1345 1352
+1350 1345 1347
+1355 1348 1349
+1350 1348 1353
+1352 1351 1358
+1356 1351 1353
+1361 1354 1355
+1356 1354 1359
+1358 1357 1364
+1362 1357 1359
+1367 1360 1361
+1362 1360 1365
+1364 1363 1370
+1368 1363 1365
+1373 1366 1367
+1368 1366 1371
+1370 1369 1376
+1374 1369 1371
+1379 1372 1373
+1374 1372 1377
+1376 1375 1382
+1380 1375 1377
+1385 1378 1379
+1380 1378 1383
+1382 1381 1388
+1386 1381 1383
+1391 1384 1385
+1386 1384 1389
+1388 1387 1394
+1392 1387 1389
+1397 1390 1391
+1392 1390 1395
+1394 1393 1400
+1398 1393 1395
+1403 1396 1397
+1398 1396 1401
+1400 1399 1406
+1404 1399 1401
+1409 1402 1403
+1404 1402 1407
+1406 1405 1412
+1410 1405 1407
+1415 1408 1409
+1410 1408 1413
+1412 1411 1418
+1416 1411 1413
+1421 1414 1415
+1416 1414 1419
+1418 1417 1424
+1422 1417 1419
+1427 1420 1421
+1422 1420 1425
+1424 1423 1430
+1428 1423 1425
+1433 1426 1427
+1428 1426 1431
+1430 1429 1436
+1434 1429 1431
+1439 1432 1433
+1434 1432 1437
+1436 1435 1442
+1440 1435 1437
+1445 1438 1439
+1440 1438 1443
+1442 1441 1448
+1446 1441 1443
+1451 1444 1445
+1446 1444 1449
+1448 1447 1454
+1452 1447 1449
+1457 1450 1451
+1452 1450 1455
+1454 1453 1460
+1458 1453 1455
+1463 1456 1457
+1458 1456 1461
+1460 1459 1466
+1464 1459 1461
+1469 1462 1463
+1464 1462 1467
+1466 1465 1472
+1470 1465 1467
+1475 1468 1469
+1470 1468 1473
+1472 1471 1478
+1476 1471 1473
+1481 1474 1475
+1476 1474 1479
+1478 1477 1484
+1482 1477 1479
+1487 1480 1481
+1482 1480 1485
+1484 1483 1490
+1488 1483 1485
+1493 1486 1487
+1488 1486 1491
+1490 1489 1496
+1494 1489 1491
+1499 1492 1493
+1494 1492 1497
+1496 1495 1502
+1500 1495 1497
+1505 1498 1499
+1500 1498 1503
+1502 1501 1508
+1506 1501 1503
+1511 1504 1505
+1506 1504 1509
+1508 1507 1514
+1512 1507 1509
+1517 1510 1511
+1512 1510 1515
+1514 1513 1520
+1518 1513 1515
+1523 1516 1517
+1518 1516 1521
+1520 1519 1526
+1524 1519 1521
+1529 1522 1523
+1524 1522 1527
+1526 1525 1532
+1530 1525 1527
+1535 1528 1529
+1530 1528 1533
+1532 1531 1538
+1536 1531 1533
+1541 1534 1535
+1536 1534 1539
+1538 1537 1544
+1542 1537 1539
+1547 1540 1541
+1542 1540 1545
+1544 1543 1550
+1548 1543 1545
+1553 1546 1547
+1548 1546 1551
+1550 1549 1556
+1554 1549 1551
+1559 1552 1553
+1554 1552 1557
+1556 1555 1562
+1560 1555 1557
+1565 1558 1559
+1560 1558 1563
+1562 1561 1568
+1566 1561 1563
+1571 1564 1565
+1566 1564 1569
+1568 1567 1574
+1572 1567 1569
+1577 1570 1571
+1572 1570 1575
+1574 1573 1580
+1578 1573 1575
+1583 1576 1577
+1578 1576 1581
+1580 1579 1586
+1584 1579 1581
+1589 1582 1583
+1584 1582 1587
+1586 1585 1592
+1590 1585 1587
+1595 1588 1589
+1590 1588 1593
+1592 1591 1598
+1596 1591 1593
+1601 1594 1595
+1596 1594 1599
+1598 1597 1604
+1602 1597 1599
+1607 1600 1601
+1602 1600 1605
+1604 1603 1610
+1608 1603 1605
+1613 1606 1607
+1608 1606 1611
+1610 1609 1616
+1614 1609 1611
+1619 1612 1613
+1614 1612 1617
+1616 1615 1622
+1620 1615 1617
+1625 1618 1619
+1620 1618 1623
+1622 1621 1628
+1626 1621 1623
+1631 1624 1625
+1626 1624 1629
+1628 1627 1634
+1632 1627 1629
+1637 1630 1631
+1632 1630 1635
+1634 1633 1640
+1638 1633 1635
+1643 1636 1637
+1638 1636 1641
+1640 1639 1646
+1644 1639 1641
+1649 1642 1643
+1644 1642 1647
+1646 1645 1652
+1650 1645 1647
+1655 1648 1649
+1650 1648 1653
+1652 1651 1658
+1656 1651 1653
+1661 1654 1655
+1656 1654 1659
+1658 1657 1664
+1662 1657 1659
+1667 1660 1661
+1662 1660 1665
+1664 1663 1670
+1668 1663 1665
+1673 1666 1667
+1668 1666 1671
+1670 1669 1676
+1674 1669 1671
+1679 1672 1673
+1674 1672 1677
+1676 1675 1682
+1680 1675 1677
+1685 1678 1679
+1680 1678 1683
+1682 1681 1688
+1686 1681 1683
+1691 1684 1685
+1686 1684 1689
+1688 1687 1694
+1692 1687 1689
+1697 1690 1691
+1692 1690 1695
+1694 1693 1700
+1698 1693 1695
+1703 1696 1697
+1698 1696 1701
+1700 1699 1706
+1704 1699 1701
+1709 1702 1703
+1704 1702 1707
+1706 1705 1712
+1710 1705 1707
+1715 1708 1709
+1710 1708 1713
+1712 1711 1718
+1716 1711 1713
+1721 1714 1715
+1716 1714 1719
+1718 1717 1724
+1722 1717 1719
+1727 1720 1721
+1722 1720 1725
+1724 1723 1730
+1728 1723 1725
+1733 1726 1727
+1728 1726 1731
+1730 1729 1736
+1734 1729 1731
+1739 1732 1733
+1734 1732 1737
+1736 1735 1742
+1740 1735 1737
+1745 1738 1739
+1740 1738 1743
+1742 1741 1748
+1746 1741 1743
+1751 1744 1745
+1746 1744 1749
+1748 1747 1754
+1752 1747 1749
+1757 1750 1751
+1752 1750 1755
+1754 1753 1760
+1758 1753 1755
+1763 1756 1757
+1758 1756 1761
+1760 1759 1766
+1764 1759 1761
+1769 1762 1763
+1764 1762 1767
+1766 1765 1772
+1770 1765 1767
+1775 1768 1769
+1770 1768 1773
+1772 1771 1778
+1776 1771 1773
+1781 1774 1775
+1776 1774 1779
+1778 1777 1784
+1782 1777 1779
+1787 1780 1781
+1782 1780 1785
+1784 1783 1790
+1788 1783 1785
+1793 1786 1787
+1788 1786 1791
+1790 1789 1796
+1794 1789 1791
+1799 1792 1793
+1794 1792 1797
+1796 1795 1802
+1800 1795 1797
+1805 1798 1799
+1800 1798 1803
+1802 1801 1808
+1806 1801 1803
+1811 1804 1805
+1806 1804 1809
+1808 1807 1814
+1812 1807 1809
+1817 1810 1811
+1812 1810 1815
+1814 1813 1820
+1818 1813 1815
+1823 1816 1817
+1818 1816 1821
+1820 1819 1826
+1824 1819 1821
+1829 1822 1823
+1824 1822 1827
+1826 1825 1832
+1830 1825 1827
+1835 1828 1829
+1830 1828 1833
+1832 1831 1838
+1836 1831 1833
+1841 1834 1835
+1836 1834 1839
+1838 1837 1844
+1842 1837 1839
+1847 1840 1841
+1842 1840 1845
+1844 1843 1850
+1848 1843 1845
+1853 1846 1847
+1848 1846 1851
+1850 1849 1856
+1854 1849 1851
+1859 1852 1853
+1854 1852 1857
+1856 1855 1862
+1860 1855 1857
+1865 1858 1859
+1860 1858 1863
+1862 1861 1868
+1866 1861 1863
+1871 1864 1865
+1866 1864 1869
+1868 1867 1874
+1872 1867 1869
+1877 1870 1871
+1872 1870 1875
+1874 1873 1880
+1878 1873 1875
+1883 1876 1877
+1878 1876 1881
+1880 1879 1886
+1884 1879 1881
+1889 1882 1883
+1884 1882 1887
+1886 1885 1892
+1890 1885 1887
+1895 1888 1889
+1890 1888 1893
+1892 1891 1898
+1896 1891 1893
+1901 1894 1895
+1896 1894 1899
+1898 1897 1904
+1902 1897 1899
+1907 1900 1901
+1902 1900 1905
+1904 1903 1910
+1908 1903 1905
+1913 1906 1907
+1908 1906 1911
+1910 1909 1916
+1914 1909 1911
+1919 1912 1913
+1914 1912 1917
+1916 1915 1922
+1920 1915 1917
+1925 1918 1919
+1920 1918 1923
+1922 1921 1928
+1926 1921 1923
+1931 1924 1925
+1926 1924 1929
+1928 1927 1934
+1932 1927 1929
+1937 1930 1931
+1932 1930 1935
+1934 1933 1940
+1938 1933 1935
+1943 1936 1937
+1938 1936 1941
+1940 1939 1946
+1944 1939 1941
+1949 1942 1943
+1944 1942 1947
+1946 1945 1952
+1950 1945 1947
+1955 1948 1949
+1950 1948 1953
+1952 1951 1958
+1956 1951 1953
+1961 1954 1955
+1956 1954 1959
+1958 1957 1964
+1962 1957 1959
+1967 1960 1961
+1962 1960 1965
+1964 1963 1970
+1968 1963 1965
+1973 1966 1967
+1968 1966 1971
+1970 1969 1976
+1974 1969 1971
+1979 1972 1973
+1974 1972 1977
+1976 1975 1982
+1980 1975 1977
+1985 1978 1979
+1980 1978 1983
+1982 1981 1988
+1986 1981 1983
+1991 1984 1985
+1986 1984 1989
+1988 1987 1994
+1992 1987 1989
+1997 1990 1991
+1992 1990 1995
+1994 1993 2000
+1998 1993 1995
+2003 1996 1997
+1998 1996 2001
+2000 1999 2006
+2004 1999 2001
+2009 2002 2003
+2004 2002 2007
+2006 2005 2012
+2010 2005 2007
+2015 2008 2009
+2010 2008 2013
+2012 2011 2018
+2016 2011 2013
+2021 2014 2015
+2016 2014 2019
+2018 2017 2024
+2022 2017 2019
+2027 2020 2021
+2022 2020 2025
+2024 2023 2030
+2028 2023 2025
+2033 2026 2027
+2028 2026 2031
+2030 2029 2036
+2034 2029 2031
+2039 2032 2033
+2034 2032 2037
+2036 2035 2042
+2040 2035 2037
+2045 2038 2039
+2040 2038 2043
+2042 2041 2048
+2046 2041 2043
+2051 2044 2045
+2046 2044 2049
+2048 2047 2054
+2052 2047 2049
+2057 2050 2051
+2052 2050 2055
+2054 2053 2060
+2058 2053 2055
+2063 2056 2057
+2058 2056 2061
+2060 2059 2066
+2064 2059 2061
+2069 2062 2063
+2064 2062 2067
+2066 2065 2072
+2070 2065 2067
+2075 2068 2069
+2070 2068 2073
+2072 2071 2078
+2076 2071 2073
+2081 2074 2075
+2076 2074 2079
+2078 2077 2084
+2082 2077 2079
+2087 2080 2081
+2082 2080 2085
+2084 2083 2090
+2088 2083 2085
+2093 2086 2087
+2088 2086 2091
+2090 2089 2096
+2094 2089 2091
+2099 2092 2093
+2094 2092 2097
+2096 2095 2102
+2100 2095 2097
+2105 2098 2099
+2100 2098 2103
+2102 2101 2108
+2106 2101 2103
+2111 2104 2105
+2106 2104 2109
+2108 2107 2114
+2112 2107 2109
+2117 2110 2111
+2112 2110 2115
+2114 2113 2120
+2118 2113 2115
+2123 2116 2117
+2118 2116 2121
+2120 2119 2126
+2124 2119 2121
+2129 2122 2123
+2124 2122 2127
+2126 2125 2132
+2130 2125 2127
+2135 2128 2129
+2130 2128 2133
+2132 2131 2138
+2136 2131 2133
+2141 2134 2135
+2136 2134 2139
+2138 2137 2144
+2142 2137 2139
+2147 2140 2141
+2142 2140 2145
+2144 2143 2150
+2148 2143 2145
+2153 2146 2147
+2148 2146 2151
+2150 2149 2156
+2154 2149 2151
+2159 2152 2153
+2154 2152 2157
+2156 2155 2
+2160 2155 2157
+5 2158 2159
+2160 2158 3
+
+
+------=_NextPart_000_162a_28d8_6181
+Content-Type: text/plain; name="3.dat"; format=flowed
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="3.dat"
+
+2904 10610 7705
+0.000169 5.711062 0.000713
+0.000139 3.702301 -4.076366
+0.00017 5.73488 0.000712
+-0.0002172194856 2.621017421 -2.937017498
+0.0001 2.621056 -2.936966
+-0.0002172194521 2.621012219 -2.937012016
+-0.122871 -0.028322 0.000604
+-5.022235 -8.647378 0
+-0.028847 -0.0036 0.000609
+-9.995821556 0.2758184777 -43.33661781
+-9.997995 0.200214 -100
+-9.992979 0.374673 -100
+9.555504 -2.948279 -100
+9.502595 -3.114597 -100
+4.324851 4.721829 -99.999001
+3e-06 5.923634 -46.297699
+-8.462545652 5.327664956 -48.06534508
+-8.421535654 5.391673987 -48.11478029
+-50.000999 73.442886 22.442884
+-50.000004 -4.692482 86.642723
+-50.000004 -3.491096 87.908722
+2e-06 -7.881439 -29.249847
+-3.769877 -9.262182 -28.43965116
+-3.815764498 -9.243036617 -28.4884573
+2.2e-05 0.519028 -0.602425
+2.6e-05 0.778664 0.00065
+2.2e-05 0.666653 0.000644
+8.9217 4.516995 0
+8.999174 4.360604 0
+8.999174 4.360604 -100
+-9.964154 -0.845957 -42.06697954
+-9.964429 -0.842354 -2.070711
+-9.964154 -0.845957 -2.066555
+-3.45939228e-05 -9.999809098 -18.02105836
+2e-06 -13.776207 -18.16341
+2e-06 -13.124817 -19.592758
+-8.338979156 -5.518552141 -35.70752523
+-8.304716 -5.570608 -100
+-8.400671 -5.424824 -100
+0.000129 4.345796 0.000758
+3.182867 5.55602 0.001
+0.000128 4.304421 0.000758
+-0.0002103872781 1.55981623 -1.778909903
+-0.0002103872473 1.559811518 -1.77890471
+-0.0002103872178 1.55980693 -1.778899524
+1e-06 -19.25042 -1.802708
+-50 -29.371872 -2.348284
+-50 -28.994118 -4.052221
+-1.027619629e-05 -9.999808948 -23.2306326
+-1.880269053e-05 -9.999809001 -21.46417056
+2e-06 -11.747704 -22.41626
+8.105246 5.857047 0
+8.206232 5.714698 0
+3e-06 9.397575 -49.480972
+-0.5901154995 9.982193692 -50.13549137
+-0.5845806512 9.982517247 -50.13431201
+-0.0002172196169 2.621037804 -2.937038977
+-0.0002172195927 2.62103404 -2.937035011
+-8.841509 -4.672013 -100
+-8.9217 -4.516995 -100
+-0.001 72.442886 23.442886
+4e-06 34.728294 -65.003662
+4e-06 36.18977 -65.579353
+-7.915654969 6.110222031 -48.65303898
+-7.864263 6.176841 -8.699941
+-7.864263 6.176841 -48.70014371
+-8.777519454 4.790359242 -47.64230443
+-8.73371 4.870554 -7.706071
+-8.81103 4.729017 -7.593073
+-9.261321633 3.771938569 -46.78006815
+-9.262182 3.769877 -100
+-9.259578063 3.776118799 -46.78368717
+6e-05 1.559853 -1.77887
+9.7e-05 3.240125 0.000746
+9.5e-05 3.18681 0.000745
+3e-06 120.064766 -55.2808
+-49.999996 124.362175 -64.460869
+3e-06 118.770248 -56.170494
+-0.0002562614788 9.397713481 -9.481249445
+-0.0002562616041 9.397735882 -9.481268578
+-1.711171 9.852507 -10.319616
+-0.0002562669542 9.398691788 -9.482085013
+-0.000256264717 9.398292052 -9.481743601
+-9.981723568 -0.5981392917 -42.35239089
+-9.987607 -0.497698 -2.467274
+-9.977633 -0.667973 -2.2718
+-50 168.442886 18.442884
+-50 168.427658 16.697643
+-3.607656 -9.326566 -28.27210516
+-3.607656 -9.326566 -100
+-3.618075805 -9.322430477 -28.28323174
+3e-06 4.803276 -45.196724
+-9.049093602 4.255901281 -47.19615006
+-9.068105834 4.214764348 -47.16105578
+-3e-06 118.770248 93.056267
+-50.000004 125.800529 100.358093
+-50.000004 124.362175 101.346642
+-9.78534847 2.059382924 -45.18809624
+-49.999996 -3.491096 -51.022949
+-9.781402603 2.078525944 -45.20712239
+-0.0002172195909 2.621033764 -2.93703472
+-0.2359780773 9.996834726 -50.05485511
+-0.315214 9.994964 -10.074184
+-0.305741 9.995187 -10.071882
+-4.136571688 -9.103983432 -28.83816227
+-4.249455 -9.052189 -100
+-4.249455 -9.052189 -28.96588982
+-3.802367238 9.248480452 -50.35368611
+-3.72223 9.281434 -100
+-3.72223 9.281434 -50.36075448
+-8.950617983 -4.45862042 -37.32604814
+-8.999174 -4.360604 -100
+-9.998777125 -0.1537185698 -42.85986698
+-9.998893 -0.148833 -2.865006
+-9.998893 -0.148833 -42.86542411
+-4.186486 9.081328 -10.311906
+-4.198445 9.075914 -10.310428
+-4.344374 9.006865 -10.289828
+1.2e-05 0.307478 0.000626
+8e-06 0.179256 0.000619
+6.038652 7.970867 -100
+6.176841 7.864263 -100
+-3e-06 2.621056 79.822739
+2e-06 -8.702171 -27.910542
+-3.160608114 -9.487067835 -27.82346907
+-3.279965 -9.446789 -27.93888136
+0.148833 -9.998893 0
+-9.246541637e-05 -9.999809454 -2.208986082
+-9.637361379e-05 -9.999809478 -0.7257075356
+4.977731 -8.673072 0
+4.825609 -8.758624 0
+-8.859887693 4.636246009 -47.51686166
+-8.817384 4.717387 -100
+-8.827986358 4.697146759 -47.56776367
+-8.304716 -5.570608 -35.62565575
+4.717387 8.817384 0
+4.870554 8.73371 0
+1e-06 -19.590401 -0.269165
+-49.999996 2.836983 -57.028069
+-4.041363979 9.146961795 -50.32983866
+-4.043881 9.145875 -50.32957245
+0.549018 9.984918 -4.858659
+0.723194 9.973815 -100
+0.549018 9.984918 -100
+-8.939555053 4.480711137 -47.38635633
+-8.970907 4.418232 -7.33347
+-8.951382104 4.457141797 -47.36651105
+-8.871257313 -4.614506248 -37.09682232
+-49.999996 30.982227 -74.275497
+-1.462822885 -9.892129664 -26.45707257
+-1.589719 -9.872832 0
+-1.589719 -9.872832 -26.54271816
+0.000262 8.881948 0.000243
+0.000258 8.736074 0.000273
+-8.73371 4.870554 -47.7063274
+-0.000203511333 0.5190010817 -0.6024626288
+-9.977401 -0.671932 -2.267256
+-0.0002035113336 0.5190011718 -0.6024627306
+9.34498 3.55968 0
+9.405683 3.396046 0
+-49.999996 122.906792 -65.424171
+-0.0002562743586 9.40001472 -9.483214922
+-0.0002562673177 9.398756728 -9.482140475
+3e-06 10.592003 -50.501114
+-0.7684809942 9.97005157 -50.17203251
+-0.845957 9.964154 -50.18737229
+0 158.442886 18.442886
+-9.987607 -0.497698 -100
+-9.987607 -0.497698 -42.46769548
+-3e-06 120.064766 92.166573
+-4.122873016 9.110121011 -50.31981105
+-4.043881 9.145875 -10.329534
+3e-06 -0.501114 -39.407997
+-9.725365763 -2.325925761 -40.25212478
+-9.749449 -2.224467 -40.3827758
+-0.0002432250619 7.062993734 -7.379044404
+0.000263 7.063034 -7.378944
+-0.0002432250632 7.062993967 -7.379044616
+-49.999996 0.24305 -54.692482
+-8.171940509 5.763507843 -48.39882029
+-8.176756 5.756795 -48.39377772
+-0.957434 -0.247751 0.000564
+-6.176841 -7.864263 0
+-0.84407 -0.217945 0.00057
+-2.394278 9.709141 -50.37679038
+-2.224467 9.749449 -100
+-2.394278 9.709141 -100
+-9.538970204 -3.000128949 -39.37488819
+-9.518474 -3.065722 -100
+-9.518474 -3.065722 -39.28584172
+-4.188761841e-05 -9.999809143 -16.34105347
+-0.0002497701199 8.221049542 -8.440224012
+-0.0002497700744 8.221041341 -8.440216497
+0.025694 9.999967 -5.378673
+0.000362 9.999811 -8.784371
+0.000343 9.999811 -6.44928
+4.562784 8.898371 0
+4.717387 8.817384 -100
+-3e-06 3.702301 80.962143
+0.000157 5.294359 0.000737
+0.000156 5.255214 0.000738
+-8.304716 -5.570608 0
+-0.0002497700756 8.221041559 -8.440216696
+-6.919445 7.219372 -9.399
+-49.999996 -9.271713 -44.489155
+-9.766181729 -2.148057185 -40.48072915
+-9.764559306 -2.155467742 -40.47122933
+-3.114597 -9.502595 0
+-3.114597 -9.502595 -27.77897857
+-8.841509 -4.672013 -37.01210519
+-9.998893 -0.148833 -100
+-9.999967 0.025694 -100
+-49.999996 29.369774 -73.607597
+9.281434 3.72223 -100
+9.34498 3.55968 -100
+-8.73371 4.870554 -100
+9.959674 -0.897152 0
+9.942501 -1.070836 0
+3e-06 8.22113 -48.440147
+-5.416593603 8.405884899 -50.04998496
+-5.3510016 8.447435101 -50.06923039
+0.000349 9.397575 -9.480972
+-3.653596717 -9.308332559 -28.3198333
+0 158.429169 16.872169
+-0.0002172194353 2.621009612 -2.937009268
+-9.921281 1.251762 -4.376159
+-9.931086 1.168788 -4.291569
+-0.0002562617742 9.397766267 -9.481294529
+-0.0002562616194 9.397738615 -9.481270913
+-0.0002562617673 9.397765033 -9.481293476
+-0.148833 9.998893 -100
+-0.2412392844 9.996710874 -50.05613307
+-0.0002240060424 3.702248789 -4.076416433
+-9.69671 2.444142 -5.562506
+-9.73106 2.302659 -5.42833
+-9.999907 0.03105 -3.068635
+-9.999967 0.025694 -3.0626
+-0.9382705157 9.95550401 -50.20426366
+-0.932489065 9.956045883 -50.20320589
+8.176756 -5.756795 -100
+8.07504 -5.898622 -100
+-0.000210387341 1.559825798 -1.778920344
+-0.0002103871863 1.559802055 -1.778894014
+-0.0002103873399 1.559825627 -1.778920158
+-1.461979381 9.892172942 -50.28791316
+-1.458224156 9.89272492 -50.28739694
+-0.025694 -9.999967 0
+-8.374048279e-05 -9.9998094 -5.219700741
+-8.825652032e-05 -9.999809428 -3.706631521
+-4.819167415 8.762100992 -50.20560735
+-4.901385793 8.716008392 -50.18678285
+-4.825609 8.758624 -50.20425126
+-7.932729758 -6.088094356 -34.7792182
+-8.001794 -5.997609 0
+-8.001794 -5.997609 -34.9298595
+-0.0002562609791 9.397624203 -9.481173194
+-2.726059 9.621207 -10.388956
+-0.0002562609816 9.397624646 -9.481173572
+0.000209 7.071943 0.000569
+0.000207 7.008718 0.000578
+-0.000249770363 8.221092448 -8.440262165
+-0.0002497702625 8.221074763 -8.440246518
+-0.000249770214 8.221066239 -8.440238977
+-0.0002240061158 3.702260386 -4.076428234
+-9.633163 2.682307 -5.786737
+-9.649878 2.622633 -5.730781
+9.852507 1.711171 0
+9.88087 1.538961 0
+-7.115088546 7.026229164 -49.27524725
+-7.125653 7.015534 -9.268142
+-7.093551089 7.048033778 -49.28938534
+-4.090826 -9.124973 0
+-4.090826 -9.124973 -28.786401
+-50 -29.719833 -0.638016
+0.207227 9.997794 -4.019516
+0.374673 9.992979 0
+0.374673 9.992979 -4.38288
+-0.0002497708006 8.221169418 -8.440330262
+0.000306 8.22113 -8.440147
+-0.0002497707459 8.221159792 -8.440321746
+-9.544108318 -2.983685682 -39.3972109
+-9.570528 -2.899136 -39.50808425
+9.073906 4.202882 0
+9.145875 4.043881 0
+9.145875 4.043881 -100
+-0.000256260173 9.397479782 -9.481049359
+-0.0002372184695 5.923593307 -6.297786703
+-8.551126 5.184206 -7.953385
+-0.0002372184749 5.923594378 -6.297787719
+-0.497698 9.987607 -50.11580826
+-0.497698 9.987607 -100
+-0.323315 9.994773 -100
+-6.40279255 7.681347187 -49.67231407
+-6.408171 7.676936 -100
+-6.400895912 7.682902274 -49.67318343
+-6.944255 -1.812828 0.000192
+-9.281434 -3.72223 0
+-9.34498 -3.55968 0
+3e-06 117.460403 -57.037468
+-49.999996 1.529823 -55.871597
+-6.136554163 7.895736808 -49.79089593
+-6.205107012 7.841493747 -49.76121149
+-8.434236211 -5.371837269 -35.93782653
+-8.494069 -5.277384 -100
+-50.000004 127.221413 99.344589
+-49.999996 -11.420662 -41.738621
+-9.172177115 -3.982962076 -38.01872531
+-9.145875 -4.043881 -37.93069304
+-4.358201844 9.000312184 -50.28791842
+-4.360604 8.999174 -100
+-4.360604 8.999174 -50.2875781
+-0.0002497704648 8.221110347 -8.440278
+1.538961 -9.88087 0
+1.366281 -9.906224 0
+-2.394278 9.709141 -10.376809
+-2.318497824 9.727128924 -50.3722228
+-0.0002240061135 3.702260035 -4.076427877
+-0.0002240060002 3.702241981 -4.076409259
+-0.0002240060769 3.702254241 -4.076421981
+-9.990656218 -0.4234937501 -42.5524889
+-9.994773 -0.323315 -100
+-0.0002103872791 1.559816383 -1.77891007
+-1.11590487 9.937163057 -50.23531818
+-1.111945391 9.937604416 -50.23465376
+-7.048202542 7.093781383 -49.31900426
+-7.052875 7.089214 -100
+-7.048252285 7.093732758 -49.3189732
+-0.0002307435433 4.803230173 -5.196794122
+-9.260675 3.773488 -6.781114
+-0.0002307435442 4.803230326 -5.196794272
+-9.951308493 -0.9830422924 -41.90815492
+-49.999996 -8.16156 -45.835876
+-9.948051089 -1.017805072 -41.86645004
+-9.997899394 0.2035502428 -43.25836622
+8.841509 4.672013 -100
+8.9217 4.516995 -100
+-0.0002497703117 8.221083422 -8.440254179
+-0.0002497700745 8.221041347 -8.440216502
+-0.0002497702637 8.221074979 -8.440246709
+-50.000004 -2.267792 89.153564
+0.000114 3.827451 0.000756
+0.000113 3.781642 0.000756
+-0.0002240061295 3.702262564 -4.076430451
+-1.193185 9.928559 -100
+-1.019728 9.947871 -100
+-8.692474526 4.943002072 -47.76370875
+-8.653363 5.01172 -7.817884
+-8.650765716 5.016283148 -47.82175009
+2.104243 9.776102 0
+2.274539 9.737887 0
+0.000232 7.852854 0.000443
+0.00018 4.803276 -5.196724
+-0.0002035108056 0.5189210812 -0.602369248
+-2.282542 -0.596151 0.000491
+-0.0002035107841 0.5189178235 -0.6023654336
+-5.12834 8.584878 -10.131289
+-2.477898193e-05 9.999808962 -46.44928212
+-6.581057595e-06 9.999809054 -48.78437411
+4e-06 33.277084 -64.40255
+-4.602296 -1.206051 0.000348
+-9.906549 -1.363775 -1.448151
+-9.906224 -1.366281 -1.445116
+-6.796202469 7.335564815 -49.47144468
+-6.792271 7.339149 -9.473416
+-6.801169 7.331037 -49.46876503
+-4.915727834 -8.707998491 -29.78213104
+-4.870554 -8.73371 0
+4.202882 -9.073906 0
+4.043881 -9.145875 0
+4.043881 -9.145875 -100
+-5.497680304 8.352718016 -50.02459953
+-5.424824 8.400671 -10.047477
+-5.556021 8.314319 -10.006105
+-6.265792518 7.793476254 -49.73493415
+-0.000249770414 8.221101422 -8.440270104
+-50 168.381958 14.952934
+-0.0002035107339 0.5189101978 -0.602356505
+-0.0002035107604 0.5189142159 -0.6023612096
+-8.368217953 5.474631947 -48.17880392
+-4.785211321 -8.780332075 -29.61458344
+-4.762702839 -8.792628292 -29.58590261
+-7.579720475 -6.522589166 -34.04850363
+-49.999996 -14.460869 -37.476406
+-7.563929 -6.541175 -34.01588507
+-8.64343274 5.028894961 -47.83169643
+-9.776102 2.104243 -100
+-9.776102 2.104243 -45.23268254
+-0.0002240060747 3.7022539 -4.076421634
+0.000124 4.17858 0.000759
+0.000123 4.136007 0.000758
+-8.171428 5.764221 -8.399129
+-8.176756 5.756795 -8.393551
+8.372684 -5.467923 -100
+8.27598 -5.613212 -100
+9.88087 1.538961 -100
+-8.078895 5.893245 -8.49606
+-8.066176 5.910535 -8.508962
+-8.069396 5.906208 -8.505742
+6.038652 7.970867 0
+6.176841 7.864263 0
+-5.512347963 -8.343114854 -30.5769623
+-5.467923 -8.372684 -100
+-5.613212 -8.27598 -100
+2.948279 9.555504 0
+3.114597 9.502595 0
+3.114597 9.502595 -100
+-0.0002562636616 9.398103494 -9.481582553
+-0.0002562629942 9.397984252 -9.48148071
+-0.0002562637097 9.398112085 -9.481589891
+1e-06 -19.903557 1.270077
+0.000231 7.832326 0.000446
+0.000228 7.74269 0.000462
+-0.07127527382 9.999370273 -50.01370254
+-0.148833 9.998893 -50.0336932
+-2.545806 9.670369 -10.383543
+-6.965043 -7.175524 -100
+-7.089214 -7.052875 -100
+-9.480620586 -3.179827788 -39.13023013
+2e-06 -1.500252 -38.19595
+-9.46352 -3.231376 -39.05993118
+-9.123818919 4.093343218 -47.05735705
+-9.124973 4.090826 -100
+-9.124973 4.090826 -47.05520698
+8.976648 -4.406791 -100
+8.898371 -4.562784 -100
+8.976648 -4.406791 0
+-7.825019409 -6.225927628 -34.54888796
+-7.787604 -6.273214 -100
+-7.895901 -6.136346 -100
+-5.022235 -8.647378 -100
+-5.022235 -8.647378 -29.91693103
+1.589719 9.872832 -100
+1.761781 9.843583 -100
+-8.928375584 4.502990019 -47.40511505
+-8.898371 4.562784 -7.455186
+-8.951217 4.457471 -7.366511
+-49.999996 121.434814 -66.361923
+-0.0002432250145 7.06298553 -7.379036886
+-7.745461 6.324982 -8.803466
+-0.0002432250158 7.062985764 -7.3790371
+-0.000256260913 9.397612394 -9.481163107
+-0.000256260908 9.397611506 -9.481162349
+-0.06154984384 9.999429723 -50.01119545
+-0.140535 9.998943 -10.031647
+-0.06666480825 9.999398053 -50.01251368
+-0.0002035106708 0.5189006082 -0.602345277
+-0.000203510589 0.5188881694 -0.602330713
+-0.0002372183958 5.923578751 -6.297772889
+-0.0002372183231 5.923564185 -6.297758858
+-0.0002372182974 5.923558948 -6.297753712
+-8.729935882 4.877184345 -47.71157878
+-3e-06 121.343559 91.254417
+-7.052875 7.089214 -9.315919
+-7.052875 7.089214 -49.31608646
+-3.396046 9.405683 -50.38108461
+-3.455695157 9.383555203 -50.37787381
+-0.000203484643 0.5149459539 -0.5977149336
+-0.0002035048989 0.5180236295 -0.6013184602
+-1.985055 -0.517936 0.000508
+-7.211223 -6.928077 0
+-1.843166 -0.48063 0.000516
+-5.927504515 8.053390252 -49.87455311
+-5.905177 8.069822 -9.883016
+-5.883809214 8.085548833 -49.8913366
+-8.173754487 5.760978415 -48.39692008
+-8.176756 5.756795 -100
+2e-06 -9.499397 -26.557114
+-1.635444524 -9.86505907 -26.57502754
+0.00011 3.688524 0.000755
+0.000109 3.641173 0.000754
+-0.317164 -0.079407 0.000595
+-5.320966 -8.466838 0
+-0.218945 -0.053583 0.0006
+-9.446328379 3.281255771 -46.34325305
+-9.455690906 3.253586989 -46.31776854
+-9.446789 3.279965 -46.34207099
+-3e-06 4.803276 82.082497
+1.019728 -9.947871 0
+0.845957 -9.964154 0
+0.845957 -9.964154 -100
+0.140517 9.207457 -3.874863
+-5.467923 -8.372684 -30.5140118
+-9.038429 -2.355401 4.5e-05
+-9.709207 -2.394 -0.164003
+-9.749449 -2.224467 -0.382315
+-0.0002562636254 9.398097025 -9.481577028
+-3.279965 -9.446789 0
+-4.281271323 9.036763981 -50.29881798
+-4.202882 9.073906 -10.309879
+-4.202882 9.073906 -50.30992338
+-1.571909 -0.409311 0.000531
+-6.838752 -7.295989 0
+-1.442112 -0.375185 0.000538
+-49.999996 27.769222 -72.911659
+-5.989904718 8.007464427 -49.85058417
+-7.588271387 6.512335435 -48.93270368
+-7.643902 6.447538 -100
+-7.530214 6.579959 -100
+4.249455 9.052189 -100
+4.406791 8.976648 -100
+-8.898371 4.562784 -100
+-8.898371 4.562784 -47.45546129
+-7.748685 6.32109 -8.800774
+0 158.388062 15.301931
+-49.999996 -17.273842 -33.060925
+-4.717387 -8.817384 -29.52816012
+2e-06 -2.478081 -36.966648
+-0.131329 9.999 -10.029273
+-2.824381249 9.592462833 -50.39025796
+-2.821361222 9.593348634 -50.39022022
+-0.000210387309 1.559820932 -1.778915034
+-0.0002103872154 1.559806569 -1.778899116
+-9.122947 4.095245 -7.058693
+-9.124973 4.090826 -7.054919
+-0.0002497707399 8.221158742 -8.440320817
+-0.0002497706869 8.221149408 -8.440312559
+-0.0002497703129 8.221083639 -8.440254371
+-0.0002497703618 8.221092228 -8.44026197
+3.607656 9.326566 -100
+3.769877 9.262182 -100
+-4.74847315 8.800249447 -50.21969244
+-4.825609 8.758624 -100
+-4.81147416 8.766252216 -50.20722571
+6.313152 7.755264 -100
+2e-06 -10.272888 -25.18998
+0.00031 9.99981 -2.024125
+0.000291 8.968504 -3.570602
+0.000221 5.923634 -6.297699
+0.000155 5.216143 0.00074
+0.000153 5.177132 0.000741
+3.930951 9.194978 0
+4.090826 9.124973 0
+-9.44465433 3.285946201 -46.34754841
+5.320966 8.466838 -100
+5.467923 8.372684 -100
+5.320966 8.466838 0
+-6.273214 7.787604 -100
+-6.136346 7.895901 -100
+-8.563922 5.163087 -7.936871
+-50 -30.037888 1.078066
+9.786785 2.053977 -100
+9.821142 1.88286 -100
+9.786785 2.053977 0
+-2.478177103 9.687673443 -50.38052141
+-5.097028 -1.334231 0.000316
+-8.841509 -4.672013 0
+-8.9217 -4.516995 0
+-9.446789 3.279965 -100
+-9.388106 3.444336 -100
+-8.370033043 5.471905362 -48.17671694
+-8.364771 5.47981 -8.182531
+-8.367987 5.474979 -8.178833
+3e-06 116.13562 -57.881439
+-0.0002562612497 9.397672555 -9.48121449
+-0.0002562613455 9.397689672 -9.48122911
+-2.053977 9.786785 -10.353634
+-0.0002172193815 2.621001094 -2.936999972
+-0.0002172195575 2.621028576 -2.937029252
+-50.000004 128.62439 98.306435
+-0.0002103871872 1.559802182 -1.778894157
+-8.896741489 4.565893698 -47.45806027
+-3.809037911 9.245737092 -50.35309749
+-3.881067225 9.216117599 -50.34674423
+-0.0002462326938 7.583471358 -7.85598192
+-0.0002497708062 8.221170395 -8.440331127
+-0.245185543 -9.99670199 -25.77771454
+-0.200214 -9.997995 -100
+-0.374673 -9.992979 -100
+-7.211223 -6.928077 -100
+7.530214 -6.579959 0
+7.414231 -6.710379 0
+7.414231 -6.710379 -100
+-49.999996 -2.267792 -52.267792
+-9.394969832 3.425111547 -46.47498746
+-9.388106 3.444336 -46.49259192
+-50.000004 -1.022949 90.376869
+9.843583 -1.761781 0
+9.811336 -1.933306 0
+-5.116971 8.591535 -10.134144
+-6.53592953 7.568385614 -49.60792592
+-6.541175 7.563929 -49.60538375
+-9.518474 -3.065722 0
+1.761781 9.843583 0
+1.933306 9.811336 0
+1.933306 9.811336 -100
+4e-06 31.83659 -63.776207
+-3.883647 9.215057 -50.34651689
+-9.428194398 -3.331952913 -38.9221395
+-9.405683 -3.396046 0
+-9.405683 -3.396046 -38.83433114
+2.731665 -9.619668 -100
+2.563363 -9.665876 -100
+2.731665 -9.619668 0
+-4.608226561 -8.874566438 -29.39306516
+3.444336 9.388106 0
+3.607656 9.326566 0
+-1.116318864 -9.937200141 -26.23668295
+-1.244192 -9.922297 0
+-1.070836 -9.942501 0
+-0.0002035108428 0.5189267355 -0.6023758682
+-0.000203510825 0.5189240385 -0.6023727103
+-49.999996 -1.022949 -53.491096
+-0.0002568294748 9.999807171 -10.57025334
+-0.0002503714068 9.999807229 -11.90819272
+-0.828235 9.965502 -10.183933
+-0.0002562630256 9.397989859 -9.481485498
+-50 168.305847 13.209288
+-0.0002103872558 1.559812823 -1.778906185
+-0.0002103872483 1.559811663 -1.778904874
+-8.071863339 5.902891694 -48.5034982
+-0.9423353899 9.95512298 -50.20500732
+-9.887363406 1.494165984 -44.62211817
+-9.899072 1.417172 -100
+-9.872832 1.589719 -100
+-2.138608011 9.768250887 -50.36003197
+-2.218383 9.750782 -10.366117
+-2.206795 9.753318 -10.365237
+-8.070050998 5.905327097 -48.50530963
+-1.019728 9.947871 -10.219234
+-1.012399 9.948558 -10.217893
+-8.9217 -4.516995 -37.24047281
+0.000172 5.818095 0.000706
+0.000171 5.776324 0.000709
+-0.0002562609869 9.397625591 -9.481174379
+-9.737887 2.274539 -45.40103453
+-9.73566 2.283715 -5.409703
+-9.737887 2.274539 -5.400681
+-0.0002432249676 7.062977417 -7.379029451
+-7.85477 6.188712 -8.708243
+-0.000243224969 7.062977653 -7.379029668
+-0.0002562830341 9.401564779 -9.484538819
+-0.0002564076273 9.42382594 -9.503552
+1.589719 9.872832 0
+0.000317 9.576268 -4.656517
+0.000332 9.91916 -5.260298
+0.000321 9.999811 -3.570524
+0.000311 9.651976 -3.57055
+0.025694 9.999967 -3.625584
+-3.878989 9.216972 -10.346895
+-3.883647 9.215057 -10.346484
+3e-06 0.519028 -40.602425
+-9.881057423 -1.537689499 -41.2371161
+-9.891347572 -1.46760576 -41.32234204
+-7.046372124 7.095571001 -49.32014764
+-7.044870961 7.097038617 -49.32108526
+1e-06 -20.189812 2.81455
+0.000158 5.333597 0.000735
+-9.927107701 -1.204435195 -41.64148597
+-9.928748845 -1.191478768 -41.6571613
+-9.927726055 -1.199642695 -41.64728766
+-7.289813265 6.845226615 -49.15678398
+-7.295989 6.838752 -100
+-7.236728497 6.9008787 -49.19338019
+0.000147 4.943479 0.000749
+0.000145 4.904468 0.00075
+-49.999996 119.946693 -67.273842
+-0.0002103873101 1.559821094 -1.778915211
+-0.025694 -9.999967 -25.68279997
+2e-06 -9.999808873 -25.67264335
+-0.025694 -9.999967 -100
+-0.0002172195223 2.62102312 -2.937023503
+-0.0002172195558 2.621028309 -2.937028971
+-3e-06 122.606239 90.320084
+-0.845957 9.964154 -100
+0.57923 9.982992 -4.826776
+0.557465 9.984378 -4.849744
+-3.909357 -1.023868 0.000393
+-8.400671 -5.424824 0
+-8.494069 -5.277384 0
+-0.0001386158708 -6.041376288 0.0002517094833
+-0.000133449614 -6.548448381 0.000219856464
+-9.262182 3.769877 -6.777987
+-0.0001929130945 -0.7002757404 0.0005717273938
+-4.406791 -8.976648 0
+-4.249455 -9.052189 0
+-9.736601664 2.279835022 -45.40624195
+8.176756 -5.756795 0
+-0.0002172194173 2.621006768 -2.937006165
+-3e-06 5.923634 83.183472
+-0.671932 9.977401 -10.152991
+3.8e-05 1.193473 0.00067
+3.5e-05 1.094404 0.000665
+-9.964316678 -0.8438256273 -42.06943773
+-0.0002137092172 2.06547389 -2.330743194
+-0.0002432248233 7.062952153 -7.379005882
+-8.189076 5.738966 -8.380028
+-8.168208 5.768711 -8.402502
+-0.758648836 9.97079944 -50.17008532
+-0.7643094563 9.970368916 -50.1712064
+-5.467923 -8.372684 0
+-0.0002497708052 8.221170228 -8.44033098
+-6.534048542 7.569983952 -49.60883772
+-6.475155632 7.620022381 -49.63738171
+-9.500610898 3.12047703 -46.19513223
+-9.502595 3.114597 -100
+-9.47677922 3.191096622 -46.26019515
+-4.562784 -8.898371 -29.33682629
+9.652575 -2.613003 -100
+9.605503 -2.781064 -100
+-49.999996 26.181061 -72.187889
+-4.35471 -1.140957 0.000364
+-8.584878 -5.12834 0
+-8.673072 -4.977731 0
+-9.462327 3.233923 -6.299331
+-9.499136 3.124848 -6.198836
+-0.0002372185135 5.923601998 -6.29779495
+-0.0002372185122 5.923601739 -6.297794704
+-8.372684 5.467923 -100
+-6.528392 7.57479 -9.611441
+-6.531766 7.571923 -9.609806
+-9.325843544 3.609476429 -46.63850841
+-9.324120852 3.613818024 -46.64229185
+-9.852507 -1.711171 -41.02520432
+-9.833971173 -1.812638386 -40.9006938
+-9.531109504 3.024962533 -46.10663841
+-9.553667373 2.954052488 -46.04091647
+0 158.31955 13.732651
+-6.916147 7.222486 -9.400959
+-0.0002497701211 8.221049754 -8.440224206
+-9.193973753 3.933244629 -46.91969942
+-9.194978 3.930951 -46.91772706
+-2.053977 9.786785 -100
+-2.145025474 9.766846444 -50.36052031
+-9.843583 1.761781 -100
+-9.811336 1.933306 -100
+-7.005963174 -7.135105396 -32.95469505
+-6.965043 -7.175524 -32.88143689
+4e-06 0.046343 0.000612
+-0.420128974 9.990794579 -50.09812946
+0.200214 9.997995 -5.210624
+0.209289 9.997735 -5.201606
+4.249455 9.052189 0
+8.817384 -4.717387 -100
+8.73371 -4.870554 -100
+-9.928559 -1.193185 -1.654663
+-9.928559 -1.193185 -41.65510511
+-8.616982759 -5.073514664 -36.40242981
+-8.584878 -5.12834 -100
+-8.673072 -4.977731 -100
+9.446789 -3.279965 0
+9.388106 -3.444336 0
+-6.991281583 7.149430373 -49.35455707
+-50 -30.325951 2.799438
+-9.980064478 0.6251556417 -43.71318666
+-9.973815 0.723194 -100
+-9.973815 0.723194 -43.81832639
+0.0003 9.189136 -3.974833
+0.0003 9.187269 -3.971546
+-9.462444317 3.233574807 -46.29933096
+-9.052189 4.249455 -100
+-8.976648 4.406791 -100
+8.758624 4.825609 0
+8.841509 4.672013 0
+3e-06 114.79631 -58.702171
+-9.052189 4.249455 -47.19068324
+-9.652575 2.613003 -45.72208425
+-9.651022282 2.618547188 -45.72728301
+-9.676568149 2.521202651 -45.63551376
+-0.0002035112537 0.5189891765 -0.6024489778
+-9.927155 -1.20407 -1.641486
+-9.928879 -1.190309 -1.658129
+-50.000004 130.009033 97.243965
+-0.0002103873707 1.559830319 -1.778925278
+-0.0002497704128 8.221101197 -8.440269905
+2e-06 -3.434311 -35.720467
+-8.526914149 -5.223475551 -36.16948625
+-8.584878 -5.12834 -36.31754329
+-1.979157231 -9.801885019 -26.82346745
+-2.104243 -9.776102 0
+-2.104243 -9.776102 -26.91652804
+-0.0002035113063 0.5189971074 -0.6024581365
+-9.951344 -0.982676 -1.908155
+-8.189284298 5.738665216 -48.38002739
+-8.127478546 5.825503075 -48.44539289
+3e-06 7.063034 -47.378944
+-0.0001945484175 -0.5389024203 0.0005806054043
+-0.0002035092887 0.5186906116 -0.6020994004
+-0.000203508709 0.5186025326 -0.6019962728
+-9.997995 0.200214 -3.254354
+-9.997832 0.205902 -3.260514
+7.895901 6.136346 0
+8.001794 5.997609 0
+-0.497698 9.987607 -10.11589
+-7.85799 6.184685 -8.705426
+3.8e-05 1.196312 0.00067
+-0.0002562617855 9.397768292 -9.481296259
+-50.000004 0.24305 91.578255
+-4.452347389 -8.953787888 -29.20412397
+9.619668 2.731665 -100
+9.665876 2.563363 -100
+-0.0002562610582 9.397638343 -9.48118527
+-9.959674 0.897152 -4.003591
+-2.320476896 -9.726733985 -27.08554471
+-2.444142 -9.69671 0
+-2.274539 -9.737887 0
+-0.0002562608393 9.397599235 -9.481151869
+-3.048414 9.523884 -10.390604
+-0.000256260844 9.397600076 -9.481152586
+8.73371 -4.870554 0
+8.647378 -5.022235 0
+8.647378 -5.022235 -100
+-5.800754185 -8.145229193 -30.99493371
+-5.898622 -8.07504 0
+-5.756795 -8.176756 0
+3.231376 -9.46352 0
+3.065722 -9.518474 0
+4e-06 30.407242 -63.124817
+-1.289762336 -9.916178541 -26.34428019
+-1.244192 -9.922297 -100
+-1.417172 -9.899072 -100
+-0.0002035104071 0.5188605422 -0.6022983653
+-0.0002035103206 0.5188474 -0.6022829776
+0.000293 9.924306 1.7e-05
+0.000299 9.99981 -0.627502
+-50 168.199295 11.467237
+-8.514454932 5.243705991 -47.99998322
+-8.554291056 5.179070823 -47.94963019
+-8.895501 4.568261 -7.459764
+-0.0002194617063 2.96899555 -3.303716004
+-49.999996 -12.458817 -40.335644
+-8.494069 -5.277384 -36.0855899
+2e-06 -5.2808 -33.178993
+-7.331037 -6.801169 -33.55535767
+-7.370581683 -6.757790219 -33.63243726
+-7.860738314 6.181248402 -48.70322626
+-0.0002372183245 5.923564472 -6.29775914
+-1.27928075 9.917449746 -50.2614505
+-1.359324 9.907122 -10.273735
+-1.285280225 9.916675906 -50.26236748
+-0.000203507628 0.5184382849 -0.6018039624
+5.613212 8.27598 -100
+5.467923 8.372684 0
+-9.821142 -1.88286 -40.81452455
+-9.821399 -1.88146 -0.815798
+-9.821142 -1.88286 -0.814079
+-0.000224006231 3.702278615 -4.076446785
+-0.0002240061938 3.702272728 -4.076440794
+-0.0002240062306 3.70227855 -4.076446718
+4e-05 1.289713 0.000674
+-6.447538 -7.643902 -100
+-6.579959 -7.530214 -100
+-0.0002562603516 9.397512081 -9.481077431
+-4.500942 8.929653 -10.265057
+-0.0002172194872 2.621017669 -2.937017758
+-0.0001217171113 -7.699112542 0.0001470828503
+-0.0001149916101 -8.355892109 0.0001052856773
+6.579959 7.530214 -100
+6.710379 7.414231 -100
+7.448616 6.67219 -100
+7.563929 6.541175 -100
+7.448616 6.67219 0
+-0.000256260498 9.39753825 -9.481099781
+-3.961238 9.181557 -10.338276
+-4.027326 9.153023 -10.331285
+-9.785274 2.059743 -5.188097
+1e-06 -20.449066 4.363785
+-0.0002562613495 9.397690393 -9.481229726
+-2.036263 9.790342 -10.352013
+-0.000256261357 9.397691727 -9.481230865
+7.1e-05 2.337992 0.000718
+6.9e-05 2.268225 0.000715
+-7.530214 6.579959 -48.97892091
+-7.523026 6.588042 -8.98419
+-7.530214 6.579959 -8.978733
+-1.244192 -9.922297 -26.31495809
+-9.162088152 4.006063711 -46.98231808
+-9.122044505 4.097209902 -47.0606593
+0.671932 -9.977401 -100
+-9.821295355 -1.882024603 -40.8155499
+-0.0002307434855 4.803220506 -5.196784621
+-9.352166 3.539714 -6.577032
+-9.322288 3.618437 -6.646017
+-49.999996 118.442886 -68.159653
+-7.640039675 6.452036472 -48.89149227
+-7.637017 6.455557 -8.893705
+-7.643902 6.447538 -48.88841785
+-3e-06 123.852417 89.363853
+-0.0002362167947 5.719404753 -6.097129156
+-0.0002562619645 9.397800274 -9.481323574
+0.0002 6.771683 0.00061
+0.000198 6.715881 0.000617
+-49.999996 -13.472321 -38.914761
+-8.206232 -5.714698 -35.39689434
+-8.140838661 -5.80687589 -35.24514414
+-6.408171 7.676936 -49.6698476
+-1.538961 9.88087 -10.298554
+-1.538961 9.88087 -50.29850627
+-0.0001961182741 -0.383989289 0.0005890515699
+-4.562784 -8.898371 0
+-4.717387 -8.817384 0
+-6.827409561e-05 -9.999809305 -9.862649611
+-4.406791 -8.976648 -29.14938272
+0.000101 3.395541 0.000749
+0.0001 3.344461 0.000748
+8.400671 5.424824 0
+8.494069 5.277384 0
+8.494069 5.277384 -100
+-0.723194 -9.973815 -26.01230404
+-0.768487805 -9.970133079 -26.03720728
+6.313152 7.755264 0
+6.447538 7.643902 0
+-0.03910368074 9.999568071 -50.00541009
+-3e-06 7.063034 84.264717
+-7.044515 7.097386 -9.32114
+-7.044604 7.097299 -9.321085
+-5.418676608 8.404565459 -50.04937385
+-5.410003 8.41006 -10.051826
+0.000127 4.262771 0.000759
+8.372684 -5.467923 0
+-1.933306 -9.811336 0
+-49.999996 24.60577 -71.436516
+-1.193185 9.928559 -10.248354
+0.723194 9.973815 0
+0.897152 9.959674 0
+-9.800764727 -1.984350753 -40.68941962
+-9.821142 -1.88286 -100
+-9.80689549 -1.953815676 -40.72705937
+-0.0002566248973 9.462645712 -9.536707832
+0 158.223648 12.164804
+-0.200214 -9.997995 0
+-0.200214 -9.997995 -25.75716454
+-7.448616 -6.67219 -33.78453996
+-9.89837834 1.421734819 -44.54899153
+-9.897878 1.425026 -4.551945
+-2.053977 9.786785 -50.35360304
+-0.0002035100769 0.5188103743 -0.6022396258
+-0.0002035102134 0.518831108 -0.602263902
+-8.556102283 5.176132598 -47.9473413
+-2.563363 9.665876 -50.38430912
+-2.487898187 9.685185727 -50.38095341
+-2.60011 -0.679645 0.000473
+-7.919004347 6.105880369 -48.64996911
+-7.970867 6.038652 -100
+-7.864263 6.176841 -100
+-9.795431401 2.01046648 -45.13947829
+-9.809549 1.941975 -5.071044
+9.984918 -0.549018 -100
+9.973815 -0.723194 -100
+9.984918 -0.549018 0
+2.563363 -9.665876 0
+2.394278 -9.709141 0
+0.000152 5.138165 0.000743
+-0.0002307435052 4.803223797 -5.196787855
+-9.815769845e-05 -9.999809489 0
+-3.705387 9.288018 -10.361921
+-3.866943 9.221926 -10.347958
+-3.717455 9.283301 -10.361066
+-9.69425 2.45355 -5.571378
+1.193185 -9.928559 0
+1.019728 -9.947871 -100
+-3.154571125 9.488999905 -50.38873446
+-3.147905005 9.491211057 -50.38886973
+-50 -30.583923 4.525575
+-7.602457438 -6.495828815 -34.0938508
+-7.563929 -6.541175 -100
+5.277384 -8.494069 0
+5.12834 -8.584878 0
+3e-06 113.442886 -59.499397
+-2.563363 9.665876 -10.384322
+-6.128782016 7.901674452 -49.7940737
+-0.0002562614704 9.397711978 -9.481248162
+-1.865114 9.824383 -10.336079
+-6.83100351 -7.303125991 -32.64844612
+2e-06 -6.170494 -31.884476
+-50.000004 131.374924 96.157486
+-0.0002562619732 9.397801826 -9.481324901
+-0.0002562619869 9.397804273 -9.48132699
+-7.858929055 6.183511101 -48.70480888
+-5.424824 8.400671 -100
+-4.295112551 -9.030267653 -29.01913787
+-0.0002432248771 7.062961673 -7.379014916
+-0.0002432248326 7.062953787 -7.379007433
+-0.0002562622393 9.39784936 -9.481365499
+-0.0002562625312 9.397901518 -9.481410048
+-2.899136 9.570528 -50.39118486
+3.930951 9.194978 -100
+4.090826 9.124973 -100
+3e-06 2.621056 -42.936966
+-9.950595579 0.9889675079 -44.10149272
+-9.952103119 0.973720852 -44.08530025
+-8.07504 5.898622 -100
+-50.000004 1.529823 92.75737
+-3.969873961 9.177828043 -50.3373986
+-3.96322182 9.180700244 -50.33810213
+-2.308741512 9.72944521 -50.37163512
+-2.388358 9.710546 -10.376452
+-2.376659 9.713324 -10.375748
+-0.000256260519 9.397541996 -9.481102981
+0.025694 9.999967 -100
+-9.65254679 2.613104327 -45.72217932
+3.883647 -9.215057 -100
+3.72223 -9.281434 -100
+4e-06 28.989483 -62.448578
+0.000309 9.590956 -3.570555
+0.000305 9.448096 -3.570565
+-4.813993 8.764894 -10.206625
+-4.825609 8.758624 -10.204181
+-0.0002562761765 9.400339533 -9.483492342
+-0.000256275164 9.400158637 -9.483337846
+-1.705526 -0.444442 0.000524
+-1.193185 9.928559 -50.24829487
+-9.683196254 -2.495673292 -40.03294654
+-9.709141 -2.394278 -0.163644
+-9.665876 -2.563363 0
+-50 168.062347 9.72731
+-6.067229027 7.948655651 -49.81920258
+-6.395114 7.687644 -9.675702
+-6.398518 7.684853 -9.674141
+2e-06 -4.368645 -34.457787
+-6.245127479e-05 -9.999809269 -11.4488337
+-0.0002307437223 4.803260132 -5.196823563
+-5.367535 -1.404317 0.000298
+-9.942006448 1.075073189 -44.1929176
+-0.0002035113069 0.5189971898 -0.6024582296
+9.872832 -1.589719 -100
+9.843583 -1.761781 -100
+9.872832 -1.589719 0
+2.899136 -9.570528 0
+-3.065722 9.518474 -50.3905398
+-3.062783393 9.5193919 -50.39055088
+9.8e-05 3.292665 0.000747
+-0.0002251218462 3.878683553 -4.255959577
+-0.000230691008 4.794234694 -5.187640591
+1e-06 -20.681236 5.917307
+0.000104 3.493946 0.000751
+-5.202696202 8.53957442 -50.11114628
+-5.262338 8.503236 -10.094835
+-0.0002240061915 3.702272356 -4.076440415
+-0.0002240061917 3.702272402 -4.076440462
+-8.241172795 -5.663576812 -35.47865098
+-9.326566 3.607656 -100
+-0.0002562602593 9.397495605 -9.481063359
+-0.0002562601734 9.397479862 -9.48104943
+-0.0002562602162 9.397487698 -9.481056363
+-6.219958003 -7.82978515 -31.63134514
+-6.176841 -7.864263 -31.56363178
+-49.999996 116.923843 -69.019081
+-9.305880664 -3.659695691 -38.4708143
+-9.281434 -3.72223 -100
+-9.281434 -3.72223 -38.38434387
+3e-06 9.999809102 -49.99533059
+-3e-06 125.081726 88.386024
+-7.638228282 6.454146866 -48.89293474
+-6.13071559 7.90019839 -49.79328412
+-1.106051367 9.938260355 -50.23366381
+-1.186044 9.929355 -10.247154
+-0.2457384953 9.996604795 -50.05722579
+-0.323315 9.994773 -50.07606452
+-5.627906631e-05 -9.999809231 -13.05638564
+-5.997609 8.001794 -100
+-0.000230743425 4.803210196 -5.19677422
+-9.9927 0.380687 -3.44974
+-9.984918 0.549018 -3.631138
+-2.988421972 9.542628002 -50.39083883
+-0.09093 9.999249 -10.018862
+3e-06 3.702301 -44.076366
+-9.631019072 2.68996458 -45.79425016
+-3e-06 8.22113 85.32592
+9.388106 -3.444336 -100
+9.326566 -3.607656 -100
+-9.843583 1.761781 -44.89140706
+-9.842668086 1.766649916 -44.89627203
+-49.999996 -10.358192 -43.123264
+-9.485033596 -3.166525157 -39.14837157
+-49.999996 23.043835 -70.657768
+-4.562784 -8.898371 -100
+-4.717387 -8.817384 -100
+0.0003 9.178287 -3.955523
+0.0003 9.178152 -3.955278
+-9.196159259 -3.927416488 -38.09899272
+-0.0002035112516 0.5189888572 -0.6024486039
+-3.700139 -0.968861 0.000406
+-0.0002035109124 0.5189373188 -0.6023882597
+0 158.100403 10.598869
+-8.561526917 5.167128486 -47.94029238
+-0.4157402747 9.990975013 -50.0971293
+-3.976773175 -9.174913691 -28.66125082
+4.562784 8.898371 -100
+4.406791 8.976648 0
+-9.797267 -2.001771 -0.667501
+-5.651395 -1.477862 0.000279
+-9.090678342 4.165570847 -47.1190426
+-2.731665 9.619668 -10.389116
+-0.0002041054013 9.999807631 -20.50396887
+2e-06 -7.037468 -30.574627
+-7.633788 6.459319 -8.896276
+-7.811129054 6.2432884 -48.74661871
+-7.965705187 6.045342844 -48.6071645
+0.38344 9.992573 -5.028286
+-9.605503 2.781064 -45.87967285
+-9.621407779 2.72427773 -45.82642499
+-9.786785 -2.053977 -100
+-4.090826 -9.124973 -100
+-50 -30.811729 6.25595
+1.244192 9.922297 0
+1.417172 9.899072 0
+-0.0002562629716 9.397980207 -9.481477255
+-0.0002562625692 9.397908306 -9.481415844
+9.194978 -3.930951 -100
+9.124973 -4.090826 -100
+-0.0002562602597 9.397495668 -9.481063412
+-4.80993 8.767086 -10.207465
+-4.656144 8.849721 -10.237601
+-7.251245924 -6.885684381 -33.40421314
+-7.331037 -6.801169 -100
+-0.0001688690007 -3.072007197 0.0004343289892
+-0.0001658924961 -3.36415362 0.0004167498455
+-7.169183802 6.971462618 -49.23973658
+3e-06 112.075752 -60.272888
+-9.977401 -0.671932 -42.26767831
+-9.973815 0.723194 -3.817934
+-9.984514 0.555354 -3.637934
+-6.82595189 7.307638787 -49.45468187
+-6.814853473 7.318116652 -49.46098827
+-5.997609 8.001794 -49.84762469
+-3.319758329 9.432477673 -50.38390526
+-3.313078166 9.434823425 -50.38415179
+-50.000004 132.721649 95.047333
+-2.131427 -0.55642 0.0005
+-7.331037 -6.801169 0
+-7.448616 -6.67219 0
+-9.262182 3.769877 -46.77828349
+-9.296497332 3.683417845 -46.70294202
+-8.400671 -5.424824 -35.8549337
+0.000234 7.926025 0.000429
+-0.0001648804507 9.999807959 -26.90559984
+-0.0001538367752 9.999808051 -28.60952542
+5.756795 8.176756 -100
+5.613212 8.27598 0
+-9.555504 2.948279 -46.03556538
+-9.581092734 2.862699514 -45.95578054
+-50.000004 2.836983 93.913841
+-9.906224 -1.366281 -41.44555869
+-9.906417092 -1.364792109 -41.44736141
+-4.127337 -1.081178 0.000379
+-0.0002372186231 5.923623667 -6.297815513
+-0.0002372185884 5.923616813 -6.297809009
+-0.0002372185904 5.923617205 -6.29780938
+-49.999996 -15.424171 -36.021023
+-6.447538 -7.643902 -31.99464524
+-6.355949629 -7.719798776 -31.84679161
+8.304716 5.570608 -100
+8.400671 5.424824 -100
+8.304716 5.570608 0
+-0.0002562603051 9.397503789 -9.481070348
+4e-06 27.58374 -61.747704
+-1.175414 9.930538 -10.245371
+-4.516995 8.9217 -100
+-6.136346 7.895901 -49.79098561
+-50 167.895081 7.990038
+-3.930951 -9.194978 -28.61097015
+-5.120739461 8.589328341 -50.13327987
+-5.113075 8.593816 -10.135122
+-5.114643 8.592898 -10.134728
+-2.690357136e-05 -9.99980905 -19.72821949
+-2.148394811 9.766108225 -50.36077597
+-2.104243 -9.776102 -100
+-7.356163514 6.773421525 -49.10898458
+-7.408220969 6.716903776 -49.07131646
+-8.183696436 5.746751086 -48.38615996
+-0.0002127870417 9.999807557 -18.99552339
+-0.0002562647839 9.398304018 -9.48175382
+-0.489793 9.987932 -10.114088
+-9.911974425 1.321076264 -44.4468692
+-9.899072 1.417172 -44.54438483
+-7.895901 -6.136346 -34.69888818
+-8.647378 5.022235 -100
+9.326566 -3.607656 0
+3.065722 -9.518474 -100
+2.899136 -9.570528 -100
+0.032046 9.999896 -3.639367
+0.200214 9.997995 0
+0.025694 9.999967 0
+-7.74976036 6.319793646 -48.8000763
+3.396046 -9.405683 0
+-7.755264 6.313152 -8.795284
+-2.767181 -0.723571 0.000463
+0 -20.886269 7.474646
+1.711171 -9.852507 -100
+1.538961 -9.88087 -100
+-9.709141 -2.394278 -40.16410586
+-9.116582459 -4.108596965 -37.83672993
+-6.880091512 -7.256556544 -32.73353783
+-6.838752 -7.295989 -100
+-49.999996 115.390045 -69.851875
+-3.22851592 9.464469484 -50.38723148
+-0.0002289368317 9.999807418 -16.07481549
+0.000371 9.999811 -9.995333
+-0.0002210583199 9.999807486 -17.51975469
+-3e-06 126.29377 87.386887
+-4.129497367 9.107122078 -50.31899197
+-1.366281 9.906224 -50.27474452
+-1.366281 9.906224 -10.274797
+-1.521182 9.883481 -10.296108
+-9.326566 3.607656 -46.63692205
+-0.0001768105134 -2.289274001 0.0004808403175
+-2.948279 -9.555504 0
+-4.672013 8.841509 -50.23482195
+-0.0001235126124 -7.523772661 0.0001581951928
+9.959674 -0.897152 -100
+9.942501 -1.070836 -100
+-9.931127497 1.168421966 -44.29156905
+-49.999996 -4.692482 -49.75695
+-9.933556029 1.147580162 -44.26954321
+-9.82908255 1.838912733 -44.96847441
+-9.758786549 2.181402078 -45.30896061
+-9.737887 2.274539 -100
+-7.448616 -6.67219 -100
+-7.466659601 -6.651689429 -33.8207396
+-0.0002307436699 4.80325137 -5.196814952
+-0.0002307436509 4.80324819 -5.196811827
+-2.274539 -9.737887 -100
+-2.444142 -9.69671 -100
+-7.089214 -7.052875 -33.10373651
+-7.129694483 -7.011469175 -33.17827584
+-3e-06 9.397575 86.366745
+-7.751570391 6.317608584 -48.79856504
+-7.755264 6.313152 -48.79548325
+-5.756795 -8.176756 -100
+-0.0002035098974 0.5187830872 -0.6022076762
+-0.0002035096503 0.5187455453 -0.6021637199
+8.27598 -5.613212 0
+9.262182 -3.769877 0
+-9.709180556 -2.394111384 -40.16432042
+-7.895901 -6.136346 0
+-7.787604 -6.273214 0
+-0.0002562625467 9.397904292 -9.481412416
+-49.999996 21.495731 -69.851875
+-0.0002372185492 5.923609061 -6.297801652
+-6.838752 -7.295989 -32.66156646
+-0.0002497707444 8.221159525 -8.44032151
+-3.231376 9.46352 -50.38717277
+0 157.94986 9.035325
+-6.082069373 -7.937373266 -31.41883465
+-6.038652 -7.970867 0
+-0.5942086346 -9.982037284 -25.9453855
+-0.723194 -9.973815 -100
+-4.669715043 8.842698172 -50.23523322
+-2.43867 -0.6372 0.000482
+0.0003 9.183615 -3.965111
+0.0003 9.181055 -3.960604
+-9.956433455 0.9299247675 -44.0387873
+-49.999996 -5.871597 -48.470177
+-9.899072 1.417172 -4.544015
+-9.046749 4.260784 -7.200007
+6.273214 -7.787604 0
+6.136346 -7.895901 0
+6.136346 -7.895901 -100
+-9.964154 -0.845957 -100
+-9.977401 -0.671932 -100
+-4.039337 9.147837 -10.330014
+-0.0002035112853 0.5189939694 -0.6024545896
+-0.0002562610666 9.397639847 -9.481186555
+-0.000256261061 9.397638834 -9.48118569
+0.000119 4.006173 0.000758
+0.000118 3.96213 0.000758
+-50 -31.0093 7.990038
+9.446789 -3.279965 -100
+9.502595 -3.114597 0
+9.998893 0.148833 0
+9.999967 -0.025694 0
+-2.658995756 -9.639692945 -27.36670365
+-2.781064 -9.605503 -27.4728474
+-0.733535 -0.188882 0.000575
+-5.987275 8.009399 -9.851478
+-49.999996 -18.159653 -31.557117
+-2.827072089 -9.591746109 -27.51433136
+-2.948279 -9.555504 -27.6236196
+-9.752307 -2.211413 -0.399049
+-6.594698 -1.722262 0.000216
+-6.263687 -1.636501 0.000238
+3e-06 110.695328 -61.0224
+-9.977538046 -0.6695933543 -42.27036305
+-5.570608 8.304716 -100
+-9.34119802 3.568822849 -46.6028635
+-50.000004 134.048798 93.913841
+-2.224467 9.749449 -10.36658
+0.000301 9.196949 -3.988591
+0.000301 9.206537 -4.005475
+-9.811336 1.933306 -45.0627886
+-9.811336 1.933306 -5.062429
+-9.080162 4.188488 -7.13833
+2.224467 -9.749449 0
+-50.000004 4.164124 95.047333
+-0.0002562622221 9.397846298 -9.481362883
+-0.0002562622108 9.397844271 -9.481361153
+-6.408171 7.676936 -9.669714
+-0.0002562611475 9.397654302 -9.481198901
+-6.263323 7.79543 -9.735876
+-6.273214 7.787604 -9.731593
+-6.122756 7.906274 -9.796412
+3e-06 26.190445 -61.0224
+-0.0001976268875 -0.2351196064 0.0005970933812
+-50 167.69751 6.25595
+-4.600617097 8.878442623 -50.24758869
+-4.870554 -8.73371 -29.72332997
+-4.905987549 -8.713542351 -29.76980332
+6.447538 7.643902 -100
+9.052189 -4.249455 -100
+-6.267705943 7.791962109 -49.73410549
+-6.34109714 7.731938711 -49.70059904
+-6.273214 7.787604 -49.73172058
+-0.0002562612395 9.397670727 -9.48121293
+-0.000256261243 9.397671353 -9.481213464
+0 -21.064087 9.035325
+-1.933306 -9.811336 -100
+-3.393261062 9.406661327 -50.38118773
+-3.883647 9.215057 -100
+2.444142 9.69671 0
+-3.396046 9.405683 -100
+-3.231376 9.46352 -100
+0.000107 3.593262 0.000753
+0.000106 3.544768 0.000752
+-9.88087 -1.538961 -41.23556965
+-49.999996 113.841934 -70.657768
+-9.859729282 1.666795714 -44.79600407
+-3e-06 127.488197 86.366745
+-4.962256 8.681776 -10.172674
+-9.69671 2.444142 -45.56284355
+9.518474 3.065722 0
+9.570528 2.899136 0
+9.570528 2.899136 -100
+0.000122 4.093093 0.000758
+-3e-06 10.592003 87.386887
+-0.0002372185511 5.923609433 -6.297802005
+-0.0002372185524 5.923609688 -6.297802248
+-6.921413773 7.217513689 -49.39799195
+-6.928077 7.211223 -100
+-6.865345058 7.270448233 -49.4312886
+-4.879767573e-05 -9.999809185 -14.68665913
+7.295989 -6.838752 -100
+-1.933306 -9.811336 -26.78935532
+-49.999996 19.961926 -69.019081
+-0.549018 -9.984918 -25.92194027
+-0.4197566626 -9.990894516 -25.85887901
+-5.266159 8.500908 -10.093796
+0 157.772034 7.474646
+-4.356269 9.001228 -10.288143
+-4.360604 8.999174 -10.287528
+-7.967513705 6.042998405 -48.60550679
+-7.961688 6.05055 -8.610638
+-7.964904 6.046381 -8.60769
+-9.619668 -2.731665 -39.72669247
+-9.638065144 -2.664657641 -39.81376295
+-5.413754 8.407684 -10.050725
+-8.565605 -2.232899 7.9e-05
+-9.570528 -2.899136 0
+-0.000224006233 3.702278933 -4.076447108
+-9.016492463 4.32380259 -47.2537354
+-9.774098 2.113168 -5.241149
+-9.776102 2.104243 -5.232326
+-3.065722 9.518474 -100
+-0.0001814332468 -1.833104099 0.0005074839585
+-0.0001791811511 -2.055340219 0.0004945511112
+-9.973498992 0.727080721 -43.82247444
+-9.973274 0.729848 -3.825035
+-9.967607066 0.7995612906 -43.89982868
+-3.214169 9.469229 -10.387513
+-3.22621 9.465235 -10.387268
+-50 -31.176582 9.72731
+-0.549018 -9.984918 -100
+4e-06 109.302032 -61.747704
+-0.723194 -9.973815 0
+-9.46352 -3.231376 0
+-5.562504236 8.310050918 -50.00416086
+-7.211223 -6.928077 -33.32839957
+-3.325964038 -9.430366629 -27.98488686
+-3.444336 -9.388106 0
+-3.444336 -9.388106 -28.10327548
+-50.000004 135.355957 92.75737
+-8.815590033 4.720670363 -47.58666885
+-8.813780185 4.723983219 -47.58931363
+0.00015 5.058632 0.000746
+0.00015 5.060307 0.000745
+2.444142 9.69671 -100
+-50.000004 5.510849 96.157486
+0.000205 6.94719 0.000587
+0.000203 6.887244 0.000595
+0.000136 4.589111 0.000756
+0.000135 4.549071 0.000757
+-2.893681 9.572128 -10.391119
+-2.899136 9.570528 -10.391186
+-9.605283 2.781799 -5.880026
+3e-06 24.81002 -60.272888
+-0.5943949754 9.98194284 -50.13640266
+-0.0002562603991 9.39752057 -9.481084681
+-0.374673 -9.992979 -25.83688456
+7.5e-05 2.473235 0.000723
+7.3e-05 2.406308 0.000721
+-0.0001754049074 9.999807872 -25.24554768
+-50 167.469696 4.525575
+-8.2174673 -5.698259854 -35.42380923
+-0.0002372185917 5.923617456 -6.297809619
+-8.267751 5.62512 -8.293679
+-9.619668 -2.731665 0
+-2.484708395 9.686002415 -50.38081199
+-4.870554 -8.73371 -100
+-1.348501 9.908518 -10.27208
+8.7e-05 2.907418 0.000737
+8.6e-05 2.84872 0.000735
+9.999967 -0.025694 -100
+9.997995 -0.200214 -100
+-7.37573449e-05 -9.999809339 -8.296547995
+0.148833 -9.998893 -100
+-9.999425447 0.07364791962 -43.11705494
+3e-06 1.559853 -41.77887
+-9.999931759 0.02883989089 -43.06656125
+0 -21.214638 10.598869
+-0.0002562616098 9.39773689 -9.481269439
+-1.693404 9.855433 -10.317444
+-0.07054897872 -9.999460158 -25.70191309
+0.000165 5.571905 0.000722
+0.000164 5.531755 0.000725
+-49.999996 112.279999 -71.436516
+-5.424824 8.400671 -50.04756986
+-7.291631172 6.843320275 -49.15553025
+-7.487664303 -6.627824548 -33.86288001
+-3e-06 128.664642 85.32592
+-1.88286 9.821142 -10.337978
+-9.359453485 3.520377852 -46.56037539
+-9.354554309 3.533379069 -46.57177797
+-1.452126349 9.893619945 -50.2865576
+-9.999116446 0.1009941694 -43.14680656
+-9.999421 0.074016 -3.117055
+-9.998831407 0.1261937537 -43.17422261
+-5.217217742 -8.53078041 -30.17253058
+-5.320966 -8.466838 -30.31151807
+-2.653439582 9.641145024 -50.38687764
+-2.646862778 9.642951029 -50.38669037
+-0.0002372185104 5.923601385 -6.297794368
+-4.592153 -1.203384 0.000349
+-0.000237218361 5.923571875 -6.297766364
+-0.0002372183533 5.923570356 -6.297764923
+-3e-06 11.80405 88.386024
+-2.899136 9.570528 -100
+-8.001794 -5.997609 -100
+-3.926619807 9.196503443 -50.34197278
+-9.999967 0.025694 -43.06301609
+-9.999353798 -0.07387321157 -42.95029022
+0.000335 9.999811 -5.402313
+-1.704574 9.853594 -10.31881
+-49.999996 18.442886 -68.159653
+2.781064 9.605503 -100
+2.948279 9.555504 -100
+2.781064 9.605503 0
+-8.754655021 -4.832666333 -36.77420453
+-8.758624 -4.825609 -36.78470571
+-9.936620156 -1.120780034 -41.74236238
+-9.947871 -1.019728 -1.863703
+-0.0002035104784 0.51887137 -0.6023110431
+1e-06 157.567017 5.917307
+-8.817384 4.717387 -47.58404769
+-1.869852453 -9.823265378 -26.74409956
+-1.807574936 -9.83497366 -26.69811178
+-0.000170632609 -2.898907545 0.0004446796731
+0.000177 5.988952 0.000693
+0.000176 5.945618 0.000696
+-0.0002103871564 1.559797415 -1.77888877
+-6.659685 7.459622 -9.544603
+-6.541175 7.563929 -9.605245
+-0.0002172195207 2.621022863 -2.937023232
+-9.872832 1.589719 -4.718222
+-9.998687699 -0.1575065508 -42.85555843
+-9.998910646 -0.1458861297 -42.86876028
+-50 -31.313522 11.467237
+-0.0002240061526 3.702266213 -4.076434164
+-9.602557 2.79091 -5.888521
+-0.0002240061547 3.702266547 -4.076434504
+-6.965043 -7.175524 0
+-8.326046176 5.537991222 -48.22730222
+-8.27598 5.613212 -8.284648
+-4.287861386 9.033640972 -50.29788391
+-9.810301923 1.938322462 -45.06777443
+9.928559 1.193185 -100
+9.947871 1.019728 -100
+9.928559 1.193185 0
+0.000254 8.599451 0.0003
+0.00025 8.471066 0.000326
+-9.852507 -1.711171 -1.02476
+4e-06 107.896286 -62.448578
+-8.113194222 -5.845843254 -35.18099312
+-6.176841 -7.864263 -100
+-8.789182493 -4.76898039 -36.86854459
+-50.000004 136.642731 91.578255
+-49.999996 -16.361923 -34.549046
+-0.0001292123542 9.99980825 -32.16017042
+6.408171 -7.676936 0
+-9.192212757 3.937266179 -46.92315762
+-9.842004 1.770184 -4.89944
+0.000134 4.508845 0.000757
+-50.000004 6.87674 97.243965
+0.671932 -9.977401 0
+-7.284955 6.85032 -9.159956
+-7.288203 6.846914 -9.157717
+-9.230701475 3.845329969 -46.84360405
+-9.194978 3.930951 -6.917435
+-4.43836957 8.960650291 -50.27512857
+7.676936 6.408171 -100
+7.787604 6.273214 -100
+7.676936 6.408171 0
+3e-06 23.442886 -59.499397
+-9.215057 -3.883647 -100
+-8.604778093 5.094133149 -47.88294744
+-8.999174 -4.360604 -37.46973717
+-0.625698 -0.160529 0.000581
+-6.667080901 7.45311261 -49.54096258
+-6.663031 7.456677 -9.542892
+-8.228017761 5.682616283 -48.33751835
+-50 167.211731 2.799438
+-8.814221 4.723176 -7.588409
+-8.817384 4.717387 -7.583787
+-0.0002432252546 7.063027087 -7.379074966
+-0.0002432252078 7.063018989 -7.379067546
+-9.101100976 -4.142800182 -37.78706949
+-3.477246586 9.375560274 -50.37671367
+-3.503781 9.365717 -10.375267
+-3.542706 9.351277 -10.373169
+-0.0002432251099 7.063002039 -7.379052013
+-0.0002432251069 7.063001526 -7.379051543
+5.424824 -8.400671 -100
+5.277384 -8.494069 -100
+5.424824 -8.400671 0
+-9.67677 -2.520787 0
+-9.544109 -2.486416 9e-06
+-9.928559 -1.193185 -100
+-9.709141 -2.394278 -100
+-3.554781 9.346798 -10.372519
+0 -21.337875 12.164804
+8.2e-05 2.728183 0.000732
+8e-05 2.666253 0.00073
+-7.700874228 6.378786945 -48.84087311
+-6.622066692 -7.49276747 -32.28622325
+-6.710379 -7.414231 -100
+-6.710379 -7.414231 -32.43687793
+0.000213 7.203997 0.00055
+0.000211 7.13699 0.00056
+-0.0002035105381 0.5188804478 -0.6023216719
+-0.0002172194159 2.62100654 -2.937005916
+-0.0002172193828 2.621001312 -2.93700021
+-0.000217219388 2.621002131 -2.937001105
+-6.665214426 7.454755398 -49.54191759
+9.973815 -0.723194 0
+-49.999996 110.704712 -72.187889
+-4.205340882e-05 9.999808876 -44.1977228
+-3e-06 129.822739 84.264717
+-0.0002562614656 9.397711134 -9.481247441
+-0.0001743110826 -2.535917021 0.0004662846852
+-0.0001716713905 -2.796400952 0.0004508091673
+-8.271339951 5.61992651 -48.28997256
+-8.27598 5.613212 -48.28488006
+-2.994293539 -9.540865877 -27.66660215
+5.857047 -8.105246 0
+5.714698 -8.206232 0
+-7.563929 -6.541175 0
+0.000298 9.99981 -0.490231
+-3e-06 13.033352 89.363853
+-8.731747867 4.874000623 -47.70905713
+-8.730247 4.876637 -7.710889
+-0.0002562671168 9.398720825 -9.482109813
+-0.323315 9.994773 -10.076151
+-6.038652 -7.970867 -100
+8.898371 -4.562784 0
+8.817384 -4.717387 0
+9.997995 -0.200214 0
+-49.999996 16.939079 -67.273842
+9.992979 -0.374673 -100
+1e-06 157.334839 4.363785
+-0.0002103871557 1.559797298 -1.778888637
+-2.781064 -9.605503 0
+-0.0002497705193 8.22111993 -8.440286478
+-0.0002497705723 8.221129263 -8.440294736
+-5.703971 8.213563 -9.956467
+-9.665876 -2.563363 -39.9453869
+-0.4103394826 9.99119764 -50.09589899
+-7.171005434 6.969618055 -49.23854048
+-7.175524 6.965043 -49.2355739
+-3.505188233 -9.365176497 -28.16618079
+0.000143 4.826258 0.000752
+0.000142 4.787031 0.000753
+-0.520434 -0.132852 0.000586
+-5.613212 -8.27598 0
+-0.417625 -0.105821 0.000591
+-8.270968 5.620463 -8.290147
+-50 -31.420067 13.209288
+9.964154 0.845957 -100
+9.977401 0.671932 -100
+9.964154 0.845957 0
+-2.315219694 9.727906926 -50.3720251
+-8.823300745 4.706091756 -47.57496025
+-9.652526 2.613179 -5.721915
+-0.0002240061136 3.702260042 -4.076427884
+-6.67219 7.448616 -100
+4e-06 106.478531 -63.124817
+-5.11986937 8.589837744 -50.13349821
+-5.12834 8.584878 -100
+-50.000004 137.908722 90.376869
+-8.273153906 5.617300589 -48.28798079
+-5.277384 8.494069 -10.090742
+-9.774943866 2.109400859 -45.23778132
+6.408171 -7.676936 -100
+6.273214 -7.787604 -100
+-5.657413003 -8.245434599 -30.78428697
+-5.756795 -8.176756 -30.92908363
+-6.038652 -7.970867 -31.35249928
+-50.000004 8.261383 98.306435
+-7.676936 -6.408171 -100
+3.279965 9.446789 0
+3.444336 9.388106 -100
+-9.786908699 -2.053361495 -40.60212087
+-9.786785 -2.053977 -40.60133532
+3e-06 22.089458 -58.702171
+-9.652575 2.613003 -5.72175
+-50 166.92366 1.078066
+-9.194978 3.930951 -100
+-5.277384 8.494069 -50.09083042
+-9.375664253 3.47735636 -46.52264364
+-9.385817102 3.450411879 -46.49812168
+-9.502595 3.114597 -46.18971481
+5.997609 -8.001794 -100
+5.857047 -8.105246 -100
+-0.0002497702152 8.221066453 -8.440239166
+0.497698 -9.987607 -100
+0.000125 4.220829 0.000759
+-0.000224006259 3.702283032 -4.076451279
+-0.0002240059884 3.702240067 -4.076407241
+-2.71418 9.624469 -10.388618
+-49.999996 -7.028069 -47.163017
+0 -21.433769 13.732651
+9.052189 -4.249455 0
+-49.999996 109.116547 -72.911659
+-3e-06 130.962143 83.183472
+-2.150141348 -9.765802255 -26.95209966
+-5.277384 8.494069 -100
+-8.64524405 5.025836677 -47.82929363
+-8.647378 5.022235 -47.82646413
+-0.0002562604478 9.397529282 -9.481092122
+0.000121 4.04982 0.000758
+7.052875 -7.089214 -100
+6.928077 -7.211223 -100
+-3e-06 14.279533 90.320084
+0.000175 5.902716 0.000699
+7.643902 -6.447538 -100
+7.530214 -6.579959 -100
+7.643902 -6.447538 0
+-0.9425431262 -9.955185954 -26.13431647
+-1.070836 -9.942501 -26.20884147
+-9.665876 -2.563363 -100
+-49.999996 15.450958 -66.361923
+9.605503 -2.781064 0
+-8.892324 4.574324 -7.464832
+1e-06 157.075592 2.81455
+-7.970867 6.038652 -48.60243364
+-9.86416735 -1.640372834 -41.11168869
+-9.852680394 -1.71011753 -41.02649116
+-9.388106 3.444336 -6.492276
+-5.849205165 8.110809738 -49.9044452
+-5.857047 8.105246 -100
+-5.785975471 8.15566649 -49.92724681
+-8.372684 5.467923 -48.17366873
+-1.784914571 -9.839233848 -26.68137861
+-49.999996 -19.019081 -30.038078
+-7.755264 6.313152 -100
+9.215057 3.883647 0
+9.215057 3.883647 -100
+-4.969146738 8.677900266 -50.17116184
+-5.052808754 8.629107269 -50.15033374
+-4.043881 9.145875 -100
+0.000141 4.747704 0.000754
+-0.0002497704661 8.221110576 -8.440278203
+-0.0002497704956 8.22111576 -8.44028279
+2.613003 9.652575 0
+2.613003 9.652575 -100
+-50 -31.496193 14.952934
+-0.0002432251598 7.063010684 -7.379059935
+-7.295989 6.838752 -9.152349
+-7.403501 6.722028 -9.074549
+3.231376 -9.46352 -100
+-8.894937671 4.569336112 -47.46093734
+4e-06 105.049179 -63.776207
+-2.731665 9.619668 -100
+-0.0002307434539 4.803215153 -5.196779265
+-0.0002307434701 4.803217928 -5.196782088
+-50.000004 139.153564 89.153564
+-9.027240464 -4.301369684 -37.55615317
+0.557342 9.984386 -4.779279
+4.870554 8.73371 -100
+-50.000004 9.66436 99.344589
+-7.295989 6.838752 -49.15252628
+-7.04124 7.100588 -9.323186
+-0.000243225059 7.06299324 -7.37904395
+-0.897152 -9.959674 0
+-5.70672301 8.211682049 -49.95564232
+-5.708736071 8.210306475 -49.95496286
+-0.0002432252046 7.063018439 -7.379067042
+-7.089214 -7.052875 0
+3e-06 20.750153 -57.881439
+-50 166.605606 -0.638016
+-4.200423815 9.075018471 -50.310227
+-9.994883 -0.318653 -2.671847
+-0.0002035106327 0.5188948197 -0.6023384994
+-0.0002562607747 9.397587692 -9.481142009
+-0.0002562607792 9.397588492 -9.481142692
+-0.0001894271329 -1.044269604 0.0005525530134
+-3.930951 -9.194978 0
+-4.406791 -8.976648 -100
+-9.257621 3.78081 -6.787452
+-8.077209743 5.895595617 -48.49804855
+-8.07504 5.898622 -8.500099
+-8.07504 5.898622 -48.50032226
+7.970867 -6.038652 0
+7.864263 -6.176841 0
+0 -21.502289 15.301931
+-9.954701677 -0.9468304864 -41.95010928
+-9.948175 -1.016482 -1.867597
+-8.997890878 4.362547224 -47.28659391
+-8.975178721 4.409719327 -47.3265815
+-8.976648 4.406791 -47.32411582
+9.073906 4.202882 -100
+-49.999996 107.515999 -73.607597
+-2.613003 -9.652575 -27.32671092
+-9.984918 0.549018 -43.63153404
+-9.989469879 0.4505571494 -43.52543071
+-0.0002432251554 7.063009922 -7.379059237
+-0.0002432251585 7.063010454 -7.379059724
+-3e-06 132.082489 82.082497
+-0.0001413905587 9.999808151 -30.36006668
+5.172388 8.55841 0
+-4.966233 8.67954 -10.171758
+-4.977731 8.673072 -10.169106
+2.274539 9.737887 -100
+-0.0001949948894 9.999807708 -22.04703613
+-8.647378 5.022235 -7.826213
+-5.714698 8.206232 -49.95295009
+-0.0002432252592 7.063027887 -7.379075699
+-7.164188 6.976521 -9.242845
+-3e-06 15.542213 91.254417
+-7.293100386 6.841780539 -49.15451788
+-2.613003 -9.652575 -100
+-2.781064 -9.605503 -100
+-9.921705968 1.248595651 -44.37331758
+-9.927409772 1.200327685 -44.32411069
+-9.922297 1.244192 -44.3688488
+0.000202 6.828773 0.000603
+-49.999996 13.978981 -65.424171
+-5.365601281 -8.438240585 -30.37302153
+-5.320966 -8.466838 -100
+-9.958985 0.904118 -4.01099
+-9.956397 0.930292 -4.038787
+-9.959674 0.897152 -100
+-9.959674 0.897152 -44.0039815
+1e-06 156.789337 1.270077
+2.394278 -9.709141 -100
+-0.0002562611445 9.397653751 -9.48119843
+-8.827816 4.697472 -7.567764
+1.88286 -9.821142 -100
+-5.842944 8.115252 -9.906592
+-5.846508 8.112723 -9.905307
+3.396046 -9.405683 -100
+-0.897152 -9.959674 -26.10794889
+-50 -31.541885 16.697643
+-4.838886 -1.267349 0.000333
+-8.758624 -4.825609 0
+-1.193215 -0.309744 0.000552
+-1.315942 -0.342011 0.000545
+4e-06 103.608688 -64.40255
+-0.0001557751392 -4.35718051 0.0003562690863
+-1.761781 -9.843583 0
+-50.000004 140.376862 87.908722
+0.000117 3.917675 0.000757
+0.000115 3.872789 0.000757
+-9.190129 3.942025 -6.926958
+-1.624534285 9.866775948 -50.30897522
+-1.538961 9.88087 -100
+-2.563363 9.665876 -100
+-9.947871 -1.019728 -41.86414314
+-3.060414 9.520132 -10.390556
+4.825609 -8.758624 -100
+4.672013 -8.841509 -100
+-9.942501 1.070836 -44.18843994
+-2.881733 9.575633 -10.39097
+-50.000004 11.085243 100.358093
+0.549018 9.984918 0
+-0.671932 9.977401 -50.1529164
+-1.070836 -9.942501 -100
+-9.555274278 2.948999753 -46.03623328
+-0.000203510874 0.5189314774 -0.6023814203
+-2.940228 -0.769068 0.000453
+-3.119622 -0.816234 0.000442
+3e-06 19.425373 -57.037468
+-50 166.257645 -2.348284
+-0.0001593655525 -4.004778534 0.0003778501303
+-9.994773 -0.323315 -42.66696352
+-9.994837794 -0.3205689081 -42.67008699
+4.516995 -8.9217 0
+4.360604 -8.999174 0
+4.360604 -8.999174 -100
+-9.947871 -1.019728 -100
+5.6e-05 1.815202 0.000697
+5.3e-05 1.733217 0.000694
+3.55968 -9.34498 -100
+-5.570608 8.304716 -50.00160488
+5.1e-05 1.649139 0.00069
+4.8e-05 1.562863 0.000686
+0 -21.543404 16.872169
+-3.647041493 9.310827761 -50.36608406
+-3.55968 9.34498 -100
+7.787604 6.273214 0
+-5.642685221 8.255451205 -49.97726592
+-5.714698 8.206232 -100
+0.000277 9.388021 0.000135
+0.000283 9.585105 9.2e-05
+-49.999996 105.903549 -74.275497
+-3e-06 133.183472 80.962143
+9.619668 2.731665 0
+-5.122031281 8.588572005 -50.13295568
+-5.12834 8.584878 -50.13137212
+-9.852507 -1.711171 -100
+-5.269031875 8.499157657 -50.09310221
+-9.582526773 2.857901196 -45.95130693
+-9.60380902 2.786725549 -45.88495073
+-3e-06 16.821007 92.166573
+5.756795 8.176756 0
+-1.019728 9.947871 -50.21916839
+-49.999996 12.523598 -64.460869
+1e-06 156.476166 -0.269165
+-9.941652 1.07811 -4.195739
+-1.761781 -9.843583 -26.66429614
+-0.0002432252091 7.063019219 -7.379067757
+-8.27598 5.613212 -100
+-7.473356146 6.643893947 -49.02208352
+5.022235 8.647378 0
+5.172388 8.55841 -100
+-5.559704 8.311894 -10.004944
+-5.700349 8.216038 -9.957689
+-5.570608 8.304716 -10.001505
+-50 -31.557114 18.442884
+-0.549018 -9.984918 0
+0.897152 9.959674 -100
+-0.0002432248716 7.062960703 -7.379013996
+1e-06 -18.883728 -3.330084
+4e-06 102.157478 -65.003662
+-9.443063 3.290405 -6.351312
+-9.445985 3.282218 -6.343815
+-0.0002432251112 7.06300227 -7.379052225
+-50.000004 141.578247 86.642723
+-7.643902 6.447538 -8.888225
+-6.752113161 -7.375790435 -32.51007716
+-4.811144 8.766431 -10.207225
+-6.313152 -7.755264 -31.77770222
+-6.73732027 7.389241903 -49.50321072
+-6.801169 7.331037 -100
+-9.605376498 2.781486632 -45.88006683
+-0.148833 9.998893 -10.033785
+-50.000004 12.523598 101.346642
+-5.942323733 -8.042528819 -31.20883615
+6.7e-05 2.19694 0.000713
+0.000163 5.491803 0.000727
+-9.942501 1.070836 -100
+3e-06 18.115524 -56.170494
+1.070836 9.942501 -100
+1.244192 9.922297 -100
+1.070836 9.942501 0
+-5.271152935 8.49786537 -50.09252528
+-50 165.879883 -4.052221
+-1.073767 -0.278338 0.000558
+-6.313152 -7.755264 0
+-0.897152 -9.959674 -100
+-9.731147414 2.302300408 -45.42833091
+-0.0002035108878 0.518933574 -0.6023838751
+-4.817587518 8.762953326 -50.20593955
+-9.215057 -3.883647 0
+9.977401 0.671932 0
+5.997609 -8.001794 0
+1e-06 -18.49044 -4.850828
+1e-06 -18.070663 -6.364475
+9.987607 0.497698 0
+9.987607 0.497698 -100
+0 -21.557114 18.442886
+-9.987711408 -0.4951550406 -42.4706013
+9.994773 0.323315 0
+-49.999996 104.279678 -74.915154
+-7.410036861 6.714932733 -49.0700029
+-7.414231 6.710379 -49.06696785
+-3e-06 134.264709 79.822739
+9.922297 -1.244192 0
+9.922297 -1.244192 -100
+-9.88087 -1.538961 -100
+-3e-06 18.115524 93.056267
+0.000217 7.344504 0.000528
+0.000215 7.273113 0.000539
+6.541175 -7.563929 0
+-5.857047 8.105246 -49.90161684
+-5.857047 8.105246 -9.901505
+-49.999996 11.085243 -63.472321
+-9.014022 4.32895 -7.25782
+-0.0002307436879 4.803254387 -5.196817916
+1e-06 156.1362 -1.802708
+-0.0002035112797 0.5189931176 -0.6024535922
+0.000221 7.494859 0.000504
+0.000223 7.574248 0.00049
+-1.417172 -9.899072 -26.42626157
+-7.175524 6.965043 -9.235402
+-9.387517181 3.445898745 -46.49401417
+-9.997995 0.200214 -43.25475367
+9.947871 1.019728 0
+-9.872029599 1.594437095 -44.72332733
+-9.871449 1.597851 -4.72639
+-50 -31.541885 20.188126
+-5.851186892 8.109403512 -49.90373026
+-0.0001912076917 -0.8685644945 0.0005623876059
+-6.489998935 -7.607447821 -32.06510677
+-6.447538 -7.643902 0
+4e-06 100.695999 -65.579353
+-2.948279 -9.555504 -100
+-3.114597 -9.502595 -100
+-50.000004 142.75737 85.355949
+-8.466838 5.320966 -100
+-8.038013918 -5.948396378 -35.01132708
+-8.105246 -5.857047 -35.16254871
+-0.0002307436284 4.803244418 -5.19680812
+-0.0002372183973 5.923579048 -6.297773171
+-8.727049 4.882256 -7.71534
+-0.0002372183987 5.923579323 -6.297773432
+-9.749449 -2.224467 -100
+7.755264 -6.313152 0
+-50.000004 13.978981 102.309944
+0.323315 -9.994773 -100
+-4.202882 9.073906 -100
+-1.796451113 9.836927091 -50.32869726
+-1.711171 9.852507 -100
+-1.711171 9.852507 -50.31957447
+3e-06 16.821007 -55.2808
+-0.0002035109006 0.5189355154 -0.6023861483
+-5.564550315 8.308703716 -50.00351532
+-50 165.472458 -5.749306
+9.46352 3.231376 0
+9.518474 3.065722 -100
+-8.643608 5.028598 -7.831212
+-8.55841 5.172388 -47.94442408
+8.55841 -5.172388 0
+0.000133 4.46842 0.000758
+-2.557602 9.667351 -10.384067
+-0 -21.543404 20.013603
+-0.0002562607178 9.397577528 -9.481133328
+-3.37895 9.411687 -10.381701
+7.755264 -6.313152 -100
+-7.406743 6.718509 -9.072204
+-49.999996 102.644897 -75.526375
+-3e-06 135.325928 78.664642
+-0.0001854352653 9.999807788 -23.62682093
+0.000151 5.099229 0.000744
+0.000151 5.084531 0.000745
+0.000179 6.04259 0.000688
+0.000178 6.032749 0.000689
+-0.0002435788019 9.99980729 -13.27061776
+-0.0002000462409 0.003621738515 0.00060997457
+-0.0002000493912 0.003932608919 0.0006099929619
+-3e-06 19.425373 93.923241
+0.000197 6.661287 0.000624
+5.714698 -8.206232 -100
+-9.998696 -0.157139 -2.855559
+4.6e-05 1.47428 0.000682
+4.3e-05 1.383272 0.000678
+-49.999996 9.66436 -62.458817
+0.200214 9.997995 -100
+0.374673 9.992979 -100
+-5.114966559 8.592708744 -50.13472906
+1e-06 155.769501 -3.330084
+-0.0002019327238 0.2791482263 -0.3216288897
+-6.801169 7.331037 -9.468616
+-6.825686 7.307889 -9.454682
+-9.073906 -4.202882 -100
+-9.145875 -4.043881 -100
+-5.829507238 -8.124607975 -31.03800526
+8.584878 5.12834 -100
+4.202882 -9.073906 -100
+-2.656543342 9.640292957 -50.38696622
+-2.731665 9.619668 -50.38910836
+-6.541175 7.563929 -100
+0.497698 -9.987607 0
+-50 -31.496193 21.932835
+7.7e-05 2.538831 0.000725
+-0.0002240060361 3.702247777 -4.076415367
+-7.414231 6.710379 -100
+-5.846195568e-05 9.999808794 -42.02412697
+-6.678575587e-05 9.999808753 -40.90287033
+-1.289136672 9.916178121 -50.26295661
+4e-06 99.224701 -66.129448
+-6.923255795 7.215774436 -49.39689788
+-6.928077 7.211223 -49.39403503
+-50.000004 143.913849 84.04879
+0.000144 4.864045 0.000751
+0.000144 4.865399 0.000751
+-9.419553739 3.356252918 -46.41193101
+-0.0001519352614 -4.73406761 0.0003330620055
+1.9e-05 0.550932 0.000638
+-5.898622 -8.07504 -100
+9.709141 2.394278 0
+9.749449 2.224467 0
+-50.000004 15.450958 103.247696
+0.000168 5.693738 0.000715
+-3.391016 9.40745 -10.381255
+3e-06 15.542213 -54.368645
+0.000132 4.42778 0.000758
+-8.024463102 5.966606634 -48.55089264
+-8.022896048 5.968713115 -48.55245956
+-50 165.035461 -7.43902
+-5.067244182 -8.620709356 -29.97554608
+-1.967826947 9.804082477 -50.3457184
+-2.047726 9.788041 -10.353062
+-0 -21.502289 21.583841
+-6.710379 -7.414231 0
+-7.71491771 -6.361853206 -34.32040865
+-7.676936 -6.408171 -34.24239271
+-9.906224 -1.366281 -100
+-0.0002562611537 9.3976554 -9.481199838
+-49.999996 100.999702 -76.108971
+-3e-06 136.366745 77.488197
+-9.34498 -3.55968 -100
+-8.466838 5.320966 -8.059929
+-0.0002035112802 0.5189931922 -0.6024536796
+9.665876 2.563363 0
+-9.050878008 4.252185665 -47.19299907
+-9.049885 4.254254 -7.194469
+-3e-06 20.750153 94.767212
+-8.758624 -4.825609 -100
+-2.224467 9.749449 -50.36655517
+-5.951461229 -8.03573113 -31.22290754
+-8.466838 5.320966 -48.06017148
+8.07504 -5.898622 0
+-49.999996 8.261383 -61.420662
+-9.073906 -4.202882 0
+-9.073906 -4.202882 -37.6998353
+1e-06 155.376221 -4.850828
+-0.0002562606729 9.397569497 -9.48112647
+-0.0002497706854 8.22114915 -8.440312331
+9.994773 0.323315 -100
+-2.444142 -9.69671 -27.18524526
+-4.816914303 8.763316552 -50.20608114
+0.000104 3.495668 0.000751
+-50 -31.420067 23.676479
+-8.022676 5.969009 -8.55246
+-8.55841 5.172388 -100
+0.000301 9.194935 -3.985045
+4e-06 97.744019 -66.653786
+-3.444336 -9.388106 -100
+-50.000004 145.047333 82.721649
+5.898622 8.07504 0
+-0.0002497706281 8.221139073 -8.440303415
+-0.0002497706295 8.221139321 -8.440303635
+-9.994773 -0.323315 -2.666544
+-3.719585764 9.282467882 -50.36094205
+-50.000004 16.939079 104.159615
+3.72223 -9.281434 0
+3.55968 -9.34498 0
+-8.000001806 5.999488239 -48.57444961
+3e-06 14.279533 -53.434311
+7.331037 6.801169 0
+-50 164.569061 -9.120852
+-6.928077 7.211223 -9.393873
+-7.890998635e-05 -9.99980937 -6.749293515
+-0.0002103871256 1.559792628 -1.778883358
+-4.672013 8.841509 -10.234761
+4.672013 -8.841509 0
+-0 -21.433769 23.153122
+0.000189 6.403917 0.000653
+0.000188 6.355132 0.000659
+-3.49912 -0.91601 0.000418
+-0.000107597261 -9.077988063 5.9149161e-05
+-0.374673 -9.992979 0
+-49.999996 99.344589 -76.662766
+1.5e-05 0.431286 0.000632
+-9.786992 -2.052947 -0.602189
+-3e-06 137.386887 76.29377
+-4.444917176 8.957406966 -50.27408057
+-4.594119013 8.881805287 -50.24875164
+-1.88286 9.821142 -100
+-9.969738229 -0.7726030459 -42.15157699
+-3e-06 22.089458 95.587944
+-3.279965 -9.446789 -100
+-7.676936 -6.408171 0
+-9.749592 -2.223814 -0.383152
+-49.999996 6.87674 -60.358192
+1e-06 154.956436 -6.364475
+-3.065722 9.518474 -10.390535
+-9.716510571 2.362586131 -45.48550161
+-9.719162018 2.351666779 -45.47514657
+-9.552306 2.958332 -6.044556
+-9.502595 3.114597 -6.189391
+-0.0002562605498 9.39754751 -9.48110769
+-6.788948 7.342177 -9.475209
+-6.794347695 7.337254932 -49.47244468
+0.000173 5.860217 0.000703
+-50 -31.313522 25.418531
+-9.052189 4.249455 -7.1904
+7.895901 6.136346 -100
+-1.630723322 9.865757001 -50.30973272
+-9.95657618 -0.9268338099 -41.97327729
+4e-06 96.254417 -67.152199
+-50.000004 146.157486 81.374924
+-0.0001278400969 -7.099026778 0.0001851138935
+-5.949706 -1.555151 0.000259
+-50.000004 18.442886 105.045425
+-8.554329 5.17901 -7.949337
+6.801169 -7.331037 -100
+6.928077 -7.211223 0
+3e-06 13.033352 -52.478081
+-3.72223 9.281434 -10.360727
+-9.368469793 -3.496359756 -38.69626388
+-9.405683 -3.396046 -100
+-50 164.073364 -10.794287
+-8.66142899 -4.997613781 -36.51994777
+0.000149 5.021384 0.000747
+-9.872832 1.589719 -44.7185886
+-9.996534327 -0.248720725 -42.75180907
+-3.607656 -9.326566 0
+-5.613212 -8.27598 -30.7198874
+-0.0001835760294 -1.621654937 0.0005196992493
+-0 -21.337875 24.72097
+0.000295 9.99981 0
+-1.88286 9.821142 -50.33794169
+-49.999996 97.680054 -77.187592
+-2e-06 138.386017 75.081726
+-2.613003 -9.652575 0
+0.000266 9.03826 0.00021
+-9.88087 -1.538961 -1.235126
+-9.852798 -1.709403 -1.02692
+-3e-06 23.442886 96.38517
+-0.0002372184367 5.923586822 -6.297780548
+-0.0002372184311 5.923585713 -6.297779496
+-9.145875 -4.043881 0
+-7.314071 -1.908643 0.000166
+-0.0001856177234 -1.420181145 0.000531250742
+-6.579959 -7.530214 0
+-49.999996 5.510849 -59.271713
+8.55841 -5.172388 -100
+1e-06 154.510315 -7.870567
+-9.942501 1.070836 -4.188052
+-9.992979 0.374673 -43.44365676
+-8.105246 -5.857047 -100
+-8.206232 -5.714698 -100
+-7.524370929 6.586529092 -48.98335633
+2.053977 -9.786785 -100
+2.053977 -9.786785 0
+-50 -31.176582 27.158459
+6e-05 1.973274 0.000704
+5.8e-05 1.89519 0.000701
+4e-06 94.75634 -67.624542
+-1.366281 9.906224 -100
+-50.000004 147.243958 80.009033
+9.821142 1.88286 0
+-50.000004 19.961926 105.904854
+-7.175524 6.965043 -100
+-0.000203510859 0.5189292058 -0.6023787606
+-9.446789 3.279965 -6.341752
+-7.787604 -6.273214 -34.46970916
+3e-06 11.80405 -51.500252
+-9.555104 2.949534 -6.036401
+-9.589984807 -2.832826458 -39.59464139
+-9.570528 -2.899136 -100
+-9.619668 -2.731665 -100
+0.000192 6.504005 0.000642
+0.000191 6.453524 0.000648
+-3.490311891 -9.370781996 -28.15080254
+-50 163.548538 -12.458815
+-1.806281901 9.835131668 -50.3297494
+-7.51979 6.59168 -8.986646
+-0.0002595116037 9.999807147 -9.995495512
+-0 -21.214638 26.286903
+-0.000162730899 -3.674467008 0.0003979641561
+-49.999996 96.006622 -77.683281
+-4.977731 8.673072 -100
+-0.0001433906041 -5.572732483 0.0002810101716
+-2e-06 139.363861 73.852417
+-3e-06 24.81002 97.158661
+-0.0002514777511 8.521399494 -8.705953349
+-8.122426 -2.118077 0.00011
+6.801169 -7.331037 0
+6.67219 -7.448616 0
+6.67219 -7.448616 -100
+-49.999996 4.164124 -58.16156
+8.206232 5.714698 -100
+-9.915501226 -1.294390161 -41.53258855
+1e-06 154.037964 -9.368643
+-0.0002240061567 3.702266854 -4.076434816
+-1.876438 9.822315 -10.337291
+9.811336 -1.933306 -100
+-50 -31.0093 28.895731
+9.709141 2.394278 -100
+-0.0002307435843 4.803237034 -5.196800863
+-0.0002307435461 4.803230636 -5.196794576
+4e-06 93.250244 -68.070663
+-9.605503 2.781064 -100
+-50.000004 148.306427 78.62439
+-5.172388 -8.55841 -100
+-9.998923 -0.143823 -2.870679
+-9.695291968 2.449565108 -45.56795753
+-8.88874941e-05 9.999808576 -37.89074798
+-1.802724292 9.835781477 -50.32936871
+-50.000004 21.495731 106.737648
+-9.387077 3.447067 -6.494762
+-9.400101 3.41074 -6.46151
+-9.555504 2.948279 -100
+-50 162.994751 -14.113934
+9.194978 -3.930951 0
+9.124973 -4.090826 0
+-9.605503 2.781064 -5.879342
+-9.959272097 0.9012153631 -44.00829689
+9.992979 -0.374673 0
+-0 -21.064087 27.850449
+-49.999996 94.324791 -78.149696
+-2.981778588 9.544705167 -50.39086564
+-2e-06 140.320084 72.606239
+-4.971352852 8.676659916 -50.17065358
+1.711171 -9.852507 0
+-0.0001029967738 9.999808463 -35.92196086
+-3e-06 26.190445 97.908173
+9.852507 1.711171 -100
+6.710379 7.414231 0
+6.838752 7.295989 0
+6.838752 7.295989 -100
+-6.607243719 7.505778381 -49.57157888
+0.000194 6.57608 0.000634
+0.000194 6.555418 0.000636
+7.864263 -6.176841 -100
+1e-06 153.539551 -10.858248
+0.000161 5.452029 0.000729
+0.000162 5.466427 0.000728
+-9.987784 -0.493387 -2.4722
+0.000167 5.652875 0.000718
+0.000166 5.612272 0.00072
+-3.640359329 9.313439608 -50.36655733
+-3.55968 9.34498 -10.372255
+0.00024 8.127215 0.000392
+0.000237 8.024174 0.000411
+-2.814746502 9.595289092 -50.39013781
+-50 -30.811729 30.629818
+9.262182 -3.769877 -100
+4e-06 91.736603 -68.49044
+-5.172388 -8.55841 -30.11247392
+-0.838438 9.964726 -10.185954
+-6.67219 7.448616 -49.53834861
+-50.000004 149.344589 77.221405
+8.673072 4.977731 -100
+-4.977731 8.673072 -50.16918241
+-5.822892 -1.522295 0.000268
+-9.797194577 -2.00213209 -40.66750104
+3.2e-05 0.992358 0.00066
+2.9e-05 0.88717 0.000655
+-50.000004 23.043835 107.543541
+-4.514646622 8.922863935 -50.26291731
+-50 162.41214 -15.759132
+-9.193217 3.934973 -6.920894
+5.022235 8.647378 -100
+-9.326566 3.607656 -6.636622
+-1.308017952e-06 -9.999808893 -25.02942272
+-0.0002364385942 9.999807352 -14.65898056
+-8.976648 4.406791 -7.323837
+-3.483932097 9.373080406 -50.37635399
+0.000301 9.191033 -3.978174
+-8.640408 5.034001 -7.835457
+-0 -20.886269 29.411127
+-0.664221 9.977853 -10.15135
+-49.999996 92.635078 -78.586685
+-2e-06 141.254425 71.343559
+-0.0002307436255 4.803243931 -5.196807642
+-0.0002307436266 4.803244123 -5.19680783
+-4e-06 27.58374 98.633476
+1e-06 153.015228 -12.338926
+-0.0002307435871 4.803237508 -5.19680133
+-0.0002307434114 4.803207878 -5.196771861
+-0.0002307435853 4.803237206 -5.196801033
+9.405683 3.396046 -100
+-9.992815581 0.3781955904 -43.4474526
+-3.305774 -0.865176 0.00043
+-0.0001990781467 -0.09190959773 0.0006047560312
+-0.0002432252067 7.063018804 -7.379067376
+-50 -30.583923 32.360195
+-9.325302 3.610841 -6.639398
+-1.532185 9.881866 -10.297622
+9.776102 -2.104243 -100
+9.737887 -2.274539 -100
+-8.105246 -5.857047 0
+4e-06 90.215858 -68.883728
+-0.0001478178907 -5.13819082 0.0003080461235
+-1.417172 -9.899072 0
+-50.000004 150.358093 75.800522
+-8.973384893 4.41329391 -47.32959126
+-50.000004 24.60577 108.322289
+-3.55968 9.34498 -50.37227618
+0.000243 8.235651 0.000372
+-50 161.800934 -17.393913
+2e-06 -11.0224 -23.809555
+9.281434 3.72223 0
+-0.0002432249251 7.062970069 -7.379022718
+-0.0002408909623 6.649317786 -6.986478576
+-1e-06 -20.681236 30.968466
+9.4e-05 3.132685 0.000743
+9.2e-05 3.07772 0.000742
+-49.999996 90.937988 -78.994118
+-2e-06 142.166565 70.064766
+-9.752229027 -2.211772363 -40.39904966
+0.000186 6.307115 0.000663
+0.000185 6.259822 0.000668
+1e-06 -17.624542 -7.870567
+-4e-06 28.989483 99.334351
+-0.0002497705737 8.221129504 -8.440294949
+1e-06 152.465118 -13.81023
+5.898622 8.07504 -100
+9.737887 -2.274539 0
+9.69671 -2.444142 0
+9.69671 -2.444142 -100
+-0.0002035107043 0.5189056937 -0.6023512313
+0.000181 6.121855 0.000681
+0.00018 6.077038 0.000685
+-50 -30.325951 34.08633
+8.4e-05 2.78899 0.000733
+4e-06 88.688477 -69.25042
+-9.69671 2.444142 -100
+-9.652575 2.613003 -100
+-50.000004 151.346649 74.362167
+9.998893 0.148833 -100
+-8.462449 5.327815 -8.065219
+-50.000004 26.181061 109.073662
+-4.516995 8.9217 -50.26254085
+0.00031 9.598662 -3.570554
+-50 161.16127 -19.017776
+0.000111 3.73534 0.000755
+-4e-06 60.598869 108.10041
+-50.000004 61.467239 118.199295
+-4e-06 62.164803 108.223648
+-1e-06 -20.449066 32.521988
+-8.372684 5.467923 -8.17343
+4.516995 -8.9217 -100
+-49.999996 89.234055 -79.371872
+1e-06 -17.152199 -9.368643
+-9.881185 -1.536824 -1.237725
+2e-06 -12.448578 -21.010517
+-2e-06 143.056274 68.770248
+-50.000004 63.20929 118.30584
+-4e-06 30.407242 100.01059
+0.000139 4.668693 0.000755
+0.000137 4.62898 0.000756
+-8.45924 5.332824 -8.069088
+3.883647 -9.215057 0
+0.000226 7.656765 0.000477
+-0.671932 9.977401 -100
+1e-06 151.889435 -15.271706
+-0.0002497701675 8.221058049 -8.44023173
+-0.0002432253088 7.063036462 -7.379083557
+2.224467 -9.749449 -100
+-9.922297 1.244192 -100
+-50.000004 68.442886 118.442886
+-50.000004 70.188126 118.427658
+-7.955727 6.058277 -8.616102
+-9.240443453 -3.821911684 -38.2458577
+-2.274539 -9.737887 -27.04850893
+-50 -30.037888 35.807701
+4e-06 87.154938 -69.590401
+6.579959 7.530214 0
+-0.0002103873719 1.559830498 -1.778925474
+-50.000004 152.309937 72.906784
+-4e-06 68.442886 108.442886
+-9.215057 -3.883647 -38.16008981
+-0.0002432252579 7.063027657 -7.379075488
+-4e-06 63.732651 108.319542
+-9.502254852 3.115607119 -46.19064566
+-50.000004 27.769222 109.797432
+3.769877 9.262182 0
+-5.898622 -8.07504 -31.14153721
+-1.977638388 9.802112324 -50.34661621
+-50 160.493378 -20.63023
+-4e-06 70.013603 108.429176
+9.749449 2.224467 -100
+-9.984681691 0.5527240789 -43.63550855
+0.000246 8.35005 0.00035
+-1e-06 -20.189812 34.07122
+-7.706069 -2.010205 0.000139
+-49.999996 87.523788 -79.719833
+-2e-06 143.923248 67.460403
+0.035065 9.999862 -5.369649
+-50.000004 64.952934 118.381966
+-4e-06 31.83659 100.66198
+-6.136346 7.895901 -9.790863
+-6.13672 7.895606 -9.790702
+2e-06 151.28833 -16.722916
+-50.000004 71.932838 118.381966
+1.417172 9.899072 -100
+-50 -29.719833 37.523785
+4e-06 85.615692 -69.903557
+7.089214 7.052875 -100
+7.211223 6.928077 -100
+7.089214 7.052875 0
+-50.000004 153.247696 71.434814
+0.323315 -9.994773 0
+-0.0002240060382 3.702248107 -4.076415714
+-4e-06 65.301933 108.388062
+-50.000004 29.369774 110.49337
+-0.0002562606035 9.397557106 -9.481115886
+-50 159.797424 -22.230782
+-4e-06 71.583839 108.388062
+-9.786785 -2.053977 -0.600874
+-1e-06 -19.903557 35.615696
+-3.396046 9.405683 -10.381069
+-49.999996 85.807709 -80.037888
+-2e-06 144.767212 66.13562
+-9.984918 0.549018 -100
+5.570608 -8.304716 -100
+-50.000004 66.697647 118.427658
+-4e-06 33.277084 101.288322
+-6.12623 7.903622 -9.794993
+2e-06 150.661987 -18.16341
+-50.000004 73.676483 118.30584
+-7.414231 6.710379 -9.066785
+0.382343 9.992623 -4.399525
+-50 -29.371872 39.234055
+7.175524 -6.965043 0
+7.052875 -7.089214 0
+4e-06 84.07122 -70.189812
+-5.172388 -8.55841 0
+-50.000004 154.159607 69.946686
+0.000184 6.213209 0.000672
+-8.464358516 5.324835215 -48.06315959
+-4e-06 66.872169 108.429176
+-50.000004 30.982227 111.16127
+-7.405724934e-05 9.999808695 -39.92336454
+-50 159.073669 -23.818943
+-0.0002562606594 9.397567091 -9.481124414
+-4e-06 73.153122 108.319542
+-1e-06 -19.590401 37.154938
+-49.999996 84.086334 -80.325951
+-2e-06 145.587952 64.79631
+-8.206232 -5.714698 0
+-4e-06 34.728294 101.889435
+-6.67219 7.448616 -9.538204
+0.000301 9.192965 -3.981575
+2e-06 150.01059 -19.592758
+-50.000004 75.418533 118.199295
+8.001794 5.997609 -100
+-7.970867 6.038652 -8.602224
+-50 -28.994118 40.937988
+4e-06 82.521988 -70.449066
+-50.000004 155.045425 68.442886
+-9.94267774e-05 -9.875877463 7.976963263e-06
+-5.991860133 8.006024707 -49.84983257
+-50.000004 32.606091 111.800926
+6.5e-05 2.124069 0.00071
+6.2e-05 2.04954 0.000707
+-49.999996 158.322296 -25.394234
+-4e-06 74.72097 108.223648
+-9.384106 3.454954 -6.50194
+-9.992979 0.374673 -3.443259
+8.9e-05 2.965123 0.000739
+-8.999174 -4.360604 0
+-1e-06 -19.25042 38.68848
+-0.0002432248957 7.06296497 -7.379018046
+-49.999996 82.360199 -80.583923
+2.104243 9.776102 -100
+-2e-06 146.385162 63.442886
+-4e-06 36.18977 102.465126
+-5.714698 8.206232 -9.952844
+-4.516995 8.9217 -10.262486
+2e-06 149.334351 -21.010517
+-50.000004 77.158463 118.062355
+-4.672013 8.841509 -100
+-50 -28.586685 42.635075
+0.00013 4.38691 0.000758
+6.965043 7.175524 -100
+4e-06 80.968468 -70.681236
+-50.000004 155.904846 66.923843
+-50.000004 34.240871 112.412148
+6.965043 7.175524 0
+-49.999996 157.543549 -26.956169
+-4e-06 76.286903 108.10041
+-8.55841 5.172388 -7.944178
+-0.0002103874015 1.559835009 -1.778930397
+-1e-06 -18.883728 40.215858
+9.46352 3.231376 -100
+4.977731 -8.673072 -100
+-49.999996 80.629822 -80.811729
+-8.704415334 -4.92199869 -36.63658794
+-8.673072 -4.977731 -36.55073226
+-2e-06 147.158661 62.075752
+-4e-06 37.661072 103.015221
+1.366281 -9.906224 -100
+2e-06 148.633484 -22.41626
+-9.74953458 -2.224076205 -40.38327678
+-50.000004 78.895737 117.895073
+-9.375534 3.477702 -6.522643
+-50 -28.149696 44.324791
+9.899072 -1.417172 -100
+9.899072 -1.417172 0
+-6.313152 -7.755264 -100
+4e-06 79.411125 -70.886269
+-50.000004 156.73764 65.390038
+-0.0002432252751 7.063030626 -7.379078209
+-50.000004 35.88607 112.994743
+-49.999996 156.73764 -28.504272
+-9.502002 3.116358 -6.191014
+-4e-06 45.14917 105.376213
+-4e-06 43.635525 104.956436
+-4e-06 77.850449 107.94986
+-7.167445 6.973223 -9.240705
+-0.654248 9.978436 -10.149226
+8.105246 5.857047 -100
+-1e-06 -18.49044 41.736603
+7.175524 -6.965043 -100
+-1.589719 -9.872832 -100
+-49.999996 78.895737 -81.0093
+-2e-06 147.908173 60.695328
+-9.922297 1.244192 -4.368477
+-50.000004 42.560982 115.035469
+-4e-06 39.141754 103.539558
+-1.761781 -9.843583 -100
+2e-06 147.908173 -23.809555
+-9.555504 2.948279 -6.035238
+-9.60006 2.799265 -5.896311
+-50.000004 44.250694 115.472458
+-50.000004 80.629822 117.697502
+-0.0002078657921 1.168669484 -1.33679161
+-0.0002562648694 9.398319285 -9.481766859
+-0.480065 9.988333 -10.111872
+9.776102 -2.104243 0
+-50 -27.683281 46.006622
+-4.512758 8.9238 -10.263165
+4e-06 77.850449 -71.064087
+-50.000004 157.543549 63.841934
+-50.000004 37.541187 113.548538
+-49.999996 155.904846 -30.038078
+-4e-06 46.669914 105.769501
+-4e-06 79.411125 107.772041
+-1e-06 -18.070663 43.250248
+0.549018 9.984918 -4.761214
+-7.290828 6.844163 -9.155908
+-49.999996 77.158463 -81.176582
+-0.0001875658432 -1.227941201 0.000542187291
+-3.769877 -9.262182 0
+-2e-06 148.633484 59.302032
+9.555504 -2.948279 0
+-0.0001164259735 9.999808354 -34.01299592
+-4e-06 40.631355 104.037971
+8.466838 -5.320966 -100
+8.466838 -5.320966 0
+2e-06 147.158661 -25.18998
+-50.000004 45.947781 115.87989
+-50.000004 82.360199 117.469696
+-0.013538 9.999726 -9.998918
+-50 -27.187592 47.680054
+4e-06 76.286903 -71.214638
+-50.000004 158.322296 62.279999
+-50.000004 39.205715 114.073364
+-49.999996 155.045425 -31.557117
+-4e-06 48.197292 106.136192
+-4e-06 80.968468 107.567009
+-1.634378566 9.86515472 -50.31017967
+-1e-06 -17.624542 44.75634
+-49.999996 75.418533 -81.313522
+-2e-06 149.334351 57.89629
+7.8e-05 2.603153 0.000727
+-4e-06 42.129433 104.510315
+2e-06 146.385162 -26.557114
+-50.000004 47.651718 116.257645
+-50.000004 84.086334 117.211723
+-50 -26.662766 49.344582
+5.12834 -8.584878 -100
+4e-06 74.72097 -71.337875
+-50 159.073669 60.704708
+-50.000004 40.87915 114.569054
+-6.259887 7.798149 -9.737365
+0.000159 5.372943 0.000733
+-49.999996 154.159607 -33.060925
+-4e-06 49.730835 106.476173
+-4e-06 82.521988 107.334839
+9.652575 -2.613003 0
+-1e-06 -17.152199 46.254417
+-49.999996 73.676483 -81.420067
+-4.667868 8.843654 -10.235502
+-2e-06 150.01059 56.478531
+1e-06 -15.003662 -15.271706
+2e-06 -14.40255 -16.722916
+-9.34498 -3.55968 -38.6091128
+0.200214 9.997995 -4.004298
+3e-06 0.003986 0.00061
+-6.712027036 -7.412713024 -32.43976849
+2e-06 145.587952 -27.910542
+-50.000004 49.361984 116.605606
+-50.000004 85.807709 116.92366
+-9.46352 -3.231376 -100
+-50 -26.108971 50.999699
+1.193185 -9.928559 -100
+4e-06 73.153122 -71.433769
+0.000195 6.607822 0.00063
+-50 159.797424 59.116547
+-2.490112309 -9.684694795 -27.22375753
+0.000144 4.840078 0.000752
+-49.999996 153.247696 -34.549046
+-4e-06 51.270077 106.78933
+-4e-06 84.07122 107.075584
+0.374673 9.992979 -5.037267
+-8.974063 4.411943 -7.328175
+-6.579959 -7.530214 -32.21439044
+-1e-06 -16.653786 47.744019
+-49.999996 71.932838 -81.496193
+-9.843583 1.761781 -4.891043
+-2e-06 150.661987 55.049183
+9.906224 1.366281 -100
+-0.0002432249649 7.062976957 -7.37902903
+2e-06 144.767212 -29.249847
+-50.000004 51.078068 116.92366
+-50.000004 87.523788 116.605606
+-50 -25.526375 52.644897
+4e-06 71.583839 -71.502289
+-50 160.493378 57.515995
+-49.999996 152.309937 -36.021023
+-4e-06 52.814552 107.075584
+-4e-06 85.615692 106.78933
+-1e-06 -16.129448 49.224701
+-49.999996 70.188126 -81.541885
+-2e-06 151.28833 53.608688
+1e-06 -16.653786 -10.858248
+2e-06 143.923248 -30.574627
+-3.231376 9.46352 -10.387163
+-50.000004 52.799438 117.211723
+-50.000004 89.234055 116.257645
+-50 -24.915154 54.279678
+4e-06 70.013603 -71.543404
+-50 161.16127 55.903542
+-0.0002307437117 4.803258371 -5.196821832
+7.331037 6.801169 -100
+7.211223 6.928077 0
+0.000148 4.982446 0.000748
+-49.999996 151.346649 -37.476406
+-4e-06 54.363785 107.334839
+-4e-06 87.154938 106.476173
+-1e-06 -15.579353 50.696003
+-49.999996 68.442886 -81.557114
+-1e-06 151.889435 52.157478
+0.000289 9.800036 4.5e-05
+7.970867 -6.038652 -100
+0.000103 3.445934 0.00075
+2e-06 143.056274 -31.884476
+-50.000004 54.525578 117.469696
+-50.000004 90.937988 115.87989
+-5.98376 8.011987 -9.852828
+8.758624 4.825609 -100
+-50 -24.275497 55.903542
+4e-06 68.442886 -71.557114
+-50 161.800934 54.279678
+-49.999996 150.358093 -38.914761
+-4e-06 55.917305 107.567009
+-4e-06 88.688477 106.136192
+-1e-06 -15.003662 52.157478
+-49.999996 66.697647 -81.541885
+-1e-06 152.465118 50.696003
+0.0003 9.18543 -3.968307
+2e-06 142.166565 -33.178993
+-3.556967378 9.345986644 -50.3724225
+-50.000004 56.255951 117.697502
+-50.000004 92.635078 115.472458
+-50 -23.607597 57.515995
+4e-06 66.872169 -71.543404
+-50 162.41214 52.644897
+-49.999996 149.344589 -40.335644
+-4e-06 57.474648 107.772041
+-4e-06 90.215858 105.769501
+9.1e-05 3.021878 0.00074
+-2e-06 -14.40255 53.608688
+-49.999996 64.952934 -81.496193
+-0.0002497701538 8.221055644 -8.440229603
+-1e-06 153.015228 49.224701
+-3.769877 -9.262182 -100
+-3.930951 -9.194978 -100
+2e-06 141.254425 -34.457787
+-1.001975 9.949535 -10.215985
+-50.000004 57.99004 117.895073
+-50.000004 94.324791 115.035469
+-50 -22.911659 59.116547
+4e-06 65.301933 -71.502289
+-50 162.994751 50.999699
+-49.999996 148.306427 -41.738621
+-5.997609 8.001794 -9.847507
+-4e-06 59.035324 107.94986
+-4e-06 91.736603 105.376213
+-2e-06 -13.776207 55.049183
+-49.999996 63.20929 -81.420067
+-1e-06 153.539551 47.744019
+-0.845957 9.964154 -10.187443
+2e-06 140.320084 -35.720467
+-50.000004 59.72731 118.062355
+-50.000004 96.006622 114.569054
+-50 -22.187889 60.704708
+4e-06 63.732651 -71.433769
+-50 163.548538 49.344582
+-9.119832 4.102033 -7.064491
+9.906224 1.366281 0
+-49.999996 147.243958 -43.123264
+-4e-06 93.250244 104.956436
+-2e-06 -13.124817 56.478531
+-49.999996 61.467239 -81.313522
+-1e-06 154.037964 46.254417
+0.00016 5.412415 0.000731
+2e-06 139.363861 -36.966648
+-50.000004 97.680054 114.073364
+-50.000004 -21.436516 62.279999
+4e-06 62.164803 -71.337875
+-50 164.073364 47.680054
+7.295989 -6.838752 0
+-49.999996 146.157486 -44.489155
+-4e-06 94.75634 104.510315
+-2e-06 -12.448578 57.89629
+-49.999996 59.72731 -81.176582
+-1e-06 154.510315 44.75634
+0.000271 9.206396 0.000174
+2e-06 138.386017 -38.19595
+-7.526184837 6.584489846 -48.98197974
+-50.000004 99.344589 113.548538
+0.000219 7.418353 0.000516
+-50.000004 -20.657768 63.841934
+4e-06 60.598869 -71.214638
+-50 164.569061 46.006622
+1.88286 -9.821142 0
+5.570608 -8.304716 0
+-49.999996 145.047333 -45.835876
+-4e-06 96.254417 104.037971
+-2e-06 -11.747704 59.302032
+-49.999996 57.99004 -81.0093
+-1e-06 154.956436 43.250248
+-49.999996 -19.851875 -28.504272
+3e-06 137.386887 -39.407997
+-50.000004 100.999702 112.994743
+-50.000004 -19.851875 65.390038
+4e-06 59.035324 -71.064087
+-50 165.035461 44.324791
+0.000182 6.167233 0.000677
+-49.999996 143.913849 -47.163017
+-4e-06 97.744019 103.539558
+-2e-06 -11.0224 60.695328
+-49.999996 56.255951 -80.811729
+-1e-06 155.376221 41.736603
+-49.999996 -20.657768 -26.956169
+3e-06 136.366745 -40.602425
+-50.000004 102.644897 112.412148
+-50.000004 -19.019081 66.923843
+8.673072 4.977731 0
+4e-06 57.474648 -70.886269
+-50 165.472458 42.635075
+-49.999996 142.75737 -48.470177
+-4e-06 99.224701 103.015221
+-2e-06 -10.272888 62.075752
+-49.999996 54.525578 -80.583923
+3.279965 9.446789 -100
+-1e-06 155.769501 40.215858
+-49.999996 -21.436516 -25.394234
+3e-06 135.325928 -41.77887
+-50.000004 104.279678 111.800926
+-50.000004 -18.159653 68.442886
+4e-06 55.917305 -70.681236
+-50 165.879883 40.937988
+0.000162 5.487802 0.000727
+-49.999996 141.578247 -49.75695
+-4e-06 100.695999 102.465126
+-2e-06 -9.499397 63.442886
+-49.999996 52.799438 -80.325951
+-1e-06 156.1362 38.68848
+-50 -22.187889 -23.818943
+3e-06 134.264709 -42.936966
+1e-06 -15.579353 -13.81023
+-0.0002432250117 7.062985053 -7.379036448
+-50.000004 105.903549 111.16127
+-50.000004 -17.273842 69.946686
+4e-06 54.363785 -70.449066
+-50 166.257645 39.234055
+-49.999996 140.376862 -51.022949
+-4e-06 102.157478 101.889435
+-2e-06 -8.702171 64.79631
+-49.999996 51.078068 -80.037888
+-1e-06 156.476166 37.154938
+0.00014 4.708262 0.000754
+-50 -22.911659 -22.230782
+3e-06 133.183472 -44.076366
+-50.000004 107.515999 110.49337
+-50.000004 -16.361923 71.434814
+8.584878 5.12834 0
+4e-06 52.814552 -70.189812
+-50 166.605606 37.523785
+-49.999996 139.153564 -52.267792
+-4e-06 103.608688 101.288322
+6.541175 -7.563929 -100
+-2e-06 -7.881439 66.13562
+-49.999996 49.361984 -79.719833
+-1e-06 156.789337 35.615696
+-50 -23.607597 -20.63023
+3e-06 132.082489 -45.196724
+-50.000004 109.116547 109.797432
+-50.000004 -15.424171 72.906784
+4e-06 51.270077 -69.903557
+-50 166.92366 35.807701
+1e-06 -16.129448 -12.338926
+-49.999996 137.908722 -53.491096
+-4e-06 105.049179 100.66198
+-2e-06 -7.037468 67.460403
+-49.999996 47.651718 -79.371872
+-1e-06 157.075592 34.07122
+-50 -24.275497 -19.017776
+3e-06 130.962143 -46.297699
+-50.000004 110.704712 109.073662
+-50.000004 -14.460869 74.362167
+4e-06 49.730835 -69.590401
+-50 167.211731 34.08633
+-49.999996 136.642731 -54.692482
+-4e-06 106.478531 100.01059
+-2e-06 -6.170494 68.770248
+-49.999996 45.947781 -78.994118
+-1e-06 157.334839 32.521988
+-50 -24.915154 -17.393913
+3e-06 129.822739 -47.378944
+-50.000004 112.279999 108.322289
+-1.97417608 9.802807998 -50.34629976
+-50.000004 -13.472321 75.800522
+4e-06 48.197292 -69.25042
+-50 167.469696 32.360195
+-49.999996 135.355957 -55.871597
+-4e-06 107.896286 99.334351
+-2e-06 -5.2808 70.064766
+-49.999996 44.250694 -78.586685
+-1e-06 157.567017 30.968466
+-50 -25.526375 -15.759132
+3e-06 128.664642 -48.440147
+-50.000004 113.841934 107.543541
+-50.000004 -12.458817 77.221405
+4e-06 46.669914 -68.883728
+-50 167.69751 30.629818
+7.563929 6.541175 0
+-49.999996 134.048798 -57.028069
+-4e-06 109.302032 98.633476
+-2e-06 -4.368645 71.343559
+-49.999996 42.560982 -78.149696
+-0 157.772034 29.411127
+-50 -26.108971 -14.113934
+3e-06 127.488197 -49.480972
+-50.000004 115.390045 106.737648
+-50.000004 -11.420662 78.62439
+4e-06 45.14917 -68.49044
+-50 167.895081 28.895731
+-49.999996 132.721649 -58.16156
+-3e-06 110.695328 97.908173
+-2e-06 -3.434311 72.606239
+-49.999996 40.87915 -77.683281
+-0 157.94986 27.850449
+-50 -26.662766 -12.458815
+3e-06 126.29377 -50.501114
+-50.000004 116.923843 105.904854
+-50.000004 -10.358192 80.009033
+4e-06 43.635525 -68.070663
+-50 168.062347 27.158459
+-49.999996 131.374924 -59.271713
+-3e-06 112.075752 97.158661
+-2e-06 -2.478081 73.852417
+-49.999996 39.205715 -77.187592
+-0 158.100403 26.286903
+-50 -27.187592 -10.794287
+3e-06 125.081726 -51.500252
+-50.000004 118.442886 105.045425
+-50.000004 -9.271713 81.374924
+4e-06 42.129433 -67.624542
+-50 168.199295 25.418531
+-49.999996 130.009033 -60.358192
+-3e-06 113.442886 96.38517
+-2e-06 -1.500252 75.081726
+-49.999996 37.541187 -76.662766
+-0 158.223648 24.72097
+-50 -27.683281 -9.120852
+3e-06 123.852417 -52.478081
+-50.000004 119.946693 104.159615
+-50.000004 -8.16156 82.721649
+4e-06 40.631355 -67.152199
+-50 168.305847 23.676479
+-49.999996 128.62439 -61.420662
+-3e-06 114.79631 95.587944
+-3e-06 -0.501114 76.29377
+-49.999996 35.88607 -76.108971
+-0 158.31955 23.153122
+-50 -28.149696 -7.43902
+3e-06 122.606239 -53.434311
+-50.000004 121.434814 103.247696
+-50.000004 -7.028069 84.04879
+4e-06 39.141754 -66.653786
+-50 168.381958 21.932835
+-49.999996 127.221413 -62.458817
+-3e-06 116.13562 94.767212
+-3e-06 0.519028 77.488197
+-49.999996 34.240871 -75.526375
+-0 158.388062 21.583841
+-50 -28.586685 -5.749306
+3e-06 121.343559 -54.368645
+-50.000004 122.906792 102.309944
+-50.000004 -5.871597 85.355949
+4e-06 37.661072 -66.129448
+-50 168.427658 20.188126
+-49.999996 125.800529 -63.472321
+-3e-06 117.460403 93.923241
+-3e-06 1.559853 78.664642
+-49.999996 32.606091 -74.915154
+-0 158.429169 20.013603
+1 2
+2 3
+1 3
+4 5
+6 5
+6 4
+7 8
+7 9
+9 8
+10 11
+11 12
+10 12
+13 14
+15 13
+15 14
+16 17
+18 17
+16 18
+19 20
+21 20
+19 21
+22 23
+24 23
+22 24
+25 26
+27 26
+25 27
+28 29
+30 28
+29 30
+31 32
+32 33
+31 33
+34 35
+35 36
+34 36
+37 38
+38 39
+37 39
+40 41
+42 41
+42 40
+43 44
+43 45
+45 44
+46 47
+47 48
+48 46
+49 50
+50 51
+49 51
+52 53
+41 53
+41 52
+54 55
+56 55
+54 56
+57 5
+58 5
+58 57
+59 60
+15 59
+15 60
+61 62
+62 63
+61 63
+64 65
+66 64
+66 65
+67 68
+68 69
+67 69
+70 71
+72 71
+72 70
+73 74
+75 74
+73 75
+76 77
+78 76
+77 78
+79 80
+79 81
+80 81
+34 82
+83 82
+34 83
+84 85
+85 86
+84 86
+19 87
+88 87
+19 88
+89 90
+90 91
+91 89
+92 93
+92 94
+94 93
+95 96
+96 97
+97 95
+98 99
+99 100
+100 98
+57 101
+101 58
+102 103
+102 104
+104 103
+105 106
+107 106
+107 105
+108 109
+110 109
+110 108
+111 60
+60 112
+111 112
+113 114
+115 113
+115 114
+116 117
+116 118
+117 118
+25 119
+120 119
+25 120
+121 122
+15 121
+15 122
+123 21
+20 123
+124 125
+126 125
+124 126
+127 128
+128 129
+127 129
+130 131
+41 131
+41 130
+132 133
+133 134
+134 132
+37 135
+135 38
+136 137
+41 137
+41 136
+61 138
+138 46
+61 46
+139 140
+140 141
+139 141
+142 143
+142 144
+144 143
+145 146
+146 147
+145 147
+148 59
+148 60
+63 149
+149 62
+150 151
+152 150
+152 151
+153 41
+154 41
+154 153
+155 67
+155 68
+156 157
+158 157
+156 158
+159 160
+41 160
+41 159
+19 77
+161 77
+19 161
+34 162
+163 162
+34 163
+164 165
+165 166
+164 166
+167 88
+87 167
+84 168
+169 168
+169 84
+61 170
+170 95
+61 95
+171 172
+141 171
+141 172
+173 174
+175 174
+173 175
+176 177
+176 178
+178 177
+179 180
+180 181
+179 181
+182 183
+182 184
+184 183
+185 186
+185 187
+187 186
+188 189
+188 190
+190 189
+191 192
+192 193
+191 193
+194 195
+194 196
+196 195
+197 136
+198 197
+136 198
+61 199
+199 123
+61 123
+5 200
+201 200
+5 201
+37 202
+135 202
+203 192
+203 204
+192 204
+205 206
+206 207
+205 207
+47 138
+125 208
+209 208
+125 209
+148 210
+210 59
+211 212
+15 211
+15 212
+19 149
+213 149
+19 213
+214 215
+15 214
+15 215
+67 216
+155 216
+217 218
+41 218
+41 217
+78 161
+219 220
+221 220
+219 221
+80 222
+79 222
+223 89
+223 91
+61 224
+224 167
+61 167
+225 226
+225 227
+227 226
+96 170
+228 229
+229 230
+230 228
+102 231
+102 232
+232 231
+233 234
+233 235
+234 235
+44 236
+44 237
+236 237
+54 238
+239 238
+54 239
+240 241
+15 240
+15 241
+242 243
+244 243
+244 242
+54 245
+246 245
+54 246
+247 248
+247 249
+248 249
+250 251
+252 251
+250 252
+253 254
+255 253
+255 254
+256 257
+258 257
+256 258
+2 259
+260 259
+2 260
+261 262
+262 263
+261 263
+264 265
+264 266
+265 266
+21 199
+267 268
+41 268
+41 267
+269 270
+271 269
+271 270
+105 272
+273 272
+105 273
+19 47
+274 47
+19 274
+275 276
+275 277
+277 276
+278 279
+280 279
+280 278
+281 173
+282 281
+173 282
+62 213
+283 284
+285 283
+284 285
+163 82
+163 286
+82 286
+287 288
+289 288
+287 289
+290 291
+291 292
+290 292
+164 56
+164 290
+290 56
+293 294
+295 294
+295 293
+296 297
+297 298
+296 298
+156 25
+158 25
+61 299
+299 78
+61 78
+300 301
+301 302
+300 302
+303 39
+39 304
+303 304
+88 224
+19 96
+305 96
+19 305
+225 5
+225 6
+306 307
+307 308
+306 308
+309 310
+309 311
+311 310
+191 312
+312 261
+191 261
+313 314
+41 314
+41 313
+185 315
+316 185
+316 315
+317 318
+319 318
+319 317
+320 168
+168 321
+320 321
+322 45
+43 322
+54 323
+324 323
+54 324
+247 128
+247 129
+325 326
+325 327
+327 326
+328 329
+330 329
+328 330
+331 332
+331 333
+332 333
+334 11
+10 334
+335 336
+15 335
+15 336
+337 338
+339 338
+339 337
+340 21
+19 340
+5 341
+342 341
+5 342
+264 2
+264 343
+343 2
+344 345
+15 344
+15 345
+346 347
+348 346
+348 347
+349 350
+41 350
+41 349
+138 274
+351 352
+351 2
+2 352
+353 354
+355 353
+355 354
+280 356
+278 356
+292 231
+15 292
+15 231
+357 358
+358 61
+357 61
+61 359
+359 62
+360 361
+360 362
+361 362
+363 364
+365 364
+363 365
+366 8
+367 8
+366 367
+368 369
+370 368
+369 370
+371 372
+372 373
+371 373
+161 299
+219 374
+302 374
+219 302
+312 279
+375 279
+375 312
+376 88
+19 376
+377 378
+377 355
+378 355
+228 286
+229 286
+16 379
+379 18
+170 305
+6 226
+380 22
+22 381
+380 381
+382 383
+382 384
+383 384
+16 348
+348 385
+16 385
+100 386
+387 386
+387 100
+388 234
+233 388
+388 318
+388 319
+5 389
+390 389
+5 390
+181 391
+391 392
+181 392
+113 211
+115 211
+393 394
+15 393
+15 394
+395 267
+268 395
+396 397
+396 398
+397 398
+199 340
+399 400
+41 400
+41 399
+401 402
+402 403
+401 403
+404 405
+406 404
+405 406
+407 408
+409 408
+407 409
+61 410
+410 138
+2 411
+412 411
+2 412
+164 413
+413 414
+164 414
+185 415
+315 415
+416 417
+15 416
+15 417
+418 419
+419 420
+418 420
+213 359
+421 422
+421 423
+423 422
+424 425
+425 426
+426 424
+427 428
+428 429
+427 429
+366 430
+431 430
+431 366
+432 433
+15 432
+15 433
+434 435
+435 436
+434 436
+437 161
+19 437
+438 439
+440 439
+438 440
+224 376
+441 286
+442 286
+442 441
+443 444
+445 444
+443 445
+446 447
+447 377
+446 377
+448 449
+448 450
+450 449
+16 451
+16 67
+67 451
+61 452
+452 170
+271 453
+454 271
+454 453
+139 455
+455 456
+139 456
+457 458
+457 7
+458 7
+459 460
+459 461
+461 460
+462 463
+464 462
+464 463
+465 466
+465 181
+181 466
+467 152
+468 152
+467 468
+5 469
+470 469
+5 470
+471 472
+471 473
+473 472
+474 475
+476 475
+474 476
+61 477
+477 199
+478 479
+480 478
+479 480
+481 277
+481 275
+401 482
+482 402
+483 484
+485 484
+483 485
+409 486
+486 407
+125 487
+208 487
+274 410
+488 489
+490 488
+490 489
+491 492
+491 493
+493 492
+494 213
+19 494
+219 495
+462 495
+219 462
+496 497
+497 498
+496 498
+499 500
+15 499
+15 500
+434 501
+502 501
+502 434
+299 437
+438 503
+439 503
+61 504
+504 224
+505 506
+505 381
+381 506
+507 308
+507 307
+443 508
+508 444
+54 509
+510 509
+54 510
+16 346
+305 452
+511 45
+511 512
+512 45
+423 513
+513 514
+423 514
+515 279
+516 279
+516 515
+261 517
+518 261
+517 518
+519 520
+15 519
+15 520
+521 522
+521 523
+522 523
+122 524
+524 400
+400 122
+465 391
+525 468
+525 152
+526 527
+526 528
+528 527
+529 41
+530 41
+530 529
+531 532
+41 532
+41 531
+533 474
+475 533
+340 477
+534 535
+535 536
+536 534
+537 538
+15 537
+15 538
+162 222
+163 222
+287 539
+288 539
+540 274
+19 540
+541 542
+542 543
+543 541
+544 415
+185 544
+545 546
+546 547
+545 547
+359 494
+548 549
+15 548
+15 549
+550 551
+551 552
+550 552
+61 553
+553 299
+554 555
+554 556
+555 556
+376 504
+101 557
+558 557
+558 101
+559 305
+19 559
+560 45
+560 512
+561 501
+561 502
+139 562
+562 563
+139 563
+564 565
+564 193
+565 193
+566 567
+567 568
+566 568
+417 569
+15 569
+570 571
+572 570
+571 572
+201 41
+529 201
+409 286
+409 83
+83 286
+573 574
+573 575
+575 574
+576 340
+19 576
+577 578
+41 578
+41 577
+278 579
+579 356
+300 580
+580 581
+300 581
+188 582
+190 582
+410 540
+583 584
+585 583
+584 585
+61 586
+586 359
+563 587
+139 587
+588 589
+590 589
+588 590
+591 592
+592 593
+593 591
+505 594
+506 594
+379 550
+379 551
+595 596
+519 595
+596 519
+597 598
+599 598
+597 599
+437 553
+600 25
+601 25
+601 600
+602 348
+602 346
+603 604
+604 61
+603 61
+486 605
+606 486
+606 605
+607 376
+19 607
+608 44
+609 608
+44 609
+610 397
+610 398
+452 559
+54 611
+238 611
+612 613
+613 614
+612 614
+615 616
+615 617
+617 616
+337 193
+193 338
+179 618
+618 610
+179 610
+238 619
+238 620
+620 619
+111 547
+621 547
+111 621
+622 41
+623 41
+623 622
+258 222
+258 624
+624 222
+625 626
+626 627
+625 627
+628 629
+630 629
+628 630
+631 632
+632 222
+631 222
+433 633
+633 432
+634 635
+634 177
+177 635
+477 576
+486 222
+606 222
+636 637
+637 638
+636 638
+587 639
+639 640
+587 640
+641 642
+643 642
+641 643
+644 326
+326 645
+645 644
+61 646
+646 410
+5 647
+200 647
+648 649
+650 648
+649 650
+494 586
+651 652
+653 652
+653 651
+654 41
+655 41
+655 654
+15 613
+15 614
+656 437
+19 656
+657 322
+511 657
+322 511
+504 607
+658 659
+660 659
+658 660
+558 661
+662 558
+661 662
+61 663
+663 452
+54 414
+54 102
+414 102
+238 664
+611 664
+665 666
+666 143
+143 665
+667 668
+668 669
+667 669
+670 41
+671 41
+671 670
+407 606
+328 672
+329 672
+673 674
+673 675
+675 674
+676 626
+676 625
+628 177
+630 177
+241 677
+677 240
+6 678
+678 225
+61 679
+679 477
+680 605
+486 680
+681 41
+682 41
+682 681
+683 32
+683 31
+557 5
+5 684
+684 557
+685 686
+686 687
+685 687
+164 688
+688 689
+164 689
+401 690
+482 690
+278 691
+691 279
+219 692
+693 692
+219 693
+540 646
+694 695
+696 695
+696 694
+505 697
+594 697
+698 699
+15 698
+15 699
+700 494
+19 700
+701 702
+702 703
+701 703
+696 704
+704 705
+696 705
+706 450
+707 450
+707 706
+550 708
+379 708
+262 709
+262 710
+709 710
+553 656
+573 711
+573 712
+712 711
+332 713
+713 714
+332 714
+99 715
+715 716
+99 716
+61 717
+717 504
+559 663
+192 718
+719 718
+192 719
+573 720
+720 721
+573 721
+191 691
+691 516
+191 516
+615 722
+615 723
+723 722
+724 725
+15 724
+15 725
+383 726
+726 727
+383 727
+728 120
+25 728
+729 292
+729 290
+481 730
+731 730
+481 731
+500 732
+732 499
+576 679
+733 734
+15 733
+15 734
+258 286
+256 286
+650 735
+736 650
+736 735
+563 639
+737 738
+738 739
+737 739
+740 741
+41 741
+41 740
+742 326
+742 645
+743 540
+19 743
+744 745
+746 745
+746 744
+747 481
+748 481
+748 747
+586 700
+749 696
+704 749
+750 751
+15 750
+15 751
+752 753
+335 752
+753 335
+61 754
+754 553
+573 755
+755 94
+573 94
+756 757
+758 757
+756 758
+607 717
+759 760
+760 761
+759 761
+762 559
+19 762
+718 204
+763 322
+242 763
+242 322
+764 193
+261 193
+261 764
+765 766
+767 766
+765 767
+768 769
+770 768
+770 769
+408 606
+771 772
+33 772
+771 33
+773 774
+775 774
+773 775
+776 41
+673 41
+673 776
+777 158
+778 158
+778 777
+322 779
+780 779
+322 780
+670 599
+671 599
+781 782
+41 782
+41 781
+729 783
+290 783
+628 784
+629 784
+328 352
+330 352
+681 785
+41 785
+786 286
+228 786
+693 295
+693 293
+787 576
+19 787
+505 788
+697 788
+789 790
+15 789
+15 790
+791 286
+624 286
+624 791
+792 684
+557 792
+793 794
+795 794
+793 795
+796 797
+798 797
+796 798
+799 800
+801 799
+800 801
+646 743
+802 803
+804 803
+802 804
+164 445
+445 413
+805 806
+41 806
+41 805
+61 807
+807 586
+808 809
+809 810
+808 810
+811 182
+812 811
+812 182
+813 814
+813 352
+352 814
+656 754
+815 607
+19 815
+339 709
+262 339
+663 762
+602 816
+816 817
+602 817
+502 818
+818 435
+502 435
+684 819
+819 61
+684 61
+820 766
+766 821
+820 821
+822 823
+824 823
+822 824
+825 629
+825 784
+448 826
+449 826
+827 828
+829 828
+827 829
+179 774
+774 180
+248 830
+248 778
+830 778
+43 779
+535 831
+831 832
+832 535
+833 834
+834 835
+833 835
+836 837
+838 836
+837 838
+785 839
+785 25
+25 839
+840 841
+15 840
+15 841
+842 843
+843 118
+842 118
+844 6
+4 844
+845 41
+846 41
+846 845
+847 848
+15 847
+15 848
+679 787
+849 850
+850 851
+851 849
+852 853
+852 854
+853 854
+100 855
+855 98
+244 560
+657 560
+657 244
+61 856
+856 646
+857 858
+859 858
+857 859
+73 860
+861 860
+73 861
+862 863
+863 864
+862 864
+700 807
+808 598
+865 598
+808 865
+457 9
+866 867
+866 421
+867 421
+480 868
+15 480
+15 868
+714 869
+332 869
+870 871
+872 871
+870 872
+873 656
+19 873
+717 815
+518 193
+517 193
+874 875
+876 875
+874 876
+61 877
+877 663
+776 674
+878 450
+436 878
+450 436
+879 286
+786 879
+322 73
+43 73
+438 177
+440 177
+880 41
+881 41
+881 880
+882 883
+883 884
+882 884
+293 885
+885 693
+245 886
+887 886
+245 887
+888 889
+889 890
+888 890
+891 233
+891 319
+319 233
+505 892
+788 892
+166 239
+164 239
+73 893
+894 893
+73 894
+895 896
+897 895
+896 897
+467 898
+899 898
+467 899
+900 901
+41 901
+41 900
+164 443
+164 902
+902 443
+61 903
+903 679
+230 222
+229 222
+341 41
+342 41
+327 904
+904 905
+327 905
+472 690
+471 690
+906 907
+220 906
+220 907
+743 856
+5 42
+908 42
+5 908
+394 909
+909 393
+910 769
+768 910
+911 700
+19 911
+250 522
+252 522
+324 912
+323 912
+913 914
+41 914
+41 913
+754 873
+915 916
+917 916
+917 915
+34 918
+632 918
+34 632
+61 919
+919 717
+517 262
+337 517
+337 262
+566 920
+921 920
+566 921
+922 824
+822 922
+762 877
+923 924
+612 923
+612 924
+925 615
+925 617
+248 926
+248 927
+926 927
+827 344
+829 344
+817 928
+602 928
+786 230
+54 929
+930 929
+54 930
+600 931
+601 931
+706 289
+707 289
+932 933
+933 934
+932 934
+935 855
+855 936
+935 936
+192 279
+203 279
+937 938
+938 939
+939 937
+940 941
+41 941
+41 940
+5 530
+942 530
+5 942
+330 943
+870 943
+330 870
+787 903
+129 944
+944 247
+945 946
+947 946
+945 947
+325 904
+388 948
+948 234
+949 478
+950 949
+478 950
+164 951
+164 952
+952 951
+953 743
+19 953
+954 955
+954 382
+955 382
+956 957
+41 957
+41 956
+807 911
+458 25
+457 25
+41 478
+41 949
+61 958
+958 754
+624 959
+791 959
+219 960
+960 302
+815 919
+961 962
+79 962
+961 79
+963 822
+964 822
+963 964
+965 762
+19 965
+561 818
+966 222
+966 967
+967 222
+968 825
+968 629
+906 969
+220 969
+505 970
+892 970
+971 972
+685 972
+971 685
+973 974
+973 619
+974 619
+54 975
+509 975
+976 977
+15 976
+15 977
+978 979
+978 980
+979 980
+98 935
+466 981
+15 466
+15 981
+467 865
+467 597
+865 597
+982 787
+19 982
+54 983
+984 983
+54 984
+985 986
+985 987
+987 986
+988 853
+852 988
+319 948
+423 866
+734 801
+799 734
+856 953
+443 989
+902 989
+990 756
+757 990
+991 992
+15 991
+15 992
+821 303
+820 303
+61 993
+993 807
+526 994
+526 995
+994 995
+252 996
+996 997
+252 997
+34 998
+999 998
+34 999
+446 491
+1000 491
+446 1000
+164 323
+323 1001
+164 1001
+873 958
+1002 1003
+1003 1004
+1002 1004
+300 363
+300 365
+1005 815
+19 1005
+877 965
+300 1006
+1006 960
+300 960
+293 1007
+1007 1008
+293 1008
+967 879
+879 966
+1009 884
+1009 883
+191 565
+691 565
+1010 878
+1011 878
+1010 1011
+1012 547
+1012 545
+978 1013
+979 1013
+1014 25
+1014 156
+935 386
+386 98
+1015 1016
+1016 1017
+1017 1015
+1018 593
+591 1018
+164 1019
+164 1020
+1020 1019
+73 1021
+74 1021
+903 982
+336 30
+15 30
+352 1022
+1022 1023
+352 1023
+61 1024
+1024 856
+1025 5
+1025 73
+73 5
+1026 356
+356 1027
+1026 1027
+1028 2
+1028 1029
+1029 2
+765 1030
+135 1030
+765 135
+911 993
+555 222
+554 222
+1031 71
+15 1031
+15 71
+250 996
+1032 1033
+1034 1032
+1033 1034
+1035 183
+1036 183
+1035 1036
+1037 873
+19 1037
+1038 1039
+1038 1040
+1040 1039
+921 567
+791 222
+383 922
+383 824
+919 1005
+358 54
+1041 54
+358 1041
+61 1042
+1042 877
+1043 497
+496 1043
+301 1044
+302 1044
+505 273
+505 105
+1045 1046
+324 1046
+1045 324
+825 934
+968 934
+164 1047
+1047 1048
+164 1048
+1049 1010
+1049 878
+538 1050
+15 1050
+328 1051
+943 1051
+943 328
+140 171
+244 1052
+1053 1052
+244 1053
+54 1020
+1054 1020
+54 1054
+902 508
+902 1055
+1055 508
+981 933
+15 933
+1056 757
+1057 757
+1056 1057
+61 1058
+1058 903
+445 989
+319 2
+388 2
+953 1024
+1059 1060
+1060 741
+741 1059
+978 1061
+1062 1061
+978 1062
+1063 190
+190 1064
+1063 1064
+1065 911
+19 1065
+1066 1067
+15 1066
+15 1067
+528 1068
+1069 1068
+528 1069
+958 1037
+1038 297
+1040 297
+1070 306
+306 1063
+1070 1063
+1071 1072
+1073 1071
+1073 1072
+61 1074
+1074 919
+817 1075
+928 1075
+54 729
+1076 729
+54 1076
+965 1042
+505 1077
+273 1077
+500 1078
+1078 1079
+1079 500
+1080 1081
+1080 1012
+1081 1012
+94 1082
+573 1082
+256 1083
+257 1083
+1084 1085
+1085 964
+1084 964
+657 1052
+523 54
+54 521
+496 864
+864 1086
+496 1086
+1087 934
+1087 968
+1088 933
+932 1088
+481 142
+481 1089
+142 1089
+54 951
+54 952
+99 1090
+1090 1091
+99 1091
+982 1058
+1092 916
+15 1092
+15 916
+1093 106
+15 1093
+15 106
+1094 953
+19 1094
+1095 1096
+41 1096
+41 1095
+1097 222
+1098 222
+1098 1097
+1099 1100
+15 1099
+15 1100
+648 332
+332 650
+1101 1102
+1103 1102
+1101 1103
+993 1065
+1104 569
+569 1105
+1104 1105
+1106 41
+1107 41
+1107 1106
+974 222
+973 222
+179 269
+269 1108
+179 1108
+61 1109
+1109 958
+1110 86
+86 157
+1110 157
+604 49
+50 604
+744 1111
+1111 1112
+744 1112
+1113 300
+300 1114
+1114 1113
+1005 1074
+1006 1050
+1115 1050
+1115 1006
+602 379
+602 550
+54 1116
+1117 1116
+54 1117
+1118 965
+19 1118
+295 1007
+1119 1120
+1120 1121
+1119 1121
+573 1122
+1122 1123
+573 1123
+256 222
+244 73
+657 73
+820 1124
+1124 37
+820 37
+352 1125
+351 1125
+725 386
+15 386
+1126 1127
+1126 507
+1127 507
+831 1128
+1128 1129
+1129 831
+99 1130
+1130 1131
+99 1131
+1132 982
+19 1132
+641 1133
+1134 1133
+641 1134
+760 1135
+760 667
+1135 667
+1136 1137
+1136 1138
+1137 1138
+1139 1140
+1140 1141
+1139 1141
+1024 1094
+811 25
+812 25
+1142 1143
+1143 1144
+1144 1142
+457 158
+458 158
+1101 1145
+1145 1103
+61 1146
+1146 993
+973 1147
+619 1147
+1148 310
+15 1148
+15 310
+1037 1109
+1044 1149
+1149 301
+1150 1005
+19 1150
+505 1151
+1077 1151
+1152 1153
+1153 1154
+1152 1154
+50 127
+50 1155
+1155 127
+1042 1118
+164 1156
+164 723
+723 1156
+768 1157
+770 1157
+179 1158
+1158 1159
+179 1159
+773 179
+179 1160
+1160 773
+1161 1084
+1084 61
+1161 61
+1162 783
+1163 783
+1162 1163
+1164 613
+1165 613
+1165 1164
+882 253
+253 1166
+882 1166
+346 1167
+348 1167
+741 1168
+1168 1060
+1169 1170
+15 1169
+15 1170
+1171 1172
+1173 1172
+1171 1173
+1058 1132
+775 1174
+775 1087
+1174 1087
+353 25
+355 25
+1175 805
+41 1175
+1087 1176
+1176 629
+1087 629
+1177 931
+600 1177
+61 1178
+1178 1024
+1179 1180
+15 1179
+15 1180
+943 872
+1181 484
+484 1003
+1181 1003
+1065 1146
+1182 306
+308 1182
+1106 794
+1107 794
+1183 1184
+1184 416
+1183 416
+41 479
+1185 1037
+19 1185
+1117 951
+1117 1186
+951 1186
+1074 1150
+1187 1188
+1187 1189
+1189 1188
+61 1190
+1190 1042
+54 1191
+54 488
+488 1191
+1192 1193
+1193 1194
+1192 1194
+711 1195
+573 1195
+1196 1197
+1197 208
+1196 208
+139 1198
+1198 521
+139 521
+129 1199
+845 1199
+129 845
+1200 1201
+1201 217
+217 1200
+1202 1203
+1202 1204
+1203 1204
+1203 1205
+1205 1062
+1203 1062
+1206 386
+386 1207
+1206 1207
+83 1162
+1162 222
+83 222
+862 498
+862 496
+922 1208
+1208 1209
+1209 922
+1210 352
+1211 352
+1211 1210
+1212 1213
+15 1212
+15 1213
+822 1214
+1215 1214
+822 1215
+15 1207
+61 1216
+1216 1058
+1217 1218
+1218 1174
+1174 1217
+403 1219
+15 403
+15 1219
+1220 158
+1221 158
+1221 1220
+909 1222
+41 1222
+41 909
+1094 1178
+1168 1223
+41 1223
+41 1168
+1143 897
+15 1143
+15 897
+1224 484
+1224 1181
+427 1225
+1226 1225
+427 1226
+1097 1227
+1227 1098
+1228 1065
+19 1228
+1229 450
+706 1229
+300 1044
+300 1149
+1183 1230
+1230 1184
+505 223
+505 23
+23 223
+1155 34
+34 127
+1109 1185
+1231 1027
+280 1027
+1231 280
+1186 1232
+1232 1117
+61 1233
+1233 1074
+1234 183
+1235 183
+1234 1235
+1118 1190
+1041 902
+54 902
+1236 1237
+898 1237
+898 1236
+139 1238
+1238 1198
+134 16
+16 132
+601 1239
+931 1239
+312 193
+375 193
+765 303
+765 821
+1240 481
+1241 481
+1241 1240
+1242 1203
+1242 1243
+1243 1203
+1164 1244
+1244 226
+1164 226
+1181 1002
+1211 1245
+1210 1245
+1246 1247
+1248 1246
+1247 1248
+383 1183
+383 1230
+1249 1250
+15 1249
+15 1250
+1132 1216
+116 1251
+172 116
+1251 172
+1239 354
+353 1239
+771 25
+1252 25
+1252 771
+1253 286
+1254 286
+1254 1253
+5 1255
+1256 1255
+5 1256
+1257 1094
+19 1257
+14 1258
+1258 1259
+1259 14
+943 352
+870 352
+1260 1261
+41 1261
+41 1260
+124 1262
+1263 1262
+124 1263
+1264 803
+803 1235
+1264 1235
+375 1265
+312 1265
+1146 1228
+1183 492
+1230 492
+1266 1267
+1266 1268
+1268 1267
+1269 1270
+1269 1271
+1270 1271
+61 1272
+1272 1109
+1273 86
+1273 1110
+1150 1233
+371 1274
+1274 969
+371 969
+1275 711
+1195 1275
+1276 1118
+19 1276
+723 616
+616 1277
+723 1277
+353 601
+1278 1279
+1279 481
+1278 481
+1280 936
+936 1281
+1280 1281
+1211 1282
+1245 1282
+941 1283
+41 1283
+15 1105
+248 447
+248 377
+1284 1132
+19 1284
+1285 1147
+1285 973
+536 832
+852 222
+988 222
+973 1286
+1286 1285
+885 1008
+1008 1287
+885 1287
+15 801
+1178 1257
+1288 987
+1288 986
+970 674
+892 674
+34 191
+191 127
+1007 1289
+1290 1007
+1289 1290
+375 1291
+1265 1291
+61 1292
+1292 1146
+1293 41
+888 41
+888 1293
+1185 1272
+1294 1150
+19 1294
+521 1295
+521 1238
+1295 1238
+1190 1276
+366 1296
+1297 1296
+366 1297
+524 1298
+15 524
+15 1298
+1299 424
+15 1299
+15 424
+1070 507
+1070 307
+1300 1301
+1302 1301
+1300 1302
+1216 1284
+719 279
+1303 616
+1304 616
+1303 1304
+61 1305
+1305 1178
+768 1306
+1306 1157
+139 1307
+1307 455
+563 1308
+587 1308
+350 1309
+41 1309
+1116 1310
+1310 1311
+1116 1311
+1228 1292
+5 1312
+1313 1312
+5 1313
+641 1314
+642 1314
+1293 890
+1315 1185
+19 1315
+1233 1294
+1203 1061
+1061 1316
+1203 1316
+303 1124
+141 1251
+737 702
+767 702
+737 767
+1202 978
+978 1204
+61 1317
+1317 1190
+760 1072
+1071 760
+822 727
+822 726
+1033 1153
+1153 1318
+1033 1318
+221 969
+1319 948
+1319 234
+1320 1321
+1322 1320
+1321 1322
+173 1224
+174 1224
+624 256
+390 41
+1323 41
+1323 390
+966 786
+684 57
+57 557
+61 1324
+1324 1216
+1325 551
+1326 551
+1325 1326
+22 892
+22 788
+1327 1328
+1329 1328
+1329 1327
+191 1330
+1330 127
+572 1331
+15 572
+15 1331
+1225 254
+253 1225
+796 222
+798 222
+1257 1305
+768 1332
+1332 1306
+1041 164
+1068 481
+1069 481
+1333 1228
+19 1333
+525 1334
+1334 1335
+525 1335
+195 222
+1188 222
+195 1188
+1272 1315
+1231 1336
+1027 1336
+61 1337
+1337 1233
+311 1338
+1338 1339
+311 1339
+1276 1317
+775 269
+775 271
+414 989
+413 989
+1340 1341
+1341 1342
+1340 1342
+173 1343
+1344 1343
+173 1344
+1345 373
+1345 372
+431 8
+1346 582
+582 1347
+1346 1347
+1348 838
+836 1348
+1349 93
+92 1349
+1284 1324
+193 904
+338 904
+22 697
+387 1350
+1350 1351
+387 1351
+1020 1352
+1054 1352
+1330 1049
+127 1049
+483 1347
+483 1346
+1353 41
+1354 41
+1354 1353
+1355 1356
+1357 1355
+1357 1356
+951 1358
+1358 1359
+951 1359
+242 657
+1360 1257
+19 1360
+1361 1237
+15 1361
+15 1237
+1292 1333
+1124 39
+370 991
+991 369
+139 983
+983 140
+61 1362
+1362 1272
+820 135
+1236 1363
+898 1363
+1064 582
+1364 582
+1064 1364
+1294 1337
+1365 373
+371 1365
+1366 1215
+822 1366
+1367 1368
+1369 1367
+1369 1368
+1370 1276
+19 1370
+869 834
+869 833
+1191 116
+1191 117
+1371 133
+1372 133
+1372 1371
+791 1254
+5 1373
+5 1374
+1373 1374
+1375 350
+1309 1375
+1376 1284
+19 1376
+22 970
+806 1018
+41 1018
+594 890
+594 889
+34 409
+641 649
+648 641
+1305 1360
+1377 41
+1378 41
+1378 1377
+5 1379
+1380 1379
+5 1380
+1381 1382
+797 1381
+1382 797
+343 1383
+343 265
+1383 265
+419 1040
+419 1038
+61 1384
+1384 1292
+164 55
+55 1385
+164 1385
+1386 286
+842 286
+842 1386
+467 1387
+1335 1387
+467 1335
+1388 41
+1389 41
+1389 1388
+1315 1362
+1390 765
+1126 765
+1390 1126
+1391 1294
+19 1391
+822 1104
+823 1104
+1392 882
+882 820
+1392 820
+1317 1370
+1071 25
+1073 25
+967 286
+171 116
+171 1191
+1166 427
+1166 1225
+1393 1394
+686 1394
+1393 686
+289 450
+287 450
+1347 1395
+483 1395
+54 1396
+544 1396
+54 544
+366 1397
+1397 430
+827 1398
+1001 827
+1001 1398
+1399 41
+1400 41
+1400 1399
+1401 1402
+15 1401
+15 1402
+1403 225
+1403 6
+1324 1376
+91 22
+22 223
+977 499
+499 532
+532 977
+506 890
+1303 1277
+1353 487
+1354 487
+1404 660
+15 1404
+15 660
+1405 1406
+1406 1407
+1405 1407
+61 1408
+1408 1305
+1017 577
+577 1016
+1409 1410
+229 1410
+1409 229
+1333 1384
+287 528
+289 528
+34 229
+229 555
+34 555
+467 921
+467 1411
+921 1411
+5 1412
+1413 1412
+5 1413
+1414 1315
+19 1414
+561 434
+1415 969
+1415 371
+1416 652
+651 1416
+1337 1391
+383 1214
+1214 726
+384 1417
+383 1417
+61 1418
+1418 1317
+1419 858
+859 1419
+1420 1031
+1421 1031
+1421 1420
+1034 1318
+1422 246
+54 1422
+1423 1424
+1425 1423
+1425 1424
+609 236
+657 512
+1085 1426
+1427 1426
+1085 1427
+54 1428
+1429 1428
+54 1429
+1296 1397
+1397 1297
+1430 707
+289 1430
+760 360
+760 1431
+360 1431
+1432 826
+826 1433
+1433 1432
+61 1434
+1434 1324
+1352 1435
+1054 1435
+1157 1212
+15 1157
+253 1436
+255 1436
+15 11
+15 12
+139 1437
+1437 984
+139 984
+1406 1438
+1406 1439
+1438 1439
+1360 1408
+764 375
+635 194
+635 1440
+1440 194
+1409 1441
+1410 1441
+1442 1333
+19 1442
+1443 1444
+1444 1445
+1445 1443
+1145 1033
+1145 1034
+1446 306
+306 1447
+1447 1446
+1125 41
+41 351
+1362 1414
+1448 1449
+1449 761
+1448 761
+1450 158
+811 158
+811 1450
+124 1332
+124 768
+381 1067
+1067 1397
+381 1397
+61 1451
+1451 1337
+1371 1452
+1452 133
+148 546
+210 546
+1453 467
+467 1454
+1453 1454
+1455 61
+61 1106
+1106 1455
+1370 1418
+928 288
+817 288
+140 1251
+983 1251
+1456 41
+1457 41
+1457 1456
+15 1142
+1458 560
+243 560
+1458 243
+1144 895
+895 1143
+1258 1059
+15 1258
+15 1059
+1376 1434
+1169 805
+806 1169
+1006 538
+710 1459
+1460 1459
+710 1460
+844 1461
+844 1462
+1461 1462
+54 171
+1463 1464
+1406 1464
+1463 1406
+1465 1360
+19 1465
+1466 1467
+1468 1467
+1466 1468
+492 1469
+491 1469
+1470 1471
+1471 551
+1470 551
+139 1472
+1472 309
+139 309
+1473 725
+1473 1280
+1280 725
+1474 1475
+1475 1476
+1476 1474
+1384 1442
+1477 41
+1478 41
+1478 1477
+360 1479
+360 834
+1479 834
+61 1480
+1480 1362
+1231 279
+506 1067
+1481 882
+884 1481
+1391 1451
+1234 1482
+1036 1482
+1036 1234
+1209 822
+507 1447
+1483 1447
+507 1483
+219 295
+1301 295
+219 1301
+1484 1370
+19 1484
+1034 222
+1033 222
+1485 366
+1485 431
+44 73
+609 73
+1486 173
+173 641
+1486 641
+1393 1136
+1136 686
+1487 1246
+41 1246
+41 1487
+573 866
+866 1488
+573 1488
+1255 41
+1256 41
+101 1489
+558 1489
+1380 41
+1490 41
+1490 1380
+1491 1376
+19 1491
+375 261
+479 1492
+41 1492
+735 760
+650 760
+1416 1493
+1493 1494
+1416 1494
+660 567
+15 567
+588 1364
+420 588
+420 1364
+113 1463
+1464 113
+1408 1465
+1495 1496
+721 1495
+721 1496
+1472 1497
+309 1497
+1498 1499
+1499 1500
+1500 1498
+248 1450
+447 1450
+61 1501
+1501 1384
+1502 1039
+15 1502
+15 1039
+602 1075
+1075 1503
+602 1503
+507 111
+1504 111
+507 1504
+1505 804
+1505 803
+1506 1459
+1459 1507
+1506 1507
+1414 1480
+606 1097
+1097 408
+1348 705
+1348 704
+842 1032
+1145 842
+1145 1032
+1508 686
+773 1508
+686 773
+1509 1391
+19 1509
+1452 1510
+1510 1511
+1452 1511
+1330 1512
+1512 1513
+1330 1513
+525 808
+525 865
+1182 507
+507 1514
+1182 1514
+1418 1484
+1515 1516
+1516 1517
+1515 1517
+1518 685
+1519 685
+1519 1518
+1166 429
+720 1495
+1520 1521
+1521 1522
+1522 1520
+1071 759
+759 156
+1071 156
+1523 1524
+1524 1004
+1523 1004
+1434 1491
+650 1525
+736 1525
+1002 1526
+1181 1526
+960 1291
+1006 1291
+1266 126
+1266 1367
+1367 126
+945 1517
+945 1527
+1517 1527
+41 1199
+61 1528
+1528 1408
+73 1529
+1530 1529
+73 1530
+983 854
+854 1251
+775 1043
+775 1531
+1531 1043
+1532 1533
+1534 1533
+1534 1532
+1088 1340
+1088 1341
+1535 41
+1536 41
+1536 1535
+447 158
+1537 158
+1537 447
+1442 1501
+1538 1539
+1540 1538
+1539 1540
+1446 507
+1541 1506
+1541 1459
+939 1542
+41 1542
+41 939
+1543 1414
+19 1543
+264 319
+264 317
+454 905
+905 453
+1392 1009
+1392 883
+1451 1509
+1544 357
+1544 61
+61 1545
+1545 1418
+1196 41
+1196 1354
+859 1546
+1546 1419
+1547 41
+1548 41
+1548 1547
+602 1549
+1550 1549
+602 1550
+1551 208
+1551 1197
+1136 528
+1393 528
+1281 1489
+101 1281
+1552 1553
+41 1553
+41 1552
+1239 1554
+354 1554
+1252 156
+1252 1014
+1555 814
+814 1173
+1555 1173
+61 1556
+1556 1434
+1557 1558
+155 1558
+1557 155
+139 488
+488 1472
+1559 1560
+103 1560
+1559 103
+1266 125
+1234 1561
+1561 1482
+1303 222
+1304 222
+1562 1563
+41 1563
+41 1562
+589 1364
+1465 1528
+1261 1564
+41 1564
+1189 124
+124 22
+1189 22
+248 812
+248 811
+1565 1442
+19 1565
+1566 937
+15 1566
+15 937
+259 41
+259 1536
+1480 1543
+61 1567
+1567 1451
+1371 1510
+1568 560
+1568 1458
+418 1063
+1063 420
+1484 1545
+1547 1569
+1548 1569
+1470 379
+16 1470
+209 1551
+54 1437
+765 737
+180 687
+774 687
+73 1399
+73 1400
+1570 1571
+1570 1572
+1571 1572
+1573 1344
+173 1573
+164 1076
+164 1574
+1574 1076
+1575 653
+1576 653
+1575 1576
+1577 1266
+1266 89
+89 1577
+594 1067
+1578 41
+1579 41
+1579 1578
+1101 1034
+1580 1581
+1580 1582
+1582 1581
+1491 1556
+1137 1583
+1138 1583
+950 480
+1165 1244
+1405 1243
+1243 1407
+1584 1465
+19 1584
+1585 1586
+1586 1587
+1587 1585
+1588 315
+1588 986
+986 315
+602 1452
+1452 1589
+602 1589
+1501 1565
+732 1079
+41 1079
+41 732
+317 1590
+1591 1590
+317 1591
+1506 1592
+1541 1592
+637 481
+481 638
+61 1593
+1593 1480
+16 1372
+67 1372
+1509 1567
+1594 1595
+1594 1152
+1152 1595
+1422 1194
+1192 1422
+1596 1484
+19 1596
+1354 208
+1546 222
+859 222
+580 709
+692 580
+692 709
+1597 1550
+1470 1597
+1550 1470
+221 1598
+1598 907
+221 907
+164 238
+164 611
+1056 1599
+1056 100
+1599 100
+820 767
+1600 1601
+1601 1487
+1487 1600
+1602 804
+1603 1602
+1603 804
+1402 1261
+1261 1401
+1072 202
+202 668
+1072 668
+651 1493
+1604 1235
+1234 1604
+1605 1491
+19 1605
+1189 61
+1187 61
+955 1606
+954 1606
+963 383
+1230 963
+1450 1537
+303 668
+1124 668
+1607 595
+1608 1607
+595 1608
+1332 910
+205 1609
+1609 1610
+205 1610
+1528 1584
+1374 41
+1373 41
+1473 936
+1222 677
+41 677
+602 1371
+602 1372
+61 1611
+1611 1501
+41 1321
+41 1320
+317 1612
+1590 1612
+1543 1593
+4 1538
+6 1538
+1613 1509
+19 1613
+1545 1596
+1488 1614
+866 1614
+101 5
+558 5
+523 139
+1615 221
+1615 1598
+91 1266
+1616 574
+574 1617
+1616 1617
+99 1618
+1618 715
+15 402
+1619 1620
+15 1619
+15 1620
+262 279
+1621 279
+1621 262
+868 1622
+15 1622
+1556 1605
+1623 908
+5 1623
+1624 1625
+1348 1625
+1348 1624
+1591 1625
+317 1625
+757 266
+1057 266
+258 1626
+1626 257
+1463 1243
+1463 1627
+1627 1243
+61 1628
+1628 1528
+1629 426
+41 426
+41 1629
+1565 1611
+128 1106
+128 1455
+788 889
+697 889
+1630 1543
+19 1630
+1372 1589
+1371 1589
+1567 1613
+1488 720
+1488 1495
+61 1631
+1631 1545
+1614 422
+866 422
+765 37
+765 1124
+1266 770
+1266 1632
+1632 770
+221 1633
+1615 1633
+602 1634
+1634 1635
+602 1635
+1616 92
+92 574
+852 286
+1636 286
+1636 852
+1104 1366
+1366 569
+1637 41
+1637 1323
+1638 1639
+15 1638
+15 1639
+98 1203
+1203 99
+1386 118
+61 1640
+1640 1556
+2 1457
+1641 1457
+2 1641
+891 264
+1642 1643
+1643 1644
+1644 1642
+1645 599
+1646 1645
+1646 599
+1584 1628
+1344 1647
+1573 1647
+218 1201
+1648 1565
+19 1648
+1519 176
+178 1519
+699 13
+13 1649
+1649 699
+561 1650
+1650 818
+1593 1630
+61 1651
+1651 1567
+1652 1342
+1340 1652
+332 1653
+1653 1654
+332 1654
+510 1382
+509 1382
+54 1385
+1596 1631
+1466 1383
+1467 1383
+574 1655
+575 1655
+823 1105
+1011 436
+1656 1657
+1658 1657
+1658 1656
+550 1659
+602 1659
+1660 1661
+1661 1454
+1454 1660
+248 1221
+248 1220
+1087 1662
+1218 1662
+1218 1087
+1021 41
+74 41
+1045 1147
+1147 1046
+1409 286
+284 1663
+1664 284
+1663 1664
+1286 966
+967 1286
+251 1665
+251 1666
+1665 1666
+983 1667
+1667 1308
+983 1308
+1605 1640
+5 1579
+1668 1579
+5 1668
+1669 279
+1669 1670
+1670 279
+1309 1671
+1672 1309
+1671 1672
+766 702
+1032 1102
+1032 1101
+1673 1584
+19 1673
+128 1107
+1047 231
+232 1047
+1674 1675
+1674 1676
+1675 1676
+1611 1648
+1677 1169
+805 1677
+951 1311
+1311 1352
+951 1352
+1678 561
+1678 1650
+61 1679
+1679 1593
+179 327
+327 454
+179 454
+1613 1651
+820 1030
+510 1680
+509 1680
+870 1681
+1681 1682
+1682 870
+1683 1596
+19 1683
+562 639
+1684 1504
+507 1684
+842 1033
+5 2
+5 819
+2 819
+1685 913
+1685 665
+913 665
+198 1686
+15 198
+15 1686
+489 118
+117 489
+1254 624
+98 1056
+1386 222
+842 222
+761 735
+1687 1605
+19 1687
+954 384
+954 1554
+384 1554
+179 1688
+1688 1158
+338 1689
+1689 904
+1519 1690
+1690 176
+1691 599
+1645 1691
+952 1358
+1628 1673
+1658 1692
+1658 1693
+1692 1693
+1674 1694
+1694 1675
+336 753
+461 1695
+461 1000
+1000 1695
+61 1696
+1696 1611
+1186 1311
+1630 1679
+1697 1613
+19 1697
+1678 501
+1698 117
+1191 1698
+243 1699
+560 1699
+1631 1683
+507 148
+621 148
+507 621
+574 549
+575 549
+1453 1661
+1700 446
+447 1700
+1701 1358
+1702 1358
+1701 1702
+1703 1704
+1704 272
+1703 272
+1285 967
+1375 1672
+1045 345
+324 345
+970 106
+106 1705
+970 1705
+1496 1706
+1495 1706
+1707 1708
+1709 1707
+1709 1708
+874 1086
+1086 875
+1640 1687
+1710 1711
+41 1711
+41 1710
+179 66
+179 64
+61 1712
+1712 1628
+1713 772
+772 1714
+1713 1714
+15 1310
+15 1311
+1715 1716
+1717 1715
+1716 1717
+1648 1696
+29 283
+1718 29
+283 1718
+414 231
+1719 1630
+19 1719
+1651 1697
+1136 450
+1393 450
+1266 1720
+1266 1262
+1262 1720
+1406 1721
+1406 1722
+1721 1722
+1723 177
+1723 1724
+1724 177
+61 1725
+1725 1631
+1301 294
+294 537
+1301 537
+1577 124
+124 89
+1503 385
+602 385
+352 878
+1011 352
+1726 1486
+1486 61
+1726 61
+163 103
+1559 163
+1727 536
+41 536
+41 1727
+1098 974
+974 1227
+1728 1729
+1153 1728
+1729 1153
+1599 386
+1599 387
+1730 349
+350 1730
+1084 1731
+1731 964
+348 1732
+1635 348
+1635 1732
+1733 1658
+1693 1733
+1734 270
+1734 1735
+270 1735
+1043 874
+1043 1086
+61 1736
+1736 1640
+1737 1688
+1158 1737
+1738 1739
+15 1738
+15 1739
+467 658
+1411 658
+1673 1712
+1740 1741
+1742 1741
+1740 1742
+771 1014
+2 1378
+1743 1378
+2 1743
+1694 177
+1674 177
+1744 1648
+19 1744
+844 924
+1462 924
+1745 1746
+1746 402
+1745 402
+1679 1719
+1539 1747
+1748 1747
+1539 1748
+1357 1749
+1750 1749
+1750 1357
+775 64
+775 932
+64 932
+61 1751
+1751 1651
+1701 222
+1702 222
+1683 1725
+592 1752
+15 592
+15 1752
+1429 257
+1429 1626
+346 451
+1753 286
+1253 1753
+132 1754
+1754 1650
+132 1650
+1187 124
+450 528
+528 878
+1242 978
+980 1242
+380 505
+163 104
+1755 1179
+15 1755
+1756 463
+463 1757
+1756 1757
+1758 1677
+15 1758
+15 1677
+1344 1004
+1573 1004
+1495 1614
+721 1614
+398 1708
+1708 396
+1127 61
+1126 61
+1687 1736
+467 1759
+1759 899
+1760 1673
+19 1760
+1401 1260
+978 1473
+935 1473
+978 935
+1761 1762
+1761 360
+1762 360
+1537 1763
+1764 1763
+1537 1764
+1654 713
+1696 1744
+286 1033
+1745 1427
+1427 1746
+61 1765
+1765 1679
+446 158
+1700 158
+458 830
+458 473
+830 473
+1697 1751
+1766 910
+1766 1767
+1767 910
+1768 1683
+19 1768
+1769 41
+1770 41
+1770 1769
+1488 1771
+866 1771
+1325 552
+1772 1773
+887 1773
+887 1772
+1429 1774
+1428 1774
+348 1634
+385 1634
+1775 1448
+1775 1449
+1020 1776
+1054 1776
+300 1693
+300 1733
+1158 1416
+1416 1737
+1777 1778
+15 1777
+15 1778
+1203 979
+1203 1779
+1779 979
+970 107
+441 1780
+1083 1780
+441 1083
+1411 920
+247 920
+1411 247
+1113 1329
+300 1329
+1781 1687
+19 1781
+1259 740
+740 1258
+1782 913
+41 1782
+1712 1760
+54 1783
+54 688
+1783 688
+1645 1784
+1646 1784
+1461 5
+844 5
+92 72
+1495 72
+92 1495
+716 1131
+1785 1131
+716 1785
+1450 1763
+1786 1787
+1788 1787
+1786 1788
+1340 933
+1652 933
+614 724
+383 1215
+61 1789
+1789 1696
+1540 5
+1539 5
+1186 1359
+1678 434
+1719 1765
+1790 1697
+19 1790
+1594 1153
+1288 286
+1753 1288
+1285 286
+1732 347
+1791 41
+1766 41
+1766 1791
+1406 1792
+1793 1792
+1406 1793
+1725 1768
+1794 1795
+1796 1794
+1795 1796
+525 921
+525 1411
+1325 528
+1326 528
+1690 177
+440 1690
+1448 1797
+1775 1797
+1407 1438
+1798 41
+1799 41
+1799 1798
+1800 1758
+15 1800
+300 1365
+1801 1365
+300 1801
+1802 41
+1803 41
+1803 1802
+205 1573
+205 1344
+978 1205
+1736 1781
+61 1804
+1804 1712
+1805 109
+109 1806
+1805 1806
+1807 781
+41 1807
+1537 25
+1450 25
+868 479
+1808 1809
+1809 1274
+1808 1274
+1744 1789
+1810 1811
+1811 41
+1810 41
+1812 1719
+19 1812
+1751 1790
+219 1327
+219 742
+1327 742
+1660 467
+229 1546
+1546 555
+1791 910
+473 7
+796 1776
+797 1776
+61 1813
+1813 1725
+824 1121
+824 1120
+1321 1814
+789 1321
+1814 789
+140 1667
+1815 1595
+1815 1816
+1816 1595
+1654 1817
+713 1817
+1158 651
+952 1352
+219 1818
+1026 1818
+219 1026
+333 1797
+1797 331
+943 1681
+99 1819
+1819 1820
+99 1820
+61 1821
+1821 1736
+1129 1822
+1822 1128
+5 1323
+669 702
+766 669
+1760 1804
+644 1689
+1689 645
+666 142
+1823 664
+1823 345
+345 664
+1574 292
+1048 292
+1048 1574
+1824 1744
+19 1824
+1765 1812
+61 1825
+1825 1751
+1635 1167
+1694 685
+1674 685
+1466 2
+343 1466
+1768 1813
+678 227
+678 1826
+227 1826
+481 1171
+638 1171
+1827 468
+467 1827
+1513 1493
+1828 1493
+1513 1828
+1823 1045
+1823 1147
+1597 1829
+1550 1829
+1243 115
+1243 1464
+1464 115
+1559 222
+360 835
+775 1159
+775 1830
+1159 1830
+15 144
+15 143
+327 644
+644 325
+5 40
+1781 1821
+1831 1727
+1832 1831
+1727 1832
+1833 1834
+1835 1834
+1833 1835
+1836 1760
+19 1836
+846 1837
+845 1837
+143 1838
+1838 913
+913 143
+1839 397
+971 397
+1839 971
+1789 1824
+41 405
+41 404
+129 1840
+128 1840
+1301 1007
+1220 926
+1220 1264
+926 1264
+16 1678
+16 434
+1253 624
+61 1841
+1841 1765
+1790 1825
+474 1842
+1842 1843
+474 1843
+1844 685
+1518 1844
+830 25
+1845 1768
+19 1845
+467 150
+1549 1394
+1508 1549
+1508 1394
+440 1846
+1690 1846
+600 353
+1056 716
+1056 1131
+1161 22
+1189 1161
+1847 1230
+963 1847
+250 1848
+1848 996
+1139 1849
+1849 1035
+1139 1035
+1850 1851
+1851 1592
+1850 1592
+1091 1820
+1091 1852
+1820 1852
+317 2
+1591 2
+1431 1762
+414 1853
+1853 104
+414 104
+1540 1748
+970 675
+107 675
+1854 1781
+19 1854
+1855 1235
+1855 803
+1856 861
+73 1856
+1804 1836
+907 1345
+906 1345
+93 1245
+1349 1245
+1413 41
+1857 41
+1857 1413
+1137 1471
+1583 1471
+980 1858
+979 1858
+133 216
+15 133
+15 216
+61 1859
+1859 1789
+1860 1861
+1861 1862
+1862 1860
+641 1775
+641 1448
+1863 1027
+1863 1336
+1812 1841
+1864 1790
+19 1864
+533 1842
+300 1658
+300 1656
+1813 1845
+1865 1866
+1865 182
+182 1866
+899 1237
+1237 1867
+899 1867
+467 808
+1868 1056
+1056 676
+1868 676
+1846 439
+1137 528
+1326 1137
+158 1869
+158 1786
+1786 1869
+54 1048
+54 1574
+1870 250
+1870 1848
+1030 1392
+527 481
+995 481
+995 527
+1270 1871
+1271 1871
+1587 1872
+1872 1586
+1385 680
+1783 680
+1385 1783
+1588 186
+1588 316
+316 186
+1821 1854
+1247 1873
+41 1873
+41 1247
+249 1874
+1874 1875
+249 1875
+1872 1876
+1877 1872
+1876 1877
+61 1878
+1878 1804
+1627 1879
+1879 169
+1627 169
+1161 1085
+1253 442
+1253 256
+256 442
+611 619
+1823 619
+611 1823
+1876 1880
+41 1880
+41 1876
+1824 1859
+173 1610
+173 1609
+1863 1633
+1818 1633
+1818 1863
+1881 1812
+19 1881
+1723 685
+1844 1723
+1825 1864
+179 1882
+1882 1883
+179 1883
+474 548
+533 548
+464 1658
+464 1656
+61 1884
+1884 1813
+218 1885
+1886 218
+1885 1886
+642 1887
+1314 1887
+124 770
+124 1632
+1056 1819
+1131 1819
+1355 745
+1355 746
+15 294
+141 1667
+1371 69
+69 1510
+61 1888
+1888 1821
+1889 41
+1890 41
+1890 1889
+1891 1487
+1600 1891
+1836 1878
+309 1338
+1472 1338
+1439 1464
+1892 1757
+1757 1893
+1892 1893
+766 738
+767 738
+1894 1824
+19 1894
+1210 1895
+1896 1895
+1210 1896
+1841 1881
+1108 653
+1108 1575
+61 1897
+1897 1825
+248 759
+248 1898
+759 1898
+1882 1830
+1883 1830
+105 675
+1845 1884
+54 166
+54 165
+1899 1900
+1900 41
+1899 41
+758 1612
+1612 948
+758 948
+1731 822
+1816 579
+1816 356
+150 810
+150 1901
+1901 810
+1828 1512
+1828 1902
+1512 1902
+574 1903
+1617 1903
+1328 1851
+1329 1851
+1870 522
+1852 1090
+381 367
+890 367
+381 890
+1243 334
+334 1904
+1243 1904
+1430 528
+1905 1587
+41 1587
+41 1905
+930 187
+1396 187
+1396 930
+249 1547
+249 1548
+1906 1907
+1316 1906
+1316 1907
+1854 1888
+1908 1836
+19 1908
+1472 310
+1909 1757
+1909 1892
+1910 41
+1703 41
+1703 1910
+331 641
+641 333
+1911 1912
+1140 1912
+1911 1140
+1558 68
+1859 1894
+832 1129
+41 1129
+41 832
+61 1913
+1913 1841
+464 1909
+1656 1909
+205 175
+205 174
+1468 2
+179 1830
+1864 1897
+645 271
+645 775
+1551 1914
+1914 1915
+1551 1915
+1916 1845
+19 1916
+1731 61
+17 1917
+18 1917
+1009 1918
+1919 1918
+1009 1919
+1920 352
+1920 1211
+1902 1493
+1903 575
+1921 1922
+1923 1922
+1921 1923
+528 1279
+528 1278
+174 1526
+1526 1924
+174 1924
+1104 1120
+823 1120
+61 776
+776 888
+61 888
+597 809
+865 809
+1925 1644
+1642 1925
+973 966
+966 230
+973 230
+1138 528
+1926 1854
+19 1926
+1622 1927
+15 1927
+1878 1908
+310 1928
+1472 1928
+1910 272
+433 585
+15 585
+333 1775
+332 1775
+1929 1930
+1931 1930
+1931 1929
+61 1932
+1932 1859
+16 816
+816 17
+1873 1552
+1620 1873
+1552 1620
+1896 352
+1786 1933
+1786 353
+1933 353
+1881 1913
+1934 1274
+1934 1801
+1801 1274
+822 1230
+205 1181
+205 1002
+1935 1864
+19 1935
+1551 1268
+1268 1914
+1884 1916
+1936 1320
+1937 1936
+1320 1937
+99 1852
+1815 579
+1634 1938
+1635 1938
+1512 177
+1828 177
+1557 1922
+451 1557
+451 1922
+928 1939
+602 1939
+800 1940
+41 1940
+41 800
+1941 41
+1941 1490
+61 673
+693 294
+885 294
+1014 33
+1014 32
+1396 959
+1396 1942
+1942 959
+1888 1926
+1542 217
+61 1943
+1943 1878
+1944 1945
+1359 1945
+1944 1359
+1711 1925
+1946 1711
+1925 1946
+1839 396
+1076 292
+1894 1932
+15 109
+15 1806
+1892 464
+1882 1676
+1676 1947
+1882 1947
+179 1087
+179 968
+1948 1881
+19 1948
+822 1183
+1103 843
+1145 843
+1897 1935
+61 1949
+1949 1884
+1868 99
+99 676
+1950 1390
+1950 1009
+1390 1009
+1939 1075
+5 1951
+1952 1951
+5 1952
+974 1285
+2 1953
+1954 1953
+2 1954
+604 1188
+604 1955
+1955 1188
+61 1956
+1956 1957
+61 1957
+1085 1603
+802 1603
+1085 802
+61 1958
+1958 1888
+2 881
+1959 881
+2 1959
+179 1218
+1908 1943
+786 1194
+786 1193
+1349 750
+1349 751
+695 548
+696 548
+1960 1552
+1553 1960
+1931 962
+1931 81
+81 962
+1203 1741
+1741 1202
+560 1961
+512 1961
+1962 41
+1963 41
+1963 1962
+1964 1894
+19 1964
+730 1965
+1965 1966
+730 1966
+54 887
+54 1772
+1159 1882
+1159 1676
+1599 1350
+1392 765
+1009 765
+54 1001
+54 827
+1913 1948
+1967 139
+139 1666
+1666 1967
+61 1968
+1968 1897
+1386 1636
+1916 1949
+899 1363
+1957 1969
+1957 9
+9 1969
+22 1085
+1114 1970
+1970 1971
+1114 1971
+1514 1972
+1972 1973
+1514 1973
+532 732
+1974 802
+803 1974
+897 1975
+1975 896
+746 1356
+1976 370
+15 1976
+15 370
+1977 1083
+1978 1083
+1977 1978
+693 1979
+1979 294
+1844 1519
+1085 1602
+1926 1958
+1492 1980
+41 1980
+1981 1908
+19 1981
+879 1193
+300 1909
+300 1892
+93 750
+763 1458
+763 1568
+73 1982
+1388 1982
+73 1388
+1983 1625
+318 1983
+1625 318
+1624 2
+1348 2
+1839 177
+971 177
+1680 1774
+15 1680
+15 1774
+1932 1964
+25 1963
+839 1963
+1882 1984
+1159 1984
+1985 92
+1985 1986
+92 1986
+54 1192
+1987 1192
+54 1987
+61 1988
+1988 1913
+1989 1328
+1989 1990
+1990 1328
+1935 1968
+1991 1916
+19 1991
+5 1992
+5 1993
+1992 1993
+573 533
+573 1994
+1994 533
+1995 1767
+1995 151
+151 1767
+1243 1721
+1243 1722
+27 41
+1996 41
+1996 27
+802 1997
+1997 1974
+1998 1999
+41 1999
+41 1998
+1745 472
+1427 472
+1158 652
+1688 652
+164 510
+164 509
+2000 1926
+19 2000
+158 1071
+158 1073
+1 5
+2001 1
+5 2001
+1943 1981
+1909 1657
+1892 1657
+54 1823
+54 1045
+177 279
+177 564
+279 564
+544 1942
+415 1942
+1922 1558
+874 497
+455 2002
+1307 2002
+61 2003
+2003 1932
+5 1941
+2004 1941
+5 2004
+2005 933
+933 2006
+2006 2005
+1636 842
+1948 1988
+2007 1935
+19 2007
+2008 8
+2008 431
+1949 1991
+974 286
+179 1707
+1707 774
+1995 41
+1995 1766
+1608 519
+2009 2010
+2009 858
+858 2010
+5 655
+1993 655
+1158 1675
+1688 1675
+1657 1809
+15 1657
+15 1809
+1987 344
+829 1987
+1138 1393
+219 1692
+1808 1692
+219 1808
+930 959
+1958 2000
+775 1088
+1911 840
+1140 840
+638 526
+526 636
+54 1295
+347 1922
+1923 347
+242 1458
+61 2011
+2011 1943
+41 1891
+1847 492
+2012 492
+1847 2012
+882 2013
+2013 2014
+882 2014
+1964 2003
+2015 1525
+15 2015
+15 1525
+2016 1753
+1288 2016
+2017 1948
+19 2017
+1968 2007
+61 2018
+2018 1949
+456 1310
+455 1310
+41 1822
+610 1709
+179 1709
+1039 2019
+1038 2019
+289 2020
+1430 2020
+1731 989
+1731 1950
+1950 989
+2021 771
+1898 771
+1898 2021
+1814 2022
+41 2022
+41 1814
+2023 1245
+1245 2024
+2023 2024
+61 2025
+2025 1958
+1483 2026
+2026 59
+1483 59
+164 985
+164 2027
+2027 985
+746 1111
+714 1479
+714 834
+1981 2011
+1855 1561
+1561 2028
+2028 1855
+1929 962
+602 2029
+2029 816
+1715 751
+1715 1349
+670 598
+2030 1710
+41 2030
+2031 1964
+19 2031
+1557 216
+451 216
+1514 2032
+2033 2032
+1514 2033
+1988 2017
+487 1368
+1367 487
+1138 1394
+1394 1583
+61 2034
+2034 1968
+1610 206
+365 1114
+34 442
+442 2035
+34 2035
+1991 2018
+2036 907
+516 907
+2036 516
+2037 1876
+1880 2037
+793 1213
+2038 1213
+2038 793
+1411 567
+129 846
+64 968
+64 825
+93 2023
+692 1979
+523 251
+2039 251
+523 2039
+332 917
+332 915
+2000 2025
+2023 750
+2023 755
+755 750
+1447 2026
+54 1156
+54 723
+1313 41
+2040 41
+2040 1313
+2041 1981
+19 2041
+714 1817
+122 399
+2005 2042
+2042 397
+2005 397
+816 2043
+2043 1917
+816 1917
+1001 344
+1911 841
+2003 2031
+1316 614
+1316 724
+2044 1278
+528 2044
+1215 417
+1215 569
+61 2045
+2045 1988
+1367 2046
+1369 2046
+2007 2034
+1326 1229
+1326 450
+300 1506
+300 1541
+1076 1163
+1076 783
+2047 1991
+19 2047
+922 1121
+2048 399
+121 2048
+399 121
+1326 706
+1325 706
+825 66
+15 1600
+15 1601
+2049 373
+2050 373
+2049 2050
+243 2051
+1699 2051
+525 566
+2052 109
+1805 2052
+2053 2000
+19 2053
+2054 2055
+41 2055
+41 2054
+2011 2041
+15 1078
+2005 2056
+2056 2042
+816 288
+773 16
+16 1508
+507 419
+1127 419
+1013 1858
+1013 1779
+1779 1858
+61 2057
+2057 2003
+2058 851
+849 2058
+1214 417
+975 1382
+2017 2045
+173 207
+173 206
+2059 2007
+19 2059
+222 918
+1188 918
+1137 450
+2018 2047
+843 1338
+1339 843
+974 620
+1227 620
+1934 373
+373 1833
+1934 1833
+1990 204
+204 2060
+1990 2060
+2061 1568
+2062 1568
+2061 2062
+521 2063
+1198 2063
+2049 279
+2050 279
+678 5
+251 1870
+2039 1870
+2025 2053
+276 1782
+41 276
+264 1625
+1591 264
+131 2064
+41 2064
+61 2065
+2065 2011
+2066 41
+2067 41
+2067 2066
+1524 483
+1524 484
+1001 912
+912 1398
+1073 2068
+1933 1073
+1933 2068
+2031 2057
+667 1072
+674 889
+788 674
+2069 2070
+2069 920
+920 2070
+2071 2017
+19 2071
+2072 41
+2072 1996
+1114 1851
+365 1851
+2034 2059
+915 1080
+1080 2073
+915 2073
+1121 1209
+61 2074
+2074 2018
+1252 1898
+2021 1252
+1792 1699
+1792 2051
+1056 625
+1056 1206
+625 1206
+54 2075
+54 2076
+2076 2075
+1203 1906
+179 825
+722 2077
+15 722
+15 2077
+1209 383
+243 73
+560 73
+2049 1833
+1692 1809
+1627 1110
+1110 2078
+1627 2078
+139 252
+139 251
+61 2079
+2079 2025
+1927 1980
+1980 1622
+2041 2065
+1915 2080
+15 1915
+15 2080
+931 2081
+1239 2081
+207 1269
+1269 2082
+207 2082
+2083 2031
+19 2083
+790 1814
+1818 1027
+2045 2071
+186 722
+15 186
+1723 1519
+1268 1197
+2021 1449
+1714 1449
+2021 1714
+61 2084
+2084 2034
+2047 2074
+1776 2085
+1358 1776
+2085 1358
+99 2086
+2086 2087
+99 2087
+837 2088
+2089 2088
+837 2089
+1327 718
+1329 718
+2090 852
+852 842
+2090 842
+54 615
+15 664
+1365 1274
+1365 1934
+363 2091
+2092 363
+2092 2091
+2053 2079
+1483 1762
+1447 1762
+1993 41
+1992 41
+2 2093
+622 2093
+2 622
+2094 2041
+19 2094
+755 2024
+2024 2095
+755 2095
+775 618
+774 618
+1499 2096
+15 1499
+15 2096
+2057 2083
+1772 2097
+2097 1773
+1297 1485
+1549 1829
+1508 1829
+2098 1249
+31 1249
+31 2098
+61 2099
+2099 2045
+2059 2084
+1417 1208
+1417 1209
+2100 2047
+19 2100
+15 1860
+15 1861
+1199 61
+1199 2101
+61 2101
+306 621
+306 148
+1046 912
+2090 286
+988 286
+988 2090
+54 1588
+985 1588
+54 985
+1269 2102
+1271 2102
+334 1425
+1904 1425
+2086 234
+1319 2086
+2052 947
+1805 947
+1788 254
+1787 254
+54 251
+82 1559
+82 222
+467 1901
+2103 2053
+19 2103
+539 2104
+288 2104
+2065 2094
+1639 2105
+2105 2106
+2106 1639
+61 2107
+2107 2057
+826 450
+2108 946
+947 2108
+2109 2110
+590 2110
+590 2109
+1220 25
+1221 25
+2062 85
+1568 85
+1262 1569
+1263 1569
+365 1970
+2071 2099
+704 1022
+704 1023
+2111 2059
+19 2111
+2112 765
+2112 737
+516 1571
+191 1571
+1205 1281
+1205 1489
+2074 2100
+2113 41
+2113 1373
+1203 2114
+2114 612
+1203 612
+306 1514
+306 2033
+179 1340
+179 1652
+323 345
+1627 2115
+2115 1793
+1627 1793
+1349 1895
+1895 1245
+89 2116
+2116 1577
+2079 2103
+1445 404
+404 1444
+1871 297
+1270 297
+1085 2117
+1602 2117
+2118 2116
+2118 1368
+1368 2116
+61 2119
+2119 2065
+813 1555
+2120 1555
+813 2120
+817 2043
+2083 2107
+2009 2077
+2121 2077
+2121 2009
+73 1802
+73 1803
+1472 118
+118 1338
+193 905
+2122 2071
+19 2122
+1686 136
+137 1686
+2084 2111
+1417 1121
+61 2123
+2123 2074
+1227 222
+1713 1797
+1797 1249
+1713 1249
+54 185
+108 2108
+108 946
+1243 10
+525 1646
+525 1645
+1262 2124
+1720 2124
+1627 2098
+2098 1713
+1627 1713
+838 2089
+1160 392
+181 1160
+2125 41
+153 2125
+1692 1834
+1808 1834
+1906 614
+1793 321
+1792 321
+360 2126
+360 2127
+2126 2127
+61 2128
+2128 2079
+972 177
+972 1839
+2129 450
+2130 450
+2130 2129
+2102 2032
+2032 2131
+2102 2131
+307 1973
+1973 1502
+307 1502
+2132 298
+2132 296
+54 925
+2094 2119
+2133 41
+2118 41
+2118 2133
+1763 1912
+1912 2134
+1763 2134
+2135 2083
+19 2135
+2136 800
+1940 2136
+2092 1851
+1850 2092
+2099 2122
+15 1375
+15 1672
+1772 1441
+2097 1441
+824 1208
+61 2137
+2137 2084
+978 2114
+978 612
+1088 2056
+1340 2056
+979 2138
+1779 2138
+573 1495
+2100 2123
+507 210
+2016 286
+2098 772
+1243 2139
+2139 10
+467 1334
+884 2140
+2140 2141
+884 2141
+1830 2142
+179 2142
+2069 41
+2069 846
+2143 1755
+1755 2144
+2144 2143
+1217 439
+1174 439
+1793 1699
+1604 2028
+1604 1561
+15 2019
+1085 482
+1085 401
+2103 2128
+41 1455
+2133 2116
+2145 2094
+19 2145
+352 1811
+352 1810
+193 279
+338 279
+2146 41
+2147 41
+2147 2146
+2107 2135
+1586 1877
+15 1586
+15 1877
+1145 222
+2127 1479
+61 2148
+2148 2099
+1772 1410
+2111 2137
+164 1396
+164 544
+1652 2056
+1422 2149
+246 2149
+573 72
+2150 2100
+19 2150
+543 2151
+2151 542
+333 1713
+333 1714
+555 1303
+554 1303
+2078 683
+1627 683
+1883 1947
+838 2
+837 2
+1848 1318
+1318 996
+828 1193
+829 1193
+1724 1519
+2152 2103
+19 2152
+652 2153
+15 652
+15 2153
+158 2154
+158 600
+600 2154
+1522 956
+956 1521
+2119 2145
+475 2155
+2155 704
+475 704
+882 2156
+2156 2013
+191 564
+61 2157
+2157 2107
+41 595
+41 1607
+1785 2158
+1130 2158
+1785 1130
+1969 61
+2159 2160
+2160 2161
+2159 2161
+2122 2148
+2 2162
+2163 2162
+2 2163
+2164 2116
+2164 1368
+1430 450
+887 1410
+886 1410
+2165 2111
+19 2165
+2123 2150
+2166 1930
+2166 2121
+2121 1930
+1222 394
+1548 2124
+2124 1569
+1518 2167
+1844 2167
+1743 41
+880 1743
+1085 1745
+918 2168
+2168 1188
+82 1560
+2128 2152
+759 1014
+41 1172
+41 1173
+61 2169
+2169 2119
+476 2155
+2135 2157
+1266 1369
+15 1642
+15 1643
+2170 795
+2170 769
+769 795
+253 429
+488 118
+905 564
+2171 2122
+19 2171
+341 1770
+54 1978
+54 1977
+1665 2172
+251 2172
+34 1033
+34 286
+2137 2165
+837 1028
+1029 837
+819 1022
+819 1625
+1022 1625
+2173 41
+670 2173
+2159 282
+173 2159
+61 2174
+2174 2123
+194 1188
+54 2027
+1674 1723
+1724 1674
+1085 431
+1085 2008
+760 361
+61 2175
+2175 2128
+564 2176
+565 2176
+1117 1945
+1116 1945
+1266 793
+1266 2038
+15 1975
+1269 1346
+1269 2177
+1346 2177
+2145 2169
+164 1429
+164 929
+929 1429
+2178 2179
+2180 2178
+2179 2180
+2181 2135
+19 2181
+1107 795
+2182 52
+53 2182
+2170 41
+2170 1107
+1425 779
+779 1424
+1051 1681
+2148 2171
+15 497
+15 498
+1330 564
+1134 361
+2183 1134
+2183 361
+61 2184
+2184 2137
+2185 1625
+1468 1625
+1468 2185
+2173 598
+173 1181
+1307 1310
+2150 2174
+1206 627
+627 1350
+1206 1350
+2139 12
+1923 2130
+2130 347
+1929 2186
+962 2186
+1850 2091
+980 1749
+1749 1858
+2152 2175
+2187 577
+578 2187
+2006 179
+179 2056
+2056 2006
+2188 2145
+19 2188
+790 2189
+15 2189
+2157 2181
+15 1306
+2190 330
+2191 2190
+330 2191
+61 2192
+2192 2148
+1820 2193
+1819 2193
+1293 367
+2165 2184
+1779 1826
+1826 2138
+2194 2150
+19 2194
+2195 1746
+15 2195
+15 1746
+2033 1972
+1921 528
+1923 528
+1085 366
+1439 237
+237 2196
+1439 2196
+191 35
+1495 71
+1312 41
+2197 948
+758 2197
+2198 978
+978 1056
+2198 1056
+1929 2199
+2199 1930
+1978 1780
+2200 2152
+19 2200
+891 1983
+233 1983
+714 916
+916 1817
+2176 918
+918 61
+2176 61
+2169 2188
+602 18
+602 17
+2201 2202
+1655 2202
+2201 1655
+61 164
+164 2157
+1987 1193
+1303 1253
+1303 1753
+2171 2192
+633 583
+41 583
+41 633
+2193 2203
+1819 2203
+54 456
+54 1515
+456 1515
+2204 2165
+19 2204
+923 613
+2174 2194
+2205 2206
+41 2206
+41 2205
+505 1296
+1296 380
+124 2164
+1577 2164
+1438 237
+2207 265
+1383 2207
+2112 820
+820 737
+2120 1173
+2166 1419
+2199 2166
+2199 1419
+802 1219
+1219 1997
+1170 806
+562 1308
+2208 1749
+1749 1242
+1242 2208
+2130 528
+2175 2200
+937 2209
+2209 1566
+61 2210
+2210 2169
+1682 1051
+475 548
+476 548
+2181 164
+2022 1998
+116 854
+2211 2171
+19 2211
+2212 1435
+2212 1054
+2184 2204
+1013 1826
+61 2213
+2213 2174
+354 1121
+1121 1554
+1266 2164
+2164 1369
+139 1665
+1665 2214
+139 2214
+1439 212
+1438 212
+2215 313
+1180 2215
+313 1180
+2216 2198
+2198 61
+2216 61
+788 1066
+697 1066
+15 534
+15 535
+1624 704
+1801 1833
+1801 1835
+2176 632
+1481 1009
+61 2217
+2217 2175
+2151 267
+2218 2151
+267 2218
+830 471
+1243 1423
+1423 1405
+2219 2220
+2221 2219
+2220 2221
+2188 2210
+352 1477
+352 1478
+1304 554
+41 1885
+139 2181
+19 139
+1372 69
+219 1541
+2222 1541
+219 2222
+2 2223
+2224 2223
+2 2224
+1669 193
+312 1669
+1192 344
+1192 2149
+2149 344
+2192 2211
+2225 1946
+1711 2225
+231 989
+61 2226
+2226 2184
+441 222
+441 256
+2194 2213
+41 1644
+41 1925
+191 719
+92 533
+92 475
+2227 41
+2227 2228
+2228 41
+523 250
+139 250
+2036 1345
+1331 571
+773 602
+602 1508
+169 2229
+2229 85
+169 85
+2185 1028
+837 2185
+2200 2217
+5 2230
+2231 2230
+5 2231
+64 934
+2232 2233
+2233 945
+2232 945
+352 2234
+2235 2234
+352 2235
+1001 345
+54 2236
+1978 2236
+2237 2188
+19 2237
+593 940
+940 592
+2016 1303
+1060 2238
+2238 1168
+164 139
+49 1955
+212 11
+1670 312
+174 484
+61 2239
+2239 2192
+1059 740
+139 311
+1485 2008
+1485 2240
+2240 2008
+1026 1595
+1816 1026
+408 605
+408 2241
+605 2241
+2204 2226
+1506 2242
+2242 1592
+2243 2194
+19 2243
+1975 2244
+15 2244
+1571 312
+1989 204
+573 1903
+139 2245
+2245 1666
+1627 1792
+1792 320
+1627 320
+2246 1080
+2246 1081
+2247 205
+205 332
+2247 332
+25 2248
+2249 2248
+25 2249
+1406 1425
+1406 1423
+1879 2229
+2250 2200
+19 2250
+2056 933
+2210 2237
+352 153
+352 154
+2164 2046
+2046 90
+2164 90
+661 844
+1461 661
+2211 2239
+139 2075
+2075 2251
+139 2251
+22 594
+22 506
+1090 1383
+1090 2207
+2252 2204
+19 2252
+2183 2015
+2183 1525
+720 2253
+721 2253
+2213 2243
+2254 1832
+15 2254
+15 1832
+892 1705
+1275 2255
+2255 871
+1275 871
+915 1092
+2036 279
+1016 2187
+15 1016
+15 2187
+2256 467
+2257 467
+2256 2257
+1715 2258
+1717 2258
+1668 41
+54 2259
+1515 2259
+1326 1471
+2217 2250
+2260 481
+747 2260
+1304 2016
+1909 1756
+2130 2261
+2129 2261
+374 1301
+61 2262
+2262 2210
+1954 41
+1953 41
+542 2218
+407 680
+2263 680
+407 2263
+2264 2211
+19 2264
+1974 1085
+2226 2252
+61 2265
+2265 2213
+1617 549
+549 1616
+41 896
+41 895
+641 1110
+641 2078
+1195 2255
+54 316
+1527 2233
+1840 1874
+128 1874
+2266 513
+2267 513
+2266 2267
+661 6
+1020 952
+2013 1226
+2156 1226
+61 2268
+2268 2217
+5 1637
+1255 1637
+1206 1599
+30 1718
+15 1718
+2237 2262
+1100 2205
+2205 1099
+1726 419
+419 173
+1726 173
+908 41
+300 139
+19 300
+653 2153
+1576 2153
+704 1842
+704 1843
+2140 1481
+2239 2264
+777 1221
+2189 2022
+1998 2189
+2077 1930
+49 127
+866 514
+61 2269
+2269 2226
+1531 1846
+1531 439
+2243 2265
+53 1144
+1142 53
+967 1398
+967 912
+2270 2271
+2272 2271
+2272 2270
+2247 1609
+215 2273
+2273 159
+159 215
+1406 2139
+2274 2139
+1406 2274
+1609 915
+1609 2073
+1869 1788
+2275 1788
+1869 2275
+1275 1031
+1195 1031
+2276 41
+1293 2276
+1000 1469
+1469 1695
+219 1850
+1541 1850
+2250 2268
+1297 505
+1250 168
+15 168
+1828 1694
+1694 2277
+1828 2277
+1764 2134
+2134 2012
+1764 2012
+2278 2237
+19 2278
+2039 250
+191 2176
+2279 871
+872 2279
+173 833
+173 869
+1422 2280
+1194 2280
+2281 2282
+15 2281
+15 2282
+1485 1603
+1485 802
+1481 1919
+2283 1481
+1919 2283
+61 2284
+2284 2239
+2285 2286
+2286 151
+2285 151
+2 1900
+2 1899
+1266 768
+1820 1467
+1819 1467
+2252 2269
+2287 2243
+19 2287
+1406 84
+1406 169
+15 1015
+1304 286
+15 1914
+1715 2288
+2288 1716
+22 1296
+54 2212
+975 2212
+610 981
+1709 981
+2081 1226
+2013 2081
+2289 2250
+19 2289
+1269 296
+296 1270
+156 32
+157 32
+2232 1806
+2290 1806
+2290 2232
+2262 2278
+837 1625
+1029 1625
+1713 331
+352 2291
+2234 2291
+2264 2284
+15 831
+2216 978
+514 1771
+2292 2252
+19 2292
+139 1232
+139 1117
+720 1614
+2265 2287
+1582 690
+690 1581
+891 837
+837 264
+460 1120
+459 1120
+2256 2293
+2293 525
+2256 525
+219 1006
+495 1006
+1869 25
+1786 25
+2276 367
+2294 159
+215 2294
+1918 2283
+653 1902
+653 1493
+1694 1724
+1898 1449
+2268 2289
+1946 1642
+2295 972
+2295 1839
+759 771
+685 177
+177 2296
+2296 685
+1959 41
+61 2297
+2297 2262
+2298 41
+2299 41
+2299 2298
+2185 343
+1468 343
+1838 1860
+1860 914
+914 1838
+1951 41
+1952 41
+300 1990
+1990 742
+300 742
+2300 2264
+19 2300
+2218 395
+15 2218
+15 395
+1141 1849
+1815 1154
+1154 579
+2121 1419
+525 1236
+1236 1334
+1064 189
+2269 2292
+189 2160
+188 2160
+689 165
+1722 2274
+61 2301
+2301 2265
+1627 31
+1796 1976
+15 1796
+16 1075
+16 817
+1455 1548
+2302 205
+207 2302
+915 2247
+1092 2247
+34 631
+1571 193
+1570 193
+2303 41
+2304 41
+2304 2303
+320 1879
+320 2229
+934 1662
+15 934
+15 1662
+248 1875
+1875 2305
+248 2305
+61 2306
+2306 2268
+1898 25
+2021 25
+2121 858
+2278 2297
+778 471
+2064 1794
+41 1794
+2271 1051
+1682 2271
+179 300
+19 179
+751 501
+15 501
+300 1989
+300 1327
+1327 1989
+2284 2300
+1152 1815
+713 2127
+713 1479
+2027 987
+2027 1277
+1277 987
+1571 1834
+2307 1834
+1571 2307
+1700 491
+61 2308
+2308 2269
+2253 1496
+2287 2301
+2309 121
+2048 2309
+1624 1022
+355 1119
+354 1119
+1326 289
+1923 450
+1921 450
+1670 193
+196 635
+196 177
+92 1488
+92 866
+2310 2311
+2312 2310
+2311 2312
+1581 804
+1580 804
+34 2176
+2313 377
+377 158
+2313 158
+2289 2306
+139 108
+108 562
+711 1031
+1497 1339
+311 1497
+2 2314
+2315 2314
+2 2315
+2316 2278
+19 2316
+2317 1400
+73 2317
+347 1938
+1938 1732
+645 300
+1879 168
+61 2318
+2318 2284
+1406 334
+1406 10
+758 2319
+2319 2320
+758 2320
+1834 1572
+2292 2308
+446 25
+1700 25
+2321 2287
+19 2321
+54 2232
+2259 2232
+1374 1952
+378 1119
+1200 1542
+1267 1569
+1267 1263
+357 219
+358 219
+1546 2186
+2186 1419
+2037 2322
+2322 1880
+2029 2323
+2323 2020
+2029 2020
+2206 1100
+1286 912
+1709 398
+2013 428
+2156 428
+127 1403
+1403 2061
+127 2061
+2324 2289
+19 2324
+1684 2032
+2033 1684
+246 2280
+124 209
+2251 2325
+139 2325
+2297 2316
+25 1996
+1229 528
+706 528
+526 637
+526 2326
+637 2326
+328 2271
+2300 2318
+980 1748
+980 1747
+2080 2046
+15 2046
+300 2242
+2242 1850
+300 1850
+2197 2319
+985 186
+2027 186
+2327 2292
+19 2327
+307 1871
+2131 1871
+307 2131
+1518 863
+2167 863
+92 1715
+92 2288
+2301 2321
+34 1559
+999 1853
+444 1853
+999 444
+1203 1740
+1203 1742
+337 1007
+517 1007
+239 664
+166 664
+5 2328
+469 2328
+2329 2330
+2331 2329
+2330 2331
+525 1901
+1901 808
+2306 2324
+926 25
+2106 2178
+2178 2105
+1266 209
+61 2332
+2332 2297
+706 2333
+1229 2333
+2334 1796
+15 2334
+1398 828
+2335 2300
+19 2335
+2247 173
+979 1748
+2161 1647
+15 2161
+15 1647
+300 1415
+300 371
+54 1805
+54 108
+1805 108
+2308 2327
+548 749
+2061 2336
+1403 2336
+1518 177
+1844 177
+360 2337
+2337 2126
+50 2338
+2338 51
+61 2339
+2339 2301
+378 25
+1576 1902
+2183 760
+648 2183
+760 648
+446 2313
+2172 522
+251 522
+411 351
+528 1241
+1068 1241
+19 2330
+2340 2330
+19 2340
+766 304
+304 738
+1546 961
+961 222
+61 2341
+2341 2306
+1877 2037
+15 2037
+5 2342
+2343 2342
+5 2343
+2316 2332
+706 2344
+2333 2344
+2345 2054
+992 2345
+2054 992
+602 179
+19 602
+2346 412
+2 2346
+332 1448
+1448 649
+332 649
+2318 2335
+1187 467
+467 124
+34 1097
+1097 974
+34 974
+1783 291
+1783 2347
+2347 291
+61 2348
+2348 2308
+2349 2091
+1507 2091
+2349 1507
+2350 564
+1330 2350
+2214 2172
+92 712
+1123 712
+92 1123
+1485 1602
+2321 2339
+2351 2143
+2143 1283
+1283 2351
+1740 2352
+1164 2352
+1164 1740
+19 2353
+2354 2353
+19 2354
+2042 2355
+2042 1341
+2355 1341
+1218 1176
+70 1122
+1123 70
+2197 1319
+1319 2319
+2356 1502
+2356 1039
+1215 460
+1366 460
+2357 795
+793 2357
+964 1604
+964 1234
+2331 2340
+1977 1774
+1978 1774
+467 1236
+429 1436
+2324 2341
+1906 2114
+978 1906
+2191 328
+1684 1972
+15 2273
+2358 2316
+19 2358
+90 1577
+363 1114
+1114 2092
+129 2069
+1128 2309
+15 1128
+15 2309
+1659 552
+54 1472
+54 1497
+517 1289
+518 1289
+61 2359
+2359 2318
+2360 2219
+848 2360
+2219 848
+308 1973
+2327 2348
+1634 1167
+2361 1111
+1356 1111
+2361 1356
+2362 2321
+19 2362
+2363 2354
+2353 2363
+2076 2251
+2356 2364
+2364 1502
+1432 69
+1432 68
+2365 1735
+2365 1734
+1080 545
+1080 1761
+545 1761
+61 2366
+2366 2331
+61 2331
+1978 1680
+2367 695
+2367 1618
+1618 695
+2368 2324
+19 2368
+129 46
+46 944
+2272 330
+2190 2272
+774 466
+774 981
+2332 2358
+596 2369
+520 596
+2369 520
+279 222
+279 2176
+222 2176
+1594 1026
+1152 1026
+1672 1443
+15 1443
+1134 2015
+2335 2359
+1085 2370
+1855 2370
+1085 1855
+1485 2117
+164 2371
+2371 925
+164 925
+2372 2327
+19 2372
+1330 685
+1330 2296
+2367 705
+694 2367
+694 705
+2339 2362
+481 194
+635 481
+490 1928
+1698 1928
+1698 490
+2352 613
+869 916
+928 2043
+61 2373
+2373 2363
+61 2363
+1463 2115
+1123 72
+28 336
+176 1086
+178 1086
+1632 795
+2357 1632
+1656 1756
+2374 541
+15 2374
+15 541
+1243 744
+744 2375
+1243 2375
+2208 1747
+1747 1242
+2340 2366
+2341 2368
+2376 41
+2376 1478
+1019 952
+775 2056
+61 2377
+2377 2332
+1269 2378
+2177 2378
+2256 49
+1955 2256
+884 2283
+649 736
+2379 2335
+19 2379
+1385 291
+2348 2372
+2325 2076
+61 2380
+2380 2339
+1535 1890
+1740 226
+2354 2373
+2381 194
+481 2381
+2236 1680
+2190 2271
+1188 603
+15 1274
+686 391
+392 686
+1502 1070
+2382 2340
+19 2382
+61 2383
+2383 2341
+1072 2068
+2068 202
+645 179
+300 2092
+1664 214
+214 1663
+701 1135
+1135 702
+139 1116
+1116 1307
+2358 2377
+1184 963
+1592 1979
+15 1592
+15 1979
+573 602
+19 573
+990 2320
+756 2320
+411 41
+412 41
+1138 450
+1485 401
+2117 401
+2359 2379
+18 708
+1659 708
+1659 18
+248 156
+248 158
+301 2384
+2384 2385
+301 2385
+61 2386
+2386 2348
+2362 2380
+2294 214
+1062 724
+1205 724
+2387 2354
+19 2387
+978 1316
+1243 1357
+1243 1355
+139 1295
+2236 1780
+1920 2271
+2267 2271
+2267 1920
+2302 173
+307 2364
+2364 1871
+1063 2356
+1063 2364
+2366 2382
+2368 2383
+240 1222
+1861 2388
+2388 1095
+1095 1861
+2389 2358
+19 2389
+1695 460
+1215 1695
+1195 2279
+2279 2255
+2277 1724
+2141 38
+15 2141
+15 38
+1049 2296
+525 150
+490 117
+61 2390
+2390 2359
+18 2333
+1659 2333
+2391 2392
+2392 2393
+2393 2391
+139 2232
+2232 1805
+139 1805
+969 1633
+573 70
+2191 352
+1266 2357
+2372 2386
+2394 2362
+19 2394
+2373 2387
+1203 1164
+2395 127
+1404 2395
+127 1404
+339 1008
+1008 709
+2356 1871
+1945 2002
+1116 2002
+183 1866
+1855 1604
+219 1365
+219 371
+1497 843
+2176 286
+1983 626
+2396 626
+1983 2396
+61 2397
+2397 2366
+2398 2368
+19 2398
+115 2196
+2196 114
+254 2283
+1788 2283
+1944 222
+1944 1701
+645 219
+2377 2389
+1485 482
+914 1862
+711 2279
+1832 534
+25 73
+73 1963
+332 736
+314 949
+1855 1997
+1997 1561
+2379 2390
+2399 945
+2399 1517
+2400 2372
+19 2400
+66 784
+784 65
+2380 2394
+61 2401
+2401 2373
+139 1497
+1497 2075
+978 1280
+2187 2281
+337 1008
+875 1846
+876 1846
+639 853
+640 853
+1670 1570
+649 1525
+1448 1525
+1666 2172
+2245 2172
+49 2293
+2176 631
+2382 2397
+821 304
+716 1130
+2383 2398
+760 701
+1828 685
+2402 1269
+2246 2402
+1269 2246
+1621 710
+347 2261
+61 2403
+2403 2377
+662 557
+661 557
+456 2404
+2404 1516
+456 1516
+2328 41
+2328 342
+1525 1797
+15 1797
+1437 562
+1437 563
+92 1421
+92 1420
+2405 2379
+19 2405
+848 2221
+15 2221
+1568 73
+1458 73
+301 538
+1149 538
+2386 2400
+306 210
+92 704
+92 749
+61 2406
+2406 2380
+2387 2401
+178 864
+2375 2407
+2375 1721
+1721 2407
+2364 1070
+137 1831
+41 1831
+371 220
+371 906
+2307 193
+1106 2124
+2124 1455
+1903 549
+2408 1520
+15 2408
+15 1520
+2369 531
+976 2369
+531 976
+2409 2382
+19 2409
+1485 1745
+482 1745
+61 2410
+2410 2383
+41 283
+41 29
+2285 41
+2285 1995
+2129 528
+2389 2403
+101 661
+455 2404
+557 1747
+557 1539
+388 1983
+99 573
+19 99
+1862 1095
+41 1862
+1136 1326
+2385 2411
+2411 2384
+2390 2405
+688 2241
+688 605
+562 946
+61 2412
+2412 2386
+210 1483
+306 1483
+139 2076
+2076 1295
+2394 2406
+180 466
+2413 2387
+19 2413
+2258 1895
+1715 1895
+2216 989
+2198 989
+515 1336
+515 1231
+162 999
+999 222
+876 1531
+2414 2167
+1844 2414
+2415 1782
+2415 276
+66 934
+1955 61
+337 279
+339 279
+876 497
+794 2124
+332 833
+833 917
+739 2026
+15 739
+15 2026
+2365 685
+1512 685
+1512 2365
+1983 627
+2397 2409
+2398 2410
+456 1116
+456 1307
+573 1717
+573 1715
+45 2196
+45 237
+2416 2389
+19 2416
+1847 1184
+1564 2209
+1566 1564
+1050 1657
+2417 2418
+41 2418
+41 2417
+1149 2384
+61 2419
+2419 2390
+473 2420
+7 2420
+2400 2412
+2191 2271
+1801 1808
+300 1808
+2421 2394
+19 2421
+219 1658
+2401 2413
+1568 2229
+1304 617
+554 617
+2 2304
+2422 2304
+2 2422
+966 1398
+1485 1427
+1057 2320
+2320 2193
+1057 2193
+1571 279
+2307 279
+1032 222
+1101 222
+1030 202
+816 2423
+17 2423
+1248 1619
+15 1248
+61 2424
+2424 2397
+2425 2398
+19 2425
+983 171
+573 2023
+1243 1750
+2403 2416
+2426 1986
+61 1986
+2426 61
+196 279
+195 279
+2405 2419
+188 282
+281 188
+179 932
+179 1088
+2427 2400
+19 2427
+2428 1516
+2428 1517
+2266 514
+34 230
+34 973
+61 2168
+2168 603
+2406 2421
+413 1853
+1989 742
+505 1485
+300 220
+300 906
+61 2429
+2429 2401
+1684 112
+1504 112
+1322 789
+1485 1426
+1702 796
+759 25
+2409 2424
+1983 2
+2396 2
+2410 2425
+984 854
+1243 2208
+2208 1750
+1431 703
+703 1762
+552 2333
+61 2430
+2430 2403
+5 1770
+57 855
+855 819
+57 819
+882 427
+427 2156
+2431 2405
+19 2431
+263 279
+2349 279
+2349 263
+139 1698
+139 490
+1808 1365
+1808 1934
+2412 2427
+16 1549
+1470 1549
+1985 1544
+1985 61
+2266 352
+2267 352
+1155 36
+61 2432
+2432 2406
+925 2077
+925 722
+2367 715
+2413 2429
+642 2337
+643 2337
+2019 2110
+15 2110
+2433 202
+1030 2433
+1464 211
+1602 403
+1602 1219
+15 1322
+54 562
+573 1349
+2353 2409
+61 2434
+2434 2410
+41 2151
+41 543
+1513 1494
+2416 2430
+160 1936
+41 1936
+1554 2081
+2242 1507
+1507 2435
+2242 2435
+19 1203
+326 1328
+15 326
+15 1328
+2436 2044
+528 2436
+179 876
+179 1531
+2419 2431
+389 41
+164 1232
+61 2437
+2437 2412
+906 1415
+2421 2432
+2438 2413
+19 2438
+1863 1615
+1420 549
+549 1031
+2096 2439
+2439 781
+781 2096
+756 1590
+756 1612
+2078 1249
+2078 1250
+15 1838
+1969 1293
+1969 2276
+520 976
+388 2396
+128 2101
+128 671
+2101 671
+2056 2440
+2440 2042
+2424 2353
+643 362
+1133 643
+1133 362
+2425 2434
+997 1318
+1377 260
+2 1377
+2441 2416
+19 2441
+573 1617
+1778 2334
+61 2442
+2442 2419
+139 171
+139 1191
+918 603
+2427 2437
+1571 1670
+2443 2421
+19 2443
+1113 219
+219 1329
+2429 2438
+2423 2344
+2344 2323
+2423 2323
+1515 1310
+2259 1310
+850 1498
+15 850
+15 1498
+92 867
+1082 867
+92 1082
+757 2320
+2029 1917
+1702 1776
+1161 1188
+942 41
+129 2444
+2444 2069
+2445 1115
+1115 495
+495 2445
+2363 2424
+2446 2425
+19 2446
+2105 2180
+45 73
+2430 2441
+73 2447
+2448 2447
+73 2448
+2028 1485
+1485 1139
+2028 1139
+573 475
+573 476
+1412 2231
+73 1798
+73 1799
+2431 2442
+1100 1299
+54 2371
+2449 2427
+19 2449
+2432 2443
+1286 1046
+1285 1046
+124 2357
+61 2450
+2450 2429
+1617 1420
+1420 2451
+1617 2451
+1670 1756
+1670 463
+10 2452
+2139 2452
+2453 41
+1399 2453
+978 2208
+736 761
+2396 233
+2396 235
+300 693
+300 692
+597 1784
+1784 809
+1201 1886
+15 1201
+15 1886
+1652 2440
+271 644
+1081 2454
+2454 2032
+1081 2032
+2434 2446
+580 1979
+61 2455
+2455 2430
+409 1097
+2206 1629
+544 187
+2295 971
+971 2456
+2456 2295
+179 874
+1927 1404
+139 110
+2346 41
+935 725
+2457 2431
+19 2457
+65 2355
+64 2355
+139 2052
+2052 110
+585 2458
+2458 584
+338 203
+203 1689
+2437 2449
+61 2459
+2459 2432
+2050 1345
+1123 672
+672 872
+1123 872
+1455 249
+2438 2450
+963 1139
+1139 383
+587 1437
+94 2023
+358 164
+1127 989
+1127 1726
+1726 989
+867 422
+1685 1782
+972 687
+61 2460
+2460 2434
+893 41
+894 41
+150 2286
+1901 2286
+2441 2455
+573 1421
+573 1420
+1572 1756
+2461 1756
+1572 2461
+263 719
+2349 719
+2076 2462
+2462 1103
+2076 1103
+1477 154
+835 1080
+1080 360
+19 1243
+2399 2428
+80 1441
+1441 81
+15 1997
+15 1561
+162 104
+162 1853
+2442 2457
+1470 708
+708 1829
+1470 1829
+512 73
+61 2463
+2463 2437
+1666 1595
+1595 2172
+248 355
+248 353
+2443 2459
+691 579
+691 1154
+1122 672
+2222 1460
+581 2222
+581 1460
+2464 2438
+19 2464
+1097 286
+1098 286
+17 2344
+2291 41
+2234 41
+2298 75
+73 2298
+2446 2460
+944 2444
+2444 127
+944 127
+2465 1148
+15 2465
+1974 1485
+1485 2370
+2370 1974
+2275 2283
+2283 2433
+2275 2433
+110 2108
+2061 2305
+2305 2336
+2466 2441
+19 2466
+1155 918
+2325 2462
+602 2423
+2423 2029
+92 1994
+574 1994
+5 2467
+40 2467
+1155 603
+1085 2240
+1426 2240
+80 1409
+1409 222
+2468 2391
+15 2468
+15 2391
+61 2469
+2469 2442
+2449 2463
+61 846
+61 845
+1139 1534
+1139 1532
+2470 2443
+19 2470
+712 1275
+1026 1815
+71 1614
+2450 2464
+2044 481
+2436 481
+1763 1865
+1865 1912
+1464 2196
+1994 548
+1994 549
+1663 2294
+41 2294
+41 1663
+2471 2446
+19 2471
+2129 1923
+1923 1432
+2129 1432
+2220 2472
+41 2472
+41 2220
+2455 2466
+481 666
+2191 1706
+2191 1496
+1415 372
+510 1381
+2428 222
+2399 222
+1141 1912
+1866 1912
+1141 1866
+2457 2469
+15 1749
+15 1858
+1785 2203
+1130 2203
+1286 222
+2473 2449
+19 2473
+1595 1967
+1967 1594
+2459 2470
+1570 1756
+179 1576
+179 653
+2426 92
+61 2474
+2474 2450
+2423 1917
+2002 2404
+2104 2475
+2475 539
+58 1281
+58 936
+1994 1842
+1632 1212
+2357 1212
+1167 2043
+15 1167
+15 2043
+1525 648
+2476 763
+2361 2476
+763 2361
+821 669
+1131 2203
+694 715
+2460 2471
+15 1973
+2028 1085
+583 433
+61 2477
+2477 2455
+1063 588
+2076 1148
+2325 1148
+58 557
+2273 2478
+2478 160
+160 2273
+2479 1777
+1777 130
+130 2479
+1645 1867
+1645 1759
+1759 1867
+511 780
+2452 780
+511 2452
+1154 2176
+286 1154
+2480 2457
+19 2480
+820 2481
+2481 2482
+820 2482
+2463 2473
+844 1540
+844 1539
+61 2483
+2483 2459
+1665 1318
+251 1318
+1531 1174
+2464 2474
+1048 231
+793 1212
+1754 69
+1754 1510
+1390 989
+1126 989
+1904 11
+41 2178
+41 2106
+61 2484
+2484 2460
+2189 2374
+54 290
+2466 2477
+419 2356
+1040 2356
+2008 2420
+8 2420
+1475 1585
+15 1475
+15 1585
+2257 1187
+2257 61
+19 1627
+41 1671
+22 1077
+22 273
+2469 2480
+15 112
+51 2293
+1180 2485
+2485 313
+61 2486
+2486 2463
+300 1302
+300 1301
+61 704
+2426 704
+2487 175
+173 2487
+1497 310
+2470 2483
+775 2142
+775 496
+496 2142
+2488 2464
+19 2488
+1615 1336
+1336 1598
+209 1915
+2086 235
+1666 1729
+2245 1729
+2361 1568
+2154 1786
+1918 1436
+1436 2140
+1918 2140
+1585 1905
+1905 1475
+2489 2202
+2451 2202
+2489 2451
+145 436
+436 146
+125 1915
+125 2080
+1155 2338
+235 626
+2471 2484
+54 2097
+2490 2466
+19 2490
+1063 188
+332 2183
+332 1134
+2491 1015
+1015 2492
+2492 2491
+2493 840
+15 2493
+1903 2451
+2451 2201
+1903 2201
+61 2494
+2494 2469
+575 2201
+2473 2486
+92 16
+1985 16
+1113 1850
+2495 2470
+19 2495
+1432 448
+448 68
+2487 2082
+2302 2487
+2082 2302
+2474 2488
+774 396
+396 687
+191 263
+191 2349
+1450 1865
+2086 2319
+1918 255
+712 1031
+1123 1031
+1420 2489
+281 205
+205 282
+2496 905
+2496 270
+905 270
+2497 2471
+19 2497
+1500 1807
+41 1500
+1492 868
+2477 2490
+1035 2493
+1849 2493
+1223 2205
+765 2482
+765 2481
+2259 1517
+2259 1527
+1654 2127
+511 73
+2480 2494
+977 531
+2498 2473
+19 2498
+1461 557
+2483 2495
+2367 2499
+1618 2499
+61 2500
+2500 2501
+61 2501
+61 2502
+2502 2474
+1852 1467
+1852 1383
+2361 2062
+1707 396
+2049 193
+2307 2049
+1056 1820
+2 1535
+2 1536
+603 50
+2365 2503
+1735 2503
+61 2276
+2276 1956
+1570 279
+2444 41
+56 2263
+56 2504
+2504 2263
+2496 2350
+2350 905
+2484 2497
+15 2439
+1446 820
+1446 2481
+1616 573
+1420 1616
+2505 2182
+15 2505
+15 2182
+61 2506
+2506 2477
+1105 1208
+15 1208
+2507 1638
+1638 2417
+2417 2507
+1108 2153
+269 2153
+810 2508
+15 810
+15 2508
+318 1350
+1625 1350
+124 1267
+2509 2480
+19 2509
+2303 2067
+239 620
+2486 2498
+61 2510
+2510 2483
+1741 2511
+2511 227
+1741 227
+448 528
+1432 528
+2501 2512
+2512 2500
+2488 2502
+811 1865
+1056 715
+1893 463
+1297 1085
+1224 1526
+801 2136
+15 2136
+61 2513
+2513 2484
+1822 2048
+41 2048
+92 1275
+2490 2506
+139 2290
+1454 910
+1454 1767
+2508 2514
+15 2514
+332 1627
+19 332
+2153 326
+269 326
+271 326
+454 326
+2494 2509
+1653 2126
+1653 2127
+61 2515
+2515 2486
+2495 2510
+1131 2516
+2516 2517
+1131 2517
+1519 177
+978 1165
+923 1165
+978 923
+2050 193
+19 2512
+2518 2512
+19 2518
+2519 2488
+19 2519
+61 1910
+1910 673
+1671 1445
+1443 1671
+1969 2520
+2520 61
+447 1764
+493 1764
+447 493
+2035 1945
+2035 1516
+1516 1945
+1296 367
+367 380
+1229 1325
+2281 578
+83 2521
+1162 2521
+2497 2513
+2350 177
+2496 177
+1574 1163
+1574 2522
+2522 1163
+2282 2523
+2523 2281
+2524 2490
+19 2524
+55 2263
+139 1515
+139 2259
+1982 41
+1211 2272
+1211 330
+475 749
+41 1144
+1103 2525
+2525 2462
+1108 1735
+269 1735
+453 270
+61 2526
+2526 2494
+584 349
+349 2458
+2498 2515
+1519 864
+2527 2495
+19 2527
+1130 2516
+1049 289
+289 1432
+1049 1432
+99 696
+99 694
+2500 2518
+2502 2519
+845 1363
+1363 1199
+1079 197
+197 1078
+1117 1311
+1918 254
+10 780
+2230 2001
+2528 2497
+19 2528
+37 668
+2422 41
+1961 1699
+901 2360
+41 2360
+2506 2524
+1125 2235
+928 2104
+2266 2271
+2270 2266
+2093 41
+2222 692
+2209 939
+41 2209
+2509 2526
+2061 560
+2061 45
+1622 1492
+2529 2498
+19 2529
+1280 1205
+846 2070
+2510 2527
+1453 124
+1734 177
+1734 2496
+54 413
+1049 450
+61 1703
+61 2530
+2530 2500
+61 2531
+2531 2502
+649 761
+1837 1363
+447 25
+1807 1499
+2199 2186
+164 1186
+346 216
+216 1167
+2513 2528
+2481 1762
+2481 703
+839 41
+61 2532
+2532 2506
+56 291
+55 291
+1984 652
+15 1984
+1023 2271
+2271 704
+1829 466
+15 1829
+481 2533
+2415 2533
+481 2415
+1688 2534
+2534 1675
+2535 2509
+19 2535
+41 2345
+2536 1704
+2536 2537
+2537 1704
+822 1417
+822 384
+1402 1566
+2515 2529
+61 2538
+2538 2510
+943 672
+517 279
+2518 2530
+2519 2531
+2087 1207
+1207 2319
+2087 2319
+683 1249
+2101 41
+1830 1984
+1883 1984
+1649 2539
+41 2539
+41 1649
+1486 989
+1486 2540
+2540 989
+15 2352
+1275 1421
+964 1847
+346 1922
+61 2541
+2541 2513
+2315 41
+1953 2315
+2542 393
+393 2543
+2543 2542
+2524 2532
+19 205
+2492 1017
+41 1017
+41 2492
+2036 2049
+2050 2036
+99 1319
+1737 2534
+2020 288
+2526 2535
+1802 1799
+2444 920
+2224 41
+2223 41
+61 2544
+2544 2515
+223 90
+2527 2538
+565 1154
+111 2454
+547 2454
+1035 1866
+2545 2518
+19 2545
+2546 2519
+19 2546
+632 1055
+2547 1055
+632 2547
+1035 1482
+1482 2493
+1156 1277
+677 2030
+73 2299
+173 915
+2528 2541
+1747 792
+2520 684
+2548 2524
+19 2548
+1737 1494
+1494 2534
+1264 1505
+1730 1375
+1056 2197
+1056 2086
+2086 2197
+2399 286
+2090 2399
+1737 652
+61 2549
+2549 2526
+61 2536
+2536 1703
+15 2322
+1880 1260
+1260 2322
+2529 2544
+2550 2527
+19 2550
+1849 1866
+1454 1306
+1306 1453
+2530 2545
+2531 2546
+676 2087
+2087 626
+2540 2216
+1141 840
+1149 2411
+1266 505
+91 505
+1787 1225
+775 1108
+1920 2266
+1021 894
+2190 1496
+2551 2528
+19 2551
+41 584
+15 2225
+15 1946
+2087 1868
+2532 2548
+2004 41
+2467 41
+2467 2004
+2049 1571
+145 501
+434 145
+929 1774
+419 590
+419 588
+54 1047
+54 232
+2535 2549
+1172 276
+205 1224
+377 461
+377 459
+2552 2529
+19 2552
+289 2129
+2129 287
+2538 2550
+565 279
+1454 1332
+1830 2414
+1830 2167
+61 2553
+2553 2530
+61 2554
+2554 2531
+631 1055
+2101 1363
+54 1931
+2555 1931
+54 2555
+41 284
+798 442
+798 1381
+442 1381
+978 1740
+978 1164
+2541 2551
+1601 1248
+1246 1601
+61 2556
+2556 2532
+836 705
+2458 1730
+61 2133
+2133 2536
+15 2542
+816 2020
+462 1657
+464 1657
+164 102
+2557 2535
+19 2557
+1332 1453
+2544 2552
+742 2060
+2060 1689
+742 1689
+2313 1000
+2313 461
+61 2558
+2558 2538
+303 669
+2078 32
+1883 2414
+2545 2553
+2546 2554
+2266 2272
+2008 2195
+2240 2195
+597 1646
+528 2260
+528 747
+1044 538
+73 2559
+1982 2559
+1843 2155
+2075 843
+843 2525
+2075 2525
+1254 415
+1253 415
+61 2560
+2560 2541
+2190 352
+2370 1997
+2548 2556
+2428 286
+1063 205
+19 1063
+248 2520
+158 2520
+41 1259
+1063 1038
+1063 1040
+555 1253
+34 1253
+2549 2557
+606 286
+61 2561
+2561 2544
+573 423
+2550 2558
+1424 236
+1423 236
+2562 2545
+19 2562
+4 924
+2563 2546
+19 2563
+1818 221
+394 240
+2476 2062
+1632 769
+847 901
+2360 847
+917 835
+917 1080
+2551 2560
+2345 991
+61 2118
+1658 1809
+1620 1960
+15 1960
+2564 2548
+19 2564
+2565 956
+957 2565
+1795 368
+1976 1795
+368 1976
+15 2143
+164 185
+1666 1153
+1153 1967
+857 554
+857 1304
+61 2566
+2566 2549
+749 573
+749 99
+1758 2055
+2055 1800
+2552 2561
+742 1328
+2567 2550
+19 2567
+1019 1776
+1019 2085
+1049 1326
+879 222
+786 222
+179 1043
+1329 1114
+1329 1971
+2553 2562
+2554 2563
+1602 1581
+2117 1581
+1800 2054
+22 105
+1002 1573
+857 2010
+15 542
+1524 1395
+2568 2551
+19 2568
+54 689
+857 222
+518 2569
+261 2569
+820 306
+1969 457
+2520 457
+2556 2564
+2063 1102
+521 1102
+164 232
+377 25
+2313 25
+486 286
+2557 2566
+15 2319
+15 2320
+2570 41
+647 41
+647 2570
+2571 2552
+19 2571
+1057 265
+2558 2567
+1019 1352
+775 968
+2481 1447
+61 2572
+2572 2553
+61 2573
+2573 2554
+1454 2514
+2514 1306
+978 1741
+516 2049
+41 593
+1032 1848
+1102 1848
+61 1353
+1353 2118
+1456 1954
+2 1456
+1254 1942
+2560 2568
+2569 1289
+203 193
+248 1933
+248 1071
+1071 1933
+2311 2574
+41 2574
+41 2311
+61 2575
+2575 2556
+1267 1197
+2061 557
+2061 684
+838 1625
+1634 2261
+2261 1938
+1569 1197
+1547 1197
+2576 2557
+19 2576
+422 750
+15 422
+219 464
+2577 1102
+2577 2063
+2561 2571
+989 1041
+61 2578
+2578 2558
+2562 2572
+2563 2573
+1330 2579
+2579 2580
+1330 2580
+1904 780
+1904 779
+824 1105
+1063 2109
+2109 2581
+1063 2581
+2036 193
+2559 41
+442 222
+383 823
+383 1104
+693 1287
+1723 1947
+1724 1947
+481 2582
+2582 275
+1504 2454
+281 419
+2501 2560
+728 41
+41 2583
+2583 728
+1546 286
+859 286
+2564 2575
+521 2465
+1198 2465
+19 306
+2584 1139
+1139 1847
+1847 2584
+131 1777
+1211 2271
+2566 2576
+61 2585
+2585 2561
+2567 2578
+2061 763
+2061 2476
+659 127
+659 2256
+2256 127
+2586 2562
+19 2586
+2587 2563
+19 2587
+334 780
+1047 1560
+1048 1560
+61 1354
+5 529
+929 959
+959 1626
+929 1626
+1044 2411
+164 1192
+164 1987
+15 425
+1753 986
+1753 315
+1961 2196
+114 1961
+1723 2414
+1947 2414
+2482 2112
+1254 222
+1253 222
+1544 775
+357 775
+2568 2501
+2588 189
+15 2588
+15 189
+2589 2564
+19 2589
+2485 2590
+2590 314
+314 2485
+2240 2420
+2456 2355
+2456 2042
+2162 41
+2163 41
+1933 25
+1869 1933
+15 969
+891 1348
+891 1624
+75 41
+1210 2271
+61 2591
+2591 2566
+2592 41
+2592 1959
+2146 2448
+73 2146
+2571 2585
+2245 1728
+173 1002
+2593 2567
+19 2593
+2594 2124
+1720 2594
+2026 1446
+2572 2586
+1253 315
+2573 2587
+1335 568
+568 1361
+1335 1361
+882 255
+988 946
+2090 946
+2061 608
+2061 322
+322 608
+859 555
+555 857
+5 2595
+1578 2595
+5 1578
+716 2203
+715 2203
+205 2159
+2512 2568
+401 1581
+2575 2589
+1619 1247
+1873 1619
+2117 403
+2035 222
+2035 1944
+493 2012
+369 2345
+41 369
+385 2261
+2576 2591
+2214 1666
+2136 2542
+2596 2571
+19 2596
+1203 1165
+2578 2593
+1285 222
+2594 1738
+1720 1738
+61 1196
+61 2597
+2597 2572
+4 1244
+924 1244
+61 2598
+2598 2573
+562 109
+1852 2193
+2599 1966
+1966 144
+2599 144
+2288 751
+751 147
+147 2288
+1895 146
+1895 2600
+146 2600
+1038 298
+2203 695
+715 695
+73 1389
+1933 2275
+2068 2275
+2246 2073
+2073 2402
+1139 2601
+2601 1911
+1139 1911
+61 2602
+2602 2575
+2370 803
+15 428
+15 429
+15 1352
+15 1435
+383 882
+382 882
+286 1153
+1458 2229
+2603 2576
+19 2603
+578 2523
+41 2523
+1453 1266
+1266 1332
+2096 1807
+662 1907
+2604 1907
+662 2604
+2585 2596
+61 2605
+2605 2578
+1742 2511
+952 2085
+2375 1112
+1721 1112
+2586 2597
+573 1716
+2587 2598
+946 639
+1314 1653
+1314 2126
+541 1999
+1999 2374
+2090 222
+1783 605
+5 1490
+2295 177
+2456 177
+395 2606
+15 2606
+134 1372
+2589 2602
+2235 41
+1028 1625
+1084 1188
+1188 1731
+1379 41
+19 820
+1203 923
+385 1167
+1547 1196
+2378 589
+2378 1364
+2607 784
+2607 628
+2591 2603
+61 2608
+2608 2585
+1009 954
+2014 954
+1009 2014
+61 1547
+2593 2605
+126 2080
+1955 2257
+2257 1188
+2609 2586
+19 2609
+1446 765
+2610 2587
+19 2610
+927 812
+927 25
+300 2222
+15 1633
+1139 1036
+1742 2352
+2295 2355
+1917 708
+1213 1738
+275 1172
+2582 1172
+16 1503
+2611 2589
+19 2611
+15 809
+41 799
+1643 572
+570 1643
+516 193
+228 222
+2428 2035
+219 54
+61 2612
+2612 2591
+5 2570
+2596 2608
+882 1919
+882 1918
+2613 2593
+19 2613
+1056 2087
+2597 2609
+2598 2610
+2142 498
+1830 498
+1428 1977
+643 1887
+1887 2015
+643 2015
+1644 570
+2185 2516
+2185 2517
+2115 321
+321 211
+2115 211
+2602 2611
+430 2195
+15 430
+1530 41
+2559 1530
+1158 1676
+15 2105
+1625 855
+164 1783
+2603 2612
+61 1548
+43 609
+608 43
+1207 1868
+2614 2596
+19 2614
+248 777
+2605 2613
+1049 1433
+61 2615
+2615 2597
+1002 1647
+1647 1526
+2185 264
+61 2616
+2616 2598
+927 1264
+184 1264
+927 184
+1461 1907
+661 1907
+964 1141
+964 1140
+1028 2516
+2225 1710
+124 1367
+2584 964
+602 1678
+602 561
+720 1771
+14 2539
+2539 13
+61 2617
+2617 2602
+998 631
+515 193
+2159 1347
+282 1347
+2309 1822
+277 2415
+73 2147
+1798 2147
+1064 2588
+1064 418
+2588 418
+1603 1219
+2177 582
+2607 65
+2618 2603
+19 2618
+2594 794
+1415 1345
+2608 2614
+248 458
+61 2619
+2619 2605
+659 525
+525 658
+1741 2352
+878 2296
+2296 61
+878 61
+2609 2615
+1693 1834
+1693 1572
+2610 2616
+2109 589
+964 2601
+1532 2601
+964 1532
+1920 2272
+282 2160
+2606 1474
+15 1474
+624 1626
+602 434
+602 502
+15 1526
+2343 41
+1379 2343
+2611 2617
+382 822
+2093 1641
+2336 2620
+1403 2620
+1745 690
+1203 1013
+1969 1956
+641 714
+641 713
+19 882
+860 1389
+1104 460
+1532 2012
+1534 2012
+1056 694
+1056 696
+2612 2618
+2607 177
+676 1207
+171 1667
+1191 1667
+164 1054
+61 2621
+2621 2608
+2613 2619
+1232 1359
+1359 2622
+1232 2622
+1956 367
+2623 2609
+19 2623
+836 2
+2624 2610
+19 2624
+2540 641
+641 1406
+2540 1406
+1266 2594
+2185 2
+526 352
+814 526
+2371 2077
+2581 1038
+2581 298
+573 474
+744 2407
+2407 745
+501 133
+306 111
+2625 2611
+19 2625
+119 41
+119 2072
+1769 1256
+5 1769
+1335 2070
+1387 2070
+1056 1091
+1091 1057
+857 286
+61 2626
+2626 2612
+1962 1803
+300 885
+1771 2253
+2614 2621
+248 457
+2627 2613
+19 2627
+2615 2623
+2616 2624
+467 1645
+2628 436
+2628 146
+641 1654
+641 1653
+2392 2629
+2629 2630
+2630 2392
+124 793
+1950 822
+822 1009
+2476 684
+249 128
+1395 1004
+2617 2625
+2631 41
+654 2631
+4 1540
+764 1291
+2154 1177
+1787 1177
+2154 1787
+998 508
+631 508
+15 2388
+641 683
+2618 2626
+2270 514
+2270 1771
+2632 2614
+19 2632
+2619 2627
+2276 2583
+61 2633
+2633 2615
+61 2634
+2634 2616
+525 1759
+2628 1011
+41 2369
+41 596
+147 92
+147 16
+206 2402
+206 1269
+855 1350
+1351 855
+2371 556
+925 556
+602 145
+2334 2064
+1794 2334
+61 2444
+61 2069
+436 818
+1576 2503
+2503 1902
+126 487
+61 2635
+2635 2617
+844 557
+1204 1013
+2565 2479
+15 2565
+15 2479
+705 2499
+634 528
+1279 634
+300 1615
+300 221
+641 2098
+641 1713
+2198 2426
+2426 989
+2214 1728
+2214 2245
+110 947
+2636 2618
+19 2636
+1078 198
+1139 1604
+641 869
+2621 2632
+1513 1724
+1513 1519
+61 2637
+2637 2619
+448 1558
+1921 1558
+448 1921
+1238 2465
+179 1575
+1048 2522
+2623 2633
+1693 1809
+2624 2634
+1989 718
+1203 1473
+1203 1280
+41 1025
+1025 2040
+45 608
+1950 61
+2638 813
+352 2638
+2639 2225
+1710 2639
+2625 2635
+1867 1784
+2583 25
+2583 1969
+1969 25
+1203 980
+306 1504
+25 681
+25 682
+19 383
+298 589
+2109 298
+2640 1025
+73 2640
+1986 989
+2626 2636
+2481 739
+2482 739
+1521 2565
+1082 1282
+94 1282
+61 2641
+2641 2621
+1513 1690
+2627 2637
+1433 69
+1433 1754
+2555 1773
+1931 1773
+1133 2015
+248 1252
+2642 2623
+19 2642
+518 279
+2643 2624
+19 2643
+525 899
+463 2644
+462 2644
+2628 352
+2645 335
+752 2645
+1661 1266
+1387 568
+200 41
+300 1300
+2646 2625
+19 2646
+120 41
+764 2411
+1291 2411
+638 1173
+1173 526
+964 1911
+249 457
+249 1969
+1669 463
+1669 2644
+61 2647
+2647 2626
+2632 2641
+2270 352
+2277 1513
+2648 2627
+19 2648
+2259 1806
+1806 1310
+1433 528
+1133 361
+1653 1887
+1786 600
+2236 510
+2633 2642
+148 547
+2634 2643
+2236 1381
+1012 2454
+1458 2051
+1660 1827
+1767 1660
+1827 1767
+2523 2310
+2310 2282
+1564 1402
+2635 2646
+1937 1322
+15 1937
+2098 33
+2636 2647
+1312 470
+179 271
+2649 2632
+19 2649
+468 2508
+152 2508
+2637 2648
+1589 134
+1589 133
+61 2650
+2650 2633
+61 2651
+2651 2634
+261 279
+467 1646
+1056 758
+352 528
+300 374
+374 1300
+450 818
+964 1849
+15 1436
+15 2140
+1028 2158
+2158 2516
+174 485
+61 2652
+2652 2635
+2114 1907
+1403 557
+1403 1539
+2154 25
+764 279
+1516 2002
+2653 2636
+19 2653
+165 2347
+166 2347
+2248 41
+2249 41
+2641 2649
+61 2654
+2654 2637
+362 2337
+2642 2650
+2643 2651
+1944 286
+2035 286
+960 538
+1191 1928
+1267 1739
+1739 1914
+1267 1914
+641 1273
+2514 1660
+449 528
+776 889
+2655 481
+2655 748
+2646 2652
+2365 177
+1752 2351
+15 2351
+573 93
+2062 86
+2271 1842
+5 1857
+19 1139
+609 1424
+2647 2653
+528 2655
+1240 2655
+528 1240
+878 1136
+1136 2296
+206 1092
+1610 1092
+1538 1826
+1538 678
+2012 2584
+61 2656
+2656 2641
+1403 678
+1969 673
+1969 776
+1308 109
+205 2487
+2648 2654
+2115 1699
+2657 1527
+2259 2657
+1407 212
+1700 493
+2658 2642
+19 2658
+2659 2643
+19 2659
+2035 2090
+2035 842
+132 501
+2478 1937
+1936 2478
+1928 1667
+960 1044
+2639 2030
+173 917
+449 818
+481 2599
+2599 731
+1759 1691
+2660 2646
+19 2660
+1403 101
+1403 57
+1203 935
+2062 73
+938 1200
+15 938
+15 1200
+1271 2131
+608 1424
+61 2661
+2661 2647
+25 2072
+2097 2555
+1610 2402
+424 1629
+1733 1809
+2649 2656
+408 222
+573 1275
+1653 1817
+2662 2648
+19 2662
+205 1343
+2650 2658
+2651 2659
+132 1678
+1300 2569
+1300 1289
+1511 1754
+2652 2660
+678 1539
+1951 942
+2653 2661
+1969 1910
+1532 841
+841 1533
+2663 2649
+19 2663
+1112 1053
+1721 1053
+319 1612
+2654 2662
+661 5
+641 2183
+61 2664
+2664 2650
+61 2665
+2665 2651
+331 1627
+2543 909
+407 222
+2342 41
+1353 1368
+1243 1425
+2666 41
+2453 2666
+1753 222
+61 2667
+2667 2652
+1609 1092
+2005 981
+488 1928
+158 355
+158 378
+2629 849
+15 2629
+15 849
+2668 2653
+19 2668
+1009 1166
+1009 253
+608 73
+994 481
+2601 841
+1316 2604
+1198 2577
+1238 2577
+2669 2349
+2669 2091
+2656 2663
+1508 466
+300 295
+300 293
+61 2670
+2670 2654
+306 1684
+132 1589
+2658 2664
+2659 2665
+2222 1459
+1287 709
+2481 2026
+12 2407
+15 2407
+1660 525
+1661 525
+1049 2579
+2660 2667
+2671 2672
+15 2671
+15 2672
+618 981
+2005 618
+1969 1703
+332 1314
+19 1485
+978 1357
+1406 978
+1406 1357
+2082 485
+483 2082
+99 758
+99 2197
+2661 2668
+1009 2013
+1009 2156
+300 1115
+1061 2604
+61 2673
+2673 2656
+1533 2584
+2584 1534
+2662 2670
+1430 2323
+1406 2115
+2114 614
+239 2674
+2674 620
+1898 761
+2675 2658
+19 2675
+2676 2659
+19 2676
+2628 2271
+1896 2271
+1896 2628
+1300 537
+374 537
+1077 2672
+2672 1093
+1077 1093
+2222 1979
+581 1979
+332 642
+1082 750
+94 750
+1717 751
+1217 1662
+1466 1625
+343 1625
+946 853
+957 130
+2677 2660
+19 2677
+61 944
+248 2062
+2520 2062
+61 2678
+2678 2661
+882 954
+462 1050
+1440 196
+300 464
+1444 406
+15 1444
+15 406
+2663 2673
+2679 2662
+19 2679
+641 31
+2664 2675
+2665 2676
+984 853
+1177 1226
+931 1226
+1266 1551
+18 2344
+2581 2019
+2061 248
+127 248
+2542 1940
+1969 2536
+325 1689
+2667 2677
+2238 1099
+15 2238
+2521 222
+2521 82
+2132 589
+2668 2678
+1298 900
+901 1298
+2680 2663
+19 2680
+1847 1533
+1533 1184
+964 1534
+2090 945
+2670 2679
+1006 2681
+2681 1291
+715 2089
+715 2088
+1011 1211
+1010 1211
+1232 1311
+2066 2163
+2 2066
+61 2682
+2682 2664
+374 2569
+61 2683
+2683 2665
+1437 853
+1690 875
+176 875
+468 2514
+286 222
+445 1853
+1438 236
+469 41
+2052 108
+1513 177
+730 2381
+2381 1965
+2350 1734
+260 41
+2520 2476
+61 2684
+2684 2667
+2 2592
+99 756
+2035 2399
+82 2522
+1560 2522
+1009 255
+15 1928
+2685 2668
+19 2685
+1162 286
+2521 286
+2622 1945
+2669 1971
+1971 2091
+2673 2680
+61 2686
+2686 2670
+1115 2681
+127 891
+891 1403
+98 978
+2675 2682
+2676 2683
+763 1112
+242 1112
+228 1194
+1098 2687
+1097 2687
+207 1924
+1924 2302
+139 2657
+1969 2133
+2 880
+826 528
+1428 1083
+1428 257
+2594 2038
+26 2249
+2677 2684
+41 570
+99 1057
+99 757
+2521 2522
+1752 940
+941 1752
+19 505
+15 187
+300 1692
+241 2639
+15 2639
+67 133
+989 1188
+2678 2685
+1135 669
+1139 1234
+61 2688
+2688 2673
+2679 2686
+15 1965
+15 1966
+1029 2088
+2689 2675
+19 2689
+158 353
+2690 2676
+19 2690
+984 1308
+1437 1308
+228 2280
+1733 1572
+1733 2461
+527 1069
+826 1754
+1122 71
+2691 2677
+19 2691
+1343 2159
+1103 2577
+1967 1026
+61 2692
+2692 2678
+15 1397
+2680 2688
+2669 279
+2160 281
+932 2355
+2693 2679
+19 2693
+2569 2411
+261 2411
+1282 2694
+1082 2694
+879 828
+966 828
+268 2695
+2606 268
+2695 2606
+2682 2689
+2683 2690
+1022 61
+594 1066
+1969 2118
+1299 2206
+1629 1299
+826 1650
+2574 1649
+699 2574
+1817 1887
+99 990
+5 2631
+5 654
+1075 2043
+1939 2043
+2684 2691
+15 1664
+1940 2543
+1896 1211
+2685 2692
+2696 2680
+19 2696
+2657 1806
+2657 2290
+330 1706
+158 601
+2686 2693
+2439 2505
+2505 782
+782 2439
+61 2329
+2329 2682
+61 2697
+2697 2683
+763 1111
+1625 2
+1827 2514
+166 2674
+1589 1511
+1681 2489
+1681 2202
+1831 2254
+61 2698
+2698 2684
+2244 2645
+15 2645
+1426 2195
+1426 1746
+2699 2685
+19 2699
+495 1050
+15 2193
+2688 2696
+188 1347
+621 60
+61 2700
+2700 2686
+2701 41
+2701 2227
+1029 2158
+2088 2158
+1969 1353
+2689 2329
+2690 2697
+1098 2674
+2687 2674
+34 1032
+1406 1879
+1819 2517
+2517 1467
+263 1507
+15 1608
+1151 2672
+2006 775
+2691 2698
+15 2203
+1011 1896
+19 1266
+2231 41
+1412 41
+1742 226
+226 2511
+1061 724
+2692 2699
+1582 471
+164 245
+164 246
+61 2702
+2702 2688
+43 1424
+1734 1512
+2693 2700
+534 1727
+2330 2689
+2703 2690
+19 2703
+1682 871
+1682 2489
+871 2489
+84 1273
+641 84
+79 1546
+2395 1927
+150 2508
+389 1623
+1403 661
+2704 2691
+19 2704
+1298 847
+711 872
+712 872
+2182 1142
+1426 2420
+61 2705
+2705 2692
+838 2499
+836 2499
+2696 2702
+1969 1354
+2706 2693
+19 2706
+1532 2134
+2697 2703
+1920 1282
+763 73
+242 73
+1335 1837
+1334 1837
+1051 2202
+1618 2089
+1421 2489
+618 397
+1023 878
+1023 61
+571 2707
+41 2707
+41 571
+2698 2704
+2393 2630
+41 2630
+41 2393
+1774 187
+2699 2705
+2499 2089
+52 2505
+2708 2696
+19 2708
+2700 2706
+2595 41
+1439 211
+61 2709
+2709 2697
+1920 2694
+300 1815
+300 1816
+1229 552
+94 2095
+79 286
+791 1942
+1099 1223
+1223 2238
+1773 2149
+15 1773
+15 2149
+2540 61
+1994 2202
+2202 1842
+175 485
+405 1607
+1476 1905
+61 2710
+2710 2698
+1705 1066
+15 1705
+2447 41
+2448 41
+2022 790
+2711 2699
+19 2711
+1969 1196
+2322 1401
+1089 144
+1089 2599
+2702 2708
+61 2712
+2712 2700
+99 2367
+15 1614
+2703 2709
+1682 352
+1681 352
+1407 236
+1468 2517
+2272 1771
+1550 1471
+1011 2271
+1957 2583
+158 1933
+15 1595
+15 2172
+175 1924
+883 2141
+2141 1392
+2704 2710
+2125 2713
+2713 41
+19 1661
+1141 2493
+512 2196
+2705 2711
+1406 1355
+2479 957
+61 2714
+2714 2702
+2715 2167
+2715 863
+300 495
+1591 266
+1627 1273
+251 997
+300 1152
+2706 2712
+1363 1691
+2101 1691
+737 703
+2716 2703
+19 2716
+899 1691
+2212 1382
+2212 797
+2272 2253
+1266 1263
+2008 430
+2374 1998
+2717 41
+1889 2717
+574 2202
+1236 1361
+1924 1092
+15 1924
+2718 2704
+19 2718
+1575 1735
+1575 2503
+419 190
+419 188
+726 416
+726 417
+41 1795
+1221 1505
+1220 1505
+61 2719
+2719 2705
+249 1196
+2055 1175
+1175 1758
+2708 2714
+2142 2715
+2142 2167
+300 462
+2720 2706
+19 2720
+440 685
+438 685
+41 127
+2709 2716
+229 886
+1077 1704
+1151 1704
+1030 883
+1886 2491
+15 2491
+1641 41
+465 1160
+833 916
+2144 2721
+41 2721
+41 2144
+2710 2718
+2722 1522
+1520 2722
+449 1650
+1589 1754
+1243 113
+1221 1580
+1505 1580
+233 2
+2711 2719
+1406 2375
+1406 744
+1075 2475
+1075 539
+753 28
+41 28
+41 753
+1263 1739
+2723 2708
+19 2723
+80 286
+2712 2720
+1503 539
+539 2261
+1503 2261
+2290 1527
+2290 2233
+2296 564
+2296 2350
+61 2724
+2724 2709
+230 886
+1010 870
+1010 1682
+1698 488
+124 1720
+1686 2254
+1524 1003
+61 2725
+2725 2710
+15 1817
+1538 2138
+421 2694
+2694 513
+421 513
+2726 2711
+19 2726
+1939 2475
+2445 1006
+2714 2723
+2715 498
+664 2347
+1158 1984
+550 18
+61 2727
+2727 2712
+2444 247
+1262 1738
+1262 1739
+2716 2724
+179 1174
+2536 41
+1900 2346
+180 465
+2718 2725
+1252 1714
+1252 772
+179 496
+15 304
+15 738
+1785 2088
+2728 1661
+19 2728
+727 416
+498 1984
+2719 2726
+72 1706
+61 2729
+2729 2714
+67 1557
+2720 2727
+660 127
+1503 2043
+1030 2141
+1091 265
+2730 2716
+19 2730
+566 2070
+1387 566
+1750 1747
+1750 792
+796 1944
+796 2035
+179 2005
+1761 546
+1519 863
+2731 2718
+19 2731
+1967 1152
+5 2040
+749 1056
+1051 1842
+1030 38
+266 1590
+525 2728
+2351 941
+2 1022
+61 2732
+2732 2719
+1512 2503
+1885 2492
+2723 2729
+2733 2720
+19 2733
+1778 131
+2064 1778
+2724 2730
+290 2504
+783 2504
+612 1462
+1091 2193
+2496 2365
+15 2507
+15 321
+2725 2731
+2030 241
+1331 2507
+1090 2193
+1269 483
+2726 2732
+2734 41
+2314 41
+2314 2734
+964 1035
+1123 71
+127 249
+2735 2723
+19 2735
+165 2687
+166 2687
+2727 2733
+1775 1714
+61 2736
+2736 2724
+2272 352
+1701 286
+1967 300
+929 187
+300 1026
+73 2666
+73 2453
+61 2737
+2737 2725
+1051 352
+2728 2293
+1684 2454
+2638 1173
+2638 41
+2738 2726
+19 2738
+1403 819
+41 2179
+964 1036
+54 2121
+54 2009
+2713 1810
+2729 2735
+61 2739
+2739 2727
+55 680
+2730 2736
+2496 685
+91 124
+1236 1837
+1702 286
+1009 427
+726 1695
+726 1469
+1863 221
+998 222
+2731 2737
+1980 2395
+41 2395
+662 5
+926 158
+2740 2728
+19 2740
+727 1469
+2732 2738
+352 2713
+352 2125
+2028 964
+54 2166
+61 2741
+2741 2729
+525 1827
+1218 503
+503 1176
+2325 2525
+2733 2739
+2640 41
+893 2640
+2742 2730
+19 2742
+978 1750
+1411 660
+1214 1695
+998 444
+1070 419
+1417 1554
+2743 2731
+19 2743
+2744 752
+41 752
+41 2744
+2707 1331
+1034 1848
+41 2695
+2070 1837
+2293 2740
+861 41
+1856 41
+61 2745
+2745 2732
+164 2009
+164 2121
+2735 2741
+2251 2525
+2746 2733
+19 2746
+2717 1899
+2 2717
+2736 2742
+796 286
+300 1818
+300 1863
+1003 1523
+775 219
+927 158
+15 1521
+2737 2743
+15 708
+883 2433
+1297 22
+867 2694
+124 2038
+1302 1289
+1302 1290
+2738 2745
+2491 1885
+263 192
+263 203
+505 107
+2747 2735
+19 2747
+2350 685
+2739 2746
+207 1092
+465 687
+687 391
+1334 1361
+61 2748
+2748 2736
+1097 2241
+2521 1163
+716 2088
+2295 65
+2607 972
+2295 2607
+61 2749
+2749 2737
+2447 1856
+1283 2144
+2013 1606
+1606 428
+602 1470
+2740 51
+41 1872
+194 989
+989 1965
+194 1965
+2750 2738
+19 2750
+1850 2435
+2435 2091
+54 1666
+1485 1855
+2751 1608
+1607 2751
+2741 2747
+1627 84
+61 2752
+2752 2739
+2068 2433
+798 286
+2742 2748
+302 2385
+2385 2569
+302 2569
+229 961
+1919 2140
+223 2116
+15 1887
+1621 1459
+2317 41
+124 1268
+2743 2749
+15 2347
+15 291
+2014 1606
+1553 2722
+2408 1553
+2722 2408
+602 67
+2753 2740
+19 2753
+2745 2750
+2350 1512
+61 2754
+2754 2741
+2746 2752
+671 1691
+15 695
+2755 2742
+19 2755
+164 2199
+164 1929
+2326 481
+830 158
+15 2485
+2251 1148
+127 1010
+1010 891
+2024 1282
+2756 2743
+19 2756
+124 1551
+2014 2081
+1183 1469
+727 1183
+2215 1179
+51 2753
+1474 2695
+528 748
+61 2757
+2757 2745
+180 1160
+2747 2754
+739 2112
+2758 2746
+19 2758
+1054 797
+1056 92
+2748 2755
+580 710
+2241 2687
+164 729
+2159 1395
+1343 1395
+1160 686
+5 2113
+2749 2756
+22 107
+1269 2132
+610 1707
+409 222
+1407 1423
+2539 1259
+15 522
+2750 2757
+522 2465
+2759 41
+2759 1857
+2760 2747
+19 2760
+1113 2092
+2752 2758
+975 1435
+2138 1748
+1716 146
+1716 2600
+961 2186
+61 2761
+2761 2748
+1062 1489
+1049 826
+1911 2134
+15 1917
+1575 2153
+1160 466
+15 1851
+61 2762
+2762 2749
+505 24
+15 1606
+83 2504
+83 783
+1706 329
+2753 2338
+1390 61
+2763 2750
+19 2763
+382 1009
+2260 2436
+1702 1944
+2754 2760
+2594 1213
+229 79
+1707 618
+61 2764
+2764 2752
+2288 146
+2755 2761
+2734 2422
+2 2734
+54 2199
+1301 1290
+564 61
+164 2555
+164 2097
+41 2215
+2756 2762
+409 2504
+1423 212
+212 1405
+1529 41
+2765 2753
+19 2765
+90 2671
+15 90
+2757 2763
+2133 2537
+2116 2537
+61 2766
+2766 2754
+1023 1011
+1409 79
+2016 987
+2758 2764
+1049 2767
+2767 2579
+15 568
+1716 751
+2768 2607
+630 2768
+630 2607
+2445 2644
+495 2644
+2769 2755
+19 2769
+128 670
+15 1867
+884 2433
+1151 24
+22 1151
+1115 1265
+1265 2681
+1780 1381
+2770 2756
+19 2770
+1718 285
+15 285
+2338 2765
+703 2112
+61 2771
+2771 2757
+2760 2766
+164 887
+2772 2758
+19 2772
+1367 2080
+778 25
+2761 2769
+61 671
+1091 2207
+400 900
+1330 2607
+2607 2456
+1330 2456
+689 2347
+2762 2770
+1122 329
+2312 698
+698 2311
+2763 2771
+1967 219
+1967 54
+2773 2760
+19 2773
+1010 2271
+54 829
+658 247
+332 643
+2764 2772
+707 2344
+61 2774
+2774 2761
+124 2594
+61 2775
+2775 2762
+15 1784
+36 2338
+2765 36
+1540 2138
+2115 1961
+1961 1463
+2482 703
+2776 2763
+19 2776
+2222 580
+1171 2582
+975 1680
+2766 2773
+765 507
+61 2777
+2777 2764
+2695 1476
+41 1476
+2769 2774
+54 1929
+1406 320
+719 2669
+719 1971
+2778 1668
+5 2778
+1811 2638
+302 538
+2770 2775
+949 2590
+1273 1250
+1110 1250
+2779 2765
+19 2779
+628 972
+2771 2776
+1632 1157
+2162 2224
+128 2173
+1217 503
+1435 1680
+61 2780
+2780 2766
+507 2033
+2038 794
+1722 2407
+525 898
+164 827
+2772 2777
+1717 2600
+2600 2258
+2781 2769
+19 2781
+1658 2461
+1658 1756
+1858 2352
+2307 1833
+2102 2246
+2032 2246
+1227 2674
+2190 2253
+2782 2770
+19 2782
+1177 1225
+164 1823
+2271 352
+147 573
+573 2288
+36 2779
+2783 2744
+41 2783
+61 2784
+2784 2771
+61 670
+2773 2780
+1423 11
+1425 11
+2785 2772
+19 2785
+2774 2781
+707 2323
+2445 1050
+191 2669
+442 796
+41 197
+2078 157
+2039 522
+2775 2782
+1610 2073
+665 481
+15 2458
+15 1730
+2776 2784
+419 1064
+733 1562
+1563 733
+2786 2773
+19 2786
+113 1961
+2222 1592
+1403 1625
+1544 16
+16 775
+2777 2785
+41 2543
+61 2787
+2787 2774
+2644 1265
+2445 1265
+1971 718
+2179 1891
+2788 2179
+1891 2788
+2707 2417
+2507 2707
+164 1045
+2788 1600
+2768 685
+2768 438
+812 158
+602 451
+659 467
+61 2789
+2789 2775
+1431 701
+2631 2113
+1971 364
+364 1970
+2779 35
+5 2227
+5 2701
+2790 2776
+19 2790
+281 1063
+2274 1052
+1722 1052
+2780 2786
+891 1625
+1330 1690
+61 2791
+2791 2777
+2781 2787
+707 528
+179 651
+1737 651
+179 1737
+1636 854
+1330 971
+1288 222
+2016 222
+1503 1167
+628 685
+602 1557
+128 2285
+2173 2285
+2782 2789
+2792 2779
+19 2792
+2042 1342
+1342 2440
+2784 2790
+41 2722
+61 2793
+2793 2780
+2785 2791
+2794 2781
+19 2794
+179 2715
+2715 862
+179 862
+558 2604
+1489 2604
+318 2
+2027 722
+134 602
+602 132
+164 829
+15 950
+1960 2408
+1549 1597
+419 2581
+419 2109
+61 2173
+2795 2782
+19 2795
+2487 1924
+15 1184
+35 2792
+481 634
+164 1931
+61 2796
+2796 2784
+900 524
+46 1840
+481 1685
+2533 1685
+2786 2793
+2274 12
+2797 2785
+19 2797
+2787 2794
+2601 2134
+147 602
+891 2620
+2620 2798
+891 2798
+808 2286
+466 773
+1639 2418
+2418 1638
+1805 945
+2789 2795
+2574 698
+1173 813
+1243 1439
+1243 1438
+2 2303
+2790 2796
+1529 2317
+2799 2786
+19 2799
+230 2280
+1010 2798
+2798 2767
+1010 2767
+2791 2797
+1531 874
+1061 1489
+61 2800
+2800 2787
+1636 116
+2267 2694
+99 387
+1348 837
+1421 871
+2244 2783
+2744 2244
+419 2364
+378 459
+1119 459
+61 2801
+2801 2789
+2254 137
+2095 1282
+2580 35
+2792 2580
+2630 2058
+2058 2629
+2378 2132
+2802 2790
+19 2802
+2793 2799
+2555 81
+61 2803
+2803 2791
+280 515
+2794 2800
+128 1995
+1302 537
+16 145
+1386 116
+164 1422
+598 2286
+2388 432
+15 2590
+2795 2801
+41 368
+2804 2792
+19 2804
+406 2751
+15 2751
+2796 2802
+1907 1462
+2114 1462
+5 2228
+61 2805
+2805 2793
+2797 2803
+1538 5
+2806 2794
+19 2806
+525 1387
+1724 1676
+1636 222
+61 2285
+1956 2583
+15 1308
+2277 177
+2807 2795
+19 2807
+2580 2804
+2391 2472
+2472 2468
+2533 1782
+61 2808
+2808 2796
+464 1893
+2799 2805
+2809 2797
+19 2809
+630 685
+1295 2465
+1295 1148
+2800 2806
+99 1599
+1082 422
+731 1966
+2129 539
+2801 2807
+468 1767
+41 2310
+971 2042
+73 2520
+1851 1113
+2570 2701
+2426 1056
+2802 2808
+2216 1406
+242 1053
+2810 2799
+19 2810
+1231 516
+2803 2809
+1295 2577
+61 2811
+2811 2800
+164 324
+99 1206
+99 625
+24 1704
+689 2241
+1096 2388
+61 2812
+2812 2801
+41 2219
+734 1563
+1531 1662
+1662 497
+1531 497
+1208 955
+15 955
+2804 2579
+1096 633
+432 1096
+775 1158
+2813 2802
+19 2813
+2805 2810
+128 1766
+61 2814
+2814 2803
+2476 1356
+2806 2811
+1156 2027
+191 2580
+2807 2812
+468 151
+1117 2622
+2815 2804
+19 2815
+2230 41
+1049 1136
+280 193
+1923 448
+2808 2813
+425 733
+1562 425
+61 2816
+2816 2805
+61 1995
+2809 2814
+164 1772
+2817 2806
+19 2817
+2818 2371
+54 2818
+1690 2607
+41 851
+41 2058
+1364 418
+556 617
+1939 2104
+688 2347
+2180 2788
+2819 2807
+19 2819
+327 271
+515 1598
+1542 938
+2579 2815
+2177 1364
+1722 12
+896 2783
+61 2820
+2820 2808
+1999 543
+1156 722
+2810 2816
+320 2051
+2051 2229
+438 2607
+2821 2809
+19 2821
+2811 2817
+1621 203
+1621 338
+1597 1394
+1597 1583
+657 2452
+1052 2452
+24 2537
+420 2588
+778 1582
+777 1582
+777 25
+2812 2819
+426 1562
+2783 1975
+2751 405
+2813 2820
+2822 2810
+19 2822
+2814 2821
+164 2818
+2009 2818
+175 2082
+61 2823
+2823 2811
+2109 2019
+1426 472
+2420 472
+34 842
+325 271
+2173 2286
+525 597
+1314 2337
+1018 1170
+61 2824
+2824 2812
+70 329
+352 2376
+1896 146
+2815 2767
+128 1791
+2825 2813
+19 2825
+442 1780
+1677 1175
+2816 2822
+61 2826
+2826 2814
+164 2166
+2817 2823
+625 1207
+691 1231
+278 1231
+26 41
+2819 2824
+1170 591
+2827 2815
+19 2827
+61 1766
+1010 330
+2820 2825
+1063 590
+5 2759
+2228 2759
+2 2067
+61 2828
+2828 2816
+2821 2826
+2829 2817
+19 2829
+158 86
+86 2520
+124 1369
+990 266
+990 1590
+2075 1148
+2830 2819
+19 2830
+41 1445
+2097 81
+1174 1662
+2767 2827
+2221 2468
+2468 2220
+61 2831
+2831 2820
+2645 2744
+2822 2828
+2832 2821
+19 2832
+2823 2829
+112 1972
+2091 364
+24 2672
+851 2833
+41 2833
+777 1580
+54 445
+54 443
+2824 2830
+1623 41
+2280 886
+2825 2831
+2834 2822
+19 2834
+2826 2832
+61 2835
+2835 2823
+891 1023
+891 1022
+1701 1359
+1357 792
+792 1356
+581 710
+2721 1755
+61 2836
+2836 2824
+15 2180
+470 41
+2827 2798
+164 615
+2837 2825
+19 2837
+2828 2834
+61 2838
+2838 2826
+2829 2835
+179 644
+278 193
+363 1851
+2214 1318
+1318 1728
+61 1791
+2833 850
+2830 2836
+15 1533
+1344 1395
+2839 2827
+19 2839
+164 316
+2831 2837
+2778 41
+232 103
+232 1560
+61 2840
+2840 2828
+2832 2838
+2841 2829
+19 2841
+263 1459
+263 1621
+1010 1023
+302 537
+1808 1835
+2001 41
+1956 9
+2842 2830
+19 2842
+2798 2839
+1498 2833
+61 2843
+2843 2831
+2342 2778
+409 2263
+2834 2840
+2844 2832
+19 2844
+2835 2841
+1550 1583
+1690 685
+631 286
+998 286
+1417 955
+384 955
+15 745
+1910 675
+272 675
+1026 1633
+1633 1595
+2836 2842
+2326 994
+2 1890
+2837 2843
+15 39
+1707 981
+2139 1052
+318 627
+2845 2834
+19 2845
+2838 2844
+775 651
+128 2170
+61 2846
+2846 2835
+1077 272
+164 930
+15 989
+775 2005
+588 2588
+2768 177
+61 2847
+2847 2836
+1243 2274
+2839 2620
+2848 2837
+19 2848
+2840 2845
+61 2849
+2849 2838
+1791 2170
+61 2170
+2841 2846
+73 1962
+1870 1102
+164 2236
+164 1978
+860 41
+2842 2847
+84 1250
+2850 2839
+19 2850
+2843 2848
+15 2160
+61 2851
+2851 2840
+2844 2849
+2852 2841
+19 2852
+1044 1291
+1204 2352
+2352 1202
+25 2520
+686 2296
+992 1800
+2853 2842
+19 2853
+2620 2850
+775 653
+61 2854
+2854 2843
+15 1972
+2845 2851
+2855 2844
+19 2855
+2846 2852
+954 2081
+2818 2077
+932 1341
+2075 310
+9 367
+2847 2853
+2848 2854
+2282 2312
+15 2312
+61 1107
+2 1889
+2856 2845
+19 2856
+178 685
+2849 2855
+61 2857
+2857 2846
+164 975
+476 1843
+61 2858
+2858 2847
+782 52
+2850 2336
+2859 2848
+19 2859
+1694 2534
+2277 2534
+2851 2856
+61 2860
+2860 2849
+2852 2857
+602 155
+164 1588
+1165 924
+2818 2010
+2010 556
+2818 556
+1762 546
+2853 2858
+2861 2850
+19 2861
+2854 2859
+440 2607
+1930 1773
+61 2862
+2862 2851
+2855 2860
+100 1351
+2863 2852
+19 2863
+164 2212
+1437 640
+693 709
+73 684
+223 2537
+2864 2853
+19 2864
+2 623
+3 623
+2721 2215
+1179 2721
+2476 792
+2336 2861
+162 998
+162 286
+788 1705
+61 2865
+2865 2854
+2833 1500
+308 2131
+2131 1182
+2856 2862
+2866 2855
+19 2866
+2857 2863
+164 1977
+211 1463
+565 278
+1986 1055
+1986 2547
+184 1235
+2858 2864
+2418 2106
+2859 2865
+2867 2856
+19 2867
+2860 2866
+262 338
+2016 1277
+61 2868
+2868 2857
+1205 725
+245 2149
+61 2869
+2869 2858
+2476 73
+2361 73
+2861 2305
+2870 2859
+19 2870
+3 41
+41 1
+1514 2131
+2862 2867
+61 2871
+2871 2860
+1406 746
+2863 2868
+2248 682
+2864 2869
+2872 2861
+19 2872
+2110 2588
+2865 2870
+164 1428
+61 2873
+2873 2862
+2866 2871
+2874 2863
+19 2874
+312 2644
+246 886
+176 685
+689 2687
+2277 1494
+2356 297
+15 1667
+2875 2864
+19 2875
+2595 1992
+2305 2872
+15 2788
+6 1244
+61 2876
+2876 2865
+2867 2873
+2877 2866
+19 2877
+2868 2874
+1506 1850
+2039 1102
+2291 2376
+15 2478
+2657 2232
+2869 2875
+745 1749
+1722 1053
+285 1664
+773 180
+2870 2876
+2878 2867
+19 2878
+467 566
+2871 2877
+70 1706
+1199 128
+61 2879
+2879 2868
+23 2537
+1217 1087
+516 1598
+972 396
+1483 546
+61 2880
+2880 2869
+2872 1875
+2881 2870
+19 2881
+2873 2878
+61 2882
+2882 2871
+2874 2879
+1344 2161
+1357 745
+2875 2880
+2883 2872
+19 2883
+555 2010
+528 177
+2876 2881
+1397 380
+61 2884
+2884 2873
+2877 2882
+2885 2874
+19 2885
+1204 227
+1204 1826
+2039 521
+2886 2875
+19 2886
+1243 746
+1875 2883
+61 2887
+2887 2876
+2878 2884
+332 1133
+2888 2877
+19 2888
+2879 2885
+2472 2393
+2880 2886
+2768 503
+2881 2887
+1689 204
+2889 2878
+19 2889
+2882 2888
+61 2890
+2890 2879
+1204 1741
+61 2891
+2891 2880
+2768 1176
+2883 1874
+57 936
+145 751
+2892 2881
+19 2892
+41 1522
+2884 2889
+61 2893
+2893 2882
+2885 2890
+2666 2299
+2886 2891
+2894 2883
+19 2894
+273 1093
+2887 2892
+15 1482
+2223 2592
+61 2895
+2895 2884
+2888 2893
+2896 2885
+19 2896
+1343 2161
+2590 950
+2897 2886
+19 2897
+1874 2894
+496 2715
+61 2898
+2898 2887
+383 1366
+2889 2895
+2899 2888
+19 2899
+2890 2896
+2891 2897
+630 1176
+1969 888
+2892 2898
+1791 769
+2900 2889
+19 2900
+2893 2899
+61 2901
+2901 2890
+528 2296
+887 2149
+61 2902
+2902 2891
+1563 799
+24 2671
+23 2671
+2894 1840
+2903 2892
+19 2903
+2895 2900
+61 2904
+2904 2893
+1204 1858
+2896 2901
+15 591
+2897 2902
+61 1293
+1973 1182
+812 184
+48 2894
+19 48
+15 2392
+2898 2903
+61 76
+76 2895
+2899 2904
+97 2896
+19 97
+223 2671
+20 2897
+2087 235
+1840 48
+15 1930
+63 2898
+2900 76
+87 2899
+2901 97
+15 1060
+2902 20
+2903 63
+77 2900
+588 2110
+573 421
+2904 87
+95 2901
+573 867
+1295 1103
+123 2902
+105 1093
+149 2903
+167 2904
+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 60 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 20 133
+134 135 136
+137 138 139
+140 141 142
+143 144 145
+37 146 147
+148 149 150
+151 152 153
+154 155 156
+157 158 159
+160 161 162
+163 61 164
+165 65 166
+167 168 169
+170 171 172
+70 173 174
+175 176 177
+178 179 180
+181 182 183
+184 185 186
+187 188 189
+190 92 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 146
+236 237 238
+239 240 241
+46 152 242
+243 244 245
+163 246 247
+248 249 250
+251 252 253
+254 255 256
+257 258 173
+259 260 261
+262 182 81
+263 264 265
+266 267 82
+268 96 269
+270 271 272
+273 274 275
+100 196 276
+277 278 279
+280 281 282
+283 284 285
+286 287 288
+289 290 291
+292 293 294
+295 296 297
+298 299 300
+301 302 303
+304 305 306
+307 308 309
+310 311 312
+313 314 315
+316 317 318
+319 320 321
+132 229 322
+323 324 325
+326 327 328
+329 330 331
+332 333 334
+335 336 337
+338 339 340
+341 342 343
+344 252 166
+345 346 347
+348 349 350
+351 352 353
+354 355 356
+357 358 359
+360 361 362
+363 364 365
+366 177 367
+368 369 370
+371 372 373
+374 375 376
+190 271 377
+378 379 380
+5 381 382
+383 384 385
+386 387 388
+389 390 391
+392 393 394
+395 396 397
+398 399 400
+401 402 403
+404 44 405
+406 407 408
+409 410 138
+411 412 413
+414 415 416
+417 418 419
+420 10 421
+422 423 424
+425 426 427
+21 428 429
+430 431 432
+433 434 435
+436 437 438
+439 440 441
+442 443 444
+445 333 242
+446 447 448
+449 450 451
+340 452 453
+454 455 456
+457 458 459
+460 461 64
+462 463 464
+465 466 467
+468 469 470
+471 472 473
+474 475 476
+262 369 477
+478 479 480
+481 482 483
+93 484 485
+486 487 488
+277 489 490
+491 18 492
+493 379 276
+494 382 273
+495 496 497
+498 499 500
+501 502 503
+504 505 506
+283 507 508
+399 509 510
+511 512 513
+514 515 516
+517 518 121
+519 520 521
+323 522 523
+524 525 526
+527 428 322
+528 529 530
+531 532 533
+534 535 536
+537 538 539
+540 541 151
+542 543 544
+545 546 547
+548 395 549
+550 551 552
+553 554 555
+344 461 556
+557 558 559
+560 561 562
+563 564 565
+566 567 568
+569 570 571
+572 573 574
+183 575 576
+577 578 579
+580 484 377
+581 582 583
+584 585 586
+587 588 589
+590 591 592
+593 594 595
+596 597 195
+598 599 600
+601 602 603
+604 605 606
+607 608 609
+610 611 612
+613 614 615
+616 617 618
+619 620 621
+622 623 624
+625 626 627
+628 629 228
+630 631 632
+633 336 634
+531 635 636
+637 638 639
+539 640 641
+642 643 243
+445 541 644
+645 646 647
+648 649 650
+253 651 652
+653 654 655
+656 657 658
+659 660 661
+662 663 664
+665 575 477
+577 666 667
+668 669 270
+670 671 672
+673 384 674
+584 675 676
+677 678 679
+501 680 440
+493 597 681
+682 683 684
+685 686 687
+688 689 690
+691 692 693
+694 695 696
+697 698 699
+700 701 702
+703 514 614
+704 617 705
+706 707 708
+709 710 711
+712 713 714
+625 715 716
+527 629 717
+718 719 720
+721 722 723
+724 725 185
+351 726 727
+334 728 729
+730 731 732
+733 734 548
+735 736 737
+738 651 556
+739 740 741
+742 743 744
+745 746 368
+747 748 749
+580 669 750
+751 752 753
+380 754 755
+756 684 757
+758 759 663
+760 761 762
+763 764 765
+766 767 768
+769 552 770
+771 772 773
+774 709 775
+776 777 778
+779 780 781
+429 782 783
+784 785 786
+787 453 788
+789 790 791
+792 793 217
+794 728 644
+795 796 797
+798 799 460
+762 800 801
+802 803 804
+805 806 807
+808 670 809
+742 810 811
+812 813 814
+815 816 817
+665 746 818
+819 820 821
+822 440 823
+824 825 826
+827 828 829
+485 830 831
+832 833 834
+835 526 836
+837 754 681
+838 839 289
+840 841 842
+843 844 845
+425 846 847
+848 849 850
+851 852 853
+854 855 856
+857 858 859
+860 861 862
+863 864 865
+866 867 868
+869 870 871
+569 872 873
+874 875 876
+877 782 717
+878 879 828
+880 881 882
+883 884 885
+886 887 888
+889 890 891
+892 893 540
+894 895 231
+896 897 898
+738 799 899
+900 901 902
+903 904 905
+841 906 907
+576 908 909
+910 911 912
+913 830 750
+914 915 916
+917 918 919
+920 921 596
+922 923 924
+925 839 926
+927 928 929
+930 931 932
+933 934 935
+641 828 936
+414 937 938
+939 940 941
+942 863 943
+944 868 945
+292 946 947
+948 949 382
+950 951 628
+827 952 953
+954 955 956
+957 31 958
+959 960 961
+962 963 964
+965 966 967
+968 969 635
+338 970 971
+972 973 974
+794 893 975
+976 977 978
+979 808 980
+981 982 983
+652 984 985
+986 987 988
+989 990 991
+992 993 994
+995 996 810
+997 998 999
+1000 908 818
+1001 1002 1003
+1004 1005 1006
+1007 1008 1009
+1010 1011 668
+837 921 1012
+1013 1014 1015
+1016 1017 1018
+1019 1020 1021
+1022 1023 1024
+1025 1026 1027
+1028 1029 1030
+128 1031 1032
+1033 1034 356
+1035 1036 1037
+659 1038 1039
+877 951 1040
+1041 1042 1043
+1044 1045 312
+1046 1047 1048
+1049 883 800
+1050 1051 1052
+1053 1054 1055
+1056 1057 890
+729 1058 1059
+1060 1061 1062
+1063 1064 1065
+1066 984 899
+989 1067 1068
+1069 1070 1071
+1072 1073 1074
+1075 1076 745
+1077 1078 1079
+1080 1081 1082
+913 1011 1083
+1084 1085 1086
+755 1087 1088
+1013 238 1089
+1090 1091 1092
+1093 1094 1095
+1096 1097 1098
+1099 1100 1101
+537 936 1102
+1103 1104 1105
+1106 1107 1108
+1109 1110 1111
+1112 1113 1114
+1115 1116 1117
+1118 935 1119
+1120 1121 1122
+1123 1124 1034
+866 1125 1126
+1127 416 1128
+954 1129 1130
+1131 489 1132
+1133 1134 362
+783 1135 1136
+1137 979 1138
+1139 1140 1141
+1142 1143 1144
+961 1145 1146
+1147 1148 1149
+1150 1151 1152
+1153 1154 1155
+1156 1058 975
+1157 1158 1159
+1160 1161 545
+1162 1163 1164
+1165 1166 798
+1167 1168 1169
+1170 1171 1172
+1173 1174 1175
+1000 1076 1176
+831 1177 1178
+997 1179 1180
+1181 1087 1012
+1182 1183 1184
+1185 1186 1187
+1188 1189 1190
+1191 1192 1193
+1194 1195 1196
+1197 1126 1198
+1199 590 1200
+1201 1202 1203
+207 1204 1205
+1206 1207 1208
+1115 405 1209
+1210 1211 1212
+1213 1214 1215
+1216 1217 1218
+1219 1220 1221
+1222 1223 1224
+1225 1226 1227
+1228 1229 6
+1230 1231 1232
+1233 1234 1235
+1236 1135 1040
+1237 1238 1239
+1240 1241 1242
+1243 1244 105
+1245 1246 1247
+1248 1249 892
+1250 1251 1252
+1253 1254 1255
+1256 1257 1258
+1066 1166 1259
+1260 1261 1262
+605 1263 8
+1264 1265 1266
+1267 1268 1269
+1006 1270 1271
+1272 1273 1274
+909 1275 1276
+1277 1177 1083
+1278 1279 693
+1280 1281 1282
+1283 1284 920
+1285 1111 939
+1286 1287 1288
+1289 1131 1290
+1291 1292 405
+1293 579 1294
+1295 1296 1297
+1298 1299 1300
+1301 1134 1302
+1303 1304 1305
+1306 1307 1308
+1309 1310 1311
+1312 1137 1313
+189 1314 1315
+1316 1317 1318
+1319 1320 1321
+1322 1323 1324
+1325 1326 1327
+1328 1329 1330
+1331 1332 950
+1333 1334 278
+1335 1336 431
+1337 1338 1339
+622 1340 1341
+1342 1343 1344
+682 404 912
+1156 1249 1345
+1346 1347 1348
+519 1349 1350
+1099 1351 1352
+985 1353 1354
+1355 306 1356
+1357 1358 407
+1359 1360 1361
+1362 1275 1176
+1363 1364 1365
+1366 1367 1368
+1369 1370 1010
+1371 1372 1373
+1374 1375 1376
+1196 1377 1378
+1181 1284 1379
+1380 1381 1382
+844 1383 1384
+1385 1386 1387
+1388 1203 1389
+1184 1390 1391
+1392 1132 279
+1393 1394 1395
+1396 821 1397
+1398 994 1399
+1400 1401 1402
+1403 1404 1405
+1406 1407 236
+1408 1409 1410
+1411 1412 1413
+1414 1415 1416
+1417 1418 1419
+1236 1332 1420
+1421 410 1422
+1423 1424 1425
+1426 1337 412
+1427 507 1428
+1429 1430 1431
+1432 1433 1434
+1059 1435 1436
+1437 1438 1439
+1440 1441 1442
+1443 1353 1259
+1444 1445 604
+1429 1446 1447
+1448 1449 1075
+1144 1450 1451
+1452 480 1453
+1277 1370 1454
+1455 1456 1457
+1458 1459 1460
+1088 1461 1462
+1463 1185 759
+1464 1465 1466
+1197 1467 1468
+1469 1470 1343
+1471 1312 1472
+1473 1474 1475
+1476 1477 1478
+1479 1480 677
+1481 1482 1483
+1484 1485 1486
+1403 1487 1244
+1488 1489 1490
+1491 1492 1493
+1136 1494 1495
+1496 1497 1498
+1499 1500 1501
+1240 1502 1503
+510 1427 1504
+558 1265 1505
+1506 1154 1507
+1508 1435 1345
+1509 1510 1330
+1080 1511 1512
+1513 1514 1515
+1193 1516 1517
+1518 1519 1165
+1520 1521 1522
+1523 1524 1525
+1526 1527 1528
+1529 1530 1531
+1532 1533 1534
+1362 1449 1535
+1536 1537 1538
+1539 467 1540
+1178 1541 1542
+1543 1461 1379
+1544 1545 1546
+1547 1548 1549
+1550 1551 1465
+1552 1299 1553
+1554 1555 1019
+1556 1557 1558
+1559 1560 737
+1160 1328 586
+1561 1484 1562
+366 1563 1564
+1565 1566 1487
+1567 1568 1569
+1570 1571 807
+1572 1573 1574
+1575 1576 76
+1577 1494 1420
+1578 424 1579
+1580 1581 1582
+1583 1584 1248
+1585 1586 1587
+1588 1589 1590
+1591 1592 1593
+1594 1595 1596
+1443 1519 1597
+1598 1599 747
+1600 1601 1602
+1603 1523 306
+1604 1605 1606
+1607 1608 1609
+1276 1610 1611
+1612 1613 1614
+766 1376 1615
+1616 862 1144
+1617 1377 1618
+1619 1541 1454
+1620 1621 1622
+1623 1624 1283
+1625 656 1626
+1627 1628 372
+1629 1630 331
+1631 1632 1633
+1634 1635 1467
+1636 1637 1638
+1556 1639 1640
+1641 723 1642
+1643 1644 1645
+1646 199 155
+1647 1648 1649
+1650 1651 1652
+1653 1654 1655
+1656 1490 1657
+1658 1659 1660
+1661 1662 1331
+1509 586 1663
+1664 1665 510
+1508 1584 1666
+1667 1668 1669
+1670 1671 1672
+1673 1674 1675
+1354 1676 1677
+1678 1679 1680
+1681 1682 1683
+1684 1610 1535
+1685 1686 1613
+1687 1688 1689
+1690 1691 1692
+1693 1694 1369
+1695 1696 1390
+1697 1698 1699
+1543 1624 1700
+1701 1629 1702
+1703 1704 1705
+1706 1707 1708
+1079 1709 1710
+310 1711 1712
+1713 1714 1715
+1647 1247 1716
+1717 698 1718
+1719 1720 1721
+1635 1722 1723
+1724 1400 1725
+1726 1727 1728
+1729 1434 1730
+1731 1732 1733
+1577 1662 1734
+1094 1278 692
+1735 1736 1737
+1738 1739 1740
+1436 1741 1742
+1743 1744 1745
+1746 1747 1748
+1749 1750 1751
+1752 1753 897
+1754 1755 1756
+1757 1676 1597
+1758 1759 1760
+1761 1762 1763
+1764 1765 1476
+1766 1767 1768
+1769 1770 1448
+1771 1772 1773
+49 1774 1775
+1776 1777 1778
+1779 1780 1781
+1619 1694 1782
+1783 1784 1785
+1786 810 1787
+1788 1789 1790
+1462 1791 1792
+1547 362 1793
+1794 1795 1796
+1797 1798 1799
+1800 312 860
+1801 1802 1247
+1803 1804 1805
+446 1806 1807
+1808 1027 1809
+1810 1811 1812
+1813 1814 1815
+1816 1817 1818
+1495 1819 1820
+1821 1822 1823
+1824 1825 1826
+1827 1828 1829
+1830 1831 1832
+1833 1741 1666
+1834 1835 1171
+1836 1837 1838
+1839 604 1840
+1841 1756 1842
+1843 1844 1518
+1845 1846 1477
+1847 1848 1849
+1684 1770 1850
+1851 1627 1852
+1542 1853 1854
+1855 1701 1856
+1857 1858 1859
+1860 1861 1862
+1863 1791 1700
+1864 1865 1866
+1867 1868 1100
+1869 1870 1871
+1872 1873 1874
+1875 1876 1877
+1878 1879 1880
+1881 1882 1883
+1884 1885 1886
+1887 1888 440
+1889 1668 1890
+1891 1892 1893
+1894 1895 1896
+1897 1819 1734
+1898 1899 1900
+1901 1902 450
+1903 1164 1904
+1905 1906 1907
+1396 1908 1909
+1910 1911 1583
+1912 1913 1914
+1418 1274 1915
+1916 1917 1918
+1757 1844 1919
+1920 385 1921
+1922 1763 1923
+1924 1925 1926
+630 1927 1446
+1611 1928 1929
+1930 1931 1932
+1933 1853 1782
+1934 1935 1936
+1937 1938 1623
+1939 1940 1941
+1942 1943 1944
+1001 1945 1946
+1947 1948 1949
+1950 1951 1952
+1953 1954 1955
+1956 1957 1958
+1959 1960 1961
+1962 1963 1964
+1965 1966 1967
+1968 1969 1970
+658 1971 1972
+1973 1974 1975
+1976 1977 1978
+1979 1980 1981
+1982 1983 1984
+1966 1809 1985
+1986 1987 1661
+1988 1989 1990
+1991 1992 1993
+1994 1995 1996
+1997 1998 1999
+1833 1911 2000
+2001 2002 2003
+2004 2005 2006
+2007 1916 2008
+2009 2010 2011
+2012 1748 2013
+1677 2014 2015
+2016 992 2017
+2018 1851 2019
+1924 2020 2021
+2022 2023 2024
+1862 2025 2026
+2027 1928 1850
+2028 2029 2030
+2031 1931 2032
+2033 2034 1693
+2035 2036 2037
+1863 1938 2038
+2039 1621 2040
+2041 2042 2043
+2044 2045 1950
+2046 2047 145
+2048 2049 1397
+2050 2051 483
+2052 1516 2053
+1468 1723 1907
+2054 2055 2056
+2057 2058 2059
+2060 2061 2062
+1536 2063 1918
+1978 2064 2065
+2066 2067 2068
+2069 2020 2070
+2071 2072 2073
+1897 1987 2074
+2075 2076 2077
+449 2078 2079
+2080 2081 2082
+2083 2084 2085
+2086 2087 2088
+1742 2089 2090
+2091 2092 2093
+2094 2095 1418
+2096 2097 2098
+2099 2100 2101
+2102 2103 2104
+483 2105 2106
+2107 2014 1919
+2108 2109 2020
+2110 2111 2112
+2113 2114 2115
+2116 2117 1769
+2118 1771 2119
+1933 2034 2120
+2121 2122 2123
+1945 2124 2125
+1792 2126 2127
+2128 2129 2130
+2048 2131 2079
+2132 2133 2134
+2135 2136 2137
+2064 2138 2139
+2140 2141 1412
+1759 770 2142
+2143 2144 588
+1820 2145 2146
+2147 1845 2148
+2149 719 1212
+1143 1044 861
+2150 1503 2151
+2152 2148 2153
+2154 2155 2156
+1506 1043 2157
+2158 2089 2000
+2159 2160 1501
+2161 1472 2162
+2026 2163 2164
+2165 2166 2167
+2105 2168 2169
+2170 2171 1843
+2172 2173 2174
+2027 2117 2175
+1854 2176 2177
+2178 2179 2180
+675 1330 1653
+2181 2126 2038
+2182 2183 2184
+2185 2186 2187
+2188 2189 2190
+2191 674 2192
+2193 2194 2195
+2196 2145 2074
+1406 1015 2197
+2198 2199 2200
+2201 2202 1910
+2203 2204 1867
+2205 2206 601
+2207 800 2208
+2209 2210 443
+2211 2212 2213
+2107 2171 2214
+2215 2216 2217
+2218 2219 886
+2220 2174 1308
+1929 2221 2222
+2223 2176 2120
+2224 2225 2226
+1517 2227 1803
+2228 2077 200
+2229 2230 2231
+2232 2233 1960
+2234 2235 1937
+1690 2236 2237
+2238 1029 2239
+2240 2241 2242
+1470 2243 264
+2244 1428 2245
+820 1901 2131
+105 1566 504
+2246 2247 2248
+2249 2250 201
+2251 861 312
+2252 2253 2254
+2255 1551 1290
+2256 961 2257
+2258 2259 1986
+2260 2261 2262
+2263 1313 2264
+2265 2266 2267
+2164 2268 2269
+2270 2271 2272
+307 2273 2274
+2275 1152 2276
+2158 2202 2277
+2203 2278 2279
+2039 1329 2280
+2281 2282 1682
+2015 2283 2284
+2285 2286 2287
+2288 2289 2290
+2291 2221 2175
+2028 2292 2293
+2294 2295 2033
+2296 2297 2298
+2181 2235 2299
+2300 327 2301
+2302 2303 546
+2304 2305 2306
+2307 2308 2309
+2310 475 2311
+468 568 2312
+2313 2314 2315
+2316 1217 2317
+97 2318 2319
+2196 2259 2320
+2321 2322 847
+2264 1138 2323
+2324 2325 2326
+2327 2328 1651
+2269 2329 2330
+2331 2332 2315
+2333 2334 2335
+2336 2337 2338
+2339 2340 2341
+2342 297 1247
+2090 2343 2344
+2345 2346 2347
+2348 2283 2214
+374 2227 2349
+2350 2351 473
+2352 2353 154
+2354 2355 2116
+1805 146 2356
+2357 2043 2358
+2359 2360 2361
+2223 2295 2362
+2363 2364 476
+1984 2365 2366
+2367 2368 2369
+2127 2370 2371
+2372 1213 2373
+2374 123 2375
+2376 2377 2378
+2084 1142 2379
+2380 2381 2382
+2209 2383 2384
+2146 2385 2386
+2387 1472 2263
+2388 2389 1163
+2390 1307 2391
+87 777 2392
+896 2393 2394
+2395 2343 2277
+2396 2397 2398
+2399 2400 2401
+2402 2403 2404
+2405 2406 2407
+2408 1613 2409
+2410 2411 2170
+2412 2413 2414
+2415 2416 2417
+2418 2419 2420
+2421 2422 2423
+2291 2355 2424
+2425 2426 2427
+2177 2428 2429
+2430 2431 1194
+2432 2433 2434
+2435 2370 2299
+1691 2436 2437
+1550 2438 1289
+2439 2374 2440
+2009 2441 2442
+2443 2444 2445
+2446 2447 353
+2331 2448 2449
+2450 2451 2452
+2453 2454 566
+2455 2456 2457
+2458 2459 2460
+2461 2462 2463
+2464 2465 382
+2466 2385 2320
+2467 269 2468
+2469 2470 2471
+2390 809 2472
+2198 2473 2129
+2474 2335 2475
+2476 2477 2478
+2479 2480 2481
+2482 2483 2201
+2484 1568 2485
+2486 2487 2488
+2348 2411 2489
+2490 353 2491
+2492 2493 2494
+2495 2496 2497
+2498 2499 2500
+2222 2501 2502
+2503 664 759
+2123 2504 2505
+2506 900 2507
+2508 2428 2362
+2509 2510 1028
+500 2511 2512
+2513 2514 2234
+1251 2515 2516
+2517 2518 2519
+1606 2242 2520
+300 2521 2522
+2523 2524 2525
+286 2526 834
+2527 683 911
+2528 2529 2530
+2531 2532 2533
+2534 2535 2183
+1399 2536 2537
+2538 2539 2540
+2541 2542 2543
+2544 2545 2258
+2328 2546 2547
+2548 2549 1980
+2550 2551 308
+11 2552 2553
+2554 2555 2556
+2557 2558 2559
+2395 2483 2560
+2051 1093 2561
+2562 2563 2564
+2486 2565 2566
+2284 2567 2568
+2569 2570 2571
+2572 1606 2573
+2574 2575 2576
+2577 2578 1807
+2579 2501 2424
+2580 2581 2582
+2583 2584 2585
+2586 2278 2587
+2588 2589 2590
+2591 2592 2294
+2376 2593 2594
+2595 2596 246
+2597 2598 2599
+2239 2510 1982
+2600 2601 2602
+2435 2514 2603
+2604 1390 2605
+2606 2353 2607
+2608 2609 2610
+1836 2611 2005
+2612 2613 2614
+2615 1837 2616
+2617 2618 2619
+2466 2545 2620
+1162 2621 2622
+2623 1641 1783
+2624 2625 2626
+2627 2628 2629
+1939 2440 2630
+2631 2632 2633
+2344 2634 2635
+2636 2637 2638
+648 2639 2640
+2641 2642 2643
+2644 2645 2646
+2647 2648 2649
+2650 2651 2652
+2653 2567 2489
+2654 2655 2656
+2657 2658 2659
+2660 2661 2354
+2662 2030 339
+2588 672 2663
+2664 1300 2665
+2508 2592 2666
+2667 2668 2669
+2670 1378 1975
+2671 2672 2673
+2674 2675 2676
+2371 2677 2678
+2679 2680 1606
+2681 2682 568
+2683 834 2684
+2685 2686 2687
+2688 2445 2689
+2690 2691 2692
+2693 2694 2695
+2696 2697 2087
+2698 753 2699
+2700 2701 2702
+2386 2703 2704
+2705 2561 1095
+2706 2707 1927
+1046 2708 2709
+2710 2711 2712
+2713 2478 2714
+2715 2716 2717
+2631 2718 2719
+2720 2634 2560
+2721 2722 2723
+2724 2725 2645
+2726 2727 2728
+2729 2143 2730
+2731 2732 2410
+2733 2734 2735
+2736 2737 2738
+2739 2740 2741
+2742 1158 2743
+2744 2745 2746
+2579 2661 2747
+2748 2749 1102
+2750 990 2751
+2752 2753 2754
+2755 2756 2757
+2429 2758 2759
+2760 2761 2762
+2763 2764 2765
+2766 1262 2767
+2768 2769 2770
+2771 2677 2603
+2772 2773 2774
+2775 2776 2777
+2527 1246 757
+565 2778 2441
+2779 2722 1017
+2780 2781 2782
+2783 2784 2785
+2556 1497 2352
+2786 2787 2788
+2789 2703 2620
+2790 2791 1047
+2792 2793 2063
+2794 1545 2795
+2796 2797 2798
+2799 2800 2801
+1230 1954 2802
+2803 2804 2482
+2805 2806 2807
+2808 2809 2607
+2810 2811 2812
+2813 2814 2815
+2304 2816 2817
+2818 2819 2820
+2821 2822 2823
+2653 2732 2824
+2825 2826 2827
+2828 2576 2671
+2744 2829 2830
+2831 2832 2833
+2502 2834 2835
+2836 2837 400
+2838 2839 600
+2840 1553 2841
+2842 2758 2666
+2843 459 2844
+2845 2846 2513
+2334 2847 2848
+2849 2516 2850
+2851 2852 2853
+2854 2855 2856
+2857 1948 2858
+2859 2860 2688
+2698 2861 2862
+2863 2864 2865
+2866 2078 2867
+2868 1564 2869
+2870 2871 2872
+1549 2154 1301
+2873 2874 2544
+2875 2876 2877
+2878 2879 2644
+2880 2881 2882
+2883 2796 135
+2884 2885 2667
+2886 2200 2887
+2888 2889 2890
+2715 2891 802
+2720 2804 2892
+2893 2894 2097
+2895 2896 2897
+2898 2899 1171
+2568 2900 2901
+2902 2903 2904
+2819 2905 2906
+2907 2834 2747
+2908 2909 2591
+2910 2760 2593
+2911 2612 2912
+2913 555 2914
+2771 2846 2915
+2916 2853 2917
+491 2918 2919
+2857 2920 244
+2921 1498 2555
+1098 2231 2922
+2923 1205 2924
+2925 2460 2926
+2927 2928 2929
+2309 2930 2931
+2932 2933 2934
+2935 2936 2937
+2938 2939 2940
+2941 2663 809
+2942 2943 2944
+2573 2945 1841
+2946 2947 2948
+2789 2874 2949
+2950 2951 1829
+2952 631 1431
+2060 1883 2953
+2954 2481 2955
+2635 2956 2957
+2958 2959 2960
+2961 2962 2963
+2964 2965 2966
+2967 2900 2824
+2968 2969 2970
+2971 2972 2973
+2974 2975 2829
+881 2976 2977
+2978 2979 2660
+2980 2981 594
+2842 2909 2982
+2983 2984 2985
+2986 2987 1944
+2678 2988 2989
+2990 2848 1949
+2991 2992 2849
+2993 2994 2995
+2996 2997 2998
+2999 3000 3001
+3002 839 3003
+3004 3005 3006
+3007 1097 1191
+3008 3009 3010
+3011 3012 3013
+2461 3014 3015
+3016 3017 3018
+2710 2507 3019
+2037 3020 3021
+2704 3022 3023
+1935 3024 3025
+1437 3026 3027
+3028 2070 3029
+2583 3030 2822
+3031 3032 2227
+3033 3034 3035
+1352 3036 2278
+3037 3038 3039
+3040 2956 2892
+3041 3042 2382
+3043 2135 2648
+3044 3045 1998
+3046 3047 2378
+3048 3049 2731
+2246 3050 3051
+2971 3052 3053
+2907 2979 3054
+3055 3056 6
+2759 3057 3058
+3059 2988 2915
+3060 3061 2694
+3062 3063 753
+3064 1952 698
+2999 3065 3066
+3067 96 2939
+3068 3069 3070
+3071 3072 1007
+532 3073 1992
+3074 3075 3076
+3077 3078 3079
+3080 1269 3081
+3082 3022 2949
+1348 3083 3084
+3085 3086 3087
+3088 3089 2973
+3090 1659 3091
+3092 311 3093
+3094 3095 3096
+3097 3098 2803
+3099 3100 3101
+2967 3049 3102
+3103 3104 2602
+3105 1138 3106
+2835 3107 3108
+3109 3110 2378
+3111 3057 2982
+2779 3112 3113
+3114 3115 2845
+3061 3116 3117
+3118 1804 3119
+3120 3121 3122
+3123 3124 3065
+3125 3126 3127
+3068 3128 3129
+3130 3131 3132
+1758 3133 3134
+2253 3135 3136
+3137 3138 3139
+2366 3133 2430
+103 3140 3141
+2417 1227 3142
+3143 3144 2873
+3145 3146 3147
+1310 3148 2836
+3149 3150 3151
+3152 3153 3154
+3040 3098 3155
+3156 3157 2930
+259 1957 3158
+2901 3159 3160
+3161 3162 205
+3163 3164 3165
+3166 3167 1463
+3168 3107 3054
+3169 3170 2908
+2306 3171 3172
+3173 3174 3175
+3176 3177 678
+3178 2413 55
+3059 3115 3179
+2636 3180 3181
+3182 781 3183
+1760 3184 2431
+3185 1287 1557
+3186 3187 3188
+1787 3189 3190
+3191 3192 3193
+3194 3195 1996
+3196 3197 3198
+3199 3200 1576
+1631 3201 3202
+490 3203 2488
+3204 3205 3206
+3207 3208 1465
+3209 3210 3211
+3212 3213 3214
+3082 3144 3215
+3216 3217 3218
+3219 3220 3221
+3222 3223 3224
+3225 1097 2230
+3226 1754 3227
+2957 3228 3229
+3230 3103 1763
+3231 282 3232
+3233 3234 3235
+3236 3159 3102
+3237 2621 3238
+3239 3240 3241
+3166 3242 3243
+3244 3245 2978
+3246 3247 3248
+3111 3170 3249
+2356 1595 3250
+3251 678 3252
+3253 3254 3255
+2989 3256 3257
+1049 761 3258
+2741 3259 3260
+3261 2572 2753
+3262 3263 3264
+3265 3266 3267
+3268 3269 3270
+125 3271 3272
+3273 2379 1144
+3274 105 3005
+3275 3276 2417
+1085 2708 3277
+3023 3278 3279
+3280 3281 3282
+3283 3284 1869
+3285 2322 3286
+3287 3161 3288
+3152 3289 3290
+3291 2339 1434
+3292 3228 3155
+3293 3294 3295
+2004 1320 2616
+3296 3233 3297
+422 3298 1074
+3299 3300 3301
+3302 3303 3048
+3304 3239 1932
+3168 3245 3305
+3058 3306 3307
+758 3308 3242
+3309 3310 2375
+3311 3312 2613
+3313 3256 3179
+3314 3315 3316
+3317 3318 781
+3319 2599 3192
+587 3320 3321
+3322 3323 3324
+3325 3326 3327
+3328 3208 2153
+3329 3223 2384
+3330 1633 3331
+3332 3333 3334
+2721 3335 3336
+3337 3338 3339
+3340 3341 1280
+3342 3278 3215
+3343 3344 3345
+3346 68 3347
+3348 3349 3097
+3350 3351 3352
+2212 3353 3354
+3355 3356 3357
+3236 3303 3358
+3359 3360 3361
+280 3362 924
+3119 2227 2052
+3108 3363 3364
+357 56 2412
+3365 3306 3249
+3366 3367 2688
+3368 3369 3370
+3371 3372 3373
+3374 3375 3376
+3377 3378 3114
+3379 3380 3381
+3382 2940 3383
+3316 856 2739
+2738 3384 3385
+1557 3386 3387
+3388 3389 3390
+2882 3391 3392
+3393 3394 3395
+3396 3397 2013
+3398 3399 3400
+3401 3402 505
+442 3403 3404
+3405 1715 3406
+3407 3408 3409
+3294 3410 3411
+3412 3413 3414
+3340 3415 3416
+3417 3418 3143
+3284 3419 3420
+3421 3422 3423
+2496 3424 3425
+3292 3349 3426
+3427 3428 3429
+2869 3430 2082
+3431 3432 3433
+3434 3435 3296
+3160 3436 3437
+3438 3439 2628
+3440 3441 3442
+3443 3363 3305
+3444 3445 3446
+3447 3448 3449
+3450 3451 3452
+3453 3454 3169
+3455 3324 3456
+3313 3378 3457
+3458 3459 3460
+3461 3462 3093
+593 3463 680
+3464 2083 3465
+3466 3467 3468
+1935 3469 2895
+1286 3470 3471
+3472 3473 1485
+3474 497 671
+3391 110 3475
+3476 3477 1913
+3478 3479 3480
+3481 3482 3483
+3484 2930 3485
+3486 3487 2722
+3488 525 3489
+1810 3490 3491
+3342 3418 3492
+3493 1324 3494
+3229 3495 3496
+2096 3497 3015
+3498 3499 3500
+3501 3502 3503
+3504 3505 3506
+3175 3507 1004
+3508 3436 3358
+3261 2416 3509
+3440 3510 3511
+3512 3513 3244
+3514 3515 3320
+3516 3517 3518
+3365 3454 3519
+3520 3521 3522
+3257 3523 3524
+3525 3526 3527
+3528 2694 3529
+2260 3530 743
+3531 3532 3533
+3534 2532 3535
+502 3536 3537
+2580 3538 3539
+3540 1651 3541
+3542 3411 3543
+3544 3420 3545
+3546 3547 3548
+3549 3550 3551
+3332 3552 112
+3553 3554 3555
+3556 3557 3558
+1779 3559 3560
+3279 3561 3562
+3563 2092 3564
+3565 1361 3566
+3567 3495 3426
+3568 3569 3570
+3571 3572 3153
+3573 3574 2627
+3575 3576 3577
+3578 3579 3580
+3504 3030 3581
+3582 3583 3584
+3585 3172 3586
+3587 907 1026
+3588 1983 2509
+3589 3590 3302
+3591 3592 2827
+3593 1932 2341
+3594 2503 3242
+3443 3513 3595
+3307 3596 3597
+3598 1857 2984
+3599 3464 3600
+3328 3601 2438
+3407 3602 441
+3603 3604 3605
+3606 3607 3608
+3609 3523 3457
+3610 3611 3612
+3613 2497 3614
+3615 2262 3616
+3617 1294 3618
+3619 3620 3538
+2557 3621 2480
+3622 3623 3624
+3625 3626 3482
+3627 3628 3629
+3630 3631 3632
+3633 2930 3634
+1672 1963 3635
+3636 3561 3492
+3637 3638 3348
+3639 3640 3641
+3642 1122 3643
+3644 3645 3030
+1267 3646 632
+3647 3648 3649
+3508 3590 3650
+3651 3652 3653
+3364 3654 3655
+3656 3596 3519
+3657 3658 3659
+3660 3193 2598
+3661 3662 2493
+3663 3605 3520
+3517 606 3664
+1150 3665 3666
+3667 3668 3377
+3669 1795 3670
+3671 3672 3673
+3674 3212 2353
+3675 3676 3677
+3678 3507 3679
+3680 3544 2507
+3681 1434 3241
+3682 3683 3684
+3685 3686 418
+3687 3253 1418
+3688 3689 3690
+3691 3692 3417
+3693 1814 3694
+513 2254 3695
+3225 3696 3697
+3567 3638 3698
+3699 891 3700
+3701 157 928
+3702 3703 3704
+3705 3706 3707
+3437 3708 3709
+3710 3654 3595
+3711 3712 3453
+1888 3713 3408
+3714 3715 3296
+3716 435 3717
+3609 3668 3718
+3719 3720 3721
+3722 3723 2977
+618 3724 3725
+3726 3727 3728
+3201 3729 3730
+3731 2996 3732
+3733 3734 3735
+3392 725 3736
+2658 3737 1214
+3738 3739 3740
+159 3741 3742
+412 3743 3744
+3745 42 1346
+3636 3692 3746
+3747 3748 3749
+3750 3751 3752
+3496 3753 3754
+1232 3755 3756
+3757 3758 3759
+3760 3761 3762
+3763 3708 3650
+534 3764 3765
+3766 3767 138
+1793 2675 3768
+3769 3770 3771
+3772 3773 3594
+3774 2085 3273
+3775 3776 3512
+3656 3712 3777
+3717 2405 3180
+3778 3779 3780
+3781 2775 3782
+3783 1444 3516
+3524 3784 3785
+949 3719 274
+616 3786 168
+3787 3788 3789
+3618 3790 3791
+821 2131 3792
+3793 3794 3578
+2897 3795 3796
+3797 3798 3029
+3799 3800 1603
+3801 3802 3803
+3804 3805 3806
+3807 3808 3809
+3810 2973 3811
+3812 3503 2540
+3813 3814 3815
+2827 3446 3816
+3817 3818 3552
+3562 3819 3820
+3821 2103 3822
+1255 3823 3824
+3825 3753 3698
+1342 3826 3827
+3828 2318 3829
+3830 3831 3832
+2950 3833 3834
+3835 3836 1486
+3837 3838 3839
+3840 3841 3589
+3842 3843 3844
+3845 3846 3538
+3847 2293 3848
+3710 3776 3849
+3597 3850 3851
+3778 715 3852
+3853 3188 3854
+3855 3784 3718
+3856 3857 3858
+3859 3860 3861
+1491 1262 3862
+3863 3864 3865
+3790 578 3866
+3867 3616 3868
+3869 3870 3871
+3872 3873 3707
+3799 3874 3875
+2434 3250 3876
+3877 3878 3879
+3880 2115 3881
+3882 2959 3883
+2228 155 2606
+3884 3885 3886
+3887 3888 3889
+3890 3819 3746
+3891 3892 3893
+3894 3895 3896
+3897 3898 3899
+3900 3901 3637
+3902 3903 3904
+3905 1713 1875
+3906 3907 3908
+3909 3910 3911
+3912 3913 3914
+3763 3841 3915
+3916 3038 3917
+3918 3919 3920
+3655 3921 3922
+3923 3781 3924
+3925 3850 3777
+3926 3927 3928
+3929 3930 715
+1245 296 2613
+3931 3932 3188
+3933 3934 3667
+3935 3936 3937
+3938 2219 3939
+3940 3122 3941
+3942 3943 3794
+3944 3945 1061
+3380 3946 722
+3947 3674 155
+3948 3949 2910
+3950 3951 3691
+3952 3953 3954
+3955 3956 3010
+3825 3901 3957
+3958 2645 3959
+2632 3960 2558
+3961 3962 3963
+3964 3965 1097
+3709 3966 3967
+3968 3969 3970
+3971 3921 3849
+3972 2935 3973
+3974 3975 3711
+3976 3977 3978
+3979 3980 3927
+3981 113 3818
+3855 3934 3982
+3983 188 3984
+3985 3986 3987
+3988 3989 3990
+3406 1459 3991
+3992 788 3993
+2053 1192 1096
+3994 3995 3996
+3997 3998 3999
+3069 4000 4001
+2266 4002 4003
+1355 4004 3874
+4005 3808 1732
+4006 4007 4008
+4009 4010 4011
+4012 2491 2537
+4013 4014 4015
+4016 4017 4018
+4019 2853 4020
+4021 4022 4023
+3890 3951 4024
+3754 4025 4026
+386 4027 2645
+4028 3961 4029
+4030 4031 4032
+4033 4034 418
+4035 4036 4037
+2876 4038 174
+4039 3966 3915
+4040 4041 4042
+4043 4044 3775
+3932 4045 4046
+4047 202 4048
+3716 2638 4049
+3928 3980 4050
+3925 3975 4051
+4052 4053 2301
+4054 4055 4056
+3785 4057 4058
+3859 1323 2042
+3405 4059 1876
+4060 4061 17
+4062 4063 4064
+4065 4066 1977
+3998 3727 4067
+4068 4000 781
+4069 4070 4071
+4072 2132 4073
+4074 4075 4076
+4077 2431 4078
+4079 4080 4081
+4082 4083 1493
+4084 4085 3151
+4086 4087 4088
+3867 1829 4089
+3820 4090 4091
+4092 3081 4093
+4094 4025 3957
+4027 4095 4096
+4097 4032 3327
+4098 571 4099
+419 4100 4101
+4102 4103 4104
+4105 4106 3840
+16 4107 4108
+4109 4110 4111
+1976 3970 4112
+4113 4114 4115
+3971 4044 4116
+4117 4118 4119
+1458 3029 4120
+4121 2063 4122
+3851 4123 4124
+4054 4125 4126
+4127 4057 3982
+4128 4129 4130
+4131 4005 1731
+4132 3992 3676
+4133 4134 3126
+4135 4136 3997
+4137 4138 4139
+1391 4140 4141
+4142 4143 4144
+2701 4145 4146
+4147 1111 4079
+4148 4149 1302
+4150 32 4151
+4152 4153 4154
+4155 4090 4024
+4156 261 2832
+3759 3267 929
+4157 4158 3900
+4159 4160 4161
+4162 4163 4164
+3760 4165 524
+3705 2934 4166
+4039 4106 4167
+3640 4168 4169
+4029 4045 4170
+3983 291 1314
+4171 4172 4173
+4174 1723 4175
+3922 4176 4177
+4120 2020 4178
+1842 4179 4180
+4181 4123 4051
+4182 4183 3933
+4184 3865 4185
+4186 4187 4188
+1696 4189 4140
+4190 4191 4192
+4193 2148 1476
+4194 4195 4196
+4197 4198 4199
+4200 4201 4202
+4150 3430 1105
+4203 4204 4205
+4206 4207 3950
+4208 4209 4210
+4211 3198 4174
+4094 4158 4212
+4213 1943 4214
+4215 1069 4216
+977 4217 4218
+2863 4219 4220
+4221 4222 4223
+1959 4224 4225
+757 4226 4227
+4228 4229 4230
+3967 4231 4232
+4233 4234 4235
+4236 4237 3533
+4171 4238 4239
+4240 2324 3402
+4241 4242 2840
+4243 4244 2456
+4245 4176 4116
+4246 4247 4248
+4249 4250 3974
+3131 2415 4251
+4127 4183 4252
+4253 2358 1323
+4254 4255 4256
+3795 4257 3905
+4258 4259 4260
+4261 4262 4263
+3125 3385 3537
+4264 2970 713
+4086 2152 3207
+1157 4265 4266
+4267 4268 1321
+2336 4269 3945
+4270 4271 4272
+4273 4274 4275
+4276 4277 4148
+4278 3782 2777
+1563 2080 3430
+4279 3012 4203
+4155 4207 4280
+4281 4282 2707
+4026 4283 4284
+1290 4214 4285
+4286 4029 4287
+4288 4215 2318
+4289 4290 2912
+4291 4292 4293
+4294 4295 4296
+3979 4238 3740
+4297 4298 3087
+4299 3762 4300
+4301 4302 4303
+4304 4231 4167
+4305 4306 1221
+4307 4308 4238
+4309 4310 4311
+4312 4313 4314
+4315 4316 4043
+4317 4318 4319
+4181 4250 4320
+4058 4321 4322
+4323 4324 4325
+4326 4327 4328
+4329 4330 4331
+3845 4100 4034
+4332 3373 4333
+4334 4335 4336
+4337 4338 4265
+4339 4340 4341
+4342 4343 3510
+4344 4345 3284
+4346 678 4347
+4091 4348 4349
+4350 4351 1691
+4352 4353 4354
+4355 4283 4212
+4356 4029 4357
+4358 4359 3729
+1092 2342 910
+4360 4361 4362
+4363 733 4364
+4137 4365 2875
+4366 1625 3415
+4367 2206 4368
+4369 4370 4105
+4371 4372 4373
+4374 4375 4376
+4377 4251 2417
+4245 4316 4378
+3958 2296 387
+4124 4379 4380
+4381 2312 4382
+4383 4321 4252
+4193 4384 3601
+4385 4386 1204
+3796 1877 3024
+3604 4387 4388
+4389 813 3035
+4390 4391 4392
+4393 4394 4324
+3556 2497 1375
+4395 3284 4396
+4397 4398 4399
+4400 1389 4401
+1828 2688 4402
+4403 4404 4405
+4406 4018 4152
+4407 4348 4280
+4408 1725 3451
+4409 4037 4410
+882 4411 4412
+4413 1718 2178
+4070 4414 4415
+295 4416 2614
+4417 4418 4157
+3955 2692 4419
+4420 4421 4422
+4423 4424 4425
+4304 4370 4426
+4427 4428 4429
+4430 4431 3600
+4177 4432 4433
+4434 4379 4320
+4435 4436 4182
+4437 4438 602
+3693 4439 4041
+850 4440 4441
+1612 4442 4443
+2537 4444 4445
+4446 4447 4448
+4449 4450 4451
+4452 4453 4454
+4455 4456 4457
+4458 4459 4206
+4460 4461 4462
+4463 4464 4465
+1776 1062 4466
+4467 2659 4468
+4355 4418 4469
+4470 4471 4472
+4473 4104 4221
+4474 4475 1182
+4216 4476 4477
+1118 816 4478
+109 924 3815
+4479 3345 4480
+4232 4481 4482
+4483 4484 4138
+4485 4486 4487
+4488 4432 4378
+2367 4489 4490
+4491 2951 4492
+4493 4494 4249
+3039 4495 239
+1540 4496 1780
+4497 4498 4499
+4383 4436 4500
+4501 4502 4503
+3912 4504 4505
+4506 4507 4508
+4509 1615 2497
+4510 1955 1232
+4511 4512 1467
+4455 4513 3828
+4514 4276 973
+4515 4516 4517
+4518 1365 4519
+4407 4459 4520
+4521 4522 4523
+4460 2672 4524
+4525 1866 4526
+4527 4528 4529
+4284 4530 4531
+4532 3679 1005
+528 4533 702
+4534 4535 4536
+4537 4538 4539
+1388 4540 2456
+1084 2783 2237
+4409 1222 4541
+4542 4481 4426
+4543 3587 4544
+4073 4545 4546
+4547 769 4548
+4549 4550 4315
+4551 4552 2368
+4434 4494 4553
+4554 4555 2016
+4556 4557 2829
+4558 1879 4559
+4322 4560 4561
+3669 1377 4562
+4563 4564 4565
+4566 2262 4567
+4568 4512 68
+3008 4569 4570
+4521 4288 4513
+4571 4572 4573
+3311 4574 4575
+4576 1376 3613
+4577 3639 4578
+4349 4579 4580
+4581 4582 4583
+398 3089 4296
+4584 4530 4469
+1703 661 4585
+4586 4587 4534
+2605 1183 4588
+4589 4590 2756
+1812 4591 4592
+4593 4594 4595
+4596 4597 4369
+4598 4599 1239
+4547 1983 4600
+4601 1480 3177
+4488 4550 4602
+4603 240 4604
+4380 4605 4606
+2289 4607 4608
+4609 4555 3868
+4610 4560 4500
+4611 4612 2297
+4613 4614 3397
+4312 2522 2987
+4615 4616 4617
+4618 4619 4620
+4621 4622 4623
+4624 1951 4625
+4626 4573 4627
+2453 2184 2535
+381 4628 949
+4516 4629 4630
+4631 4579 4520
+4632 3566 4633
+4634 3088 4635
+4636 4637 141
+4638 4639 4417
+4640 4641 4642
+637 4643 4644
+4645 4646 2457
+4647 4648 4649
+4542 4597 4650
+1825 2236 4651
+3105 4652 4653
+4654 4655 4656
+4433 4657 4658
+4335 4659 4660
+4661 4662 4496
+4663 4605 4553
+4664 4665 4666
+1975 4667 4562
+4668 4669 4435
+4451 4670 4671
+4672 4575 4673
+4674 4675 4676
+4677 4678 4679
+2226 4022 4680
+4241 3876 1594
+4681 4568 3346
+4682 4683 4684
+4685 1975 1617
+4686 2613 4687
+4571 4688 4616
+4689 3647 4404
+4690 4691 4692
+4693 305 4694
+4695 4696 4458
+4092 4697 4698
+4584 4639 4699
+4700 4701 4702
+4703 2049 4704
+4705 4706 4707
+4482 4708 4709
+1139 4710 3673
+3847 3920 4711
+4712 4657 4602
+4713 4714 4683
+4715 3924 4278
+2858 4716 4125
+4717 4718 4719
+4720 4721 4493
+4610 4669 4722
+4723 4724 4725
+4726 4727 4728
+4729 4730 4731
+4732 2267 4733
+4734 4735 4736
+4526 1023 4737
+3704 438 4738
+4117 4739 4740
+4741 4742 4743
+4631 4696 4744
+4745 4746 2672
+4747 4748 4325
+4749 4750 4751
+4531 4752 4753
+4754 4755 4756
+4757 1107 4758
+4759 4760 4761
+4762 4708 4650
+3531 4763 4764
+4765 2681 2184
+4766 4767 3788
+4768 4769 4770
+4771 4772 4549
+4663 4721 4773
+4774 4775 1974
+4561 4776 4777
+4613 1478 853
+3842 4778 4779
+4780 4781 4782
+4783 3315 4784
+4681 4175 1467
+1357 1632 4785
+4289 4416 1091
+4786 4787 4788
+4789 4790 4791
+2114 4792 4793
+4794 4795 4010
+4796 4797 2245
+4798 4578 4799
+4800 3583 4801
+4515 1717 4802
+4803 3736 4804
+4805 3995 3786
+4580 4806 4807
+727 4808 4809
+4810 4752 4699
+4811 4812 4813
+4457 4754 4522
+4814 4815 4596
+4816 1200 592
+1424 4817 4818
+4819 4820 4821
+4822 4823 1996
+4824 4825 4622
+4826 2100 4827
+4258 4496 4828
+4712 4772 4829
+4830 4831 1581
+4606 4832 4833
+4834 2922 4835
+1021 4836 4837
+4838 2861 4839
+1123 1698 4559
+4840 4776 4722
+4841 4842 3042
+4843 4844 4845
+4846 4487 4847
+4848 3172 4849
+3331 407 4850
+4851 4852 4853
+4854 4855 3829
+2838 3247 1339
+4856 4857 2940
+4858 4806 4744
+4859 2570 4860
+3880 4861 4862
+4863 4864 4279
+4865 4866 4867
+4868 4869 4638
+4870 4871 4872
+4873 4537 1183
+4762 4815 4874
+4875 4876 4877
+4878 3632 4879
+2753 4180 1225
+4880 4881 3959
+2321 4882 1338
+4658 4883 4884
+148 4885 4886
+4887 4832 4773
+4888 4667 4775
+3836 4595 3551
+4889 4890 4668
+1764 3397 4891
+4787 3130 1503
+4892 4893 4894
+4895 2452 734
+4896 4817 4897
+4898 421 4009
+4899 3153 4900
+4901 4902 3370
+4903 4904 4905
+1218 4731 4906
+4907 4908 516
+4909 170 4910
+4911 4404 4912
+4913 4543 4022
+4914 3607 4915
+4916 4917 4918
+4919 4920 4695
+4299 4921 4922
+4923 4924 4925
+4926 4927 4928
+4929 4930 4931
+4932 4933 365
+4934 4737 1383
+4810 4869 4935
+4936 4937 4938
+4939 4940 4941
+4709 4942 4943
+4142 4944 4945
+4946 3804 4947
+4948 4883 4829
+3329 4949 4950
+2768 1921 673
+4951 4952 4763
+4953 1973 1377
+4954 4955 4720
+4956 4957 4844
+2816 4958 4959
+4960 3551 4961
+1018 2722 4962
+4840 4890 4963
+4735 3132 4377
+4964 246 3314
+4965 3599 4431
+3350 4904 4966
+4967 4968 4898
+4969 2420 2286
+4970 4971 4972
+4050 4973 4974
+1231 4975 4976
+4977 4978 4979
+4980 1990 4981
+4982 4672 3607
+4983 4471 4984
+4442 2735 4985
+4986 635 4987
+4858 4920 4988
+1761 2602 4989
+4990 4938 4865
+4753 4991 4992
+4993 3651 4994
+4995 847 4996
+4997 4998 4999
+5000 4942 4874
+5001 5002 5003
+3276 5004 2753
+4917 2657 5005
+5006 5007 4771
+4951 5008 2566
+4887 4955 5009
+5010 5011 2451
+4959 5012 3172
+5013 2521 5014
+4962 3576 5015
+4777 5016 5017
+5018 731 5019
+5020 3352 5021
+5022 747 5023
+4692 5024 5025
+4173 5026 3927
+5027 5028 1218
+5029 5030 3800
+1202 5031 5032
+5033 3375 4715
+4807 5034 5035
+5036 5037 5038
+5039 5040 5041
+5042 2781 5043
+5044 4991 4935
+5045 5046 5047
+5048 5049 4423
+221 764 5050
+5051 5052 4814
+3033 5053 5054
+5055 5056 5057
+5058 4202 4254
+5059 5060 5061
+4948 5007 5062
+5063 5064 5065
+5066 4867 5067
+5068 2446 2537
+5069 1304 5070
+4833 5071 5072
+5073 5016 4963
+5074 5075 5076
+1997 1349 5077
+5078 5079 2917
+5080 5081 3782
+5082 1295 5083
+2530 3510 5084
+5085 5086 4608
+5087 2880 4803
+5088 5034 4988
+5089 1564 2784
+1895 5090 5091
+5092 5093 4868
+5045 626 5094
+5000 5052 5095
+2797 5096 2368
+3149 5097 5098
+5099 5100 5101
+5102 1885 2778
+5103 4880 2879
+764 5104 4882
+4884 5105 5106
+3526 1335 5107
+5108 4275 5109
+5110 5111 3209
+5112 3509 5113
+5114 5071 5009
+5115 5116 1592
+5117 5118 5119
+5120 933 5121
+343 5122 5123
+5124 5125 4889
+4089 4402 2860
+5126 222 2290
+5127 4791 4465
+5128 3375 5129
+5130 4382 5131
+2538 462 5132
+1367 4607 870
+5133 5134 4919
+5135 763 5136
+5137 5138 1789
+5139 5140 4508
+4267 2006 5141
+5142 5143 5144
+5044 5093 5145
+5146 5147 5148
+5149 5150 5151
+4943 5152 5153
+5154 1148 1923
+52 5155 5156
+1762 5157 5158
+5159 5160 2525
+3687 1644 5161
+5162 5105 5062
+657 5163 5164
+5165 2268 5050
+5166 5167 5168
+5169 5170 4954
+5171 5172 5173
+5174 5121 4478
+5175 2008 2249
+4438 5176 2206
+5073 5125 5177
+5178 5179 5180
+12 5181 4968
+4264 2470 1039
+5182 4415 5183
+5184 4473 5185
+4743 4947 5186
+5187 5188 3835
+5088 5134 5189
+784 5190 5191
+5192 5193 5194
+4992 5195 5196
+5197 1141 5198
+5199 5152 5095
+2204 5200 2549
+5154 5158 5099
+5201 5202 5203
+5204 5205 5006
+5206 5207 3689
+2220 4007 5208
+5114 5170 5209
+5210 5211 4961
+5017 5212 5213
+5214 5215 5216
+4261 4487 5217
+5218 4071 5219
+5128 3715 3923
+5220 568 5130
+5221 5222 5223
+5224 34 2163
+74 5225 3576
+5226 4527 2216
+5227 5228 3990
+5229 5230 5231
+4102 5232 5233
+4274 3554 5234
+5035 5235 5236
+5237 1309 5238
+5239 5240 4532
+5241 5242 5243
+5244 5195 5145
+5245 17 5246
+5247 5248 5249
+5250 5251 5051
+4826 5079 4901
+5252 1942 4313
+5253 5254 3465
+5162 5205 5255
+5256 5257 5258
+5207 5259 5260
+5261 5262 5263
+5008 3533 5069
+5072 5264 5265
+5266 840 1381
+5267 5212 5177
+5268 5269 5270
+3474 5271 5272
+3382 5273 5274
+5221 2559 5275
+2407 5276 5277
+5278 4835 5279
+2872 5280 4871
+5281 5282 5283
+5284 5285 4337
+1891 5286 2622
+5252 4401 5032
+2207 5287 761
+5288 5289 5290
+5291 5219 5182
+5292 5235 5189
+2902 5293 5294
+5295 5296 5092
+5297 3254 5161
+5298 5299 626
+5199 5251 5300
+5301 4341 4453
+5066 5274 4857
+5302 2075 2809
+5106 5303 5304
+5305 5306 2547
+5307 5264 5209
+5308 5210 4594
+5309 5310 5124
+5311 5312 2867
+5096 5313 5314
+5315 5316 5317
+5318 5319 2559
+5320 5321 5322
+5323 5324 5325
+5326 5327 1138
+718 5328 5329
+3087 2751 5330
+5331 3752 5332
+5241 5333 1367
+5334 2665 1552
+4491 2443 4402
+5335 5336 5133
+5337 5338 5339
+3518 623 5340
+2954 5341 5342
+5343 5344 5345
+5244 5296 5346
+5347 2656 5348
+5023 5349 2200
+3935 5350 260
+5153 5351 5352
+3948 2378 5353
+5354 5355 5356
+5357 5358 5359
+5360 2050 5361
+5362 5363 5364
+5365 5303 5255
+5366 4163 5367
+2302 3362 5368
+5369 5370 5169
+1800 5371 5372
+5267 5310 5373
+4084 5374 5375
+5376 1015 219
+5377 5378 716
+5379 5380 5381
+5382 5383 3064
+4501 5384 3826
+2270 5385 773
+4617 5331 4118
+5386 2756 5387
+5388 5389 5390
+5115 5391 5392
+5292 5336 5393
+5394 5395 5396
+1402 5397 3452
+5398 5399 5400
+5401 5402 5403
+5404 4540 436
+5108 5405 5406
+5196 5407 5408
+5409 806 5410
+5254 5411 4430
+5412 5413 1890
+5414 5351 5300
+4198 1774 5415
+3543 3410 3853
+5416 250 2552
+5417 3220 5361
+2007 2250 5418
+5419 5420 5204
+1053 5421 1669
+2646 387 5422
+5423 5424 5425
+5426 3677 5427
+5428 5429 5430
+5307 5370 5431
+2974 5432 5433
+5213 5434 5435
+5436 5141 5437
+2161 941 3817
+4837 5438 389
+5439 4618 4318
+5440 4068 780
+5441 5442 4247
+5443 5444 5445
+5446 1706 5447
+5448 5449 5450
+5451 5452 5453
+5454 5455 2524
+5456 5388 3903
+5236 5457 5458
+5194 4375 5459
+5460 5407 5346
+5461 172 5462
+5463 5464 5465
+5466 5467 2627
+5365 5420 5468
+5469 5470 5471
+5472 809 5473
+5474 5277 5475
+5265 5476 5477
+5478 4427 5479
+5480 5481 1017
+5482 5434 5373
+5483 5484 5485
+3334 5486 1472
+5487 5488 5489
+5490 1735 1363
+5491 4503 689
+5492 5493 5494
+5495 5496 5497
+5498 3356 5499
+2943 5500 3217
+5501 5502 5262
+3868 5503 3833
+5504 5457 5393
+5505 1063 5506
+5507 5411 2200
+5508 3480 4028
+5509 5510 4925
+478 2676 5511
+5512 5513 5295
+5514 4195 5515
+390 483 2705
+5463 5314 4552
+5516 5338 5019
+5517 5518 5519
+5304 5520 5521
+5522 4205 4265
+5523 5476 5431
+5524 5525 5309
+5526 5527 3070
+1319 5528 5529
+1699 2934 3873
+5530 5531 4691
+5487 2125 5532
+4895 396 5533
+5399 5534 2800
+3767 5535 5536
+5537 5538 5539
+5466 1228 5540
+1650 1730 5541
+5542 5049 5543
+5544 5545 5335
+5546 5547 2086
+3401 1965 5548
+5549 1579 5550
+5460 5513 5551
+1749 5552 5553
+5554 5555 5556
+41 5557 1347
+5352 5558 5559
+5560 5561 2936
+5562 5563 3779
+4970 2665 5564
+4400 4313 5362
+5565 5520 5468
+5566 1995 1112
+5301 5567 5568
+5076 4876 5569
+5570 49 1860
+5571 1505 687
+5572 5573 5369
+5574 3866 5575
+5482 5525 5576
+5577 5578 1838
+5579 4646 5580
+5581 5582 5583
+5448 5584 3037
+5585 5586 5587
+5588 5589 5590
+5591 4666 5592
+5593 5594 5595
+5596 5597 2125
+5598 2172 5599
+5600 5601 3301
+5354 5602 5603
+5504 5545 5604
+5605 2183 5271
+5606 2073 5607
+4356 3186 4046
+5608 5609 5610
+5611 5612 5613
+5408 5614 5615
+5382 4517 5616
+5617 5136 1554
+1273 5618 5619
+5620 2373 5621
+5622 2986 5623
+5624 5625 5626
+5627 5628 4204
+5629 5630 5631
+5632 5633 5419
+5634 5635 5636
+5637 3985 5638
+5639 3120 1100
+5640 3689 5641
+5523 5573 5642
+3585 1724 2816
+5435 5643 5644
+5645 194 5646
+1567 5647 5493
+5507 5648 4965
+4055 5649 4701
+5650 3355 5651
+5593 3871 3584
+495 5272 5652
+1479 5653 5654
+5655 4440 5656
+5542 5657 5658
+5458 5659 5660
+5661 2113 5662
+5663 5664 175
+5665 5666 5667
+5668 5614 5551
+5669 5670 5116
+3797 2109 4420
+4892 5671 3686
+5672 5673 5401
+5565 5633 5674
+1210 5329 5675
+5323 5676 5229
+5571 5677 3529
+5477 5678 5679
+5680 2032 5681
+5682 1017 3487
+5683 5643 5576
+5684 5685 2948
+4853 3607 5443
+3148 5686 5687
+3916 4604 4495
+607 5688 5689
+5690 5691 5692
+653 5693 5694
+5695 5696 3871
+5697 5599 5208
+5698 5699 5587
+5700 4063 5631
+5701 4067 5702
+5703 3296 5129
+5704 4717 4451
+5705 5659 5604
+4586 4376 5194
+5706 4085 4164
+5707 4922 5708
+5709 3430 5089
+5710 5711 5712
+1296 5713 4209
+5714 5715 5512
+5716 5717 5718
+5020 418 5671
+5719 5173 5720
+5067 2369 5314
+5178 4676 865
+5721 5722 5723
+1652 5306 5653
+5724 5725 4191
+5726 5727 5728
+2261 2642 5503
+5521 5729 5730
+5731 5732 5733
+1832 5734 3801
+5735 5736 4132
+5281 5737 5075
+5738 5739 2285
+5740 218 1674
+5741 5678 5642
+216 5742 5743
+967 5744 187
+5590 5745 3372
+5746 5747 5524
+5025 958 5748
+5749 5750 4271
+5751 1695 5752
+2852 4989 5753
+5754 241 5755
+5490 5756 5757
+1368 869 5758
+1729 1790 1930
+5759 5760 2927
+5761 5762 5763
+5456 5764 5765
+5766 5767 5768
+5769 5770 5771
+2884 3021 4984
+5772 5773 5544
+5774 4451 5775
+5737 2515 5776
+5668 5715 5777
+1208 5340 5778
+5779 5780 4637
+5297 5781 5782
+5559 5783 5784
+5785 1071 5786
+5787 5788 5789
+5790 5729 5674
+5735 5791 1859
+5792 5005 5793
+5794 5795 5796
+5797 5798 5799
+1529 3320 5800
+5801 5802 5572
+5481 5803 2723
+5683 5747 5804
+5805 4564 5806
+5119 3085 5807
+5808 5809 451
+4566 1398 5810
+5811 5812 4071
+5813 5360 3220
+5814 876 5815
+5816 2694 5817
+5818 5819 5820
+2946 5821 5822
+5617 2163 5823
+5824 5825 5826
+5187 3473 5289
+5705 5773 5827
+5828 5829 760
+5830 1945 5597
+5831 5832 2298
+5833 5834 5835
+5615 5836 5837
+2926 5838 5839
+5840 3602 5841
+5842 5728 1057
+5843 3903 193
+5844 5845 5632
+5846 421 5847
+3675 2985 5791
+5848 5849 5850
+5797 2929 5851
+5741 5802 5852
+5853 5854 3320
+5644 5855 5856
+5501 5857 5858
+4192 5859 2381
+5808 488 5860
+4156 5861 1958
+5862 4827 5863
+457 5864 5865
+5866 2850 5867
+5868 5869 4505
+5870 5871 5872
+5268 5552 5873
+3208 5580 5874
+5875 3488 3339
+5876 5877 5049
+5878 5879 5880
+5660 5881 5882
+5883 5884 4486
+5622 5885 2521
+5886 245 134
+5471 5887 5888
+5889 5836 5777
+27 4336 5890
+5891 5892 2017
+5893 5894 5895
+4385 4441 3338
+1643 5896 5781
+5790 5845 5897
+5898 3445 5899
+5900 4702 5901
+5902 5903 5904
+5905 5848 5228
+5906 5907 4465
+5679 5908 5909
+5910 5911 5912
+5080 5913 5914
+5915 5650 5916
+5917 5855 5804
+186 3392 5918
+5919 5920 5921
+5922 3429 5923
+5924 5925 1372
+5926 5927 1314
+5928 5929 619
+5930 5931 5932
+5933 5934 2766
+5935 5881 5827
+5936 4822 3769
+5937 4812 5938
+5939 2883 245
+5940 5941 5714
+3695 3136 5546
+2017 5942 5943
+5944 5945 5750
+5588 5847 4968
+1401 1657 5767
+1201 2455 5946
+5730 5947 5948
+5949 3917 5584
+5898 1486 5950
+5951 5952 5953
+5954 2505 5955
+5956 5957 5958
+5959 5908 5852
+4218 5960 1067
+5879 5961 5962
+5963 3782 5964
+5965 4916 5966
+5967 5968 50
+5969 5970 5746
+1902 5971 488
+5701 2936 5972
+1395 4018 2450
+5973 5974 5975
+589 5824 5976
+5111 5977 5978
+4894 4768 4904
+447 5979 542
+5980 5981 1681
+5982 5983 5984
+5985 5986 3964
+2991 5987 5988
+5989 5990 5772
+5991 5003 5992
+5993 5994 5995
+5889 5941 5996
+5942 5997 5998
+5999 6000 6001
+5784 6002 6003
+5846 5454 4794
+544 6004 6005
+2359 1674 793
+6006 6007 6008
+6009 5947 5897
+6010 6011 3469
+6012 6013 6014
+6015 6016 6017
+6018 6019 5801
+6020 6021 6022
+5165 6023 6024
+6025 5110 5316
+6026 6027 6028
+6029 5627 3012
+5917 5970 6030
+6031 6032 6033
+6034 6035 6036
+6037 6038 6039
+6040 6041 6042
+1905 3198 6043
+6044 6045 1798
+5905 6046 6047
+6048 2733 6049
+6050 2365 6051
+1149 6052 6053
+6054 3021 6055
+6056 5983 5932
+6057 4275 6058
+1322 6059 2043
+5102 6060 2550
+5935 5990 6061
+4956 6062 6063
+6064 416 5203
+6065 5217 5884
+5585 256 6066
+4391 4877 5776
+5837 6067 6068
+5465 6069 5274
+6070 4742 6071
+6072 4510 4976
+6073 6074 6075
+744 6076 3189
+6077 6078 2724
+693 6079 6080
+6081 6082 5844
+6083 6084 6085
+4929 384 6086
+1315 290 3002
+5959 6019 6087
+6088 3126 3713
+6089 6090 6091
+5856 6092 6093
+3019 902 5702
+6094 6038 6095
+3514 5976 5826
+4679 6096 5470
+6048 6097 6098
+6099 71 6100
+6101 3413 6102
+6103 6104 6105
+836 5875 4440
+6106 6107 6108
+6109 4301 6058
+6110 6111 6112
+5882 6113 6114
+6115 1421 6116
+6117 6118 5201
+6119 1488 6120
+6121 6067 5996
+6122 6123 6124
+6125 6126 6127
+6128 6129 2984
+6130 4950 6131
+2393 6007 3846
+6132 5478 5167
+6009 6082 6133
+6134 6135 6136
+6137 6029 4864
+6138 6139 6140
+5909 6141 6142
+6143 5712 6144
+6145 6146 6147
+6148 6092 6030
+2562 6149 6150
+6151 6152 6153
+6035 6154 1881
+6155 5239 1270
+6156 4873 1390
+6157 6158 6159
+3095 6160 4851
+6161 6045 75
+1578 29 6162
+6163 6164 205
+6165 6166 6052
+5508 4046 6167
+6168 6169 6170
+6171 6172 6173
+6174 5290 6175
+5748 4770 4903
+6056 6107 6176
+6177 6113 6061
+2655 6178 6179
+4040 1211 1815
+5541 6180 1574
+4408 6181 4958
+6182 6183 5940
+3043 3499 1405
+5143 6184 6185
+6186 6187 5415
+6188 5630 2665
+898 1047 6189
+5948 6190 6191
+6192 3886 6015
+6193 6141 6087
+6096 6194 5887
+6110 976 6146
+6195 6196 5969
+3953 2818 6197
+6198 6036 2062
+6094 6158 6199
+6149 6200 6201
+6202 6109 5406
+5582 6203 6118
+6204 824 4197
+3648 4399 6205
+6206 6207 515
+4931 6208 2192
+5984 6209 6210
+6211 6212 5989
+3016 6213 6214
+5842 6215 5783
+6216 4742 1539
+6217 6218 3206
+986 6219 6220
+6221 6222 2205
+6121 6183 6223
+3029 6224 2021
+6225 6226 6227
+6003 6228 6229
+6230 1511 6231
+6232 6233 543
+6234 4609 1829
+6235 6137 6236
+6237 6190 6133
+6238 6239 6240
+6241 6242 177
+6243 6244 6245
+6246 6247 6018
+6148 6196 6248
+254 5699 6249
+6250 6251 1963
+6039 6252 6253
+1670 6254 2225
+6255 2337 6256
+6257 2180 2044
+6258 5406 5234
+6259 6260 6261
+6262 5755 4603
+6263 6264 5910
+6265 6097 6266
+6267 6209 6176
+6177 6212 6268
+5925 2165 6079
+3044 6269 947
+993 5068 2536
+6270 6271 6272
+6068 6273 6274
+2940 6069 94
+6050 6275 6276
+6277 6278 5532
+6279 5609 5703
+6280 6281 6282
+995 3189 6239
+6283 2329 6144
+6284 3995 5933
+6285 3272 647
+6286 6287 6081
+6288 6240 6289
+6290 6291 6292
+6293 6294 6295
+2243 6296 3123
+6297 6044 1797
+1128 5203 6298
+3121 6299 6166
+6193 6247 6300
+6093 6301 6302
+6303 6252 6199
+6304 6036 5922
+6305 6306 6307
+6308 1179 6309
+6310 6264 6097
+5138 6311 6312
+210 6313 3858
+6314 4472 4983
+6315 2364 6316
+5831 4612 6317
+5113 6318 5823
+6319 6320 6321
+6322 6323 6106
+6114 6324 6325
+6326 6327 122
+4800 6328 6329
+3455 6330 6331
+6332 1057 3658
+2066 3893 2691
+6333 6273 6223
+6334 6235 635
+6335 5722 3844
+4363 4153 2451
+6336 6277 1945
+6337 5485 5328
+4305 6338 6339
+6008 6189 6340
+6341 1447 393
+6342 6343 4470
+6237 6287 6344
+6345 2799 6346
+6299 5139 6053
+6142 6347 6348
+6349 6350 69
+2372 1270 4468
+6351 6301 6248
+6352 6353 6157
+6354 6355 5469
+6356 2648 3498
+1417 416 1645
+6357 5494 5625
+427 6308 6358
+1281 6359 6360
+6361 6362 884
+5760 5813 6363
+6364 6365 6007
+6366 6367 5442
+6186 6368 5690
+5333 6369 869
+6267 6323 6370
+5985 1192 6371
+6372 3580 5057
+6373 6324 6268
+6374 1824 6219
+5608 6375 3714
+6376 6377 6378
+3079 6379 998
+5509 5183 6380
+6381 6382 6182
+6383 6384 919
+6385 6386 6387
+1336 6388 6389
+6390 4429 6391
+6392 6393 761
+6394 6395 2519
+3367 6234 4402
+6191 6396 6397
+6398 1235 6399
+6400 2912 6401
+6402 6403 1852
+6404 6347 6300
+4784 246 6405
+6406 1068 6407
+6408 6409 6195
+6303 6353 6410
+6164 1720 6411
+6412 6413 6414
+6415 6208 6098
+6416 6417 149
+6418 6419 1343
+6420 5759 5799
+6421 6422 2602
+6423 5526 4001
+6424 6425 6426
+6427 6428 6429
+6210 6430 6431
+6432 6334 6433
+6434 6435 6211
+3359 6436 6437
+4387 6438 6439
+5291 4925 6440
+6333 6382 6441
+6442 753 917
+6385 602 6443
+6444 3444 6445
+6446 509 4295
+6229 6447 6448
+6449 1745 6450
+6451 1827 3868
+6452 6244 6453
+6364 6189 2791
+6454 6396 6344
+6455 6456 5430
+4897 6457 5829
+6458 6459 6246
+6405 6460 6461
+6257 6462 6463
+6351 6409 6464
+6465 6119 1205
+6253 6466 6467
+5498 6468 6469
+6470 5323 6471
+6472 2292 6473
+6474 6475 724
+5574 6476 6360
+5081 6477 6478
+6479 4632 6480
+5397 6481 68
+4198 6482 825
+6483 6484 427
+4366 1282 6485
+3190 6240 5245
+6421 1922 6486
+6487 6488 4518
+4109 2865 3892
+6489 6490 6491
+6492 6493 6494
+5227 2244 6046
+6319 6495 864
+6496 6430 6370
+6373 6435 6497
+6498 6499 6222
+6500 3356 6501
+6502 5222 6503
+6449 3843 6272
+6274 6504 6505
+4739 2121 2364
+6506 6224 3798
+6507 6508 5294
+6509 1642 4398
+6510 6511 6512
+6243 1852 6513
+6514 6515 6286
+6516 3664 6517
+4849 5012 5193
+6404 6459 6518
+6064 6519 5896
+3629 6520 6521
+6302 6522 6523
+4403 6524 3293
+6525 6466 6410
+6526 4825 5389
+6527 6528 5349
+6263 2192 6415
+6529 6530 6531
+6532 5579 1465
+6533 6432 3510
+6534 6535 6536
+6537 5799 6538
+6539 3227 6540
+6541 1595 235
+4108 6542 6543
+3645 1834 2585
+6544 6545 3075
+4330 6439 5636
+6546 6547 6322
+6325 6548 6549
+6285 6153 3309
+2206 6499 602
+6550 1646 2353
+6551 4522 1077
+6552 3449 6255
+6553 6504 6441
+6554 6555 6556
+5918 4803 85
+224 6557 6558
+6454 6515 6559
+6560 6561 342
+5422 5832 6354
+6562 1725 6563
+6348 6564 6565
+6566 6567 2773
+5537 6568 686
+6569 6570 4088
+826 6571 6572
+6573 6522 6464
+3813 546 6574
+6575 5727 4318
+5605 6576 4765
+6577 1343 6578
+6579 6580 6352
+6527 2199 845
+6581 3259 6582
+6583 3672 2248
+6584 6533 2529
+2275 3456 6585
+6586 2436 2783
+6496 6547 6587
+6588 6321 6589
+6590 6548 6497
+6591 2808 1497
+6592 6593 6552
+6594 6595 3812
+6076 6596 6289
+6597 6598 6381
+6599 5107 430
+6600 6601 6602
+6603 6604 5048
+6398 5344 6085
+6397 6605 6606
+5549 3360 30
+6607 6608 6609
+6610 6153 6611
+6612 6613 4740
+6614 6564 6518
+6615 2919 6616
+6617 2844 6618
+6619 5539 6620
+2025 36 6621
+2945 1605 3227
+6622 6623 6408
+6624 6625 4682
+6626 3072 6111
+6525 6580 6627
+6628 887 6629
+6630 4985 6631
+6541 6632 6633
+5078 5753 6422
+6634 3735 518
+6635 1991 6636
+572 664 1187
+6583 6637 1140
+6638 5829 5957
+6501 4477 6639
+5459 3586 5012
+6431 6640 6037
+6641 6642 6434
+5018 6643 6644
+45 6503 287
+3726 6645 2711
+6553 6598 6646
+6647 6648 179
+2866 6649 4704
+6650 6651 6652
+6448 3141 6653
+6654 6655 6656
+4546 6657 6658
+6659 6476 6660
+6661 6605 6559
+6662 2252 512
+6663 5680 5414
+6664 6665 6458
+6666 6419 2505
+6573 6623 6667
+6467 6668 6669
+3918 6670 3124
+2682 5423 4382
+6671 6672 2517
+6673 6674 6675
+6676 3053 6677
+4317 2265 5789
+6678 2071 6679
+5721 6680 4778
+6681 6682 5599
+3628 4740 4118
+6683 6428 6124
+6446 6321 6684
+6685 6686 6687
+6688 6689 4587
+6690 6640 6587
+6691 6692 6693
+6590 6642 6694
+1524 5030 6695
+315 6696 6697
+6505 6698 6699
+5440 6700 4001
+4118 6613 6520
+6701 3548 5945
+6702 6703 6514
+6704 2440 6705
+6706 6572 5085
+6614 6665 6707
+6708 2927 6363
+6539 2679 1605
+6523 6709 6710
+6711 6712 3559
+6713 6668 6627
+6714 6715 6716
+6717 5502 6718
+6719 6720 6721
+6014 1476 6570
+6722 6723 6724
+6725 6534 1659
+4539 6726 4475
+6585 6727 3665
+1936 3796 6728
+710 6729 1415
+6730 6072 6731
+6732 6733 6734
+6159 6735 6546
+6549 6736 6737
+6738 5150 5938
+2683 6739 45
+4921 5710 1474
+6740 6698 6646
+6741 6742 6743
+6744 6745 6746
+2746 6650 5432
+6747 6748 626
+5396 6749 2498
+6750 3624 6751
+6661 6703 6752
+811 2918 2643
+6753 1751 2189
+4934 6139 6754
+6565 6755 6756
+6757 6709 6667
+6758 6759 2153
+3941 6166 6760
+4483 2877 258
+6761 6762 6579
+6763 6764 6765
+6766 6767 3478
+6768 4968 6769
+6770 2458 6771
+3472 6772 5290
+6773 3277 1048
+6774 6775 284
+6776 973 6777
+6778 6779 4082
+6780 6781 6782
+6688 5012 6783
+6690 6735 6095
+4052 6784 891
+6785 6786 6787
+6788 6736 6694
+6789 4514 2994
+6790 6791 6597
+5955 2364 3627
+2392 6792 6012
+6793 3101 5269
+6794 2451 4017
+6795 6796 6797
+6798 1282 6659
+6799 4093 2477
+6800 116 5828
+6004 6233 6801
+5438 6708 5417
+6802 1808 1565
+6606 6803 6804
+67 6805 6806
+6807 6808 6800
+6809 6810 797
+6811 3285 6812
+6813 6755 6707
+6814 6815 6622
+6816 4572 2310
+6817 6818 6819
+752 6383 918
+6820 4020 5753
+6713 6762 6821
+6822 6823 3028
+6393 6824 800
+99 6825 4513
+6826 5250 458
+6827 6828 6829
+6203 6519 5202
+557 6830 1266
+3265 3565 6831
+6832 1474 964
+6833 6834 6641
+6835 6836 1317
+6837 6838 3995
+6740 6791 6839
+6840 2519 6841
+6842 6843 6844
+6845 6846 6609
+6847 6848 6849
+5462 6850 5347
+1452 1545 5693
+6851 3737 6852
+6653 2059 6853
+6854 6346 6567
+6855 84 6856
+6343 6857 6858
+6859 3814 6860
+6063 4022 6254
+2647 6802 3499
+6861 6803 6752
+6862 6863 6864
+6865 4687 757
+6866 6867 6664
+6868 6869 6366
+6870 6871 450
+6757 6815 6872
+6873 5736 6874
+926 3911 3702
+6817 1798 6875
+6876 6877 6878
+6669 6879 6880
+6881 6882 1748
+4522 6825 1078
+6714 6543 6883
+3757 3742 6680
+6884 6885 5673
+815 1493 1261
+78 6886 6887
+6788 6834 6888
+6889 6890 6891
+6892 6893 1848
+6894 6895 6896
+6897 6898 6899
+4896 116 6900
+6901 6902 5961
+6699 6903 6904
+1366 2025 6905
+6847 6194 6906
+6907 6908 4474
+3129 6909 6910
+6911 6912 3745
+6913 6706 6905
+6914 6915 2528
+266 6916 6917
+6918 6919 6920
+6859 185 3475
+1421 6730 6889
+6921 6922 6702
+996 6862 2918
+6813 6867 6923
+1407 4996 6811
+6924 1232 6925
+6926 2815 6927
+4780 6925 1954
+6710 6928 6929
+3280 499 1438
+6930 2124 1003
+6129 6931 5791
+5225 6932 3486
+6933 6879 6821
+6934 6935 6657
+4939 6936 6937
+6938 6326 3735
+6939 739 6940
+6941 6942 6943
+5973 5132 5168
+6737 6944 6945
+6946 6947 6948
+6949 6950 6951
+6952 6903 6839
+1726 3701 6953
+6954 3335 6955
+474 2505 6956
+3176 6957 2402
+4987 6236 4863
+6958 6959 6854
+6960 6961 6962
+6861 6922 6963
+5188 6964 6965
+6966 5057 6967
+3208 6968 1466
+6756 6969 6970
+2983 6971 6972
+3396 6882 4384
+5445 5764 3902
+6973 6928 6872
+6974 6842 2928
+6975 2936 6976
+6977 4311 6554
+6978 6979 6761
+6980 4060 6543
+4367 6981 6443
+6982 4808 6983
+6984 2136 6985
+3852 4328 6986
+6987 6988 6166
+6989 6990 6991
+5479 6992 5974
+6993 6994 6995
+3697 6996 1192
+6997 6967 1817
+6998 6626 6146
+6999 6944 6888
+4930 7000 2734
+7001 6136 4472
+5256 872 7002
+7003 7004 6790
+5242 5085 6571
+2914 2716 7005
+7006 7007 6194
+7008 751 107
+7009 7010 7011
+7012 7013 7014
+5084 6433 4986
+7015 7016 7017
+7018 7019 7020
+6318 7021 7022
+6804 7023 7024
+7025 7026 7027
+7028 6969 6923
+7029 7030 2827
+7031 7032 6814
+7033 3209 7034
+1898 7035 2811
+6933 6979 7036
+3231 1637 7037
+7038 1979 4506
+4269 6090 4466
+7039 7040 3949
+7041 2427 7042
+420 4010 7043
+3062 107 59
+5937 7044 7045
+7046 7047 6833
+7048 5198 6169
+7049 57 359
+6952 7004 7050
+7051 7052 2408
+7053 7054 4381
+7055 7056 7057
+7058 3025 7059
+6853 3096 7060
+3222 7061 2210
+7062 1702 7063
+7018 912 1117
+7064 7023 6963
+118 63 7065
+51 7066 6368
+7067 7068 5322
+7069 7070 6866
+7071 2194 7072
+6556 7073 7074
+203 7075 7076
+7077 388 5832
+6973 7032 7078
+7079 7080 7081
+6880 7082 7083
+7084 7085 3066
+4056 7086 2920
+7038 6053 6988
+4796 285 7087
+7088 5442 7089
+7090 4290 6995
+3870 5039 7091
+7092 7093 7094
+7055 7095 7096
+7097 7098 7099
+7100 7101 160
+7102 4700 7103
+7104 5967 1861
+6775 6320 7105
+6999 7047 7106
+7107 4763 4237
+6904 7108 7109
+7110 217 1673
+7111 5167 7112
+7113 7114 7115
+7116 7117 1223
+7118 7119 7120
+7121 7122 6921
+6295 4578 6807
+7123 5249 3183
+7028 7070 7124
+4309 7125 7126
+7127 5602 6711
+6929 7128 7129
+7130 6100 7131
+7132 7133 7134
+7135 7082 7036
+7136 7137 2924
+7138 6609 7139
+7140 6936 3581
+7141 6047 4797
+7092 7142 2551
+7143 7144 6027
+171 2654 6850
+7102 245 7086
+7145 7099 6764
+7146 7147 342
+7148 7149 7150
+6945 7151 7152
+7153 3643 7154
+2706 3646 7155
+7156 7108 7050
+7157 7158 3802
+7159 5270 2002
+7160 7026 7161
+7162 2801 7163
+5618 5488 6278
+7164 5792 3507
+7165 1291 912
+7064 7122 7166
+712 7167 2471
+6970 7168 7169
+6384 7170 5467
+7171 7128 7078
+7172 7173 6111
+7174 7175 7176
+7177 7178 6978
+7179 3181 7180
+7090 7181 4622
+7136 4386 7182
+7183 6420 7184
+7185 3689 3942
+7186 2820 7187
+6913 1861 7188
+6101 7189 7190
+5522 6896 6134
+7191 7192 4200
+6537 7193 2927
+6731 4975 7194
+7195 7196 7197
+4467 1005 5793
+7198 7148 7199
+7200 7151 7106
+6673 4761 7201
+7202 7203 7025
+1689 6266 6415
+7204 6841 7205
+7206 7207 7208
+7209 7210 7003
+7211 2142 7212
+7213 7214 7215
+7216 7217 1767
+7218 7219 7220
+7221 4296 7222
+2101 5863 7223
+7024 7224 7225
+4641 5761 7226
+7227 852 290
+7228 7168 7124
+7229 7230 7031
+7231 7232 7233
+7234 7235 7130
+7236 7175 7237
+7135 7178 7238
+7140 2585 7239
+3793 1008 7240
+3962 3479 7241
+7242 2184 5220
+7243 4074 2250
+7244 2157 7245
+7246 7247 7046
+7248 7249 4439
+6026 7250 6930
+7156 7210 7251
+7252 5667 6293
+7253 3522 7254
+7255 7220 7256
+7060 7257 7258
+7217 7259 7260
+7261 7262 599
+7263 7224 7166
+7264 4918 7265
+7266 7267 7069
+7171 7230 7268
+7269 7270 7271
+7272 206 3162
+6363 6766 6974
+7273 7274 7275
+7276 7183 4573
+7277 7278 7279
+7083 7280 7281
+3848 7084 6670
+6671 7205 5527
+7282 7283 4147
+7284 7285 2571
+7286 7287 5058
+7288 7289 7290
+7291 7292 7293
+7294 7295 5272
+4567 7296 2017
+6357 7297 5191
+7298 7299 1968
+7200 7247 7300
+7301 7302 7198
+7303 7304 7305
+5624 7306 7307
+7109 7308 7309
+7195 7310 56
+7311 5502 7312
+7313 2421 4292
+7314 6117 7315
+7316 5960 5298
+5577 7317 53
+7318 6848 7319
+2674 974 1133
+7320 1767 7321
+598 7322 328
+7323 7324 7121
+7325 6810 7326
+7228 7267 7327
+6946 4925 5182
+3162 6411 7328
+7129 7329 7330
+7269 1817 7331
+7332 7333 7334
+7335 978 7336
+7337 7278 7237
+7338 7280 7238
+6763 3070 7205
+6960 1831 4036
+7339 7340 1954
+7341 1704 7342
+1271 2373 6487
+7288 2823 3506
+7343 1789 2213
+7344 309 7142
+6768 7019 7345
+4354 7346 5394
+6013 2012 3397
+5816 3577 3113
+7152 7347 7348
+7349 3017 234
+5762 7350 6530
+3312 7351 4226
+4310 6618 6555
+7352 7353 1326
+7354 7308 7251
+5403 7355 1806
+2604 4809 7356
+7357 5581 7358
+5247 7119 7098
+7359 857 4750
+972 5356 7360
+7361 2833 7362
+7263 7324 7363
+7364 7365 756
+4281 7366 4698
+7169 7367 7368
+6356 3635 7369
+4976 4654 7370
+7371 7329 7268
+5924 6358 1548
+7372 6011 2597
+7373 7374 7302
+922 546 7375
+7376 1286 1640
+7193 3221 6363
+7377 4032 7282
+7378 7379 7174
+7380 7381 7177
+7382 6773 6189
+7339 3756 7383
+2091 15 2618
+7384 3644 2823
+7153 2727 7385
+5283 7386 5867
+3575 6028 6161
+7387 1432 1932
+7388 7389 1887
+7390 7347 7300
+7391 6595 7392
+1359 3758 5723
+4229 7393 4306
+7394 7395 7209
+7396 56 7397
+7398 7399 5037
+7400 4831 7401
+7402 7403 1489
+7404 7405 7406
+7407 7408 4396
+7225 7409 7410
+5999 4583 7411
+7412 7413 7414
+7415 2511 7416
+7417 2463 2903
+7418 7367 7327
+7419 7420 7229
+1915 6818 7421
+3930 6939 4328
+6483 1372 7422
+7337 7379 7423
+7338 7381 7424
+7425 7426 7427
+7428 6678 5024
+7429 2802 4781
+7430 7431 3980
+7432 7433 7434
+7435 7436 7437
+6154 7438 906
+1886 2441 6603
+7250 6394 7439
+1460 7440 3798
+7311 603 5263
+4139 3463 7441
+7442 7443 7246
+7444 5515 7445
+7446 7447 7448
+7354 7395 7449
+5720 2638 3717
+7258 5449 7450
+7451 7452 7453
+7275 1381 4957
+7454 7455 4573
+7456 4797 4726
+7407 3419 7457
+352 7458 4444
+7459 7409 7363
+6751 7460 4878
+6731 7461 4655
+7462 5358 7463
+7464 7465 7266
+1393 2533 5148
+7466 269 95
+6826 1622 2280
+7371 7420 7467
+1555 6874 7468
+7469 7470 854
+7471 6313 1607
+7279 7472 7473
+7281 7474 7475
+7476 7477 7478
+7479 7480 7157
+7481 1866 2130
+5330 4830 5807
+7482 4480 3045
+3110 2965 2593
+3163 983 14
+6887 5718 7483
+5756 7484 5949
+7390 7443 7485
+7349 1804 3032
+6444 1146 7486
+7487 1190 7287
+7309 7488 7489
+7490 7491 7457
+2102 7492 2743
+7493 2383 3404
+5556 2685 3388
+6780 3936 3158
+7494 7495 7496
+7497 4786 7498
+4345 7499 3419
+7500 7501 7323
+7502 7503 7377
+5868 5992 7504
+7505 5869 7506
+7418 7465 7507
+7330 7508 7509
+1127 2094 1645
+7471 3802 7510
+7511 7512 2599
+7513 7472 7423
+7514 7474 7424
+7515 7516 942
+7479 1609 2668
+7437 7517 6470
+7518 4410 1831
+6977 7074 6406
+6907 5246 6543
+897 6992 2790
+7519 6453 6513
+3067 7520 7521
+7522 2273 4801
+7523 1767 2300
+7524 6261 5539
+1318 7525 1575
+5202 6955 7526
+7348 7527 7528
+795 7529 5257
+959 6445 3592
+5366 7530 7531
+4184 4728 7532
+7533 7488 7449
+5260 6997 3943
+7534 7535 7536
+7537 7184 5799
+7538 662 7539
+3534 7540 5148
+7541 804 7542
+4734 4788 1503
+7543 3232 7544
+7459 7501 7545
+7546 4633 5090
+7547 2008 4121
+7548 608 7549
+7368 7550 7551
+7552 353 7553
+7554 7508 7467
+7555 971 1555
+7556 3036 7253
+2887 5349 1599
+7557 6477 7558
+7559 7560 7378
+6297 5015 75
+7561 7562 7380
+5131 5425 6914
+263 6316 6418
+869 7563 7476
+3968 2065 4855
+2862 6984 107
+7564 4781 7340
+2709 5975 897
+7565 7566 7567
+345 7568 6436
+5311 5809 1796
+7569 7570 7571
+7164 3174 7265
+7572 6036 7573
+7574 7527 7485
+7575 2067 7576
+7577 7578 7394
+7579 2750 2317
+7580 3403 7326
+7581 7582 7502
+7446 7583 520
+7584 4475 5872
+6868 4248 6971
+7585 7586 611
+547 924 7587
+7410 7588 7589
+7372 7590 2586
+7591 7550 7507
+7592 7593 7594
+7595 3300 7596
+7597 7598 7419
+7599 931 3031
+957 5024 7600
+7557 3980 7601
+7513 7560 7602
+7514 7562 7603
+6315 4405 6612
+7604 7358 5583
+7605 7606 5425
+6778 7607 3572
+7608 5506 7609
+7610 1851 6403
+7611 7612 4291
+5563 5046 7613
+7614 7615 7616
+7617 7618 2085
+1645 7421 937
+1199 2541 7130
+7619 7620 7442
+7621 6298 5202
+7100 7539 574
+6896 4338 7622
+5979 2578 6232
+7533 7578 7623
+7624 7497 6854
+7450 7625 7626
+6242 7627 7628
+3563 1055 7629
+7630 1613 7631
+2494 7632 7633
+7634 7588 7545
+2748 7635 6881
+304 3874 4629
+7636 7637 7464
+7638 1505 2693
+7554 7598 7639
+2523 7640 7641
+7473 7642 7643
+7644 3438 1229
+7475 7645 7646
+3682 265 7647
+7648 521 293
+7649 7181 6994
+7273 7573 1883
+6165 5101 7650
+7352 7651 7652
+7653 6851 7654
+7574 7620 7655
+4548 3134 2365
+1513 6000 7656
+7657 4938 7581
+3187 4397 7658
+7659 3076 7660
+7489 7661 7662
+1440 7663 7664
+6722 5817 1264
+1638 3707 2933
+7665 7666 7667
+4977 7668 3477
+5011 7669 734
+7670 7671 4248
+7672 7673 5349
+7674 7675 7500
+7676 7677 6447
+3625 7678 7679
+7591 7637 7680
+7590 7512 2279
+7681 4319 5727
+7509 7682 7683
+7684 4723 7685
+7686 5810 7332
+1290 7687 7688
+6798 7689 3415
+7690 4260 7691
+7692 7642 7602
+7693 7645 7603
+7037 3706 454
+7694 7695 4864
+4581 7696 7679
+7570 1151 2403
+7063 331 7697
+4122 7698 3633
+1250 7699 4392
+730 6170 7700
+7243 2008 2793
+7701 4643 2449
+7528 7702 7703
+3984 5744 7704
+7705 1252 2992
+7706 7707 692
+7202 7708 2574
+7286 7709 7710
+7711 7661 7623
+4624 7712 7713
+6046 7496 4797
+1188 2256 6602
+7587 281 7714
+7715 7716 5824
+7717 7635 828
+7634 7675 7718
+5849 7719 7720
+7721 7722 7723
+1469 6666 2504
+7551 7724 7725
+7303 4558 2934
+7726 321 3091
+7727 7682 7639
+7728 2327 1574
+7729 3450 4511
+7730 4746 7391
+3988 1082 6677
+7731 7732 7559
+7733 7734 7561
+7735 7736 7511
+7572 7737 3427
+7738 7537 4836
+6423 4068 3318
+5409 1413 7739
+3226 7740 7741
+6894 4265 5628
+7742 7743 7657
+953 5517 641
+4196 7744 7745
+7617 7746 4364
+4368 6222 6312
+7747 7702 7655
+7706 6080 7748
+7749 6811 847
+7750 7751 7752
+7753 7754 7755
+7756 7757 7577
+2774 7162 5502
+6727 3323 4724
+7758 2112 4716
+7759 961 7760
+7761 5669 1218
+4412 5893 880
+7762 7763 4133
+2916 7764 7765
+7589 7766 7767
+7768 7769 1070
+7770 655 611
+7771 7712 7772
+7773 7724 7680
+1510 7774 2039
+5377 4328 6909
+7775 7776 7597
+5709 3978 4450
+7692 7732 7777
+7693 7734 7778
+7779 7780 7781
+7782 1116 7783
+7784 7211 4953
+7785 7786 7787
+7788 7276 7455
+6917 2488 1334
+7789 7313 7612
+7790 2276 7569
+4448 4186 7041
+7791 2431 7792
+7793 1302 2156
+7794 7795 3375
+7796 634 7797
+7469 2740 7798
+341 5555 7799
+7176 7800 7619
+7548 5824 7596
+7801 7802 7803
+7804 7805 2849
+6871 7750 4115
+4563 530 7249
+7711 7757 7806
+7807 7808 1951
+1813 5675 6074
+6572 6204 5086
+7626 1688 7809
+5600 1530 2640
+7810 7811 7812
+140 7013 7813
+7814 6259 4066
+1634 4568 6481
+7118 4001 6765
+7815 7766 7718
+6507 7362 2894
+7816 7817 7636
+7727 7776 7818
+7684 1574 3540
+7819 7820 6993
+7821 7822 7823
+7643 7824 7825
+7646 7826 7827
+7828 7782 4010
+7829 7830 1637
+7784 1195 3184
+7831 2335 7742
+233 775 7832
+7833 7834 7835
+5279 2231 3007
+7836 7519 1851
+7837 7838 4313
+560 2190 7839
+7840 7841 2963
+7842 7843 6327
+7794 7844 7845
+5278 7027 7846
+3412 7149 7374
+7847 2085 7848
+7849 7850 2843
+7747 7800 7851
+7852 7853 7854
+7662 7855 7856
+7857 7858 7859
+7053 5425 7860
+7861 7862 6040
+7863 7864 5064
+7865 5695 7866
+2122 6205 7867
+7868 7869 3087
+7870 5716 6886
+7556 2599 7590
+7871 7814 1978
+7872 7873 7674
+5713 7874 7875
+6743 7876 7877
+7773 7817 7878
+2729 2585 2899
+7879 3398 7089
+2931 7698 7880
+7683 7881 7882
+6758 5874 4785
+6908 6542 4475
+7883 7884 4902
+2576 7885 4524
+7886 7824 7777
+7887 7618 549
+7888 7826 7778
+7889 7890 7891
+7892 308 1884
+4788 7893 7894
+7895 7896 7897
+7898 1252 7899
+4707 7134 5755
+7900 7901 7902
+4554 7296 2262
+2144 6870 487
+2506 3545 7499
+7903 7904 1008
+7905 5122 7147
+7703 7906 7277
+6822 3798 7811
+7907 5685 968
+7908 7855 7806
+3891 7909 7910
+6635 4864 7911
+6330 7912 7913
+7914 4421 650
+7915 7411 7916
+7762 3537 7917
+3598 6972 7671
+7815 7873 7918
+3211 7919 5316
+7920 7245 7583
+7725 7921 7922
+7923 1883 6304
+7924 7881 7818
+6968 2153 7925
+7926 7927 7884
+7928 2848 7831
+7929 7930 7731
+7644 7931 7932
+7933 7934 7733
+114 5829 7935
+7936 5206 3809
+7913 7291 4159
+7937 7938 7939
+7940 7941 7942
+7943 7944 7945
+6569 278 2492
+6216 5904 4947
+7946 364 1685
+7904 7947 7948
+7236 7906 7851
+4293 2423 7949
+7950 7951 4649
+7952 6377 7953
+7954 7955 7956
+7957 7958 7756
+6260 7357 5539
+39 2349 1804
+7959 4266 6896
+564 7960 7961
+2546 7962 7963
+498 7964 7965
+7966 2240 3509
+7752 1691 4648
+6526 7967 2912
+7767 7968 7969
+7970 7971 785
+7972 7973 7590
+4759 7974 7385
+7975 7976 7977
+7978 7921 7878
+7979 7980 7775
+7231 3428 7981
+7982 6180 7685
+7983 7984 6413
+7886 7930 7985
+7986 3357 6500
+7888 7934 7987
+6457 7988 3258
+7264 7989 7990
+7672 747 7899
+6168 7991 7992
+7993 2151 4788
+7042 1810 6827
+6456 3570 7994
+2401 2702 7995
+7996 7997 6797
+7998 5733 7999
+7950 7866 5595
+8000 2980 2046
+7908 7958 8001
+6885 8002 5402
+5670 8003 1592
+8004 3405 8005
+8006 2700 2400
+7809 7708 8007
+2754 1841 3227
+8008 7274 7923
+6088 8009 3537
+1198 6349 4568
+2847 2851 8010
+8011 2891 8012
+8013 1125 8014
+8015 7968 7918
+8016 8017 7816
+8018 8019 8020
+8021 8010 7928
+7924 7980 8022
+7179 3809 5640
+7103 8023 135
+4199 8024 8025
+4350 2785 177
+7653 6488 1215
+7825 8026 8027
+8028 7161 7203
+7827 8029 8030
+1386 2898 8031
+4 1229 3574
+3670 4078 1195
+8032 5936 1387
+4006 497 7295
+8033 5355 4557
+5991 4504 3899
+6296 7867 8034
+3803 1609 8035
+6034 3429 8036
+8037 6797 7861
+4061 8038 6238
+8039 1981 3422
+8040 8041 7797
+5751 8042 2737
+7856 8043 8044
+5514 2608 7744
+8003 5171 5391
+7120 7123 4068
+1168 8045 7219
+1153 4144 8046
+8047 772 8048
+8049 7788 4503
+1947 8010 7765
+8050 1132 7688
+6958 8051 7912
+5865 8052 1620
+8053 8054 7872
+8055 7723 894
+7978 8017 8056
+7396 354 359
+8057 4063 8058
+7882 8059 8060
+7495 8061 4727
+7632 5022 5253
+8062 8026 7985
+8063 8029 7987
+8064 8065 4973
+6057 3535 8066
+8067 8068 8069
+8070 3150 8048
+8071 8072 7270
+789 6777 2994
+7599 1516 6996
+8073 8074 8075
+8076 8043 8001
+4685 2512 4775
+8077 8078 5215
+4845 1381 8008
+3685 4100 3620
+8079 7789 8080
+4395 3235 8081
+7 7054 6517
+4811 3139 8082
+5118 6601 8083
+2414 3886 8084
+8015 8054 8085
+8086 2853 8021
+1521 706 3879
+8087 833 8088
+7425 7532 8089
+4013 7095 2960
+7922 8090 8091
+8092 3194 5566
+8093 8059 8022
+7334 2543 8094
+8095 8096 7929
+8097 8098 2792
+5392 8099 5687
+8100 8101 7933
+8102 8103 8104
+8105 8106 5467
+3938 8067 887
+8107 1831 8108
+5391 8071 8109
+3343 8110 5367
+136 2798 8111
+8112 7812 7440
+4914 8073 4852
+8113 3242 8114
+8115 3112 3528
+13 8116 8117
+8118 8119 7957
+5758 8120 1526
+1964 1671 2224
+8121 8049 690
+8122 8123 5122
+6073 8124 3694
+6480 337 8125
+8126 8127 6750
+8128 8129 8130
+5284 4204 8131
+2313 5144 8132
+8013 8133 6350
+7969 8134 8135
+7515 3865 7532
+7736 7256 5200
+7883 6486 8136
+8137 2311 6956
+8138 8090 8056
+8139 1206 3516
+8140 8141 7979
+914 8142 8143
+8144 8036 3428
+8145 8146 8147
+8062 8096 8148
+8149 5851 8150
+8063 8101 8151
+8102 1387 3771
+8152 4821 803
+8153 8154 8155
+8156 7524 7604
+5059 5122 8157
+8158 7999 8159
+3092 8160 861
+8161 8162 664
+8098 5953 8163
+8164 8006 8165
+8076 8119 8166
+8167 7416 499
+3147 8168 4749
+5962 8169 8170
+8171 6433 969
+3550 8172 4594
+8173 4254 4201
+6130 7285 3224
+8174 1005 8175
+8007 2433 8176
+7949 8177 1253
+4077 5688 8178
+8179 2815 8180
+8181 978 8182
+8183 8134 8085
+8184 8014 944
+3642 7974 6675
+8185 8089 3865
+8186 2440 8187
+1573 8188 1651
+8189 8190 8016
+4834 7846 7160
+1207 8092 1114
+8093 8141 8191
+8192 8193 8194
+5697 8195 7192
+8027 8196 8197
+5027 1217 8198
+8030 8199 8200
+8201 8202 8203
+8204 3368 7884
+3006 506 3402
+1591 8205 5391
+8206 8207 1175
+8208 6139 6624
+7946 8209 8210
+4680 6062 4843
+8211 4326 715
+8212 8213 1060
+8214 5786 3838
+8215 856 4783
+8044 8216 8217
+1496 2630 6550
+7451 7114 1569
+4659 8218 8219
+2088 8220 8221
+8222 8223 2419
+8224 1660 8225
+7673 8226 5648
+8227 8228 8053
+3631 4228 8229
+8230 1302 6776
+8115 8231 5480
+5261 6498 1788
+8138 8190 8232
+8233 8139 604
+8060 8234 8235
+3659 6575 5789
+8236 8196 8148
+8149 3295 4911
+8237 8199 8151
+3493 7016 8238
+8239 8240 7101
+6684 6774 508
+8241 3174 8242
+8243 8244 8245
+6760 6053 8246
+8247 8248 4187
+7760 8249 7820
+5611 3505 4941
+8250 6820 3104
+7701 8251 2787
+2712 7490 3545
+8252 8216 8166
+5681 1789 6221
+6230 6725 1512
+8253 903 8254
+7029 8255 1229
+8256 2168 2561
+8257 8258 8259
+8260 8261 8120
+6270 4779 8262
+8263 5024 5531
+6615 3788 4590
+8183 8228 8264
+8265 8266 5677
+8091 8267 8268
+8269 8234 8191
+8025 7058 1934
+5598 8270 7802
+3924 6478 7844
+8271 8272 8095
+8273 8274 8100
+4900 7016 8275
+8276 8239 3185
+4113 7866 3871
+6122 8277 8278
+8279 8280 7125
+8281 6376 8282
+8283 8284 2325
+8285 8286 6139
+8287 8161 7539
+5779 8288 8289
+8290 6731 8291
+8292 573 1186
+8293 8294 5972
+3681 7728 6180
+642 135 8295
+8296 8297 8118
+3200 7870 77
+7170 8298 2627
+8172 1961 8299
+8300 8301 8302
+6145 8303 7172
+8304 8305 4072
+8306 3065 8307
+8308 8309 4904
+4461 6491 62
+6471 8310 8311
+5774 6586 3978
+8312 7879 8313
+8314 4818 6900
+8135 8315 8316
+8317 4585 3269
+6746 8318 4983
+8319 1270 8174
+6427 714 8277
+7358 8265 6568
+3827 8137 6666
+8320 8267 8232
+8321 5033 8322
+8323 8324 8140
+8325 8326 8327
+7808 8328 2045
+8329 2937 6975
+7304 3707 8330
+8236 8272 8331
+8332 4689 3295
+8237 8274 8333
+8334 1089 5439
+8335 2648 8336
+4528 8337 8338
+8339 832 45
+4447 8340 4059
+4969 5739 6059
+1174 8341 8342
+8343 8110 8344
+3462 5148 7835
+2670 4775 7415
+8181 7240 6998
+8252 8297 8345
+7015 8346 3571
+8347 8348 8349
+2057 8350 3473
+8351 2740 8215
+8352 956 8353
+8176 7964 8354
+8152 8355 8356
+1586 8357 8358
+4048 2250 7547
+7832 711 1414
+8311 6554 8359
+3126 3536 3408
+8314 6808 4798
+8360 8315 8264
+8361 7026 8362
+119 6582 2740
+8363 7663 5043
+7314 4066 8156
+8364 1709 8365
+5428 829 1102
+8366 8367 8189
+8322 3287 8368
+8269 8324 8369
+8370 8371 7039
+8372 7566 8373
+7729 1723 1899
+6132 1822 8374
+8375 6241 2868
+8197 8376 8377
+8378 7422 693
+8200 8379 8380
+8275 3494 8381
+8334 5789 4732
+8175 3507 8241
+610 8382 8383
+3387 8384 8276
+8385 1073 8386
+3319 8387 7972
+2807 8080 7611
+7889 2419 8388
+7722 8389 895
+8390 2195 7071
+8217 8391 8392
+8393 7801 1031
+8256 8394 8395
+8257 5041 1909
+8396 8397 4411
+8108 4037 8398
+8399 7709 8400
+6401 2614 4686
+6262 7076 7133
+8401 8402 8382
+115 4577 6808
+8403 8404 8227
+8320 8367 8405
+6619 8406 7358
+5610 8407 3728
+8235 8408 8409
+8410 8411 6718
+7235 8412 2543
+7738 4503 7454
+8413 464 6693
+8414 3939 7989
+7091 5041 8415
+679 8416 5405
+8417 8376 8331
+8418 736 2595
+8419 8379 8333
+8420 6957 8416
+1559 7470 8421
+6682 8173 7192
+8422 4574 2614
+7185 8224 3807
+8423 8424 8425
+8426 7306 8427
+3662 2849 7898
+2893 3014 8428
+8429 8391 8345
+5136 6126 7555
+8430 8431 6637
+7505 2098 3913
+694 6123 814
+8432 1104 4966
+8360 8404 8433
+621 8434 2215
+3374 5964 3924
+7676 6747 7316
+8435 327 1766
+8268 8436 8437
+8438 617 8439
+8321 8407 6279
+8440 8408 8369
+6099 2543 8370
+3579 1817 5057
+4236 1305 298
+1433 1572 6180
+8441 144 8442
+8443 8444 8271
+8445 8446 8273
+7983 6172 1778
+8378 692 8447
+4674 943 3864
+8448 7607 1492
+1658 8449 1081
+6672 741 1601
+8206 8450 707
+8390 8451 8452
+7907 6236 7695
+8453 1288 8292
+8454 5734 8107
+5923 3428 4224
+7093 8455 8456
+8457 8109 8458
+8459 638 5418
+8460 8461 8296
+4021 8462 6062
+8463 8464 6445
+8465 819 5041
+8466 2561 482
+6981 8467 6386
+2397 5082 3432
+2687 8201 7436
+8432 4770 33
+3337 3489 7182
+8316 8468 8469
+2726 6721 4760
+8470 188 8471
+8472 8473 5452
+6407 7316 5378
+8474 8436 8405
+4114 8415 3792
+5850 6231 1082
+8475 8476 8323
+6691 8477 6629
+7896 7819 1090
+5166 8413 1822
+1499 2962 4790
+8417 8444 8478
+8418 3315 855
+8419 8446 8479
+8480 8481 7913
+8482 2623 1545
+6152 8483 3310
+8484 8485 8486
+5530 2119 8487
+533 7911 6236
+7735 3193 8488
+8489 3470 592
+8490 1285 4652
+1064 8491 8492
+8429 8461 8493
+4135 6494 8494
+8495 3460 8496
+6639 2318 8497
+4824 8498 89
+8336 7369 1962
+7401 5562 8499
+2500 3832 8500
+8354 6823 8501
+8502 2526 7640
+8503 8468 8433
+8504 8505 8506
+8145 8507 8508
+8509 8510 4495
+6060 7961 8455
+8511 3720 8512
+4422 8513 7812
+8514 8515 8366
+8516 2464 949
+8517 8518 1111
+5287 8519 7935
+8520 7075 4047
+8440 8476 8521
+4982 4852 8522
+8523 8524 7163
+8525 3621 5319
+8526 649 5800
+8377 8527 8528
+8380 8529 8530
+8531 4736 8532
+8533 8214 143
+7805 8226 1252
+8534 4129 8535
+8483 8536 8187
+2018 1546 8537
+4479 8538 8344
+3896 5769 303
+5620 8539 6488
+8540 592 8453
+3465 7887 7841
+8541 1037 8542
+3290 8543 7016
+8392 8544 8545
+8546 8547 106
+8548 3499 8335
+8549 4622 6400
+8550 8551 8552
+8553 4793 4928
+833 8502 8554
+8555 8556 8403
+8557 8219 126
+7567 8558 7107
+8281 4495 8559
+3099 8560 562
+8332 3411 8561
+8474 8515 8562
+8563 1102 879
+8564 7439 6840
+5450 4519 5756
+3678 8565 3174
+8409 8566 8567
+3634 2308 8568
+8569 8527 8478
+8570 8529 8479
+3308 8533 8571
+8572 7748 8573
+7040 8574 2761
+2173 1109 4080
+7254 8424 3193
+6897 5594 6329
+2147 6759 3202
+8575 8544 8493
+6836 3199 7525
+8464 8516 8576
+6729 5724 8577
+3991 8247 4447
+8503 8556 8578
+8579 8517 7283
+8580 8581 2813
+5906 4790 3887
+8437 8582 8583
+8279 5916 7942
+7984 8584 8585
+4556 5432 5902
+400 8586 3052
+8587 8566 8521
+3573 5467 8588
+2394 8589 5974
+8590 8591 8443
+5854 7384 3321
+8592 8593 8445
+8594 4905 5671
+3822 7959 6135
+8595 7447 1350
+8399 303 8233
+878 641 8596
+7730 7203 2576
+8597 8164 5994
+8598 2474 4489
+8599 2524 5341
+178 5586 7011
+7925 2148 1765
+8600 6770 8601
+8602 7848 3465
+8603 8604 8460
+8605 3038 8510
+7915 2351 7656
+8606 1656 4374
+8607 2879 4096
+8608 8609 488
+8610 8611 8612
+8469 8613 8614
+8615 1885 8616
+8617 2684 833
+1522 3878 8618
+8553 5911 3881
+7365 7895 8339
+8580 8154 8619
+8620 7976 4023
+8621 2045 8622
+8623 8624 6020
+8625 8582 8562
+4767 7402 8626
+8627 362 8628
+8629 8630 8475
+8069 8374 6692
+8631 3259 8351
+8632 145 8441
+8569 8591 8633
+8570 8593 8634
+1306 4080 8490
+6966 7903 3580
+4162 5375 3344
+6876 2625 8635
+6309 8636 2155
+8637 7885 7203
+8638 2553 8639
+8640 8641 3191
+5176 2211 6222
+5719 434 8099
+8642 7779 2329
+8575 8604 8643
+8644 8645 8646
+8647 8606 8648
+8649 8579 4032
+8650 7989 3173
+8501 6745 8651
+8652 8653 8654
+639 8655 8656
+8657 5228 8658
+8659 8613 8578
+8660 5049 8661
+8662 1785 1544
+4069 8326 4365
+8620 2225 8663
+8664 8665 8514
+2814 8666 8667
+8587 8630 8668
+8669 4445 5871
+3608 4852 8670
+4913 6062 8671
+7227 8672 8673
+8674 2581 5704
+8528 8675 8676
+8530 8677 8678
+3657 2267 6712
+8679 8680 8681
+8682 8683 8452
+8684 8685 8686
+8687 8688 6877
+8689 2219 8650
+8690 8691 1709
+4476 8692 3356
+8693 1988 3197
+2921 6392 6638
+3660 3725 8423
+8694 8695 3717
+4937 2333 7743
+8696 6361 7988
+8084 3570 965
+8697 142 1441
+8545 8698 8699
+2134 6934 4545
+8700 6889 8290
+8701 8702 7627
+6829 3388 7435
+8703 8704 8555
+4425 8019 8705
+8706 6509 7585
+8707 223 2564
+4287 4170 8708
+8709 8710 8711
+8625 8665 8712
+8567 8713 8714
+8715 958 8263
+7948 6112 3072
+8674 3978 1086
+8716 8675 8633
+8717 8677 8634
+8718 1242 6591
+3243 8571 3468
+6412 8212 6172
+7966 7022 1858
+8719 1908 8720
+8721 5939 2920
+6883 17 8722
+8319 2686 5621
+8430 2247 4130
+5749 7666 3612
+4443 8723 8209
+5880 8724 8725
+7920 8726 4945
+8727 8649 7503
+8728 3286 1426
+7584 7458 4588
+8729 8698 8643
+8730 8731 1750
+8658 6046 7456
+4804 8732 8733
+4932 8355 8734
+8659 8704 8735
+1325 8736 8737
+4893 6391 2072
+8583 8738 8739
+8740 8741 6506
+8112 8742 8667
+8743 6345 7498
+8744 8713 8668
+8745 8746 2795
+8747 4730 8748
+1558 8749 8750
+4484 7388 3463
+5926 290 925
+7343 8751 2032
+5065 8752 8753
+6938 3960 5223
+8754 8755 8590
+8572 8452 8756
+8757 8758 8592
+8718 2555 8759
+8760 8761 3288
+8438 7255 8762
+8763 3509 2680
+8764 585 5920
+7544 281 923
+8765 288 5275
+6388 8766 5929
+8767 116 6808
+8768 3728 4136
+8769 8770 4233
+8771 7198 7374
+4866 7743 8598
+2479 5342 5455
+2905 8772 314
+7487 8773 8249
+8774 8775 8603
+4210 7875 8776
+8777 1082 8657
+8778 7498 8531
+8779 8780 5087
+8616 308 8781
+5288 6593 3448
+4095 1849 8782
+4286 3854 4046
+8614 8783 8784
+8785 7299 8786
+4160 8787 8193
+8624 8788 8789
+8790 8738 8712
+7993 7498 6959
+8791 8792 8629
+8745 1785 8793
+8356 8210 7786
+8794 8795 5878
+8621 7772 4625
+8796 3500 1487
+8716 8755 8797
+8717 8758 8798
+8799 1091 8800
+8801 4213 1132
+1748 8802 8803
+8804 5755 8805
+7312 8524 8806
+8807 8727 7582
+3433 5083 8808
+8412 8809 2542
+8810 8811 1712
+5140 8204 8812
+5453 8813 25
+8242 7989 2218
+8729 8775 8814
+8070 8815 5374
+8816 1659 8817
+8779 8733 8818
+1411 8819 8820
+8651 6576 8821
+215 8822 4714
+8823 3295 3542
+8824 294 8825
+8826 3837 257
+8827 8005 4446
+8828 8783 8735
+8829 1826 932
+8830 8035 2669
+8347 1032 7803
+8680 7871 3970
+8831 8832 8664
+8744 8792 8833
+2035 2669 1608
+8466 8447 1095
+851 3909 839
+4234 8834 8835
+8836 4729 5116
+8676 8837 8838
+8839 8608 450
+8678 8840 8841
+8842 8843 2555
+8801 8844 5623
+6493 6375 3997
+8845 6844 8846
+2282 3877 8847
+2542 8848 8371
+5771 6901 8724
+5317 8313 5441
+73 6044 8849
+8198 2317 4298
+8481 7624 8051
+8781 7142 4062
+8699 8850 8851
+8568 8852 7905
+8772 2396 6696
+1755 7771 8853
+8854 6128 6972
+7659 4219 4111
+8855 8856 8703
+302 409 8250
+2454 8857 8078
+8790 8832 8858
+6608 8859 8623
+342 8860 8157
+8861 3452 6806
+8714 8862 8863
+7707 8864 8865
+7758 7764 5862
+8364 8866 8867
+8868 8869 1551
+5754 7133 8520
+8870 8871 8872
+8873 8837 8797
+8874 8840 8798
+5117 8875 1189
+8876 1678 2941
+8760 3791 6359
+8877 8807 4938
+8150 8845 3411
+6793 8878 8879
+8848 8880 3467
+8881 8882 3165
+8565 8883 8414
+563 6604 5877
+8817 1512 8884
+8885 8254 8886
+8887 8888 4189
+6647 7010 8535
+8889 8850 8814
+6217 8890 255
+8891 8726 7448
+8318 8830 3021
+1896 8396 3723
+8751 3304 2031
+8892 3970 1978
+7180 5474 4005
+8828 8856 8893
+1683 8847 708
+8739 8894 8895
+8896 8897 5666
+8898 6954 5203
+8899 8839 2131
+8900 8862 8833
+1095 8865 8394
+7973 5639 2278
+8901 8902 8903
+8904 8905 8754
+2764 3997 3728
+8906 8907 8757
+8799 1777 8908
+2011 5543 6604
+8909 3264 5118
+2058 5290 6592
+8361 6489 8637
+8701 8724 4623
+8778 8051 6854
+8910 8488 8423
+8350 3549 1486
+4277 6227 3946
+8672 1314 8911
+8912 2965 2762
+4273 8066 8810
+8913 8914 7097
+8823 6521 4404
+1818 3943 3688
+5483 3748 8915
+1946 2125 8564
+8628 1301 8230
+7535 40 6912
+8916 8917 8774
+5698 180 6942
+8918 5437 8919
+8920 5214 8921
+8784 8922 8923
+8924 8706 654
+3240 3354 7962
+6535 7720 8925
+8926 8894 8858
+7058 5496 6010
+8927 2314 792
+164 8928 3315
+8929 8930 8791
+8349 7709 1445
+5379 8931 8932
+8836 8933 8934
+8935 8877 7743
+8873 8905 8936
+8874 8907 8937
+3617 3288 204
+8802 8938 8939
+8940 1604 5112
+5646 3903 8941
+5815 4360 6557
+8942 8943 5641
+6609 6022 8944
+4389 8945 695
+8684 1856 8946
+8947 5194 6181
+7956 4037 1830
+8889 8917 8948
+5259 8925 8949
+8192 2031 3593
+8950 8276 8681
+8821 7520 8951
+8952 8953 6749
+8954 8955 7981
+4544 8956 2225
+8920 6915 7606
+8957 8922 8893
+5040 8899 821
+5684 8958 1341
+8959 8960 299
+6558 6125 2288
+8961 8962 8831
+2232 4225 7737
+8554 8963 8088
+6560 8123 8927
+8964 6102 6494
+8900 8930 8965
+8868 4285 5031
+6337 8966 3749
+8838 8967 5982
+373 479 8451
+8841 8968 8969
+2274 2442 1885
+1159 3013 4204
+8970 8971 8972
+8487 8973 8974
+4131 3690 3809
+8975 5987 1457
+6799 6306 8976
+8942 3943 7271
+3994 7218 8977
+3084 8978 511
+6728 1875 8004
+8607 6151 646
+2465 8979 5540
+8851 8980 8981
+8982 7651 8737
+8983 1003 8984
+3127 3408 822
+8985 5578 5156
+5315 4694 3209
+8986 7860 6915
+5682 3060 3112
+8740 7812 8666
+8987 8988 8855
+8989 8990 1217
+8926 8962 8991
+8992 8935 2335
+5743 8860 6561
+8863 8993 8994
+8179 5612 8995
+5930 8967 8936
+2019 1852 371
+1593 5116 5028
+8996 8968 8937
+350 8786 8733
+1504 3989 8586
+8325 7131 4038
+8997 2138 4066
+8307 264 6577
+8998 8999 1091
+9000 2286 9001
+5161 9002 8914
+1561 8299 2233
+812 8278 5053
+6927 8154 7954
+8747 3072 9003
+7145 2519 9004
+9005 8648 4536
+9006 8147 9007
+8494 6102 7373
+9008 9009 9010
+6104 6852 3502
+9011 8980 8948
+8896 8410 8524
+9012 9013 9014
+5136 7468 7021
+801 6824 2554
+9015 4303 8822
+7919 5442 8313
+8796 3274 5230
+8957 8988 9016
+8989 4906 9017
+7206 5155 9018
+8895 9019 9020
+5372 3555 1711
+9021 8993 8965
+9022 2942 7901
+6108 5931 8904
+9023 248 5318
+9024 9025 8906
+8997 9026 8866
+9027 3676 9028
+7234 8327 5218
+9029 3530 7296
+9030 1078 4756
+6864 3732 2998
+8975 9031 7804
+9032 7746 2379
+8730 9033 9034
+9035 9036 9037
+7436 9038 3389
+9039 9040 6986
+8459 202 9041
+9042 5054 3764
+645 3271 5103
+9043 2651 7096
+9044 9045 8916
+9046 9047 1679
+9048 9049 6742
+8497 4513 6551
+8763 6127 6318
+4452 4710 9050
+3140 1487 8548
+8923 9051 9052
+9053 8992 2848
+213 3889 396
+9054 3497 7506
+9055 9056 7939
+9057 9019 8991
+6931 5427 3676
+3810 1664 400
+9058 9059 8929
+7336 6146 9060
+6932 1602 9061
+6634 9023 3960
+8996 9025 9062
+9063 9064 3254
+9065 8765 3621
+9066 2637 8943
+9067 8266 5583
+1473 3762 4922
+2641 2998 9068
+2447 4923 7553
+9032 1451 4154
+9069 8679 8276
+4254 8348 9070
+4594 1562 3551
+9071 3869 7866
+6869 9072 9073
+4076 9074 202
+9075 9076 2841
+8002 2577 7355
+9011 9045 9077
+9078 9079 4909
+8951 8387 9080
+6198 8954 3429
+2719 121 3735
+9081 7116 7518
+904 4747 4394
+4227 7842 9082
+6147 978 991
+8667 8513 8180
+9083 9051 9016
+9084 2337 8654
+8300 9085 7664
+9086 9087 8961
+9088 5914 9089
+9090 6733 8662
+9091 320 4635
+9092 2119 4690
+9093 305 1525
+9094 5791 9027
+9021 9059 9095
+9060 6111 3071
+7564 9096 9097
+9098 987 2229
+8969 9099 9100
+9101 9096 4253
+9102 2404 9103
+9067 9104 8231
+3077 1180 6484
+9105 2110 5863
+6070 4496 467
+9106 4382 567
+7048 9107 5568
+9108 3952 9109
+9039 6910 9110
+9111 2345 2041
+9112 9113 1736
+8981 9114 9115
+9116 7190 9117
+7998 8871 523
+8617 8088 1292
+3441 5216 3073
+1570 7739 2389
+9118 217 9119
+9120 550 9121
+9081 5734 7158
+3610 9122 5780
+1996 9123 9124
+9125 9126 8987
+9127 8010 4019
+9128 7678 9129
+2081 5775 4671
+9057 9087 9130
+9088 9131 9132
+9133 654 9090
+8994 9134 9135
+7687 1551 1464
+9136 9137 579
+6890 7194 9138
+9139 9099 9062
+8971 3254 8913
+9140 2487 5070
+9029 5943 6596
+3011 5821 7694
+4351 9071 4648
+9141 9142 1856
+9143 2841 3876
+9144 6782 9145
+2609 9146 3146
+9147 4908 614
+1364 9148 6488
+9149 9150 9151
+9152 9114 9077
+9153 9154 2782
+9155 8880 1200
+4128 3051 6648
+1226 4611 4881
+8912 8574 9156
+9157 3733 121
+9158 9159 9123
+9160 6589 6774
+9083 9126 9161
+9162 6172 9163
+9164 6983 9165
+5533 3888 4789
+9166 9167 9168
+8484 5863 9169
+8715 8308 4770
+4664 1365 7654
+9121 4600 2510
+9020 9170 9171
+3203 9172 6916
+9093 6695 7034
+9173 9134 9095
+9174 9175 9176
+9177 5534 9178
+9179 9180 6023
+9181 9182 9024
+278 9140 9183
+9184 3255 9185
+8963 5160 1209
+6636 8131 3012
+3310 1941 9186
+9187 3370 2099
+9188 3270 5484
+5731 522 5339
+9189 1917 4644
+9190 9191 9044
+8178 6051 3133
+5240 1737 9192
+6380 5840 7763
+8442 2594 2965
+3976 2783 7751
+8511 9193 5211
+9194 9195 9196
+5398 5667 9178
+9052 9197 9198
+9164 4189 9199
+3330 3703 3729
+6734 5694 9200
+6940 3317 6910
+9201 9170 9130
+8486 4126 2112
+9202 8064 9131
+8155 2815 8742
+8471 5927 9203
+4308 9204 1870
+9205 810 492
+9206 9207 9058
+9174 2737 9165
+9049 4997 7876
+8523 9177 8897
+1422 9208 6889
+9209 3421 9210
+9139 9182 9211
+9102 5654 4601
+9066 8072 5173
+3770 9124 7492
+6660 7035 9212
+5891 7296 3615
+4031 9213 7503
+9186 646 6153
+6801 3986 9214
+9215 614 208
+4373 7536 6911
+9152 9191 9216
+9217 3351 9218
+9219 1626 7689
+5986 9220 9221
+9127 8400 9053
+9222 8934 5055
+9080 9223 9224
+1233 6084 7652
+9120 1029 9225
+9226 5164 7399
+7610 8482 8537
+9227 9197 9161
+5812 591 8327
+7113 9145 5647
+6794 214 734
+9200 1785 6732
+9228 3576 3336
+9229 9230 9086
+8398 7955 8153
+5978 1356 305
+173 2877 9231
+9173 9207 9232
+9233 915 7821
+9234 8887 2737
+9235 3876 9076
+7726 8225 9236
+9100 9237 9238
+9239 9240 8223
+3325 7503 7412
+9241 7486 9242
+9243 7913 9244
+8983 5619 6336
+848 9245 8648
+8389 774 232
+5047 1068 7316
+735 6105 9246
+9247 5913 2777
+9115 9248 9249
+1823 5167 8589
+2029 1589 452
+9250 6972 2984
+2217 4529 9251
+9252 8182 1067
+9002 9253 9040
+9254 147 1595
+8491 2054 8505
+9091 2972 9255
+9256 9223 8641
+2140 9257 6033
+5184 7386 5232
+448 9258 1580
+9259 9260 9125
+6795 5708 3762
+2823 3030 2730
+771 9010 8815
+9261 7189 6494
+9208 3557 7461
+9262 7453 5350
+9201 9230 9263
+9135 9264 9265
+4636 9266 9267
+6192 7397 2413
+9268 9237 9211
+6705 3310 6610
+9269 1124 9270
+9271 3439 1382
+6174 9241 6593
+6536 9272 8225
+9273 6102 7374
+7213 9274 3138
+432 6389 5928
+8291 4976 6924
+7965 8705 1438
+402 5607 9275
+9276 9248 9216
+8824 8538 9277
+9278 2272 9274
+633 7406 8125
+7936 4005 9279
+5890 4660 8557
+9280 5142 2332
+9227 9260 9281
+8979 8546 6442
+9282 9283 9284
+9285 3802 8454
+7144 1600 9286
+9287 8250 137
+7159 9033 5553
+9171 9288 9289
+8749 8950 8892
+9290 9291 188
+9292 9264 9232
+9293 4718 3539
+9294 9295 9181
+5473 672 496
+9210 9169 2100
+9296 5583 8406
+9297 8480 6331
+1103 2082 9218
+9250 9094 9298
+4016 1394 9299
+5830 7143 1003
+538 2749 6792
+9028 5427 9300
+5700 6328 7344
+9301 8601 9302
+9303 9304 9190
+700 131 2186
+2377 8826 2981
+9064 9305 5161
+8829 3696 6220
+5825 486 8609
+9256 5691 9306
+7012 8302 3547
+5883 6786 9307
+6962 7510 5734
+9308 5091 9309
+9198 9310 9311
+8547 9312 6602
+5149 9313 7044
+6055 2669 9314
+9315 9316 4877
+4854 4477 6469
+9317 3653 9079
+9318 9288 9263
+4805 3862 5934
+9319 9320 9206
+7310 5518 9321
+9268 9295 9322
+9273 9323 6492
+2467 2896 9324
+9325 9001 5739
+9239 4656 1374
+7893 1502 8696
+8691 4523 1078
+9326 9297 3324
+1 4352 3262
+1707 6103 1560
+8661 6604 9327
+9328 5601 9329
+7542 2716 554
+5971 7715 486
+2617 5421 3564
+9172 9031 82
+9330 3065 6670
+8120 871 9331
+9166 3298 6162
+9276 9304 9332
+9333 9334 4282
+9335 918 3063
+3769 9336 1994
+9224 9337 9338
+8485 3423 5649
+9329 9339 1029
+8970 1272 3255
+1033 4166 1698
+9340 9310 9281
+98 6724 1709
+9341 9078 9342
+9343 1714 7001
+9315 5075 9344
+9261 3999 8294
+9345 9346 9229
+8640 8423 9347
+9348 9349 6043
+3806 5433 5903
+9350 7319 6906
+9292 9320 9351
+4615 4740 2363
+9352 6835 9353
+9238 9354 9355
+817 3154 7607
+9356 6593 6772
+4645 1533 1358
+9357 2713 4509
+9217 4671 4719
+9328 2510 9358
+5921 9359 1527
+9280 8656 4706
+9360 4591 2191
+7552 6948 7333
+9361 2511 3282
+9249 9362 9363
+9364 9365 9366
+9008 5385 9367
+2520 5029 9368
+8870 9369 324
+3755 7370 9370
+9371 9337 9306
+3041 5859 5725
+8725 303 9287
+9372 9373 3823
+9374 9375 9259
+7759 5879 8463
+9012 6291 8245
+9376 9377 4877
+7262 413 3247
+9318 9346 9378
+1596 146 3118
+9350 5887 9379
+9265 9380 9381
+5638 9382 9383
+9384 9354 9322
+9385 9326 6585
+7196 359 9269
+768 8388 9240
+2600 5753 8086
+3582 7091 8259
+8020 4424 8660
+9357 3425 916
+3237 3483 1892
+9386 3920 9387
+8728 3744 3699
+9189 2786 9388
+7850 9389 5864
+9336 1387 9390
+5843 401 5764
+8363 9391 8301
+9392 9362 9332
+6863 9393 7403
+9143 6633 9394
+7242 4257 9395
+363 5662 4862
+9194 1266 9396
+8246 4508 9397
+9398 2167 9399
+4075 8163 9113
+9106 8077 7605
+9340 9375 9400
+9144 9401 3937
+9402 9403 236
+1630 9404 113
+9289 9405 9406
+9407 9323 7198
+2633 8670 6160
+9408 9380 9351
+8804 9112 9409
+9410 9411 703
+9111 5739 9412
+4049 5173 8205
+5021 9293 4100
+9413 9414 9294
+9415 5429 2749
+1880 9416 7299
+8058 7142 7892
+5404 4850 1533
+7049 1034 1697
+9222 3580 9417
+7647 9330 3920
+9418 8037 6805
+5159 4795 7783
+5353 2981 72
+9419 5707 9420
+3977 8375 4670
+9421 9422 9303
+9373 9048 9423
+9424 9151 2141
+9235 6280 9254
+9425 9426 5876
+9388 2788 1537
+9427 2918 1786
+9371 7066 9428
+3897 3914 9429
+9430 9431 9432
+9311 9433 9434
+5492 5190 2485
+9435 9436 5186
+4802 9437 3210
+6744 4472 9438
+8876 980 5327
+9439 3034 9440
+9441 9405 9378
+3904 194 9442
+9443 9444 9319
+9445 7951 6899
+9446 9385 1152
+934 7429 6687
+5536 3894 8250
+9384 9414 9447
+9448 9449 9450
+3863 7532 8061
+2111 8721 4125
+9451 5987 3661
+4678 4413 6463
+9452 5564 5629
+5696 8465 7091
+268 9453 4856
+8068 9454 4428
+9455 2624 6379
+2459 9456 5838
+411 889 3744
+9420 9418 8133
+7223 2112 9457
+6753 8878 5873
+9392 9422 9458
+6017 9459 9460
+9425 4424 9461
+9462 9463 9464
+9465 2981 3047
+9338 9466 9467
+9333 4697 8976
+9468 9433 9400
+6024 9469 2763
+9435 5903 6652
+9430 5126 8827
+9470 9471 9345
+9408 9444 9472
+3908 5372 583
+9473 6687 9097
+7947 8949 9474
+9355 9475 9476
+5056 8458 7331
+7975 919 8106
+9477 9478 5232
+3461 8811 2532
+9300 3683 9386
+9479 2976 5895
+9480 1208 1113
+7067 1914 9481
+9116 3973 7320
+7007 9482 5887
+9247 7328 1257
+9483 9484 8794
+5026 7845 7601
+2139 9485 4456
+9363 9486 9487
+9457 4125 9488
+5658 9489 4424
+9490 9491 9339
+1912 5321 9492
+9205 6240 3189
+9493 9466 9428
+8158 9494 8872
+9495 8492 8504
+9496 9497 9374
+9498 9147 9215
+4339 9107 7992
+9441 9471 9499
+6739 6865 684
+1052 9500 4835
+9381 9501 9502
+9410 9215 2923
+9503 3666 3541
+9252 6407 9504
+3884 2413 9321
+9505 9475 9447
+2993 999 9506
+9415 8803 9507
+2932 1698 9508
+9509 8852 9510
+1538 3485 7698
+2821 3321 3515
+8184 7996 9420
+4907 6207 9511
+2380 4842 9512
+9513 9486 9458
+9514 3552 2387
+9515 5661 4933
+9516 3338 4440
+1970 9517 777
+9518 7641 9065
+9519 7629 7433
+9395 5652 2183
+8221 3527 6599
+5977 9073 9520
+9468 9497 9521
+9522 9520 6893
+3831 9523 9524
+582 9446 7569
+6502 684 9082
+9406 9525 9526
+9527 4947 7127
+9528 9501 9472
+5305 9529 5654
+613 6465 9215
+4960 9530 5950
+392 7068 7859
+9531 7945 9532
+1455 9533 5185
+9534 9535 9413
+9536 1963 4839
+6566 7292 8051
+9537 4816 7376
+6855 2565 6916
+5424 6584 6915
+9538 4940 4035
+4538 6991 9539
+9540 7216 3973
+7272 2777 5963
+9541 615 4908
+3805 9542 6226
+9543 9544 9421
+2023 9545 23
+9426 9546 7960
+9547 9270 9548
+8898 415 9549
+8901 7201 7207
+1056 6654 7681
+9493 5968 9550
+3824 9423 6741
+2427 3491 9551
+9434 9552 9553
+9554 8248 8167
+6658 9555 7608
+3856 6961 6937
+9556 3324 6331
+9557 9525 9499
+9558 8039 7926
+9559 1457 9451
+9516 849 9560
+9527 1781 6071
+9561 9562 9443
+9103 9503 5306
+9531 5651 9563
+5988 1457 267
+5172 8694 2638
+9505 9535 9564
+7710 1839 7628
+9343 4983 6054
+6531 9565 9566
+9344 5282 9567
+9568 2194 9399
+9179 9569 8146
+9570 9571 8558
+5320 394 9572
+9513 9544 9573
+9547 777 9574
+9575 5342 9576
+9577 8079 2806
+9467 9578 9579
+9580 9581 8645
+9063 3255 2095
+9582 9552 9521
+1030 9491 2069
+1956 8552 6781
+9583 4990 9584
+1120 6674 8903
+9585 9586 9470
+9587 7400 9069
+9558 8812 4507
+9588 6916 82
+2159 9589 4431
+4386 9560 4758
+1581 9007 8875
+9528 9562 9590
+9591 9592 8642
+767 2714 9593
+9594 7940 5651
+9595 9596 9597
+9598 6734 9599
+9476 9600 9601
+6686 9602 935
+9335 8588 919
+3369 9105 2100
+7293 8467 6311
+3860 2347 9603
+1752 5974 7111
+9604 6898 6188
+24 9605 9606
+9607 9608 8793
+8420 6258 9609
+4307 3927 7431
+9054 7504 2462
+9487 9610 9611
+9612 5550 9613
+9490 2639 2108
+9518 2481 5342
+9614 9578 9550
+129 4533 4565
+7609 1065 9495
+9098 4835 9615
+9616 9617 9496
+6021 9436 6651
+9557 9586 9618
+8959 1305 9619
+408 1633 4359
+3128 7205 6395
+9502 9620 9621
+1408 2904 8551
+1840 3516 9480
+9622 5900 4551
+9623 3783 1208
+9624 9600 9564
+4782 6687 9625
+9626 1732 5475
+6077 2879 1940
+6611 646 2878
+9627 1327 529
+9628 9629 9630
+8470 9631 5744
+9128 1904 4582
+9632 9610 9573
+7455 6816 5384
+930 4651 3018
+5334 4064 5629
+9307 7798 3259
+6544 7909 2068
+9633 938 6875
+9213 4936 7582
+9634 9635 5820
+5866 9533 5987
+9582 9617 9636
+7846 9500 8362
+791 6877 8033
+209 4908 1873
+9637 9638 8052
+3080 7366 7155
+326 3414 7321
+9526 9639 9640
+9185 5782 9641
+9629 9420 6797
+4314 4401 9642
+3558 9643 3425
+9644 887 8689
+9645 9620 9590
+9646 5997 994
+5197 5567 9050
+6980 6908 6726
+9647 9648 9534
+1746 2749 8563
+9397 8812 9649
+963 6206 9411
+6202 8416 3251
+1605 9368 7740
+9650 9651 9543
+3546 9266 7813
+6779 9652 8045
+8450 3386 3471
+5835 7445 4194
+9614 9653 9654
+9568 2166 3768
+9655 9193 2826
+9656 6160 9657
+463 5965 8477
+9658 9615 7846
+9553 9659 9660
+6877 790 9661
+7796 9662 3722
+9663 3252 1480
+9664 9639 9618
+888 6692 1821
+7810 8667 6926
+2426 9665 1811
+319 2406 434
+4358 3911 838
+9666 9667 9561
+9594 3357 8692
+9668 9669 9369
+6716 5870 6908
+9624 9648 9670
+7565 9671 4104
+9672 5444 3606
+9673 9674 8788
+5958 8767 4578
+9155 8540 3167
+9469 8771 8964
+3218 9675 9676
+9309 3652 9677
+8541 9056 1727
+9678 6402 372
+9632 9651 9679
+7413 7582 9583
+6341 7858 9680
+9243 6585 9556
+9681 2119 9682
+9638 4248 9437
+8886 905 4393
+9579 9683 9684
+9685 9419 8014
+9686 9659 9636
+9687 3122 1868
+5359 9688 5063
+9602 9689 5121
+9690 9348 1988
+9663 9529 9691
+9692 9693 9585
+9694 4487 2769
+8136 9695 8812
+9696 6414 3373
+8539 7484 1365
+8381 1323 9697
+9698 1534 2456
+9645 9667 9699
+9700 9701 5499
+9601 9702 9703
+9567 5232 9671
+153 6116 8700
+9704 6843 9705
+9606 1856 7062
+9324 3383 96
+9204 7398 4344
+9706 6965 7438
+9707 5798 3750
+4926 9708 9709
+9710 8938 2013
+9711 9104 6118
+9611 9712 9713
+2673 6460 4964
+7522 8258 9714
+3003 3911 9715
+1926 9225 9491
+9305 9716 5781
+9717 7942 9718
+9719 9683 9654
+7360 9661 2994
+9720 9366 9721
+9722 9723 9616
+8343 8825 7530
+9625 935 9724
+9664 9693 9725
+9726 9727 2524
+9621 9728 9729
+8881 7434 7754
+8489 1200 8809
+9180 5712 9407
+9730 9702 9670
+8669 9731 2536
+9732 8924 6734
+1500 4465 5794
+28 6437 9167
+7184 9707 4688
+9733 9673 5376
+9734 7569 1152
+7341 9735 2969
+9736 5664 7600
+9737 699 4517
+9738 9712 9679
+9739 7953 8559
+9740 6953 927
+9253 5781 8499
+5995 8165 2399
+1311 510 508
+7580 9741 9742
+9686 9723 9743
+9118 9744 1674
+2888 9745 9746
+7914 7289 5613
+9732 6732 1784
+220 236 7749
+9640 9747 9748
+9749 9657 2718
+9750 6225 8687
+9751 5118 9312
+8941 5764 9672
+9752 9753 7849
+9754 9728 9699
+2468 2024 22
+9532 9700 3357
+3872 1637 7543
+8891 9755 4143
+9756 9757 9647
+6860 5919 6474
+9598 9758 9759
+7691 9760 4733
+9761 9762 9763
+9327 2441 8615
+9764 9765 7215
+9448 372 6245
+9766 9715 3729
+9767 3956 9763
+9736 4691 1773
+9137 9768 9769
+1171 2584 9770
+6156 4140 8888
+823 3463 9771
+914 3424 9772
+8495 9257 8820
+9773 9774 9650
+6594 9775 988
+4841 8253 9776
+5491 4627 7455
+9777 4259 9778
+9719 35 9779
+5238 6774 6321
+9780 8932 9781
+9660 9782 9783
+9784 7625 7146
+9785 5745 9786
+2391 3106 980
+9787 9747 9725
+6617 7126 9752
+7094 9452 4063
+9751 8795 9788
+2765 8368 9789
+1920 2770 4846
+9790 9791 9666
+9730 9757 9792
+4012 2536 9793
+9794 9795 9796
+2961 397 3888
+3132 9797 1241
+9630 6796 9798
+9799 4431 9800
+9801 6989 9234
+3260 5884 9694
+4626 6538 7184
+9685 9802 1474
+9803 9771 4138
+6679 9682 4691
+705 168 6284
+9689 9804 9805
+8358 9353 1316
+9738 9774 9806
+7877 4999 8126
+9684 9807 9808
+7648 6269 5077
+9809 6689 9810
+9811 9782 9743
+824 7188 1775
+9462 9812 2864
+5645 8202 8974
+1014 9760 9674
+7575 4570 6545
+9813 9814 9692
+9361 5312 4888
+9754 9791 9815
+9626 5276 9236
+7173 9017 9003
+9703 9816 9817
+9818 9819 9820
+3182 5248 9110
+9821 9822 2699
+4178 9491 2238
+6588 9823 4295
+9824 5907 4713
+9825 145 9826
+9827 9698 1203
+2952 9828 1268
+2755 2444 3789
+9829 9463 4220
+6616 2997 9830
+9831 7786 9832
+4891 2013 1747
+9724 5121 9833
+8448 8238 3153
+9713 9834 9835
+7864 4640 8752
+9836 8805 7133
+1925 9837 551
+9838 9807 9779
+9404 1471 3552
+8305 9839 2133
+9570 7566 9840
+9841 9842 9722
+2185 8736 9843
+6115 9844 3766
+7404 9845 9846
+9787 9814 9847
+9848 5589 5181
+9729 9849 9850
+9272 9279 1732
+9851 9816 9792
+3811 4635 433
+8995 9852 8154
+4924 5811 5182
+7977 9821 918
+9853 9717 6228
+9854 9855 9856
+9478 9840 4104
+9857 5934 6838
+7595 5976 1531
+8065 9226 7430
+8626 9858 2756
+3137 9859 9860
+2855 9830 2996
+7631 7052 6265
+9861 1425 4799
+2350 4272 1514
+9862 9834 9806
+981 8882 9863
+4179 7318 7615
+9000 9370 8222
+2913 1675 8129
+9642 1203 4244
+4872 5280 9864
+9865 9866 2559
+9867 5763 6529
+9811 9842 9868
+8697 9085 7014
+9456 9577 9869
+8859 2197 9673
+9748 9870 9871
+9872 8844 279
+9416 7305 8818
+9873 9874 9875
+9876 9849 9815
+2812 9877 3415
+9878 9822 8663
+9879 9880 9756
+9797 9881 5302
+9882 9026 6261
+104 9883 506
+5686 7868 9884
+7838 9827 4401
+9885 8972 9004
+9720 9886 9887
+9209 3370 7927
+7579 8990 8303
+3987 9108 9382
+5387 3788 2854
+9360 6415 9888
+9889 9890 5860
+5665 6294 3641
+9891 9892 9773
+6416 9893 8915
+9485 9894 4755
+7891 9412 2286
+9838 9895 9896
+5671 8309 4033
+9897 8244 9898
+6184 9515 9899
+9783 9900 9901
+9902 9870 9847
+5591 5584 5756
+9903 4222 7566
+7427 7141 4727
+9554 1438 8018
+9904 9905 9790
+9906 6473 2030
+9851 9880 9907
+5616 4630 3874
+167 5635 6837
+9882 5538 9195
+3004 5548 4675
+9804 9908 6439
+3381 9909 2194
+8280 162 9910
+3142 124 9911
+9912 7837 2987
+9857 9913 1260
+9914 8262 570
+7716 5853 5976
+2539 6374 9775
+9885 7439 5489
+7857 9481 9915
+9862 9892 9916
+3333 1740 9047
+471 7916 9917
+9808 9918 9919
+9920 8711 9921
+7822 5692 8142
+1072 9168 9365
+9922 9900 9868
+8462 9923 9924
+9117 8293 2937
+7586 4357 4170
+9925 5380 9780
+9877 6476 1282
+9926 9927 9813
+8605 5757 5584
+9314 1609 9285
+9876 9905 9928
+6789 790 8688
+9929 8512 4628
+9817 9930 9931
+9932 9240 4576
+9933 7795 4172
+2150 9934 3132
+8401 6767 3220
+9833 9805 9935
+7204 3070 6700
+8270 7192 9936
+8960 9912 2521
+9727 7043 4795
+8519 9937 4168
+9784 6561 7110
+9439 9921 8945
+3747 3395 6417
+3434 5609 9938
+9835 9939 9940
+5592 9739 3038
+9627 701 9843
+7432 3164 8117
+9941 9918 9896
+6918 9942 9943
+3734 9865 3960
+6479 7405 9944
+9945 9946 9841
+4705 240 8282
+9947 7241 612
+9902 9927 9948
+7139 8623 9733
+9770 9390 8031
+5511 2193 8452
+9850 9949 9950
+9951 9802 868
+9952 6892 9953
+9954 9930 9907
+8984 6027 6819
+9883 9955 3402
+9704 3410 8846
+8024 7059 6482
+8317 226 7342
+7199 5104 6023
+9956 7768 8690
+9957 7937 8542
+9889 486 7549
+9958 5510 9175
+6787 9709 5447
+9959 9939 9916
+9960 3724 8425
+5818 7755 9961
+9962 3761 4535
+7393 1130 1219
+8549 9963 8702
+1781 9964 4661
+7938 8835 3741
+9866 2955 3621
+8931 7721 9965
+2810 1626 7080
+3774 2251 3907
+8310 5231 9966
+9922 9946 9967
+9968 8653 5676
+9969 8584 8800
+9871 9970 9971
+9972 6473 690
+3195 1385 3769
+9973 9949 9928
+8622 2180 9974
+9768 9951 9596
+9975 9976 9879
+1532 9977 407
+9978 9979 4676
+9980 9605 9142
+9359 676 8260
+6276 9358 1983
+275 7232 8955
+6023 4361 7301
+6830 9956 6723
+9829 7660 6425
+2990 643 2475
+6455 9981 966
+1743 6271 9982
+9983 9984 9891
+6083 9985 7353
+1041 9986 9746
+1022 6625 1383
+9987 9988 9989
+9990 7212 9991
+9941 7780 9992
+9993 9994 873
+7392 9658 7026
+3094 9157 2718
+3738 1870 9995
+8842 1497 3214
+4498 9734 9244
+9901 9996 9997
+2828 9665 8028
+8506 2056 5980
+9998 9970 9948
+4980 667 9690
+9908 9999 4388
+10000 10001 9904
+10002 6994 6091
+2772 5263 6387
+9597 868 8014
+9954 9976 10003
+4464 1864 10004
+7799 9119 6561
+9538 7955 9852
+10005 9895 5224
+7658 8561 3410
+1527 9331 6475
+1169 3996 5934
+1481 7167 6429
+764 4995 4362
+9132 4973 7558
+2484 786 7452
+9649 7884 9187
+9959 9984 10006
+9960 4331 10007
+9488 2920 5886
+10008 8787 5137
+4981 7035 5575
+1051 9221 6490
+9919 10009 10010
+7517 5325 9038
+10011 8952 5395
+10012 6451 7686
+9993 5258 1744
+9906 10013 8121
+10014 4071 8327
+10015 9996 9967
+9409 8509 240
+10016 9745 10017
+10018 10019 9926
+9836 7075 9074
+9935 6439 10020
+9973 10001 10021
+10022 9619 3533
+9931 10023 10024
+8764 6574 1161
+6754 10025 10026
+9789 10027 9628
+4598 10028 10029
+3731 4766 9830
+4002 6656 9542
+7165 911 1802
+555 10030 2717
+9519 8116 2093
+1384 8286 10031
+10032 6982 9199
+10033 966 9631
+2587 1100 3940
+10034 9762 5151
+9940 10035 10036
+9612 346 3361
+10037 599 3247
+6472 10038 7085
+9646 9731 6715
+4112 8681 8384
+2831 1409 10039
+10040 10009 9992
+6828 3390 3490
+10041 6185 8012
+10042 8638 9696
+10043 9721 5528
+2268 7781 10005
+10044 10045 9945
+9888 6097 7051
+9622 2798 8023
+10046 7991 732
+10047 10004 9824
+6461 2672 2575
+9998 10019 10048
+10049 10050 5765
+10051 9769 9595
+9950 10052 10053
+9571 10022 4763
+9286 8849 1798
+10054 10023 10003
+10055 10056 6811
+4008 2472 672
+9825 2966 8441
+4994 9317 9341
+10057 4492 10058
+10059 10060 1716
+9980 7414 10061
+439 4414 7441
+10062 8130 555
+9897 10029 9013
+2650 8159 7056
+8330 7830 8780
+1114 10063 10064
+5566 4823 10065
+1616 2379 7847
+4003 9964 3559
+10066 10035 10006
+2188 8560 8879
+10067 561 10017
+688 6473 2662
+3266 9845 9740
+10043 4268 10068
+9042 10069 9440
+10015 10045 10070
+6005 9214 5637
+7481 5795 10004
+9971 10071 10072
+10049 5444 4673
+10073 10052 10021
+10074 9376 10075
+10076 8655 9041
+9089 1256 9819
+10077 10078 9975
+9798 1475 6143
+3046 2593 2964
+8000 8441 3109
+10079 6630 4819
+6365 6390 3619
+9424 6032 4979
+1618 1195 7791
+10080 10081 8986
+5805 6075 130
+7020 10059 911
+7079 4973 3739
+4499 8532 10082
+9396 6723 8867
+3744 6784 10083
+3204 6943 7568
+10084 5174 9913
+2767 1493 10085
+10086 5966 7990
+2388 5286 10087
+10088 10089 9983
+10090 9633 6044
+5348 6179 10091
+9793 994 5892
+10092 8240 8681
+10040 9592 10093
+9999 10094 3605
+9146 7359 8168
+9997 10095 10096
+7787 8209 7630
+10097 3553 583
+4847 5884 8631
+1903 10098 3238
+10099 10071 10048
+403 4915 5444
+10100 10101 10000
+10102 9477 5282
+10054 10078 10103
+1663 1161 2303
+4589 1108 9753
+9540 2937 5561
+10079 7786 8723
+7187 2906 313
+1147 4508 9695
+2664 5629 8057
+1967 10104 4676
+5364 9037 437
+10105 970 10106
+1045 581 5372
+8171 1340 4342
+10083 10037 412
+8128 7852 5740
+2871 8207 8397
+10107 4334 26
+7690 3559 1781
+2001 5413 9034
+10066 10089 10108
+8762 8910 3724
+8595 1999 9755
+10109 1571 10087
+8372 4764 8558
+2968 1038 1705
+10010 10110 10111
+10020 4388 10112
+3623 3630 7460
+2589 1680 8857
+10113 1419 9184
+10114 10095 10070
+7005 804 10115
+9925 10116 10117
+9545 1855 9605
+8753 4642 10118
+10119 10120 10018
+2518 5596 7439
+10073 10101 10121
+3773 9910 7539
+10024 10122 10123
+10124 10125 7628
+3347 3452 6562
+1344 264 3001
+1874 9858 9541
+9283 7444 5834
+1687 2192 383
+10057 9830 3787
+376 6371 1516
+9203 4738 9459
+8009 9801 3384
+8111 2368 10126
+10127 9255 10128
+9482 10129 5470
+3442 636 6433
+3458 8819 5410
+7356 10032 4140
+6438 5120 9805
+10036 10130 10131
+4859 3765 10132
+4952 6856 10133
+10134 9987 7035
+5752 1183 4107
+335 7546 8040
+10135 10110 10093
+9848 10042 5745
+10136 10137 5345
+1333 279 8050
+10138 10139 10044
+4490 8295 2798
+9364 10140 8386
+6846 9673 8623
+9377 10102 5075
+10099 10120 10141
+10026 10075 9316
+553 8129 9744
+5807 9258 4297
+10053 10142 10143
+3772 8571 2047
+10144 10122 10103
+6581 10145 6065
+4741 10146 465
+391 318 7138
+9511 2757 1874
+9988 5768 5163
+417 7257 8594
+10127 1512 3090
+10147 8946 9605
+2361 10030 8129
+10148 10149 10028
+8411 4169 3353
+5566 10150 9158
+10151 586 10152
+1170 3857 7239
+3299 6275 609
+10153 10130 10108
+10154 6662 8978
+7361 5293 1410
+8770 6200 9432
+9872 9183 10155
+10114 10139 10156
+3135 2696 5547
+5839 9869 2805
+10072 10157 10158
+5956 6294 5857
+10159 10142 10121
+6173 6413 4332
+10160 10161 10077
+2182 470 7294
+10162 1581 10163
+6976 902 9794
+3322 10164 2340
+10063 5778 8958
+7517 8203 9968
+10165 10166 2338
+4101 3538 6006
+8105 2629 9923
+10167 2626 6878
+6305 9138 9334
+9149 4978 10168
+5634 9805 10084
+10152 1330 2040
+10169 10170 10088
+6738 8082 10171
+10172 5226 8434
+2837 4635 2973
+3055 8255 2826
+6697 2398 3431
+10135 9874 10173
+7222 8083 8283
+5343 6951 9985
+10174 1023 1865
+10096 10175 10176
+8038 9539 9393
+10177 10157 10141
+10178 10179 10100
+4188 4242 2425
+10144 10161 10180
+6215 891 10181
+10182 10013 340
+3545 9795 2507
+10183 4946 4742
+10184 10185 8312
+7917 3384 9176
+120 7843 9749
+2316 3086 7761
+10080 2529 4343
+3929 627 5299
+4998 3622 8127
+10112 3605 10186
+8682 2195 9909
+9737 4630 4004
+7299 8732 1969
+10148 1238 10187
+5888 6194 6462
+10041 2360 8132
+691 1371 316
+10153 10170 10188
+9914 9994 9982
+8741 10189 9837
+7982 4725 3291
+3484 8251 10190
+7030 8298 6445
+9302 6771 2925
+10111 10191 10192
+7669 10193 396
+5127 10004 4525
+10194 10175 10156
+5500 10195 9675
+10196 2881 10197
+10198 10199 10119
+10159 10179 10200
+4327 779 6910
+10123 10201 10202
+4053 6332 9389
+4246 9298 5558
+8525 9576 2481
+10203 9455 10204
+9641 7400 10205
+9884 2317 1216
+10007 169 617
+1237 8612 6720
+10206 721 9678
+10207 3751 4912
+10208 10011 7346
+6167 3188 9705
+4201 10209 4255
+7493 9742 4949
+9655 3816 9530
+8719 2010 9714
+10014 7130 6947
+10131 10210 10211
+4971 8456 6281
+4217 9474 740
+10212 10191 10173
+9823 8909 4296
+6719 10213 10187
+2695 3112 1016
+10214 10215 10138
+10195 8597 10216
+5519 10217 539
+2476 9233 6307
+10177 10199 10218
+10143 10219 10220
+10106 340 2030
+9796 3419 3283
+10221 10201 10180
+10222 3834 9068
+10223 9136 3618
+7770 3931 6524
+7829 3232 10197
+10224 10225 8120
+10226 10227 2511
+2830 5355 8635
+10207 6520 5332
+9202 9819 1971
+8213 8639 10228
+10229 4097 10230
+10231 10232 5426
+7325 444 7529
+10233 10210 10188
+10118 7226 9867
+4011 4795 8599
+8618 9479 10234
+3481 10098 9129
+10235 6197 7186
+10194 10215 10236
+375 10237 9220
+10238 5656 3338
+8918 10140 9887
+10239 10060 6769
+7221 5179 10240
+10158 10241 10242
+10243 10219 10200
+10244 9995 3680
+6796 9962 7862
+1114 10065 9623
+10245 3230 5158
+10246 10247 10160
+9006 9587 1557
+156 199 6704
+6578 6666 5954
+8422 7967 10050
+4251 9911 9881
+6340 1047 1753
+6809 4099 9741
+10248 3326 9141
+6845 9402 1015
+10249 5010 4018
+9431 10250 8834
+8947 10251 4376
+10252 10062 2716
+10253 945 9596
+7350 9282 9565
+10254 10255 10169
+3591 2826 9929
+9761 4419 9313
+9903 8558 10133
+4333 5745 10256
+6031 8496 7668
+10212 9855 10257
+8685 8646 1739
+10162 9484 10205
+10176 10258 10259
+355 9460 455
+9438 6135 6895
+9785 10239 5589
+10260 10241 10218
+10261 10262 10178
+10186 10263 10264
+10221 10247 10265
+7633 3906 4497
+4243 1533 406
+10184 5316 7033
+10203 8944 2745
+8921 3511 2529
+10266 4230 6339
+10267 7741 3875
+10055 9403 10204
+10268 10269 5406
+3649 4119 6520
+4757 8648 10251
+6949 10137 9943
+5436 9886 10068
+10150 10064 2947
+1110 4030 7283
+10270 9372 1254
+10233 10255 10271
+9681 10272 8973
+2469 1483 660
+9832 4821 7541
+6163 8761 3341
+8074 9275 249
+10192 10273 10274
+9484 9856 9873
+10275 10258 10236
+5060 10276 5952
+10277 10278 10198
+4239 1870 8081
+10243 10262 10279
+9875 9591 1639
+7997 4300 6796
+10202 10280 10281
+778 1968 8785
+10282 8395 7836
+10283 10284 1960
+8576 8512 2825
+6338 10285 9963
+5147 10249 1394
+7745 2610 3145
+3026 9991 9546
+2689 10286 8508
+10287 7696 6001
+10211 10288 10289
+9575 5416 9726
+9512 9776 8885
+10115 4821 7785
+5285 1993 6857
+10290 10273 10257
+5135 5243 9569
+10244 902 10291
+10292 10293 10214
+9188 9893 4886
+9536 9878 1671
+4647 6213 1692
+10145 7065 10294
+10260 10278 10295
+10220 10296 10297
+10092 3969 7943
+10298 10280 10265
+4541 8619 7955
+10299 6649 3281
+5400 9861 6294
+10282 8537 2794
+6607 10204 3078
+948 3056 8512
+2357 7383 9325
+8208 10300 10025
+8097 7698 3157
+2817 1725 10301
+10129 1847 10302
+1722 5766 3196
+8114 759 8162
+9262 9401 7115
+4262 10294 7000
+940 7283 10229
+8195 10303 10209
+1588 5427 3993
+8766 10172 620
+10304 10288 10271
+6602 3263 58
+8342 9677 4993
+8695 4634 434
+10275 10293 10305
+9387 6670 8306
+10306 5626 10307
+10308 1763 2601
+9383 9109 10309
+8750 7315 10113
+10242 10310 10311
+2776 10312 3162
+9604 1299 9394
+10313 10296 10279
+8261 1655 7563
+10314 10315 10246
+503 3384 8042
+10316 4347 1480
+8693 10134 1990
+2569 6131 8710
+7628 10285 367
+4406 7833 1394
+8985 7208 2611
+10317 7613 5094
+7594 3700 1057
+8573 9398 2195
+10318 10319 10254
+5337 325 6643
+5464 5901 9581
+1020 10105 9972
+7260 7261 327
+10320 54 1121
+10290 8169 10321
+6941 6218 6249
+10259 10322 10323
+8854 9637 3684
+5944 3611 8289
+10264 5158 10308
+6621 9653 7104
+10324 10325 5609
+6452 8864 9449
+9759 9607 6732
+10326 10310 10295
+10327 10328 10261
+2437 7865 4648
+10298 10315 10329
+10330 173 9465
+10331 3888 10193
+8843 2208 6824
+7382 6007 2582
+7704 966 3569
+10332 7932 2953
+10165 3449 9242
+198 2076 2439
+5742 7854 10276
+8702 10125 8498
+10333 10334 10335
+3501 10336 9246
+1894 9662 8041
+10304 10319 10337
+10274 10338 10339
+6150 9839 874
+2149 4042 3394
+10340 10322 10305
+10341 579 10051
+5123 8852 2307
+9563 7942 161
+3416 1626 1721
+4103 10342 8373
+10343 10344 10277
+10313 10328 10345
+10346 8284 1243
+10281 10347 10348
+10349 10316 5654
+10350 6362 8759
+9656 7351 8522
+10058 10222 2996
+2995 973 10351
+5266 7274 1882
+10217 7197 9574
+1587 10352 960
+10047 1024 1866
+1728 9055 158
+7540 9015 9299
+10353 9584 9453
+10289 10354 10355
+10356 10357 2
+1801 297 8999
+10358 10359 9492
+10002 10166 10360
+9212 1989 4211
+10361 10338 10321
+5446 7952 4665
+10362 10225 10363
+7244 4944 1155
+10364 9046 5326
+2975 9750 5355
+10365 10366 10292
+2409 8209 9831
+10227 1439 499
+10367 7154 10149
+10368 10369 1921
+10326 10344 10370
+7006 6463 9953
+10297 10371 10372
+595 9231 4138
+10373 10347 10329
+10269 10374 4275
+8075 10375 6160
+6342 6135 7622
+4838 7369 2137
+10376 970 1555
+10232 8034 9072
+10377 10378 7477
+7902 2944 3216
+1889 2003 1054
+4201 9070 9936
+10379 2036 212
+10380 10354 10337
+4141 4189 2736
+10381 7045 6511
+3268 4885 227
+5192 4376 9245
+7714 3232 1636
+10340 10366 10382
+10126 5314 5273
+9687 2548 6987
+2780 6426 9391
+7880 2063 5175
+2490 6440 7553
+7150 7322 2839
+10311 10383 10384
+10385 10371 10345
+10386 10056 3079
+4972 9075 1299
+5411 10387 2473
+10388 10389 10314
+3521 4388 4329
+8908 6089 6995
+10390 2649 7369
+9781 9965 8055
+10391 5014 299
+7523 10291 3972
+8385 8919 423
+3780 10317 627
+7248 8124 5806
+10303 469 9
+10392 10393 10318
+10067 2890 3100
+10394 10395 6994
+8507 1286 3366
+10361 6902 10396
+4671 2082 4449
+10323 10397 10398
+10399 10400 3
+6120 10238 4386
+7553 9958 726
+10401 2770 10369
+10402 10383 10370
+8743 7894 1423
+10403 10404 10327
+9417 1008 8748
+8170 9854 8795
+10387 9589 5796
+10405 9163 1062
+10373 10389 10406
+10376 765 10182
+10350 6824 885
+6620 6261 4065
+8998 6995 10395
+4270 472 7667
+10094 10245 10263
+6369 6318 10224
+9379 5470 7616
+4974 9131 9818
+9668 9494 2652
+8218 8393 127
+9710 4614 8673
+955 8472 10407
+4703 5657 8720
+10380 10393 10408
+10339 10409 10410
+8011 9899 8734
+10411 6631 7853
+7677 1067 7335
+1872 5386 6002
+10412 10397 10382
+3882 9429 4014
+6516 10081 624
+10248 1702 330
+10413 8066 10374
+10414 10415 10343
+10385 10404 10416
+9947 4170 3963
+9933 3234 5129
+2330 1639 9483
+10348 10417 10418
+10419 8402 5361
+2718 10375 517
+10299 8019 9489
+10420 5885 10155
+4295 10240 6495
+9506 10167 790
+10421 10223 3288
+10016 7839 1042
+9981 9507 10422
+7995 4146 4371
+6717 4437 5263
+8806 8897 7252
+10423 6645 8407
+10424 4861 6310
+8310 6556 5324
+3213 10425 9937
+8789 9777 10146
+10355 10426 10427
+9022 10428 4748
+10429 10409 10396
+10034 10171 10430
+9977 9766 1633
+6 10431 7931
+10432 10433 10365
+4621 7364 2911
+9509 2448 8122
+8883 9192 9454
+10402 10415 10434
+10372 10435 10436
+10272 5606 192
+6331 4161 10164
+10437 10417 10406
+10419 2106 9758
+1380 10332 7274
+5603 10438 2829
+776 7717 640
+6155 2373 9148
+10439 10267 4630
+10440 6178 6884
+10312 10421 205
+10367 10213 2728
+7009 6066 10441
+10442 5667 8897
+6528 10031 748
+6049 1614 7052
+9716 1582 7400
+1220 1129 8352
+10443 10426 10408
+5557 10154 3083
+10444 10228 6964
+10445 1648 9786
+4390 10333 10075
+2690 3009 7576
+10446 9613 8890
+1106 10447 1205
+494 2061 10431
+10412 10433 10448
+10256 5589 4967
+9957 1036 4235
+43 834 8087
+10384 10449 10450
+8249 10352 10394
+2495 1376 10451
+10452 10435 10416
+10453 9549 10090
+10454 6685 4781
+10455 10456 10388
+10061 10457 23
+1990 1900 10458
+10438 5903 5432
+7298 86 8733
+6250 1671 8956
+690 10459 10038
+4922 10460 4165
+5655 8647 849
+4792 6378 9708
+9966 9504 6977
+9691 7963 4302
+5912 10368 384
+9764 6512 9009
+2055 2281 5981
+3246 10181 3743
+10461 10336 4745
+5001 3898 3883
+10462 10463 10392
+4875 10075 10300
+2179 1951 2045
+2697 3525 8220
+10429 5770 10464
+9043 4015 9669
+8982 2187 1234
+10447 1874 9498
+10398 10465 10466
+8652 3449 9356
+8977 8439 168
+6831 9944 9846
+8596 539 9517
+10467 10449 10434
+9160 508 1665
+9697 2043 5738
+10468 10469 10403
+10453 75 9228
+9442 8973 9092
+9711 7526 5803
+10437 10456 10470
+8632 9156 3466
+10458 3198 1988
+10027 3618 10341
+6314 3020 3821
+10460 6832 7137
+835 849 9005
+10471 5951 3156
+5516 7700 5732
+3944 10472 2337
+88 194 5390
+4879 8229 10266
+4353 10400 10208
+10423 10325 7491
+10443 10463 10473
+10309 3954 10235
+7840 2160 3600
+3248 599 8435
+8550 5861 10039
+10410 10474 10475
+3393 8966 720
+10476 749 10334
+8304 10477 875
+2742 9159 5822
+7650 1101 3122
+10478 10465 10448
+5272 10479 2534
+10480 10481 10414
+10085 7607 4899
+10452 10469 10482
+9030 9894 8365
+9599 654 8383
+10364 1313 5486
+10418 10483 10484
+1528 6474 184
+7621 6118 9296
+6532 8869 5946
+8094 2542 9537
+3027 9461 8019
+10485 3721 10486
+7828 421 7345
+7944 6468 9701
+5109 8066 2531
+10487 7713 10439
+117 856 8928
+10136 6399 6919
+10472 10444 3447
+9934 3275 4251
+8534 10441 8431
+7897 405 8088
+9445 6632 6214
+10427 10488 10489
+10445 3373 8585
+6256 3945 10490
+10491 10474 10464
+3476 10359 10168
+4502 3000 10459
+10492 10493 10432
+8500 9524 10116
+10467 10481 10494
+3861 7017 3494
+10495 6692 9644
+10436 10496 10497
+8457 8933 1592
+9347 3724 704
+360 1301 4149
+10498 10483 10470
+10183 467 4662
+6025 8313 6367
+6663 7387 2031
+481 5361 3219
+6748 8211 627
+6335 6450 1360
+10499 9014 6950
+9290 5744 10422
+7375 1161 10151
+2169 8746 9608
+8581 1224 10189
+10353 2024 10457
+4462 247 6460
+9938 8407 8768
+10091 10440 5672
+10500 10488 10473
+6891 139 1421
+2422 10270 8177
+10306 5819 8427
+10501 666 9769
+8602 3600 9799
+10320 8902 9018
+7482 946 9277
+10478 10493 10502
+6187 5497 8024
+4619 10503 7593
+6317 7614 6355
+7259 5038 6655
+9820 1972 9219
+10450 10504 10505
+8708 611 9133
+7112 1822 10495
+10506 10496 10482
+2287 2419 9932
+3919 10231 3683
+3614 3425 8143
+1050 2231 3965
+10507 10508 10455
+466 9778 4828
+4346 10268 8416
+8526 3321 7290
+1719 1972 1258
+10442 8524 5858
+7592 5727 4620
+10509 7233 10485
+10379 8103 2104
+2241 3399 10185
+5899 6175 3473
+1649 9969 297
+8808 1297 4208
+5013 5363 2987
+3371 6413 9162
+6785 1708 8421
+10510 10511 10462
+6828 4592 5554
+7132 10076 7075
+10501 10512 9349
+5074 5233 5282
+10491 3895 10513
+8953 3830 2499
+10514 1404 6600
+8884 1511 8777
+7417 6508 8428
+10515 162 7941
+10466 10516 10517
+6283 8508 10012
+8113 9826 8571
+10324 3297 7408
+9153 10518 9812
+1871 4238 3926
+10519 10504 10494
+8328 9952 2180
+10520 10521 10468
+3376 5129 3435
+3910 1846 3730
+361 3379 2675
+10498 10508 10522
+8861 6042 10301
+8285 10025 10335
+1373 427 1180
+5717 8600 10523
+10346 506 2326
+9767 10430 4569
+9473 3289 1119
+9566 9284 5833
+10500 10511 10524
+225 150 9735
+8683 10206 479
+7793 8636 10351
+138 10454 1953
+10475 10525 10526
+8473 10107 8813
+10476 7699 7899
+1303 299 10420
+1009 6372 1816
+8686 10527 1702
+5706 7531 5097
+10528 10516 10502
+4848 6563 2816
+2885 6858 10529
+9853 8287 162
+7874 7463 10530
+10531 10532 10480
+10506 10521 10533
+10413 5146 2532
+8188 10349 5306
+901 5036 5560
+6628 10086 2219
+10484 10534 10535
+2725 5832 387
+10097 7571 9609
+7697 113 9514
+1279 846 1372
+7970 7297 7307
+10471 2308 10536
+10537 9915 9828
+10461 6460 2596
+185 10363 349
+10489 10538 10539
+4145 7534 4372
+6812 10503 237
+3671 4454 3050
+10540 10525 10513
+6701 8288 9267
+1598 7899 7705
+858 10399 10357
+9101 3494 8543
+7081 10541 9131
+10542 10543 10492
+10544 2365 3588
+5061 10536 8852
+10287 1515 3626
+7462 7863 9688
+10519 10532 10545
+2886 9800 5411
+10497 10546 10547
+10548 10534 10522
+4240 5548 5180
+4677 6355 6078
+10490 1062 6171
+317 3079 10204
+4225 10284 8144
+9920 10069 536
+6683 696 1482
+8185 943 10104
+7284 10132 7061
+348 4803 3392
+9548 1878 1968
+10549 10538 10524
+7428 958 4769
+9596 10550 10512
+7072 2675 8627
+6041 9809 2305
+10033 6016 3570
+2958 7057 5002
+4653 2162 1313
+8329 1768 3973
+10551 6681 2174
+10528 10543 10552
+9308 8341 9864
+108 10196 281
+4186 9551 8340
+10331 4463 4790
+10553 3663 1351
+3074 4110 7910
+7088 3400 7670
+10505 10554 10555
+9508 1034 358
+4711 3683 1590
+10082 2752 8940
+10556 10546 10533
+10557 10558 10507
+8508 10559 2859
+10405 3945 9084
+7790 583 5371
+5383 306 4693
+1416 8577 4190
+5495 7822 9772
+8536 8782 10425
+7494 5228 8449
+842 8671 4844
+4323 10428 7900
+10560 3532 9035
+10561 10562 10510
+10563 8046 2889
+9278 9765 9367
+10564 23 10565
+10550 867 1906
+9342 4910 5461
+1835 8032 8031
+10540 5535 10566
+8776 10530 5357
+9989 6485 6476
+10517 10567 10568
+7389 3839 6990
+10128 6676 1511
+10358 9572 9150
+4134 5841 3409
+10569 10554 10545
+5004 6540 1841
+10570 10571 10520
+10572 9706 10283
+9271 4844 9924
+10548 10558 10573
+10477 10559 5711
+426 10386 1180
+2418 10451 9240
+9788 5237 4294
+2938 5274 5313
+4774 9990 10226
+805 10574 3459
+5381 10117 9523
+1733 8225 8816
+6288 5998 8722
+8047 5098 2271
+7792 3133 10544
+9803 2877 10330
+10046 6644 4340
+10549 10562 10575
+8756 479 9450
+9819 10541 1972
+10576 5599 7191
+1921 10577 6086
+10578 211 1172
+2615 5529 7317
+10526 10579 10580
+8243 10581 8611
+10174 6140 1383
+8357 8337 9352
+10582 10567 10552
+2255 1392 4087
+5157 3603 10263
+10583 10584 10531
+6251 1025 10390
+1167 1262 4083
+10556 10571 10585
+4593 10572 8299
+10535 10586 10587
+9291 8939 8911
+3981 10230 329
+6935 5505 9555
+10588 10565 2024
+10109 1893 10574
+10190 9510 2308
+1035 6201 8769
+7753 9635 9863
+9676 10216 5993
+5712 10286 962
+10539 10589 19
+10499 9942 6292
+6510 7214 9860
+10590 7105 7516
+10578 8031 8104
+6424 9154 9464
+10591 10579 10566
+7483 10523 9301
+7994 3885 952
+10514 60 6985
+5569 4684 10592
+66 10593 10542
+9559 2488 9588
+843 2128 1023
+7521 2022 269
+2118 8973 90
+10569 10584 10594
+1456 4223 83
+2319 4477 5915
+10547 10595 91
+10596 10586 10573
+10515 5785 7538
+9196 685 558
+1453 1628 8537
+7077 6355 10302
+10163 5807 7869
+10509 1960 4225
+7426 1985 7719
+697 9522 7807
+8353 10407 5451
+5412 10597 8731
+10537 1430 9680
+4098 796 7002
+10391 1305 10560
+6138 10074 10025
+10598 10589 10575
+8426 9961 7971
+5042 1442 10518
+10401 4927 4485
+10564 8644 10147
+10253 9769 1293
+7890 9593 2346
+10582 10593 10599
+1794 9890 5689
+5100 10263 10553
+1585 9251 8338
+10555 10600 181
+10601 10411 10252
+10602 558 7638
+10603 10595 10585
+197 10604 10557
+5663 1564 4151
+10605 1266 10602
+787 6873 970
+9718 5651 7986
+8518 10551 4080
+8346 9603 9652
+8709 535 4860
+8186 3947 199
+9634 10307 982
+10381 9859 4813
+10606 8853 9974
+230 10607 10561
+10446 3205 347
+10608 1738 111
+5814 8707 2563
+10591 9844 48
+3116 9061 7769
+2323 980 5472
+38 6282 10237
+10568 10609 251
+7665 9917 9122
+176 1772 10124
+7823 6186 5570
+7480 10529 7117
+79 10600 10594
+10008 2032 8194
+10601 804 4820
+1710 6723 10605
+272 10610 10570
+10596 10604 102
+10362 6474 1527
+9955 9978 5548
+5787 4318 5726
+10360 1145 8249
+1667 2619 10597
+10487 4517 698
+10424 7052 1686
+10563 9986 1507
+2856 2998 9427
+3117 559 1505
+4751 859 10356
+6849 10606 6463
+10598 10607 133
+10590 4727 7087
+4263 10577 2770
+10608 331 10527
+6290 6920 10581
+10580 47 332
+2432 2841 1298
+10342 10592 9036
+3568 3886 3178
+2590 10479 497
+5894 1520 10234
+165 10609 10599
+5368 456 10250
+8610 4599 9898
+370 80 10583
+5308 8299 10486
+8773 8702 7649
+10603 10610 191
+7466 9580 10588
+1450 8160 7834
+1799 6027 1002
+10587 101 378
+4081 2174 10576
+9979 4185 943
+2257 7008 60
+3560 2267 5788
+3171 9810 6783
+1173 2870 4870
diff --git a/test/boolean/Makefile.am b/test/boolean/Makefile.am
new file mode 100644
index 0000000..da3c974
--- /dev/null
+++ b/test/boolean/Makefile.am
@@ -0,0 +1,73 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\
+	 -DG_LOG_DOMAIN=\"Gts-test\"
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+check_PROGRAMS = set boole
+
+## Basic tests
+TESTS = set_t1_t2.sh \
+	set_t1_t3.sh \
+	set_t1_t4.sh \
+	set_t1_t5.sh \
+	set_t1_t6.sh \
+	set_t1_t7.sh \
+	set_t1_t9.sh \
+	set_t1_t10.sh \
+	set_t1_t11.sh \
+	set_t1_t12.sh \
+	set_t1_t13.sh \
+	set_t14_t15.sh \
+	set_t11_t16.sh \
+	set_t17_t18.sh \
+	set_t19_t20.sh \
+	set_t19_t21.sh \
+## Various cubes
+	set_cube_cube2.sh \
+	set_cube_cube1.sh \
+	set_t1_t22.sh \
+	set_t1_t23.sh \
+	set_t1_t24.sh \
+	set_t27_t28.sh \
+## Boolean operations
+	boole_cube_cube1.sh \
+	boole_cube_cube5.sh \
+## Floating point problems
+	set_t25_t26.sh \
+## Coincident faces
+	set_cube_cube4.sh \
+## Rotated cube cube1 (touching faces)
+	set_cube6_cube7.sh \
+## Coincident faces (tetrahedra by T. Binder)
+	set_loc1_loc2.sh \
+## Coincident faces (again by T. Binder)
+	set_p1_p2.sh \
+## Menger sponge (by B. Petit)
+	set_sponge_cutter.sh \
+## cylinders (by Darie Aron)
+	set_1_2.sh
+
+XFAIL_TESTS = set_t25_t26.sh set_cube_cube4.sh set_cube6_cube7.sh set_loc1_loc2.sh set_p1_p2.sh set_sponge_cutter.sh set_1_2.sh
+
+EXTRA_DIST = t1 t2 t3 t4 t5 t6 t7 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 \
+	t20 t21 t22 t23 t24 t25 t26 t27 t28 cube cube1 cube2 cube4 cube5 cube6 cube7 \
+	loc1 loc2 \
+	p1 p2 \
+	sponge cutter \
+	1.gts 2.gts \
+	$(TESTS) \
+	set_t1_t2 set_t1_t3 set_t1_t4 set_t1_t5 set_t1_t6 set_t1_t7 set_t1_t9 \
+	set_t1_t10 set_t1_t11 set_t1_t12 set_t1_t13 set_t14_t15 set_t11_t16 \
+	set_t17_t18 set_t19_t20 set_t19_t21 \
+	set_cube_cube2 set_cube_cube1 \
+	set_t1_t22 set_t1_t23 set_t1_t24 boole_cube_cube1 boole_cube_cube5 \
+	set.sh boole.sh \
+	set_t27_t28 set_loc1_loc2.sh set_p1_p2.sh set_sponge_cutter.sh \
+	set_1_2.sh
+
+test-cleanup:
+	rm -f errors
+
+check-TESTS: test-cleanup
diff --git a/test/boolean/Makefile.in b/test/boolean/Makefile.in
new file mode 100644
index 0000000..eee1a60
--- /dev/null
+++ b/test/boolean/Makefile.in
@@ -0,0 +1,360 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) 	 -DG_LOG_DOMAIN=\"Gts-test\"
+
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+check_PROGRAMS = set boole
+
+TESTS = set_t1_t2.sh 	set_t1_t3.sh 	set_t1_t4.sh 	set_t1_t5.sh 	set_t1_t6.sh 	set_t1_t7.sh 	set_t1_t9.sh 	set_t1_t10.sh 	set_t1_t11.sh 	set_t1_t12.sh 	set_t1_t13.sh 	set_t14_t15.sh 	set_t11_t16.sh 	set_t17_t18.sh 	set_t19_t20.sh 	set_t19_t21.sh 	set_cube_cube2.sh 	set_cube_cube1.sh 	set_t1_t22.sh 	set_t1_t23.sh 	set_t1_t24.sh 	set_t27_t28.sh 	boole_cube_cube1.sh 	boole_cube_cube5.sh 	set_t25_t26.sh 	set_cube_cube4.sh 	set_cube6_cube7.sh 	set_loc1_loc2.sh 	set_p1_p2.sh 	set_sponge_cutter. [...]
+
+
+XFAIL_TESTS = set_t25_t26.sh set_cube_cube4.sh set_cube6_cube7.sh set_loc1_loc2.sh set_p1_p2.sh set_sponge_cutter.sh set_1_2.sh
+
+EXTRA_DIST = t1 t2 t3 t4 t5 t6 t7 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 	t20 t21 t22 t23 t24 t25 t26 t27 t28 cube cube1 cube2 cube4 cube5 cube6 cube7 	loc1 loc2 	p1 p2 	sponge cutter 	1.gts 2.gts 	$(TESTS) 	set_t1_t2 set_t1_t3 set_t1_t4 set_t1_t5 set_t1_t6 set_t1_t7 set_t1_t9 	set_t1_t10 set_t1_t11 set_t1_t12 set_t1_t13 set_t14_t15 set_t11_t16 	set_t17_t18 set_t19_t20 set_t19_t21 	set_cube_cube2 set_cube_cube1 	set_t1_t22 set_t1_t23 set_t1_t24 boole_cube_cube1 boole_cube_cube5 	set. [...]
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+LIBS = @LIBS@
+set_SOURCES = set.c
+set_OBJECTS =  set.o
+set_LDADD = $(LDADD)
+set_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+set_LDFLAGS = 
+boole_SOURCES = boole.c
+boole_OBJECTS =  boole.o
+boole_LDADD = $(LDADD)
+boole_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+boole_LDFLAGS = 
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = set.c boole.c
+OBJECTS = set.o boole.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/boolean/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-checkPROGRAMS:
+
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+distclean-checkPROGRAMS:
+
+maintainer-clean-checkPROGRAMS:
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+set: $(set_OBJECTS) $(set_DEPENDENCIES)
+	@rm -f set
+	$(LINK) $(set_LDFLAGS) $(set_OBJECTS) $(set_LDADD) $(LIBS)
+
+boole: $(boole_OBJECTS) $(boole_DEPENDENCIES)
+	@rm -f boole
+	$(LINK) $(boole_LDFLAGS) $(boole_OBJECTS) $(boole_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = test/boolean
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+boole.o: boole.c ../../src/gts.h ../../src/gtsconfig.h
+set.o: set.c ../../src/gts.h ../../src/gtsconfig.h
+
+check-TESTS: $(TESTS)
+	@failed=0; all=0; \
+	srcdir=$(srcdir); export srcdir; \
+	for tst in $(TESTS); do \
+	  if test -f $$tst; then dir=.; \
+	  else dir="$(srcdir)"; fi; \
+	  if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+	    all=`expr $$all + 1`; \
+	    echo "PASS: $$tst"; \
+	  elif test $$? -ne 77; then \
+	    all=`expr $$all + 1`; \
+	    failed=`expr $$failed + 1`; \
+	    echo "FAIL: $$tst"; \
+	  fi; \
+	done; \
+	if test "$$failed" -eq 0; then \
+	  banner="All $$all tests passed"; \
+	else \
+	  banner="$$failed of $$all tests failed"; \
+	fi; \
+	dashes=`echo "$$banner" | sed s/./=/g`; \
+	echo "$$dashes"; \
+	echo "$$banner"; \
+	echo "$$dashes"; \
+	test "$$failed" -eq 0
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-checkPROGRAMS mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-checkPROGRAMS clean-compile clean-libtool clean-tags \
+		clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-checkPROGRAMS distclean-compile \
+		distclean-libtool distclean-tags distclean-generic \
+		clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-checkPROGRAMS \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-checkPROGRAMS distclean-checkPROGRAMS \
+clean-checkPROGRAMS maintainer-clean-checkPROGRAMS mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir check-TESTS info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+test-cleanup:
+	rm -f errors
+
+check-TESTS: test-cleanup
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/boolean/boole.c b/test/boolean/boole.c
new file mode 100644
index 0000000..1abb429
--- /dev/null
+++ b/test/boolean/boole.c
@@ -0,0 +1,169 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "gts.h"
+
+static void prepend_triangle_bbox (GtsTriangle * t, GSList ** bboxes)
+{
+  *bboxes = g_slist_prepend (*bboxes, 
+			     gts_bbox_triangle (gts_bbox_class (), t));
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s1, * s2;
+  GtsSurface * s1out2, * s1in2, * s2out1, * s2in1;
+  GtsSurfaceInter * si;
+  GNode * tree1, * tree2;
+  GSList * bboxes;
+  FILE * fp;
+  guint line;
+
+  if (argc != 3) {
+    fprintf (stderr, 
+	     "%s: test boolean operations between surfaces\n"
+	     "usage: %s FILE1 FILE2\n",
+	     argv[0], argv[0]);
+    return 1;
+  }
+
+  /* open first file */
+  if ((fp = fopen (argv[1], "rt")) == NULL) {
+    fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[2]);
+    return 1;
+  }
+  /* reads in first surface file */
+  s1 = gts_surface_new (gts_surface_class (),
+			GTS_FACE_CLASS (gts_nface_class ()),
+			GTS_EDGE_CLASS (gts_nedge_class ()),
+			GTS_VERTEX_CLASS (gts_nvertex_class ()));
+  if ((line = gts_surface_read (s1, fp))) {
+    fprintf (stderr, "%s: `%s' is not a valid GTS surface file\n", 
+	     argv[0], argv[1]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+  fclose (fp);
+
+ /* open second file */
+  if ((fp = fopen (argv[2], "rt")) == NULL) {
+    fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[3]);
+    return 1;
+  }
+  /* reads in second surface file */
+  s2 = gts_surface_new (gts_surface_class (),
+			GTS_FACE_CLASS (gts_nface_class ()),
+			GTS_EDGE_CLASS (gts_nedge_class ()),
+			GTS_VERTEX_CLASS (gts_nvertex_class ()));
+  if ((line = gts_surface_read (s2, fp))) {
+    fprintf (stderr, "%s: `%s' is not a valid GTS surface file\n", 
+	     argv[0], argv[2]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+  fclose (fp);
+
+  /* display summary information about both surfaces */
+#if 0
+  gts_surface_print_stats (s1, stderr);
+  gts_surface_print_stats (s2, stderr);
+#endif
+
+  /* build bounding boxes for first surface */
+  bboxes = NULL;
+  gts_surface_foreach_face (s1, (GtsFunc) prepend_triangle_bbox, &bboxes);
+  /* build bounding box tree for first surface */
+  tree1 = gts_bb_tree_new (bboxes);
+  /* free list of bboxes */
+  g_slist_free (bboxes);
+
+  /* build bounding boxes for second surface */
+  bboxes = NULL;
+  gts_surface_foreach_face (s2, (GtsFunc) prepend_triangle_bbox, &bboxes);
+  /* build bounding box tree for second surface */
+  tree2 = gts_bb_tree_new (bboxes);
+  /* free list of bboxes */
+  g_slist_free (bboxes);
+
+  si = gts_surface_inter_new (gts_surface_inter_class (), 
+			      s1, s2, tree1, tree2);
+
+  s1out2 = gts_surface_new (gts_surface_class (),
+			    gts_face_class (),
+			    gts_edge_class (),
+			    gts_vertex_class ());
+  gts_surface_inter_boolean (si, s1out2, GTS_1_OUT_2);
+  gts_surface_print_stats (s1out2, stderr);
+
+  s1in2 = gts_surface_new (gts_surface_class (),
+			   gts_face_class (),
+			   gts_edge_class (),
+			   gts_vertex_class ());
+  gts_surface_inter_boolean (si, s1in2, GTS_1_IN_2);
+  gts_surface_print_stats (s1in2, stderr);
+
+  s2out1 = gts_surface_new (gts_surface_class (),
+			    gts_face_class (),
+			    gts_edge_class (),
+			    gts_vertex_class ());
+  gts_surface_inter_boolean (si, s2out1, GTS_2_OUT_1);
+  gts_surface_print_stats (s2out1, stderr);
+
+  s2in1 = gts_surface_new (gts_surface_class (),
+			   gts_face_class (),
+			   gts_edge_class (),
+			   gts_vertex_class ());
+  gts_surface_inter_boolean (si, s2in1, GTS_2_IN_1);
+  gts_surface_print_stats (s2in1, stderr);
+
+  printf ("(geometry \"1out2\" { =\n");
+  gts_surface_write_oogl (s1out2, stdout);
+  printf ("})\n"
+	  "(normalization \"1out2\" none)\n");
+
+  printf ("(geometry \"1in2\" { =\n");
+  gts_surface_write_oogl (s1in2, stdout);
+  printf ("})\n"
+	  "(normalization \"1in2\" none)\n");
+
+  printf ("(geometry \"2out1\" { =\n");
+  gts_surface_write_oogl (s2out1, stdout);
+  printf ("})\n"
+	  "(normalization \"2out1\" none)\n");
+
+  printf ("(geometry \"2in1\" { =\n");
+  gts_surface_write_oogl (s2in1, stdout);
+  printf ("})\n"
+	  "(normalization \"2in1\" none)\n");
+
+  g_assert (gts_surface_inter_check (si));
+
+  /* destroy surfaces and intersection */
+  gts_object_destroy (GTS_OBJECT (s1));
+  gts_object_destroy (GTS_OBJECT (s2));
+  gts_object_destroy (GTS_OBJECT (si));
+
+  /* destroy bounding box trees (including bounding boxes) */
+  gts_bb_tree_destroy (tree1, TRUE);
+  gts_bb_tree_destroy (tree2, TRUE);  
+
+  return 0;
+}
diff --git a/test/boolean/boole.sh b/test/boolean/boole.sh
new file mode 100755
index 0000000..3f55ddf
--- /dev/null
+++ b/test/boolean/boole.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+if ./boole $1 $2 2> log > /dev/null; then
+    :
+else
+    echo "======== boole $1 $2 ========" >> errors
+    cat log >> errors
+    rm -f log
+    exit 0
+fi
+if diff log boole_$1_$2 > /dev/null; then
+    :
+else
+    echo "======== boole $1 $2 ========" >> errors
+    cat log >> errors
+    rm -f log
+    exit 0
+fi
+rm -f log
+exit 1
diff --git a/test/boolean/boole_cube_cube1 b/test/boolean/boole_cube_cube1
new file mode 100644
index 0000000..d520546
--- /dev/null
+++ b/test/boolean/boole_cube_cube1
@@ -0,0 +1,52 @@
+# vertices: 8 edges: 17 faces: 10
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 4
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 4 mean: 4.25 | 0.433013 max: 5
+#   faces per edge: min: 1 mean: 1.76471 | 0.424183 max: 2
+# Geometric statistics
+#   face quality: min: 0.940974 mean: 0.94162 | 0.00129156 max: 0.944203
+#   face area  : min: 2.66666 mean: 2.98563 | 0.159488 max: 3.06538
+#   edge length : min: 2.3094 mean: 2.73144 | 0.497814 max: 3.51863
+# vertices: 4 edges: 5 faces: 2
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 4
+#   duplicate edges: 1
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 2.5 | 0.5 max: 3
+#   faces per edge: min: 1 mean: 1.2 | 0.4 max: 2
+# Geometric statistics
+#   face quality: min: 0.944203 mean: 0.944203 | 6.08931e-09 max: 0.944203
+#   face area  : min: 2.66666 mean: 2.66666 | 8.78608e-09 max: 2.66666
+#   edge length : min: 2.3094 mean: 2.50071 | 0.382633 max: 3.26598
+# vertices: 8 edges: 17 faces: 10
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 4
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 4 mean: 4.25 | 0.433013 max: 5
+#   faces per edge: min: 1 mean: 1.76471 | 0.424183 max: 2
+# Geometric statistics
+#   face quality: min: 0.944163 mean: 0.944171 | 1.5889e-05 max: 0.944203
+#   face area  : min: 2.66666 mean: 2.69982 | 0.016583 max: 2.70811
+#   edge length : min: 2.3094 mean: 2.60519 | 0.439964 max: 3.29147
+# vertices: 4 edges: 5 faces: 2
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 4
+#   duplicate edges: 1
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 2.5 | 0.5 max: 3
+#   faces per edge: min: 1 mean: 1.2 | 0.4 max: 2
+# Geometric statistics
+#   face quality: min: 0.944203 mean: 0.944203 | 6.08931e-09 max: 0.944203
+#   face area  : min: 2.66666 mean: 2.66666 | 8.78608e-09 max: 2.66666
+#   edge length : min: 2.3094 mean: 2.50071 | 0.382633 max: 3.26598
diff --git a/test/boolean/boole_cube_cube1.sh b/test/boolean/boole_cube_cube1.sh
new file mode 100755
index 0000000..5a81fdf
--- /dev/null
+++ b/test/boolean/boole_cube_cube1.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./boole.sh cube cube1; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/boole_cube_cube5 b/test/boolean/boole_cube_cube5
new file mode 100644
index 0000000..0041628
--- /dev/null
+++ b/test/boolean/boole_cube_cube5
@@ -0,0 +1,52 @@
+# vertices: 16 edges: 37 faces: 22
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 3 mean: 4.625 | 1.49478 max: 7
+#   faces per edge: min: 1 mean: 1.78378 | 0.411663 max: 2
+# Geometric statistics
+#   face quality: min: 0.683271 mean: 0.801034 | 0.12834 max: 0.944203
+#   face area  : min: 0.0891777 mean: 1.50862 | 1.35899 max: 3.06538
+#   edge length : min: 0.398478 mean: 1.74521 | 1.01006 max: 3.51863
+# vertices: 8 edges: 13 faces: 6
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 3.25 | 0.829156 max: 4
+#   faces per edge: min: 1 mean: 1.38462 | 0.486504 max: 2
+# Geometric statistics
+#   face quality: min: 0.584589 mean: 0.751386 | 0.118678 max: 0.85094
+#   face area  : min: 0.202374 mean: 0.333333 | 0.133073 max: 0.515859
+#   edge length : min: 0.398478 mean: 1.02472 | 0.522984 max: 2
+# vertices: 12 edges: 25 faces: 14
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 3 mean: 4.16667 | 1.06719 max: 6
+#   faces per edge: min: 1 mean: 1.68 | 0.466476 max: 2
+# Geometric statistics
+#   face quality: min: 0.85891 mean: 0.922849 | 0.0413042 max: 0.960353
+#   face area  : min: 0.168417 mean: 0.48441 | 0.266535 max: 1
+#   edge length : min: 0.398478 mean: 1.02875 | 0.381584 max: 2
+# vertices: 12 edges: 25 faces: 14
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 3 mean: 4.16667 | 1.06719 max: 6
+#   faces per edge: min: 1 mean: 1.68 | 0.466476 max: 2
+# Geometric statistics
+#   face quality: min: 0.629606 mean: 0.828704 | 0.130466 max: 0.944203
+#   face area  : min: 0.429301 mean: 1.01349 | 0.41683 max: 1.5236
+#   edge length : min: 0.398478 mean: 1.60904 | 0.707443 max: 2.38211
diff --git a/test/boolean/boole_cube_cube5.sh b/test/boolean/boole_cube_cube5.sh
new file mode 100755
index 0000000..7e7e13a
--- /dev/null
+++ b/test/boolean/boole_cube_cube5.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./boole.sh cube cube5; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/cube b/test/boolean/cube
new file mode 100644
index 0000000..c765694
--- /dev/null
+++ b/test/boolean/cube
@@ -0,0 +1,39 @@
+8 18 12
+0 -1.63299 -1.5
+-1.63299 0 -1.5
+0 1.63299 -1.5
+1.63299 0 -1.5
+0 -1.63299 1.1547
+-1.63299 0 1.1547
+0 1.63299 1.1547
+1.63299 0 1.1547
+3 1
+2 1
+6 1
+2 6
+2 7
+3 2
+3 7
+3 8
+4 3
+4 8
+5 1
+4 5
+1 4
+6 5
+7 6
+5 8
+7 5
+8 7
+9 13 1
+6 1 2
+4 2 3
+14 3 11
+4 15 5
+6 5 7
+7 18 8
+9 8 10
+10 16 12
+13 12 11
+15 14 17
+18 17 16
diff --git a/test/boolean/cube1 b/test/boolean/cube1
new file mode 100644
index 0000000..e4ba56d
--- /dev/null
+++ b/test/boolean/cube1
@@ -0,0 +1,39 @@
+8 18 12
+0 -1.63299 1.1547
+-1.63299 0 1.1547
+0 1.63299 1.1547
+1.63299 0 1.1547
+0 -1.63299 3.5
+-1.63299 0 3.5
+0 1.63299 3.5
+1.63299 0 3.5
+3 1
+2 1
+6 1
+2 6
+2 7
+3 2
+3 7
+3 8
+4 3
+4 8
+5 1
+4 5
+1 4
+6 5
+7 6
+5 8
+7 5
+8 7
+9 13 1
+6 1 2
+4 2 3
+14 3 11
+4 15 5
+6 5 7
+7 18 8
+9 8 10
+10 16 12
+13 12 11
+15 14 17
+18 17 16
diff --git a/test/boolean/cube2 b/test/boolean/cube2
new file mode 100644
index 0000000..31b6714
--- /dev/null
+++ b/test/boolean/cube2
@@ -0,0 +1,39 @@
+8 18 12
+8 0 0
+0 0 0
+0 1 0
+8 1 0
+8 0 10
+0 0 10
+0 1 10
+8 1 10
+3 1
+2 1
+6 1
+2 6
+2 7
+3 2
+3 7
+3 8
+4 3
+4 8
+5 1
+4 5
+1 4
+6 5
+7 6
+5 8
+7 5
+8 7
+9 13 1
+6 1 2
+4 2 3
+14 3 11
+4 15 5
+6 5 7
+7 18 8
+9 8 10
+10 16 12
+13 12 11
+15 14 17
+18 17 16
diff --git a/test/boolean/cube4 b/test/boolean/cube4
new file mode 100644
index 0000000..a864c6f
--- /dev/null
+++ b/test/boolean/cube4
@@ -0,0 +1,39 @@
+8 18 12
+0 -1.63299 -2
+-1.63299 0 -2
+0 1.63299 -2
+1.63299 0 -2
+0 -1.63299 2
+-1.63299 0 2
+0 1.63299 2
+1.63299 0 2
+3 1
+2 1
+6 1
+2 6
+2 7
+3 2
+3 7
+3 8
+4 3
+4 8
+5 1
+4 5
+1 4
+6 5
+7 6
+5 8
+7 5
+8 7
+9 13 1
+6 1 2
+4 2 3
+14 3 11
+4 15 5
+6 5 7
+7 18 8
+9 8 10
+10 16 12
+13 12 11
+15 14 17
+18 17 16
diff --git a/test/boolean/cube5 b/test/boolean/cube5
new file mode 100644
index 0000000..c0e296b
--- /dev/null
+++ b/test/boolean/cube5
@@ -0,0 +1,39 @@
+8 18 12
+0 -1 -1
+-1 0 -1
+0 1 -1
+1 0 -1
+0 -1 2
+-1 0 2
+0 1 2
+1 0 2
+3 1
+2 1
+6 1
+2 6
+2 7
+3 2
+3 7
+3 8
+4 3
+4 8
+5 1
+4 5
+1 4
+6 5
+7 6
+5 8
+7 5
+8 7
+9 13 1
+6 1 2
+4 2 3
+14 3 11
+4 15 5
+6 5 7
+7 18 8
+9 8 10
+10 16 12
+13 12 11
+15 14 17
+18 17 16
diff --git a/test/boolean/cube6 b/test/boolean/cube6
new file mode 100644
index 0000000..5e31e6d
--- /dev/null
+++ b/test/boolean/cube6
@@ -0,0 +1,39 @@
+8 18 12 GtsSurface GtsFace GtsEdge GtsVertex
+-0.0471141 1.71734 -1.40185
+-1.88699 1.15792 -0.123091
+1.55052 1.09747 0.625643
+-1.75833 -1.01684 -0.889362
+-0.289349 0.538054 1.90441
+-0.160693 -1.63671 1.13814
+1.67918 -1.07729 -0.140628
+0.0815424 -0.457427 -2.16813
+1 2
+2 3
+1 3
+2 4
+4 5
+2 5
+4 6
+5 6
+6 7
+6 8
+7 8
+3 5
+4 8
+2 8
+5 7
+7 3
+8 1
+1 7
+1 2 3
+4 5 6
+7 8 5
+9 10 11
+6 12 2
+7 13 10
+4 14 13
+12 15 16
+1 17 14
+8 9 15
+17 18 11
+3 16 18
diff --git a/test/boolean/cube7 b/test/boolean/cube7
new file mode 100644
index 0000000..9c1620a
--- /dev/null
+++ b/test/boolean/cube7
@@ -0,0 +1,39 @@
+8 18 12 GtsSurface GtsFace GtsEdge GtsVertex
+1.55052 1.09747 0.625643
+-0.289349 0.538054 1.90441
+2.96196 0.549843 2.41684
+-0.160693 -1.63671 1.13814
+1.12209 -0.00957019 3.6956
+1.25074 -2.18433 2.92933
+3.09062 -1.62492 1.65057
+1.67918 -1.07729 -0.140628
+1 2
+2 3
+1 3
+2 4
+4 5
+2 5
+4 6
+5 6
+6 7
+6 8
+7 8
+3 5
+4 8
+2 8
+5 7
+7 3
+8 1
+1 7
+1 2 3
+4 5 6
+7 8 5
+9 10 11
+6 12 2
+7 13 10
+4 14 13
+12 15 16
+1 17 14
+8 9 15
+17 18 11
+3 16 18
diff --git a/test/boolean/cutter b/test/boolean/cutter
new file mode 100644
index 0000000..a48018d
--- /dev/null
+++ b/test/boolean/cutter
@@ -0,0 +1,183 @@
+32 90 60 GtsSurface GtsFace GtsEdge GtsVertex
+-0.3333333333 0.3333333333 -0.3333333333
+-1 0.3333333333 0.3333333333
+-0.3333333333 0.3333333333 0.3333333333
+-0.3333333333 -0.3333333333 -1
+0.3333333333 -0.3333333333 -0.3333333333
+-0.3333333333 -0.3333333333 -0.3333333333
+-0.3333333333 -1 -0.3333333333
+0.3333333333 -1 0.3333333333
+-0.3333333333 -1 0.3333333333
+0.3333333333 1 -0.3333333333
+-0.3333333333 1 -0.3333333333
+-0.3333333333 1 0.3333333333
+0.3333333333 -0.3333333333 0.3333333333
+1 0.3333333333 0.3333333333
+0.3333333333 0.3333333333 0.3333333333
+-0.3333333333 0.3333333333 -1
+-1 -0.3333333333 -0.3333333333
+-1 0.3333333333 -0.3333333333
+-0.3333333333 -0.3333333333 0.3333333333
+-0.3333333333 0.3333333333 1
+0.3333333333 0.3333333333 1
+0.3333333333 1 0.3333333333
+1 0.3333333333 -0.3333333333
+0.3333333333 0.3333333333 -0.3333333333
+-1 -0.3333333333 0.3333333333
+0.3333333333 0.3333333333 -1
+-0.3333333333 -0.3333333333 1
+0.3333333333 -0.3333333333 1
+1 -0.3333333333 -0.3333333333
+1 -0.3333333333 0.3333333333
+0.3333333333 -0.3333333333 -1
+0.3333333333 -1 -0.3333333333
+1 2
+3 2
+1 3
+4 5
+6 5
+4 6
+7 8
+9 8
+7 9
+10 11
+12 11
+10 12
+13 14
+14 15
+13 15
+4 16
+16 6
+17 18
+1 18
+17 1
+8 13
+9 13
+17 6
+6 19
+17 19
+15 20
+21 20
+21 15
+22 12
+22 10
+23 24
+24 15
+23 15
+6 1
+1 16
+19 13
+19 9
+1 11
+1 10
+25 19
+17 25
+13 21
+24 10
+24 22
+14 23
+26 16
+26 1
+19 3
+25 3
+7 6
+6 9
+24 1
+27 28
+28 21
+27 21
+13 28
+15 22
+29 23
+29 14
+24 26
+2 25
+15 3
+3 22
+20 27
+5 24
+5 23
+19 28
+30 14
+29 30
+31 26
+31 24
+18 25
+32 5
+5 13
+32 13
+12 3
+19 27
+3 27
+5 29
+5 30
+31 5
+2 18
+32 8
+4 26
+11 3
+20 3
+7 5
+13 30
+4 31
+7 32
+1 2 3
+4 5 6
+7 8 9
+10 11 12
+13 14 15
+16 6 17
+18 19 20
+8 21 22
+23 24 25
+26 27 28
+12 29 30
+31 32 33
+17 34 35
+20 34 23
+22 36 37
+38 10 39
+25 40 41
+15 28 42
+43 30 44
+33 14 45
+46 35 47
+40 48 49
+50 9 51
+39 43 52
+53 54 55
+42 54 56
+44 57 32
+58 45 59
+47 52 60
+49 2 61
+51 37 24
+62 57 63
+55 27 64
+65 31 66
+36 56 67
+59 68 69
+70 60 71
+18 41 72
+73 74 75
+63 29 76
+48 77 78
+66 58 79
+67 53 77
+79 69 80
+71 65 81
+72 61 82
+75 21 83
+16 46 84
+38 3 85
+78 64 86
+50 5 87
+88 68 13
+80 88 74
+89 81 4
+19 82 1
+90 83 7
+84 70 89
+85 76 11
+62 86 26
+87 73 90
diff --git a/test/boolean/loc1 b/test/boolean/loc1
new file mode 100644
index 0000000..3683634
--- /dev/null
+++ b/test/boolean/loc1
@@ -0,0 +1,15 @@
+4 6 4
+1 0 0
+0 0 1
+0 0 0
+0 1 0
+1 2
+3 2
+3 1
+3 4
+1 4
+4 2
+1 2 3
+4 5 3
+2 6 4
+6 1 5
diff --git a/test/boolean/loc2 b/test/boolean/loc2
new file mode 100644
index 0000000..730a6d7
--- /dev/null
+++ b/test/boolean/loc2
@@ -0,0 +1,15 @@
+4 6 4
+0.5 0 1
+0.5 1 0
+0.5 0 0
+1.5 0 0
+1 2
+3 2
+3 1
+4 2
+4 1
+3 4
+1 2 3
+4 1 5
+5 3 6
+2 4 6
diff --git a/test/boolean/p1 b/test/boolean/p1
new file mode 100644
index 0000000..9955569
--- /dev/null
+++ b/test/boolean/p1
@@ -0,0 +1,39 @@
+8 18 12 GtsSurface GtsFace GtsEdge GtsVertex
+0 1 2
+0 1 0
+0 0 1
+1 1 0
+1 0 1
+1 0 0
+0 0 0
+1 1 2
+1 2
+3 2
+1 3
+4 5
+6 5
+6 4
+7 2
+4 2
+7 4
+7 6
+8 5
+4 8
+7 5
+3 5
+7 3
+8 2
+3 8
+1 8
+1 2 3
+4 5 6
+7 8 9
+9 6 10
+11 4 12
+5 13 10
+13 14 15
+8 16 12
+2 7 15
+17 18 3
+14 11 17
+16 1 18
diff --git a/test/boolean/p2 b/test/boolean/p2
new file mode 100644
index 0000000..bb25223
--- /dev/null
+++ b/test/boolean/p2
@@ -0,0 +1,111 @@
+20 54 36 GtsSurface GtsFace GtsEdge GtsVertex
+0.889865686 1.806185912 0.7958760584
+1.369642857 1.108928571 1.260714286
+0 1.494230769 1.003846154
+0 0 2
+0 0.8320502943 2.445299804
+0 0.3705118328 1.752992111
+1.10594603 2.418820147 1.387453235
+1.5125 1.5375 1.975
+2 3 1
+1.267261242 0.8017837257 2.465477516
+0 1.955769231 1.696153846
+0 2.629488167 1.247007889
+0 3 1
+0 2.167949706 0.5547001962
+1 0 3
+0 0 3
+1 0 2
+1.732738758 2.198216274 0.5345224838
+0 3 0
+2 3 0
+1 2
+3 2
+3 1
+4 5
+6 5
+6 4
+7 8
+9 8
+7 9
+10 2
+8 2
+8 10
+7 11
+8 11
+12 13
+14 13
+12 14
+6 2
+3 6
+15 16
+4 16
+4 15
+16 5
+14 3
+11 3
+14 11
+10 17
+2 17
+15 5
+18 1
+19 1
+18 19
+6 17
+19 13
+9 13
+9 19
+4 17
+10 5
+10 15
+12 11
+15 17
+7 12
+14 19
+7 13
+14 1
+18 20
+9 20
+9 18
+11 5
+8 5
+19 20
+3 5
+18 2
+18 8
+1 2 3
+4 5 6
+7 8 9
+10 11 12
+13 14 7
+15 16 17
+2 18 19
+20 21 22
+23 4 21
+24 25 26
+27 28 10
+29 23 20
+30 31 32
+28 33 18
+34 35 36
+33 37 6
+38 29 39
+26 40 17
+41 27 39
+40 13 42
+16 34 43
+35 44 9
+37 41 22
+31 45 43
+46 47 48
+49 50 14
+45 3 24
+51 46 32
+52 49 25
+47 51 36
+11 53 54
+44 15 42
+50 38 12
+8 54 48
+53 1 30
+5 52 19
diff --git a/test/boolean/set.c b/test/boolean/set.c
new file mode 100644
index 0000000..e0a6c55
--- /dev/null
+++ b/test/boolean/set.c
@@ -0,0 +1,218 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "gts.h"
+
+static void prepend_triangle_bbox (GtsTriangle * t, GSList ** bboxes)
+{
+  *bboxes = g_slist_prepend (*bboxes, 
+			     gts_bbox_triangle (gts_bbox_class (), t));
+}
+
+static gboolean segment_is_ok (GtsSegment * s)
+{
+  g_return_val_if_fail (s != NULL, FALSE);
+  g_return_val_if_fail (s->v1 != s->v2, FALSE);
+  g_return_val_if_fail (GTS_OBJECT (s)->reserved == NULL, FALSE);
+  return TRUE;
+}
+
+static gboolean vertex_is_ok (GtsVertex * v)
+{
+  g_return_val_if_fail (v != NULL, FALSE);
+  g_return_val_if_fail (GTS_OBJECT (v)->reserved == NULL, FALSE);
+  return TRUE;
+}
+
+static gboolean triangle_is_ok (GtsTriangle * t)
+{
+  g_return_val_if_fail (t != NULL, FALSE);
+  g_return_val_if_fail (t->e1 != NULL, FALSE);
+  g_return_val_if_fail (t->e2 != NULL, FALSE);
+  g_return_val_if_fail (t->e3 != NULL, FALSE);
+  g_return_val_if_fail (t->e1 != t->e2 && t->e1 != t->e3 && t->e2 != t->e3, 
+			FALSE);
+  g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e1), 
+					    GTS_SEGMENT (t->e2)),
+			FALSE);
+  g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e1), 
+					    GTS_SEGMENT (t->e3)), 
+			FALSE);
+  g_return_val_if_fail (gts_segments_touch (GTS_SEGMENT (t->e2), 
+					    GTS_SEGMENT (t->e3)), 
+			FALSE);
+  g_return_val_if_fail (GTS_SEGMENT (t->e1)->v1 != GTS_SEGMENT (t->e1)->v2, 
+			FALSE);
+  g_return_val_if_fail (GTS_SEGMENT (t->e2)->v1 != GTS_SEGMENT (t->e2)->v2, 
+			FALSE);
+  g_return_val_if_fail (GTS_SEGMENT (t->e3)->v1 != GTS_SEGMENT (t->e3)->v2, 
+			FALSE);
+  g_return_val_if_fail (GTS_OBJECT (t)->reserved == NULL, FALSE);
+  return TRUE;
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s1, * s2;
+  GtsSurfaceInter * si;
+  GNode * tree1, * tree2;
+  GSList * bboxes;
+  FILE * fp;
+  guint line;
+
+  if (argc != 3) {
+    fprintf (stderr, 
+	     "%s: check set operations between surfaces\n"
+	     "usage: %s FILE1 FILE2\n",
+	     argv[0], argv[0]);
+    return 1;
+  }
+
+  /* open first file */
+  if ((fp = fopen (argv[1], "rt")) == NULL) {
+    fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[2]);
+    return 1;
+  }
+  /* reads in first surface file */
+  s1 = gts_surface_new (gts_surface_class (),
+			GTS_FACE_CLASS (gts_nface_class ()),
+			GTS_EDGE_CLASS (gts_nedge_class ()),
+			GTS_VERTEX_CLASS (gts_nvertex_class ()));
+  if ((line = gts_surface_read (s1, fp))) {
+    fprintf (stderr, "%s: `%s' is not a valid GTS surface file\n", 
+	     argv[0], argv[1]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+  fclose (fp);
+
+ /* open second file */
+  if ((fp = fopen (argv[2], "rt")) == NULL) {
+    fprintf (stderr, "%s: can not open file `%s'\n", argv[0], argv[3]);
+    return 1;
+  }
+  /* reads in second surface file */
+  s2 = gts_surface_new (gts_surface_class (),
+			GTS_FACE_CLASS (gts_nface_class ()),
+			GTS_EDGE_CLASS (gts_nedge_class ()),
+			GTS_VERTEX_CLASS (gts_nvertex_class ()));
+  if ((line = gts_surface_read (s2, fp))) {
+    fprintf (stderr, "%s: `%s' is not a valid GTS surface file\n", 
+	     argv[0], argv[2]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+  fclose (fp);
+
+  /* display summary information about both surfaces */
+#if 0
+  gts_surface_print_stats (s1, stderr);
+  gts_surface_print_stats (s2, stderr);
+#endif
+
+  /* build bounding boxes for first surface */
+  bboxes = NULL;
+  gts_surface_foreach_face (s1, (GtsFunc) prepend_triangle_bbox, &bboxes);
+  /* build bounding box tree for first surface */
+  tree1 = gts_bb_tree_new (bboxes);
+  /* free list of bboxes */
+  g_slist_free (bboxes);
+
+  /* build bounding boxes for second surface */
+  bboxes = NULL;
+  gts_surface_foreach_face (s2, (GtsFunc) prepend_triangle_bbox, &bboxes);
+  /* build bounding box tree for second surface */
+  tree2 = gts_bb_tree_new (bboxes);
+  /* free list of bboxes */
+  g_slist_free (bboxes);
+
+  {
+    GSList * i;
+    GtsSurface * s = gts_surface_new (gts_surface_class (),
+				      gts_face_class (),
+				      gts_edge_class (),
+				      gts_vertex_class ());
+
+    si = gts_surface_inter_new (gts_surface_inter_class (), 
+				s1, s2, tree1, tree2);
+
+    gts_surface_merge (s, si->s1);
+    gts_surface_merge (s, si->s2);
+    gts_surface_print_stats (s, stderr);
+    gts_object_destroy (GTS_OBJECT (s));
+
+    printf ("(geometry \"inter\" { = LIST {\n");
+    i = si->edges;
+    while (i) {
+      GtsSegment * s = i->data;
+      printf ("# %s->%s\n"
+	      "VECT 1 2 0 2 0 %g %g %g %g %g %g\n",
+	      GTS_NVERTEX (s->v1)->name,
+	      GTS_NVERTEX (s->v2)->name,
+	      GTS_POINT (s->v1)->x, 
+	      GTS_POINT (s->v1)->y, 
+	      GTS_POINT (s->v1)->z, 
+	      GTS_POINT (s->v2)->x, 
+	      GTS_POINT (s->v2)->y, 
+	      GTS_POINT (s->v2)->z);
+      i = i->next;
+    }
+    printf ("}})\n"
+	    "(normalization \"inter\" none)\n");
+    printf ("(geometry \"s1\" { =\n");
+    gts_surface_write_oogl (si->s1, stdout);
+    printf ("})\n"
+	    "(normalization \"s1\" none)\n");
+    printf ("(geometry \"s2\" { =\n");
+    gts_surface_write_oogl (si->s2, stdout);
+    printf ("})\n"
+	    "(normalization \"s2\" none)\n");
+
+    gts_surface_foreach_face (s1, (GtsFunc) triangle_is_ok, NULL);
+    gts_surface_foreach_edge (s1, (GtsFunc) segment_is_ok, NULL);
+    gts_surface_foreach_edge (s1, (GtsFunc) vertex_is_ok, NULL);
+
+    gts_surface_foreach_face (s2, (GtsFunc) triangle_is_ok, NULL);
+    gts_surface_foreach_edge (s2, (GtsFunc) segment_is_ok, NULL);
+    gts_surface_foreach_edge (s2, (GtsFunc) vertex_is_ok, NULL);
+
+    gts_surface_foreach_face (si->s1, (GtsFunc) triangle_is_ok, NULL);
+    gts_surface_foreach_edge (si->s1, (GtsFunc) segment_is_ok, NULL);
+    gts_surface_foreach_edge (si->s1, (GtsFunc) vertex_is_ok, NULL);
+
+    gts_surface_foreach_face (si->s2, (GtsFunc) triangle_is_ok, NULL);
+    gts_surface_foreach_edge (si->s2, (GtsFunc) segment_is_ok, NULL);
+    gts_surface_foreach_edge (si->s2, (GtsFunc) vertex_is_ok, NULL);
+
+    g_assert (gts_surface_inter_check (si));
+  }
+
+  /* destroy surfaces and intersection */
+  gts_object_destroy (GTS_OBJECT (s1));
+  gts_object_destroy (GTS_OBJECT (s2));
+  gts_object_destroy (GTS_OBJECT (si));
+
+  /* destroy bounding box trees (including bounding boxes) */
+  gts_bb_tree_destroy (tree1, TRUE);
+  gts_bb_tree_destroy (tree2, TRUE);  
+
+  return 0;
+}
diff --git a/test/boolean/set.sh b/test/boolean/set.sh
new file mode 100755
index 0000000..ac7b304
--- /dev/null
+++ b/test/boolean/set.sh
@@ -0,0 +1,35 @@
+#! /bin/sh
+if ./set $1 $2 2> log > /dev/null; then
+    :
+else
+    echo "======== set $1 $2 ========" >> errors
+    cat log >> errors
+    rm -f log
+    exit 0
+fi
+if diff log set_$1_$2 > /dev/null; then
+    :
+else
+    echo "======== set $1 $2 ========" >> errors
+    cat log >> errors
+    rm -f log
+    exit 0
+fi
+if ./set $2 $1 2> log > /dev/null; then
+    :
+else
+    echo "======== set $2 $1 ========" >> errors
+    cat log >> errors
+    rm -f log
+    exit 0
+fi
+if diff log set_$1_$2 > /dev/null; then
+    :
+else
+    echo "======== set $2 $1 ========" >> errors
+    cat log >> errors
+    rm -f log
+    exit 0
+fi
+rm -f log
+exit 1
diff --git a/test/boolean/set_1_2.sh b/test/boolean/set_1_2.sh
new file mode 100755
index 0000000..414ea07
--- /dev/null
+++ b/test/boolean/set_1_2.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh 1.gts 2.gts; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_cube6_cube7.sh b/test/boolean/set_cube6_cube7.sh
new file mode 100755
index 0000000..296742e
--- /dev/null
+++ b/test/boolean/set_cube6_cube7.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh cube6 cube7; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_cube_cube1 b/test/boolean/set_cube_cube1
new file mode 100644
index 0000000..8f42719
--- /dev/null
+++ b/test/boolean/set_cube_cube1
@@ -0,0 +1,13 @@
+# vertices: 12 edges: 30 faces: 20
+# Connectivity statistics
+#   incompatible faces: 12
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 2
+#   non-manifold edges: 4
+#   edges per vertex: min: 4 mean: 5 | 1.52753 max: 8
+#   faces per edge: min: 1 mean: 2 | 0.894427 max: 4
+# Geometric statistics
+#   face quality: min: 0.940974 mean: 0.942895 | 0.00156893 max: 0.944203
+#   face area  : min: 2.66666 mean: 2.84273 | 0.182422 max: 3.06538
+#   edge length : min: 2.3094 mean: 2.71617 | 0.484942 max: 3.51863
diff --git a/test/boolean/set_cube_cube1.sh b/test/boolean/set_cube_cube1.sh
new file mode 100755
index 0000000..07a74f1
--- /dev/null
+++ b/test/boolean/set_cube_cube1.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh cube cube1; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_cube_cube2 b/test/boolean/set_cube_cube2
new file mode 100644
index 0000000..38200f5
--- /dev/null
+++ b/test/boolean/set_cube_cube2
@@ -0,0 +1,13 @@
+# vertices: 22 edges: 70 faces: 50
+# Connectivity statistics
+#   incompatible faces: 35
+#   duplicate faces: 0
+#   boundary edges: 10
+#   duplicate edges: 0
+#   non-manifold edges: 10
+#   edges per vertex: min: 4 mean: 6.36364 | 1.69345 max: 10
+#   faces per edge: min: 1 mean: 2.14286 | 0.832993 max: 4
+# Geometric statistics
+#   face quality: min: 0.178119 mean: 0.717724 | 0.242282 max: 0.98315
+#   face area  : min: 0.0286197 mean: 3.05059 | 7.79843 max: 36.8351
+#   edge length : min: 0.11547 mean: 3.24514 | 3.3883 max: 12.8062
diff --git a/test/boolean/set_cube_cube2.sh b/test/boolean/set_cube_cube2.sh
new file mode 100755
index 0000000..7477de2
--- /dev/null
+++ b/test/boolean/set_cube_cube2.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh cube cube2; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_cube_cube4.sh b/test/boolean/set_cube_cube4.sh
new file mode 100755
index 0000000..40ae5e6
--- /dev/null
+++ b/test/boolean/set_cube_cube4.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh cube cube4; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_loc1_loc2.sh b/test/boolean/set_loc1_loc2.sh
new file mode 100755
index 0000000..6f2cbeb
--- /dev/null
+++ b/test/boolean/set_loc1_loc2.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh loc1 loc2; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_p1_p2.sh b/test/boolean/set_p1_p2.sh
new file mode 100755
index 0000000..e0ad36b
--- /dev/null
+++ b/test/boolean/set_p1_p2.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh p1 p2; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_sponge_cutter.sh b/test/boolean/set_sponge_cutter.sh
new file mode 100755
index 0000000..b9d49fd
--- /dev/null
+++ b/test/boolean/set_sponge_cutter.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh sponge cutter; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t11_t16 b/test/boolean/set_t11_t16
new file mode 100644
index 0000000..70fb5ad
--- /dev/null
+++ b/test/boolean/set_t11_t16
@@ -0,0 +1,13 @@
+# vertices: 8 edges: 14 faces: 7
+# Connectivity statistics
+#   incompatible faces: 4
+#   duplicate faces: 0
+#   boundary edges: 9
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 2 mean: 3.5 | 1.58114 max: 6
+#   faces per edge: min: 1 mean: 1.5 | 0.823754 max: 4
+# Geometric statistics
+#   face quality: min: 0.623756 mean: 0.831182 | 0.129567 max: 0.970117
+#   face area  : min: 0.282843 mean: 0.639395 | 0.235498 max: 1
+#   edge length : min: 0.34641 mean: 1.45588 | 0.506805 max: 2.29129
diff --git a/test/boolean/set_t11_t16.sh b/test/boolean/set_t11_t16.sh
new file mode 100755
index 0000000..a71aec5
--- /dev/null
+++ b/test/boolean/set_t11_t16.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t11 t16; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t14_t15 b/test/boolean/set_t14_t15
new file mode 100644
index 0000000..57ccc95
--- /dev/null
+++ b/test/boolean/set_t14_t15
@@ -0,0 +1,13 @@
+# vertices: 13 edges: 34 faces: 22
+# Connectivity statistics
+#   incompatible faces: 15
+#   duplicate faces: 0
+#   boundary edges: 10
+#   duplicate edges: 0
+#   non-manifold edges: 4
+#   edges per vertex: min: 3 mean: 5.23077 | 1.62452 max: 9
+#   faces per edge: min: 1 mean: 1.94118 | 0.872494 max: 4
+# Geometric statistics
+#   face quality: min: 0.00115904 mean: 0.573171 | 0.401589 max: 0.986184
+#   face area  : min: 2.84337e-12 mean: 0.662314 | 0.857899 max: 2.9282
+#   edge length : min: 1.65091e-06 mean: 1.63412 | 0.889055 max: 3.26599
diff --git a/test/boolean/set_t14_t15.sh b/test/boolean/set_t14_t15.sh
new file mode 100755
index 0000000..29a0ea0
--- /dev/null
+++ b/test/boolean/set_t14_t15.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t14 t15; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t17_t18 b/test/boolean/set_t17_t18
new file mode 100644
index 0000000..bc484e0
--- /dev/null
+++ b/test/boolean/set_t17_t18
@@ -0,0 +1,13 @@
+# vertices: 5 edges: 6 faces: 2
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 6
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 2.4 | 0.8 max: 4
+#   faces per edge: min: 1 mean: 1 | 0 max: 1
+# Geometric statistics
+#   face quality: min: 0.99004 mean: 0.990344 | 0.000303792 max: 0.990648
+#   face area  : min: 0.00100417 mean: 0.00981539 | 0.00881122 max: 0.0186266
+#   edge length : min: 0.0459561 mean: 0.129001 | 0.0811836 max: 0.23179
diff --git a/test/boolean/set_t17_t18.sh b/test/boolean/set_t17_t18.sh
new file mode 100755
index 0000000..b9413bb
--- /dev/null
+++ b/test/boolean/set_t17_t18.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t17 t18; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t19_t20 b/test/boolean/set_t19_t20
new file mode 100644
index 0000000..2ede4d4
--- /dev/null
+++ b/test/boolean/set_t19_t20
@@ -0,0 +1,13 @@
+# vertices: 8 edges: 15 faces: 8
+# Connectivity statistics
+#   incompatible faces: 4
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 2
+#   edges per vertex: min: 3 mean: 3.75 | 1.29904 max: 7
+#   faces per edge: min: 1 mean: 1.6 | 0.711805 max: 3
+# Geometric statistics
+#   face quality: min: 0.761015 mean: 0.861651 | 0.065395 max: 0.944203
+#   face area  : min: 0.25 mean: 0.375 | 0.125 max: 0.5
+#   edge length : min: 0.5 mean: 1.0867 | 0.468053 max: 2
diff --git a/test/boolean/set_t19_t20.sh b/test/boolean/set_t19_t20.sh
new file mode 100755
index 0000000..7743c7b
--- /dev/null
+++ b/test/boolean/set_t19_t20.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t19 t20; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t19_t21 b/test/boolean/set_t19_t21
new file mode 100644
index 0000000..cb2deab
--- /dev/null
+++ b/test/boolean/set_t19_t21
@@ -0,0 +1,13 @@
+# vertices: 8 edges: 13 faces: 6
+# Connectivity statistics
+#   incompatible faces: 2
+#   duplicate faces: 0
+#   boundary edges: 9
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 2 mean: 3.25 | 1.47902 max: 6
+#   faces per edge: min: 1 mean: 1.38462 | 0.624926 max: 3
+# Geometric statistics
+#   face quality: min: 0.751755 mean: 0.884037 | 0.0755302 max: 0.996181
+#   face area  : min: 0.25 mean: 0.333333 | 0.117851 max: 0.5
+#   edge length : min: 0.5 mean: 1.02312 | 0.261934 max: 1.41421
diff --git a/test/boolean/set_t19_t21.sh b/test/boolean/set_t19_t21.sh
new file mode 100755
index 0000000..0efe901
--- /dev/null
+++ b/test/boolean/set_t19_t21.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t19 t21; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t10 b/test/boolean/set_t1_t10
new file mode 100644
index 0000000..ffa3e78
--- /dev/null
+++ b/test/boolean/set_t1_t10
@@ -0,0 +1,13 @@
+# vertices: 7 edges: 10 faces: 4
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 2.85714 | 1.35526 max: 6
+#   faces per edge: min: 1 mean: 1.2 | 0.4 max: 2
+# Geometric statistics
+#   face quality: min: 0.944203 mean: 0.944203 | 4.96645e-09 max: 0.944203
+#   face area  : min: 0.5 mean: 0.5 | 0 max: 0.5
+#   edge length : min: 1 mean: 1.16569 | 0.202922 max: 1.41421
diff --git a/test/boolean/set_t1_t10.sh b/test/boolean/set_t1_t10.sh
new file mode 100755
index 0000000..0abdc59
--- /dev/null
+++ b/test/boolean/set_t1_t10.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t10; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t11 b/test/boolean/set_t1_t11
new file mode 100644
index 0000000..03de123
--- /dev/null
+++ b/test/boolean/set_t1_t11
@@ -0,0 +1,13 @@
+# vertices: 6 edges: 8 faces: 3
+# Connectivity statistics
+#   incompatible faces: 0
+#   duplicate faces: 0
+#   boundary edges: 7
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 2.66667 | 1.10554 max: 5
+#   faces per edge: min: 1 mean: 1.125 | 0.330719 max: 2
+# Geometric statistics
+#   face quality: min: 0.924605 mean: 0.931138 | 0.00923825 max: 0.944203
+#   face area  : min: 0.707107 mean: 0.804738 | 0.138071 max: 1
+#   edge length : min: 1 mean: 1.46334 | 0.329587 max: 2
diff --git a/test/boolean/set_t1_t11.sh b/test/boolean/set_t1_t11.sh
new file mode 100755
index 0000000..6201273
--- /dev/null
+++ b/test/boolean/set_t1_t11.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t11; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t12 b/test/boolean/set_t1_t12
new file mode 100644
index 0000000..c5211ab
--- /dev/null
+++ b/test/boolean/set_t1_t12
@@ -0,0 +1,13 @@
+# vertices: 9 edges: 17 faces: 9
+# Connectivity statistics
+#   incompatible faces: 4
+#   duplicate faces: 0
+#   boundary edges: 9
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 2 mean: 3.77778 | 1.6178 max: 7
+#   faces per edge: min: 1 mean: 1.58824 | 0.771463 max: 4
+# Geometric statistics
+#   face quality: min: 0.630787 mean: 0.863666 | 0.129378 max: 0.979162
+#   face area  : min: 0.166667 mean: 0.346448 | 0.131603 max: 0.5
+#   edge length : min: 0.372678 mean: 1.07467 | 0.323877 max: 1.5
diff --git a/test/boolean/set_t1_t12.sh b/test/boolean/set_t1_t12.sh
new file mode 100755
index 0000000..691b2ec
--- /dev/null
+++ b/test/boolean/set_t1_t12.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t12; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t13 b/test/boolean/set_t1_t13
new file mode 100644
index 0000000..aec10d1
--- /dev/null
+++ b/test/boolean/set_t1_t13
@@ -0,0 +1,13 @@
+# vertices: 8 edges: 15 faces: 8
+# Connectivity statistics
+#   incompatible faces: 4
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 2 mean: 3.75 | 1.47902 max: 6
+#   faces per edge: min: 1 mean: 1.6 | 0.8 max: 4
+# Geometric statistics
+#   face quality: min: 0.613267 mean: 0.861469 | 0.143299 max: 0.944203
+#   face area  : min: 0.25 mean: 0.4375 | 0.108253 max: 0.5
+#   edge length : min: 0.5 mean: 1.23939 | 0.337513 max: 1.80278
diff --git a/test/boolean/set_t1_t13.sh b/test/boolean/set_t1_t13.sh
new file mode 100755
index 0000000..5c4ace9
--- /dev/null
+++ b/test/boolean/set_t1_t13.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t13; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t2 b/test/boolean/set_t1_t2
new file mode 100644
index 0000000..40a8ad8
--- /dev/null
+++ b/test/boolean/set_t1_t2
@@ -0,0 +1,13 @@
+# vertices: 8 edges: 15 faces: 8
+# Connectivity statistics
+#   incompatible faces: 4
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 3 mean: 3.75 | 1.29904 max: 6
+#   faces per edge: min: 1 mean: 1.6 | 0.8 max: 4
+# Geometric statistics
+#   face quality: min: 0.751755 mean: 0.828837 | 0.0487075 max: 0.870694
+#   face area  : min: 0.25 mean: 0.3125 | 0.108253 max: 0.5
+#   edge length : min: 0.5 mean: 1.12707 | 0.360144 max: 1.80278
diff --git a/test/boolean/set_t1_t2.sh b/test/boolean/set_t1_t2.sh
new file mode 100755
index 0000000..ce484a6
--- /dev/null
+++ b/test/boolean/set_t1_t2.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t2; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t22 b/test/boolean/set_t1_t22
new file mode 100644
index 0000000..7bceddf
--- /dev/null
+++ b/test/boolean/set_t1_t22
@@ -0,0 +1,13 @@
+# vertices: 4 edges: 5 faces: 2
+# Connectivity statistics
+#   incompatible faces: 2
+#   duplicate faces: 0
+#   boundary edges: 4
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 2.5 | 0.5 max: 3
+#   faces per edge: min: 1 mean: 1.2 | 0.4 max: 2
+# Geometric statistics
+#   face quality: min: 0.944203 mean: 0.944203 | 4.96645e-09 max: 0.944203
+#   face area  : min: 1 mean: 1 | 0 max: 1
+#   edge length : min: 1.41421 mean: 1.53137 | 0.234315 max: 2
diff --git a/test/boolean/set_t1_t22.sh b/test/boolean/set_t1_t22.sh
new file mode 100755
index 0000000..c67b298
--- /dev/null
+++ b/test/boolean/set_t1_t22.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t22; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t23 b/test/boolean/set_t1_t23
new file mode 100644
index 0000000..4f5b8b5
--- /dev/null
+++ b/test/boolean/set_t1_t23
@@ -0,0 +1,13 @@
+# vertices: 5 edges: 7 faces: 3
+# Connectivity statistics
+#   incompatible faces: 2
+#   duplicate faces: 0
+#   boundary edges: 5
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 2.8 | 0.748331 max: 4
+#   faces per edge: min: 1 mean: 1.28571 | 0.451754 max: 2
+# Geometric statistics
+#   face quality: min: 0.613267 mean: 0.833891 | 0.156005 max: 0.944203
+#   face area  : min: 0.25 mean: 0.75 | 0.353553 max: 1
+#   edge length : min: 0.5 mean: 1.4228 | 0.435791 max: 2
diff --git a/test/boolean/set_t1_t23.sh b/test/boolean/set_t1_t23.sh
new file mode 100755
index 0000000..3a9cf0c
--- /dev/null
+++ b/test/boolean/set_t1_t23.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t23; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t24 b/test/boolean/set_t1_t24
new file mode 100644
index 0000000..215a12c
--- /dev/null
+++ b/test/boolean/set_t1_t24
@@ -0,0 +1,13 @@
+# vertices: 6 edges: 9 faces: 4
+# Connectivity statistics
+#   incompatible faces: 2
+#   duplicate faces: 0
+#   boundary edges: 6
+#   duplicate edges: 0
+#   non-manifold edges: 0
+#   edges per vertex: min: 2 mean: 3 | 1 max: 4
+#   faces per edge: min: 1 mean: 1.33333 | 0.471405 max: 2
+# Geometric statistics
+#   face quality: min: 0.613267 mean: 0.778735 | 0.165468 max: 0.944203
+#   face area  : min: 0.25 mean: 0.625 | 0.375 max: 1
+#   edge length : min: 0.5 mean: 1.36249 | 0.504711 max: 2
diff --git a/test/boolean/set_t1_t24.sh b/test/boolean/set_t1_t24.sh
new file mode 100755
index 0000000..59f2f31
--- /dev/null
+++ b/test/boolean/set_t1_t24.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t24; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t3 b/test/boolean/set_t1_t3
new file mode 100644
index 0000000..0336ee1
--- /dev/null
+++ b/test/boolean/set_t1_t3
@@ -0,0 +1,13 @@
+# vertices: 10 edges: 22 faces: 13
+# Connectivity statistics
+#   incompatible faces: 7
+#   duplicate faces: 0
+#   boundary edges: 9
+#   duplicate edges: 0
+#   non-manifold edges: 2
+#   edges per vertex: min: 2 mean: 4.4 | 1.74356 max: 7
+#   faces per edge: min: 1 mean: 1.77273 | 0.849161 max: 4
+# Geometric statistics
+#   face quality: min: 0.751755 mean: 0.85275 | 0.0674633 max: 0.944203
+#   face area  : min: 0.125 mean: 0.269231 | 0.107932 max: 0.5
+#   edge length : min: 0.5 mean: 1.02544 | 0.37637 max: 1.80278
diff --git a/test/boolean/set_t1_t3.sh b/test/boolean/set_t1_t3.sh
new file mode 100755
index 0000000..97de47c
--- /dev/null
+++ b/test/boolean/set_t1_t3.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t3; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t4 b/test/boolean/set_t1_t4
new file mode 100644
index 0000000..40a96b8
--- /dev/null
+++ b/test/boolean/set_t1_t4
@@ -0,0 +1,13 @@
+# vertices: 9 edges: 20 faces: 12
+# Connectivity statistics
+#   incompatible faces: 8
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 2
+#   edges per vertex: min: 3 mean: 4.44444 | 1.34256 max: 6
+#   faces per edge: min: 1 mean: 1.8 | 0.87178 max: 4
+# Geometric statistics
+#   face quality: min: 0.751755 mean: 0.822966 | 0.0531924 max: 0.870694
+#   face area  : min: 0.25 mean: 0.291667 | 0.0931695 max: 0.5
+#   edge length : min: 0.5 mean: 1.12353 | 0.353807 max: 1.80278
diff --git a/test/boolean/set_t1_t4.sh b/test/boolean/set_t1_t4.sh
new file mode 100755
index 0000000..ab3ecf5
--- /dev/null
+++ b/test/boolean/set_t1_t4.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t4; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t5 b/test/boolean/set_t1_t5
new file mode 100644
index 0000000..0299431
--- /dev/null
+++ b/test/boolean/set_t1_t5
@@ -0,0 +1,13 @@
+# vertices: 10 edges: 22 faces: 13
+# Connectivity statistics
+#   incompatible faces: 7
+#   duplicate faces: 0
+#   boundary edges: 9
+#   duplicate edges: 0
+#   non-manifold edges: 2
+#   edges per vertex: min: 3 mean: 4.4 | 1.49666 max: 7
+#   faces per edge: min: 1 mean: 1.77273 | 0.849161 max: 4
+# Geometric statistics
+#   face quality: min: 0.693229 mean: 0.825106 | 0.0798649 max: 0.944203
+#   face area  : min: 0.125 mean: 0.301093 | 0.112731 max: 0.5
+#   edge length : min: 0.5 mean: 1.10154 | 0.415896 max: 1.80278
diff --git a/test/boolean/set_t1_t5.sh b/test/boolean/set_t1_t5.sh
new file mode 100755
index 0000000..3972a13
--- /dev/null
+++ b/test/boolean/set_t1_t5.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t5; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t6 b/test/boolean/set_t1_t6
new file mode 100644
index 0000000..fd56e10
--- /dev/null
+++ b/test/boolean/set_t1_t6
@@ -0,0 +1,13 @@
+# vertices: 7 edges: 13 faces: 7
+# Connectivity statistics
+#   incompatible faces: 4
+#   duplicate faces: 0
+#   boundary edges: 7
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 2 mean: 3.71429 | 1.38505 max: 6
+#   faces per edge: min: 1 mean: 1.61538 | 0.835598 max: 4
+# Geometric statistics
+#   face quality: min: 0.527186 mean: 0.620237 | 0.0812647 max: 0.719528
+#   face area  : min: 0.075 mean: 0.164286 | 0.116387 max: 0.4
+#   edge length : min: 0.15 mean: 1.06864 | 0.425992 max: 2
diff --git a/test/boolean/set_t1_t6.sh b/test/boolean/set_t1_t6.sh
new file mode 100755
index 0000000..9a16eee
--- /dev/null
+++ b/test/boolean/set_t1_t6.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t6; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t7 b/test/boolean/set_t1_t7
new file mode 100644
index 0000000..ceb8355
--- /dev/null
+++ b/test/boolean/set_t1_t7
@@ -0,0 +1,13 @@
+# vertices: 6 edges: 11 faces: 6
+# Connectivity statistics
+#   incompatible faces: 2
+#   duplicate faces: 0
+#   boundary edges: 5
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 2 mean: 3.66667 | 0.942809 max: 5
+#   faces per edge: min: 1 mean: 1.63636 | 0.642824 max: 3
+# Geometric statistics
+#   face quality: min: 0.444182 mean: 0.594293 | 0.140079 max: 0.751755
+#   face area  : min: 0.05 mean: 0.175 | 0.134629 max: 0.4
+#   edge length : min: 0.1 mean: 1.07667 | 0.465016 max: 2
diff --git a/test/boolean/set_t1_t7.sh b/test/boolean/set_t1_t7.sh
new file mode 100755
index 0000000..67b6b2a
--- /dev/null
+++ b/test/boolean/set_t1_t7.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t7; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t1_t9 b/test/boolean/set_t1_t9
new file mode 100644
index 0000000..1d91d6d
--- /dev/null
+++ b/test/boolean/set_t1_t9
@@ -0,0 +1,13 @@
+# vertices: 8 edges: 17 faces: 10
+# Connectivity statistics
+#   incompatible faces: 8
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 2
+#   edges per vertex: min: 3 mean: 4.25 | 1.19896 max: 6
+#   faces per edge: min: 1 mean: 1.76471 | 0.941176 max: 4
+# Geometric statistics
+#   face quality: min: 0.751755 mean: 0.837209 | 0.0466718 max: 0.870694
+#   face area  : min: 0.25 mean: 0.3 | 0.1 max: 0.5
+#   edge length : min: 0.5 mean: 1.12601 | 0.338309 max: 1.80278
diff --git a/test/boolean/set_t1_t9.sh b/test/boolean/set_t1_t9.sh
new file mode 100755
index 0000000..3cfba63
--- /dev/null
+++ b/test/boolean/set_t1_t9.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t1 t9; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t25_t26.sh b/test/boolean/set_t25_t26.sh
new file mode 100755
index 0000000..d33b946
--- /dev/null
+++ b/test/boolean/set_t25_t26.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t25 t26; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/set_t27_t28 b/test/boolean/set_t27_t28
new file mode 100644
index 0000000..1bdff4f
--- /dev/null
+++ b/test/boolean/set_t27_t28
@@ -0,0 +1,13 @@
+# vertices: 7 edges: 11 faces: 5
+# Connectivity statistics
+#   incompatible faces: 2
+#   duplicate faces: 0
+#   boundary edges: 8
+#   duplicate edges: 0
+#   non-manifold edges: 1
+#   edges per vertex: min: 2 mean: 3.14286 | 1.35526 max: 6
+#   faces per edge: min: 1 mean: 1.36364 | 0.642824 max: 3
+# Geometric statistics
+#   face quality: min: 0.397406 mean: 0.727301 | 0.192196 max: 0.941237
+#   face area  : min: 0.333332 mean: 1.45709 | 1.26757 max: 3.53626
+#   edge length : min: 0.288675 mean: 2.17848 | 1.21404 max: 4.04145
diff --git a/test/boolean/set_t27_t28.sh b/test/boolean/set_t27_t28.sh
new file mode 100755
index 0000000..62596b6
--- /dev/null
+++ b/test/boolean/set_t27_t28.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+if ./set.sh t27 t28; then
+    exit 1
+fi
+exit 0
diff --git a/test/boolean/sponge b/test/boolean/sponge
new file mode 100644
index 0000000..660aa7b
--- /dev/null
+++ b/test/boolean/sponge
@@ -0,0 +1,39 @@
+8 18 12 GtsSurface GtsFace GtsEdge GtsVertex
+1 -1 -1
+1 1 -1
+1 1 1
+1 -1 1
+-1 -1 1
+-1 -1 -1
+-1 1 1
+-1 1 -1
+1 2
+3 2
+1 3
+4 3
+1 4
+5 4
+5 3
+6 1
+6 4
+3 7
+7 5
+6 5
+6 8
+8 5
+7 8
+2 8
+6 2
+2 7
+1 2 3
+3 4 5
+6 4 7
+8 5 9
+7 10 11
+9 6 12
+13 12 14
+14 11 15
+13 16 17
+16 15 18
+17 1 8
+18 10 2
diff --git a/test/boolean/t1 b/test/boolean/t1
new file mode 100644
index 0000000..95771cd
--- /dev/null
+++ b/test/boolean/t1
@@ -0,0 +1,8 @@
+3 3 1
+1 0 0 A
+0 1 0 B
+-1 0 0 C
+1 2 AB
+2 3 BC
+3 1 CA
+1 2 3 ABC
diff --git a/test/boolean/t10 b/test/boolean/t10
new file mode 100644
index 0000000..33b8136
--- /dev/null
+++ b/test/boolean/t10
@@ -0,0 +1,8 @@
+3 3 1
+0 -1 0
+0 0 -1
+0 0 1
+1 2
+2 3
+3 1
+1 2 3
diff --git a/test/boolean/t11 b/test/boolean/t11
new file mode 100644
index 0000000..e4f60ed
--- /dev/null
+++ b/test/boolean/t11
@@ -0,0 +1,8 @@
+3 3 1
+0 -1 0 G
+-1 0 -1 E
+-1 0 1 F
+1 2 GE
+2 3 EF
+3 1 GF
+1 2 3 GEF
diff --git a/test/boolean/t12 b/test/boolean/t12
new file mode 100644
index 0000000..f0ba8bc
--- /dev/null
+++ b/test/boolean/t12
@@ -0,0 +1,12 @@
+4 5 2
+0 -1 0
+0 0 -1
+0 0 1
+1 0.5 0
+1 2
+2 3
+3 1
+4 2
+4 3
+1 2 3
+5 2 4
diff --git a/test/boolean/t13 b/test/boolean/t13
new file mode 100644
index 0000000..50dba54
--- /dev/null
+++ b/test/boolean/t13
@@ -0,0 +1,12 @@
+4 5 2
+0 -1 0
+0 0 -1
+0 0 1
+0 1.5 0
+1 2
+2 3
+3 1
+4 2
+4 3
+1 2 3
+5 2 4
diff --git a/test/boolean/t14 b/test/boolean/t14
new file mode 100644
index 0000000..9651a3c
--- /dev/null
+++ b/test/boolean/t14
@@ -0,0 +1,31 @@
+8 18 4
+0 -1.63299 -1.1547 A
+-1.63299 0 -1.1547 D
+0 1.63299 -1.1547 C
+1.63299 0 -1.1547 B
+0 -1.63299 1.1547 F
+-1.63299 0 1.1547 E
+0 1.63299 1.1547
+1.63299 0 1.1547
+3 1 CA
+2 1 DA
+6 1 EA
+2 6 DE
+2 7
+3 2 CD
+3 7
+3 8
+4 3 BC
+4 8
+5 1 FA
+4 5 BF
+1 4 AB
+6 5 EF
+7 6
+5 8
+7 5
+8 7
+9 13 1 ABC
+6 1 2 ACD
+4 2 3 ADE
+14 3 11 EAF
diff --git a/test/boolean/t15 b/test/boolean/t15
new file mode 100644
index 0000000..cf758b9
--- /dev/null
+++ b/test/boolean/t15
@@ -0,0 +1,16 @@
+4 6 2
+-1.63299 -0.942809 -0.666667 J
+0 1.88562 -0.666667 I
+1.63299 -0.942809 -0.666667 H
+0 0 2 G
+2 1 IJ
+3 2 HI
+2 4 IG
+1 3 JH
+4 1 GJ
+3 4 HG
+5 3 1 IGJ
+6 5 4 HGJ
+
+
+
diff --git a/test/boolean/t16 b/test/boolean/t16
new file mode 100644
index 0000000..d4f2374
--- /dev/null
+++ b/test/boolean/t16
@@ -0,0 +1,12 @@
+4 5 2
+1 0 0 A
+0 1 0 B
+-1 0 0 C
+0 -2 -0.5 D
+1 2 AB
+2 3 BC
+3 1 CA
+1 4 AD
+3 4 CD
+1 2 3 ABC
+3 5 4 ACD
diff --git a/test/boolean/t17 b/test/boolean/t17
new file mode 100644
index 0000000..30c00c1
--- /dev/null
+++ b/test/boolean/t17
@@ -0,0 +1,8 @@
+3 3 1 GtsSurface GtsNFace GtsNEdge GtsNVertex
+0 0 1 A
+0.045944 1.43664e-16 0.998944 B
+0.0141975 0.0436953 0.998944 C
+1 2 AB
+2 3 BC
+1 3 AC
+1 2 3 ABC
diff --git a/test/boolean/t18 b/test/boolean/t18
new file mode 100644
index 0000000..fee6906
--- /dev/null
+++ b/test/boolean/t18
@@ -0,0 +1,8 @@
+3 3 1 GtsSurface GtsNFace GtsNEdge GtsNVertex
+0 0 1 D
+0.197173 6.16548e-16 0.980369 E
+0.0609297 0.187522 0.980369 F
+1 2 DE
+2 3 EF
+1 3 FD
+1 2 3 DEF
diff --git a/test/boolean/t19 b/test/boolean/t19
new file mode 100644
index 0000000..d845998
--- /dev/null
+++ b/test/boolean/t19
@@ -0,0 +1,12 @@
+4 5 1
+1 0 0 A
+0 1 0 B
+-1 0 0 C
+0 -1 0 D
+1 2 AB
+2 3 BC
+3 4 CD
+4 1 DA
+2 4 BD
+1 5 4 ABD
+2 3 5 BCD
diff --git a/test/boolean/t2 b/test/boolean/t2
new file mode 100644
index 0000000..9417788
--- /dev/null
+++ b/test/boolean/t2
@@ -0,0 +1,8 @@
+3 3 1
+0 -1 0
+0 0.5 -1
+0 0.5 1
+1 2
+2 3
+3 1
+1 2 3
diff --git a/test/boolean/t20 b/test/boolean/t20
new file mode 100644
index 0000000..8e3172f
--- /dev/null
+++ b/test/boolean/t20
@@ -0,0 +1,12 @@
+4 5 2
+0 1 0.5 E
+0 -1 0.5 F
+0 -1 -0.5 G
+0 1 -0.5 H
+1 2 EF
+2 3 FG
+3 4 GH
+4 1 HE
+1 3 EG
+1 2 5 EFG
+3 4 5 GHE
diff --git a/test/boolean/t21 b/test/boolean/t21
new file mode 100644
index 0000000..f987374
--- /dev/null
+++ b/test/boolean/t21
@@ -0,0 +1,12 @@
+4 5 1
+0 0.5 1 E
+0 0.5 -1 F
+0 -0.5 -1 G
+0 -0.5 1 H
+1 2 EF
+2 3 FG
+3 4 GH
+4 1 HE
+1 3 EG
+1 2 5 EFG
+3 4 5 GHE
diff --git a/test/boolean/t22 b/test/boolean/t22
new file mode 100644
index 0000000..a3f84f4
--- /dev/null
+++ b/test/boolean/t22
@@ -0,0 +1,8 @@
+3 3 1
+1 0 0 D
+0 0 1 E
+-1 0 0 F
+1 2 DE
+2 3 EF
+3 1 FD
+1 2 3 DEF
diff --git a/test/boolean/t23 b/test/boolean/t23
new file mode 100644
index 0000000..902f27d
--- /dev/null
+++ b/test/boolean/t23
@@ -0,0 +1,8 @@
+3 3 1
+1.5 0 0 D
+0 0 1 E
+-1 0 0 F
+1 2 DE
+2 3 EF
+3 1 FD
+1 2 3 DEF
diff --git a/test/boolean/t24 b/test/boolean/t24
new file mode 100644
index 0000000..fac2f84
--- /dev/null
+++ b/test/boolean/t24
@@ -0,0 +1,8 @@
+3 3 1
+1.5 0 0 D
+0 0 1 E
+-1.5 0 0 F
+1 2 DE
+2 3 EF
+3 1 FD
+1 2 3 DEF
diff --git a/test/boolean/t25 b/test/boolean/t25
new file mode 100644
index 0000000..b8d6196
--- /dev/null
+++ b/test/boolean/t25
@@ -0,0 +1,8 @@
+3 3 1
+-0.198159 1.13233e-16 -0.985271 A
+-0.28322 0.205771 -0.942056 B
+-0.419495 2.39712e-16 -0.913263 C
+1 2 AB
+2 3 BC
+3 1 CA
+1 2 3 ABC
diff --git a/test/boolean/t26 b/test/boolean/t26
new file mode 100644
index 0000000..71724cc
--- /dev/null
+++ b/test/boolean/t26
@@ -0,0 +1,8 @@
+3 3 1
+-0.361845 2.06769e-16 -0.932238 D
+-0.417408 2.38519e-16 -0.908719 E
+-0.386478 -0.050289 -0.920926 F
+1 2 DE
+2 3 EF
+3 1 FD
+1 2 3 DEF
diff --git a/test/boolean/t27 b/test/boolean/t27
new file mode 100644
index 0000000..e825784
--- /dev/null
+++ b/test/boolean/t27
@@ -0,0 +1,29 @@
+8 18 2
+0 -1.63299 -1.5
+-1.63299 0 -1.5
+0 1.63299 -1.5
+1.63299 0 -1.5
+0 -1.63299 1.1547
+-1.63299 0 1.1547
+0 1.63299 1.1547
+1.63299 0 1.1547
+3 1
+2 1
+6 1
+2 6
+2 7
+3 2
+3 7
+3 8
+4 3
+4 8
+5 1
+4 5
+1 4
+6 5
+7 6
+5 8
+7 5
+8 7
+6 1 2
+4 2 3
diff --git a/test/boolean/t28 b/test/boolean/t28
new file mode 100644
index 0000000..2bde9a8
--- /dev/null
+++ b/test/boolean/t28
@@ -0,0 +1,31 @@
+8 18 1
+0 -1.63299 -2
+-1.63299 0 -2
+0 1.63299 -2
+1.63299 0 -2
+0 -1.63299 2
+-1.63299 0 2
+0 1.63299 2
+1.63299 0 2
+3 1
+2 1
+6 1
+2 6
+2 7
+3 2
+3 7
+3 8
+4 3
+4 8
+5 1
+4 5
+1 4
+6 5
+7 6
+5 8
+7 5
+8 7
+4 2 3
+
+
+
diff --git a/test/boolean/t3 b/test/boolean/t3
new file mode 100644
index 0000000..bb50be2
--- /dev/null
+++ b/test/boolean/t3
@@ -0,0 +1,12 @@
+4 5 2
+0 -1 0
+0 0.5 -1
+0 0.5 1
+1 0.5 0
+1 2
+2 3
+3 1
+4 2
+4 3
+1 2 3
+5 2 4
diff --git a/test/boolean/t4 b/test/boolean/t4
new file mode 100644
index 0000000..e156042
--- /dev/null
+++ b/test/boolean/t4
@@ -0,0 +1,12 @@
+4 5 2
+0 -1 0
+0 0.5 -1
+0 0.5 1
+0 1.5 0
+1 2
+2 3
+3 1
+4 2
+4 3
+1 2 3
+5 2 4
diff --git a/test/boolean/t5 b/test/boolean/t5
new file mode 100644
index 0000000..770788c
--- /dev/null
+++ b/test/boolean/t5
@@ -0,0 +1,12 @@
+4 5 2
+0 -1 0
+0 0.5 -1
+0 0.5 1
+1 -0.5 0
+1 2
+2 3
+3 1
+4 2
+4 3
+1 2 3
+5 2 4
diff --git a/test/boolean/t6 b/test/boolean/t6
new file mode 100644
index 0000000..c0bc7f4
--- /dev/null
+++ b/test/boolean/t6
@@ -0,0 +1,8 @@
+3 3 1
+0 0.4 0
+0 0.6 -1
+0 0.5 1
+1 2
+2 3
+3 1
+1 2 3
diff --git a/test/boolean/t7 b/test/boolean/t7
new file mode 100644
index 0000000..1addfd9
--- /dev/null
+++ b/test/boolean/t7
@@ -0,0 +1,8 @@
+3 3 1
+0 0.4 0 D
+0 0.6 -1 E
+0 0.5 0 F
+1 2 DE
+2 3 EF
+3 1 FD
+1 2 3 EFD
diff --git a/test/boolean/t9 b/test/boolean/t9
new file mode 100644
index 0000000..d2ddf99
--- /dev/null
+++ b/test/boolean/t9
@@ -0,0 +1,12 @@
+4 5 2
+0 -1 0 D
+0 0.5 -1 E
+0 0.5 1 F
+0 1 0 G
+1 2 DE
+2 3 EF
+3 1 FD
+4 2 GE
+4 3 GF
+1 2 3 DEF
+5 2 4 EGF
diff --git a/test/coarsen/Makefile.am b/test/coarsen/Makefile.am
new file mode 100644
index 0000000..3937c9e
--- /dev/null
+++ b/test/coarsen/Makefile.am
@@ -0,0 +1,12 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\
+	 -DG_LOG_DOMAIN=\"Gts-test\"
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+check_PROGRAMS = cartesian c1 c2 c3 double_prism
+
+TESTS = flat.sh flat1.sh
+
+EXTRA_DIST = flat.sh flat1.sh
diff --git a/test/coarsen/Makefile.in b/test/coarsen/Makefile.in
new file mode 100644
index 0000000..80bb1fd
--- /dev/null
+++ b/test/coarsen/Makefile.in
@@ -0,0 +1,381 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) 	 -DG_LOG_DOMAIN=\"Gts-test\"
+
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+check_PROGRAMS = cartesian c1 c2 c3 double_prism
+
+TESTS = flat.sh flat1.sh
+
+EXTRA_DIST = flat.sh flat1.sh
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+LIBS = @LIBS@
+cartesian_SOURCES = cartesian.c
+cartesian_OBJECTS =  cartesian.o
+cartesian_LDADD = $(LDADD)
+cartesian_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+cartesian_LDFLAGS = 
+c1_SOURCES = c1.c
+c1_OBJECTS =  c1.o
+c1_LDADD = $(LDADD)
+c1_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+c1_LDFLAGS = 
+c2_SOURCES = c2.c
+c2_OBJECTS =  c2.o
+c2_LDADD = $(LDADD)
+c2_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+c2_LDFLAGS = 
+c3_SOURCES = c3.c
+c3_OBJECTS =  c3.o
+c3_LDADD = $(LDADD)
+c3_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+c3_LDFLAGS = 
+double_prism_SOURCES = double_prism.c
+double_prism_OBJECTS =  double_prism.o
+double_prism_LDADD = $(LDADD)
+double_prism_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+double_prism_LDFLAGS = 
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = cartesian.c c1.c c2.c c3.c double_prism.c
+OBJECTS = cartesian.o c1.o c2.o c3.o double_prism.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/coarsen/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-checkPROGRAMS:
+
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+distclean-checkPROGRAMS:
+
+maintainer-clean-checkPROGRAMS:
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+cartesian: $(cartesian_OBJECTS) $(cartesian_DEPENDENCIES)
+	@rm -f cartesian
+	$(LINK) $(cartesian_LDFLAGS) $(cartesian_OBJECTS) $(cartesian_LDADD) $(LIBS)
+
+c1: $(c1_OBJECTS) $(c1_DEPENDENCIES)
+	@rm -f c1
+	$(LINK) $(c1_LDFLAGS) $(c1_OBJECTS) $(c1_LDADD) $(LIBS)
+
+c2: $(c2_OBJECTS) $(c2_DEPENDENCIES)
+	@rm -f c2
+	$(LINK) $(c2_LDFLAGS) $(c2_OBJECTS) $(c2_LDADD) $(LIBS)
+
+c3: $(c3_OBJECTS) $(c3_DEPENDENCIES)
+	@rm -f c3
+	$(LINK) $(c3_LDFLAGS) $(c3_OBJECTS) $(c3_LDADD) $(LIBS)
+
+double_prism: $(double_prism_OBJECTS) $(double_prism_DEPENDENCIES)
+	@rm -f double_prism
+	$(LINK) $(double_prism_LDFLAGS) $(double_prism_OBJECTS) $(double_prism_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = test/coarsen
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+c1.o: c1.c ../../src/gts.h ../../src/gtsconfig.h
+c2.o: c2.c ../../src/gts.h ../../src/gtsconfig.h
+c3.o: c3.c ../../src/gts.h ../../src/gtsconfig.h
+cartesian.o: cartesian.c ../../src/gts.h ../../src/gtsconfig.h
+double_prism.o: double_prism.c ../../src/gts.h ../../src/gtsconfig.h
+
+check-TESTS: $(TESTS)
+	@failed=0; all=0; \
+	srcdir=$(srcdir); export srcdir; \
+	for tst in $(TESTS); do \
+	  if test -f $$tst; then dir=.; \
+	  else dir="$(srcdir)"; fi; \
+	  if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+	    all=`expr $$all + 1`; \
+	    echo "PASS: $$tst"; \
+	  elif test $$? -ne 77; then \
+	    all=`expr $$all + 1`; \
+	    failed=`expr $$failed + 1`; \
+	    echo "FAIL: $$tst"; \
+	  fi; \
+	done; \
+	if test "$$failed" -eq 0; then \
+	  banner="All $$all tests passed"; \
+	else \
+	  banner="$$failed of $$all tests failed"; \
+	fi; \
+	dashes=`echo "$$banner" | sed s/./=/g`; \
+	echo "$$dashes"; \
+	echo "$$banner"; \
+	echo "$$dashes"; \
+	test "$$failed" -eq 0
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-checkPROGRAMS mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-checkPROGRAMS clean-compile clean-libtool clean-tags \
+		clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-checkPROGRAMS distclean-compile \
+		distclean-libtool distclean-tags distclean-generic \
+		clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-checkPROGRAMS \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-checkPROGRAMS distclean-checkPROGRAMS \
+clean-checkPROGRAMS maintainer-clean-checkPROGRAMS mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir check-TESTS info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/coarsen/c1.c b/test/coarsen/c1.c
new file mode 100644
index 0000000..a334d7a
--- /dev/null
+++ b/test/coarsen/c1.c
@@ -0,0 +1,191 @@
+#include "gts.h"
+
+static void triangle_normal (GtsTriangle * t, 
+			     gdouble * nx, 
+			     gdouble * ny, 
+			     gdouble * nz,
+			     gdouble * nt)
+{
+  GtsPoint * p1, * p2 = NULL, * p3 = NULL;
+  gdouble x1, y1, z1, x2, y2, z2;
+
+  g_return_if_fail (t != NULL);
+
+  p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1);
+  if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v1);
+  }
+  else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v1);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v2);
+  }
+  else
+    g_assert_not_reached ();
+
+  x1 = p2->x - p1->x;
+  y1 = p2->y - p1->y;
+  z1 = p2->z - p1->z;
+
+  x2 = p3->x - p1->x;
+  y2 = p3->y - p1->y;
+  z2 = p3->z - p1->z;
+
+  *nt = ((p1->y*p2->z - p1->z*p2->y)*p3->x + 
+	 (p1->z*p2->x - p1->x*p2->z)*p3->y + 
+	 (p1->x*p2->y - p1->y*p2->x)*p3->z);
+  *nx = y1*z2 - z1*y2;
+  *ny = z1*x2 - x1*z2;
+  *nz = x1*y2 - y1*x2;
+}
+
+static gdouble edge_volume_cost (GtsEdge * e, GtsVertex * v)
+{
+  GSList * i, * triangles;
+  gdouble n1, n2, n3, nt;
+  gdouble cost = 0.0, a;
+
+  triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL);
+  triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles);
+
+  i = triangles;
+  while (i) {
+    if (GTS_IS_FACE (i->data)) {
+      triangle_normal (i->data, &n1, &n2, &n3, &nt);
+      a = GTS_POINT (v)->x*n1 + 
+	GTS_POINT (v)->y*n2 + 
+	GTS_POINT (v)->z*n3 - nt;
+      cost += a*a;
+    }
+    i = i->next;
+  }
+  g_slist_free (triangles);
+
+  return cost/36.;
+}
+
+static GtsVertex * edge_collapse (GtsSurface * s,
+				  GtsEdge * e,
+				  GtsCoarsenFunc midvertex)
+{
+  GtsVertex  * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid;
+  GtsSplit * vs;
+  GtsObject * o1, * o2;
+
+  /* if the edge is degenerate (i.e. v1 == v2), destroy and return */
+  if (v1 == v2) {
+    gts_object_destroy (GTS_OBJECT (e));
+    return NULL;
+  }
+
+  mid = (*midvertex) (e, s->vertex_class, NULL);
+  o1 = GTS_OBJECT (v1);
+  o2 = GTS_OBJECT (v2);
+  vs = gts_split_new (gts_split_class (), mid, o1, o2);
+  gts_split_collapse (vs, s->edge_class, NULL);
+
+  return mid;
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * surface = gts_surface_new (gts_surface_class (),
+					  gts_face_class (),
+					  gts_edge_class (),
+					  gts_vertex_class ());
+  
+  GtsVertex * v1 = gts_vertex_new (gts_vertex_class (), 0.684, 0.024, 0.12);
+  GtsVertex * v2 = gts_vertex_new (gts_vertex_class (),
+				   0.696, 0.024, 0.12);
+  GtsVertex * v3 = gts_vertex_new (gts_vertex_class (),
+				   0.696, 0, 0.12);
+  GtsVertex * v4 = gts_vertex_new (gts_vertex_class (),
+				   0.66, 0.024, 0.12);
+  GtsVertex * v5 = gts_vertex_new (gts_vertex_class (),
+				   0.684, 0.012, 0.12);
+  GtsVertex * v6 = gts_vertex_new (gts_vertex_class (),
+				   0.672, 0.024, 0.12);
+  GtsVertex * v7 = gts_vertex_new (gts_vertex_class (),
+				   0.672, 0.036, 0.1);
+#if 1
+  GtsVertex * v8 = gts_vertex_new (gts_vertex_class (),
+				   0.684, 0.036, 0.1);
+#else
+  GtsVertex * v8 = gts_vertex_new (gts_vertex_class (),
+				   0.684, 0.036, 0.101);
+#endif
+  GtsVertex * v9 = gts_vertex_new (gts_vertex_class (),
+				   0.6744, 0, 0.12);
+  
+  GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2);
+  GtsEdge * e2 = gts_edge_new (gts_edge_class (), v3, v1);
+  GtsEdge * e3 = gts_edge_new (gts_edge_class (), v3, v2);
+  GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v5);
+  GtsEdge * e5 = gts_edge_new (gts_edge_class (), v6, v5);
+  GtsEdge * e6 = gts_edge_new (gts_edge_class (), v6, v4);
+  GtsEdge * e7 = gts_edge_new (gts_edge_class (), v7, v8);
+  GtsEdge * e8 = gts_edge_new (gts_edge_class (), v7, v1);
+  GtsEdge * e9 = gts_edge_new (gts_edge_class (), v1, v8);
+  GtsEdge * e10 = gts_edge_new (gts_edge_class (), v9, v3);
+  GtsEdge * e11 = gts_edge_new (gts_edge_class (), v3, v5);
+  GtsEdge * e12 = gts_edge_new (gts_edge_class (), v9, v5);
+  GtsEdge * e13 = gts_edge_new (gts_edge_class (), v6, v1);
+  GtsEdge * e14 = gts_edge_new (gts_edge_class (), v6, v7);
+  GtsEdge * e15 = gts_edge_new (gts_edge_class (), v5, v1);
+  GtsEdge * e16 = gts_edge_new (gts_edge_class (), v8, v2);
+  GtsEdge * e17 = gts_edge_new (gts_edge_class (), v9, v4);
+
+  GtsFace * f1 = gts_face_new (gts_face_class (),
+			       e1, e2, e3);
+  GtsFace * f2 = gts_face_new (gts_face_class (),
+			       e4, e5, e6);
+  GtsFace * f3 = gts_face_new (gts_face_class (),
+			       e7, e8, e9);
+  GtsFace * f4 = gts_face_new (gts_face_class (),
+			       e10, e11, e12);
+  GtsFace * f5 = gts_face_new (gts_face_class (),
+			       e13, e8, e14);
+  GtsFace * f6 = gts_face_new (gts_face_class (),
+			       e15, e13, e5);
+  GtsFace * f7 = gts_face_new (gts_face_class (),
+			       e1, e16, e9);
+  GtsFace * f8 = gts_face_new (gts_face_class (),
+			       e4, e17, e12);
+  GtsFace * f9 = gts_face_new (gts_face_class (),
+			       e15, e11, e2);
+
+  GtsVertex * v;
+
+  gts_surface_add_face (surface, f1);
+  gts_surface_add_face (surface, f2);
+  gts_surface_add_face (surface, f3);
+  gts_surface_add_face (surface, f4);
+  gts_surface_add_face (surface, f5);
+  gts_surface_add_face (surface, f6);
+  gts_surface_add_face (surface, f7);
+  gts_surface_add_face (surface, f8);
+  gts_surface_add_face (surface, f9);
+
+#if 1
+  v = edge_collapse (surface, e15, 
+		     (GtsCoarsenFunc) gts_volume_optimized_vertex);
+#else
+  v = gts_volume_optimized_vertex (e15, gts_vertex_class ());
+  fprintf (stderr, "(%g, %g, %g) cost: %g\n", 
+	   GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z,
+	   edge_volume_cost (e15, v));
+#endif
+
+  gts_surface_print_stats (surface, stderr);
+  gts_surface_write (surface, stdout);
+
+  return 0;
+}
diff --git a/test/coarsen/c2.c b/test/coarsen/c2.c
new file mode 100644
index 0000000..fc1682e
--- /dev/null
+++ b/test/coarsen/c2.c
@@ -0,0 +1,200 @@
+#include "gts.h"
+
+static void triangle_normal (GtsTriangle * t, 
+			     gdouble * nx, 
+			     gdouble * ny, 
+			     gdouble * nz,
+			     gdouble * nt)
+{
+  GtsPoint * p1, * p2 = NULL, * p3 = NULL;
+  gdouble x1, y1, z1, x2, y2, z2;
+
+  g_return_if_fail (t != NULL);
+
+  p1 = GTS_POINT (GTS_SEGMENT (t->e1)->v1);
+  if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v1);
+  }
+  else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e2)->v1);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GTS_POINT (GTS_SEGMENT (t->e1)->v2);
+    p3 = GTS_POINT (GTS_SEGMENT (t->e2)->v2);
+  }
+  else
+    g_assert_not_reached ();
+
+  x1 = p2->x - p1->x;
+  y1 = p2->y - p1->y;
+  z1 = p2->z - p1->z;
+
+  x2 = p3->x - p1->x;
+  y2 = p3->y - p1->y;
+  z2 = p3->z - p1->z;
+
+  *nt = ((p1->y*p2->z - p1->z*p2->y)*p3->x + 
+	 (p1->z*p2->x - p1->x*p2->z)*p3->y + 
+	 (p1->x*p2->y - p1->y*p2->x)*p3->z);
+  *nx = y1*z2 - z1*y2;
+  *ny = z1*x2 - x1*z2;
+  *nz = x1*y2 - y1*x2;
+}
+
+static gdouble edge_volume_cost (GtsEdge * e, GtsVertex * v)
+{
+  GSList * i, * triangles;
+  gdouble n1, n2, n3, nt;
+  gdouble cost = 0.0, a;
+
+  triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v1, NULL);
+  triangles = gts_vertex_triangles (GTS_SEGMENT (e)->v2, triangles);
+
+  i = triangles;
+  while (i) {
+    if (GTS_IS_FACE (i->data)) {
+      triangle_normal (i->data, &n1, &n2, &n3, &nt);
+      a = GTS_POINT (v)->x*n1 + 
+	GTS_POINT (v)->y*n2 + 
+	GTS_POINT (v)->z*n3 - nt;
+      cost += a*a;
+    }
+    i = i->next;
+  }
+  g_slist_free (triangles);
+
+  return cost/36.;
+}
+
+static GtsVertex * edge_collapse (GtsSurface * s,
+				  GtsEdge * e,
+				  GtsVertex * (*midvertex) (GtsEdge *,
+							    GtsVertexClass *))
+{
+  GtsVertex  * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid;
+  GtsSplit * vs;
+  GtsObject * o1, * o2;
+
+  /* if the edge is degenerate (i.e. v1 == v2), destroy and return */
+  if (v1 == v2) {
+    gts_object_destroy (GTS_OBJECT (e));
+    return NULL;
+  }
+
+  mid = (*midvertex) (e, s->vertex_class);
+  o1 = GTS_OBJECT (v1);
+  o2 = GTS_OBJECT (v2);
+  vs = gts_split_new (gts_split_class (), mid, o1, o2);
+  gts_split_collapse (vs, s->edge_class, NULL);
+
+  return mid;
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * surface = gts_surface_new (gts_surface_class (),
+					  gts_face_class (),
+					  gts_edge_class (),
+					  gts_vertex_class ());
+		     
+  GtsVertex * v1 = gts_vertex_new (gts_vertex_class (),
+				   0.48, 1.068, 0.116);
+  GtsVertex * v2 = gts_vertex_new (gts_vertex_class (),
+				   0.492, 1.068, 0.118);
+  GtsVertex * v3 = gts_vertex_new (gts_vertex_class (),
+				   0.492, 1.056, 0.118);
+  GtsVertex * v4 = gts_vertex_new (gts_vertex_class (),
+				   0.516, 1.044, 0.118);
+  GtsVertex * v5 = gts_vertex_new (gts_vertex_class (),
+				   0.492, 1.04057, 0.118);
+  GtsVertex * v6 = gts_vertex_new (gts_vertex_class (),
+				   0.492, 1.02, 0.118);
+  GtsVertex * v7 = gts_vertex_new (gts_vertex_class (),
+				   0.504, 1.044, 0.118);
+  GtsVertex * v8 = gts_vertex_new (gts_vertex_class (),
+				   0.504, 1.056, 0.117);
+  GtsVertex * v9 = gts_vertex_new (gts_vertex_class (),
+				   0.48, 1.056, 0.117);
+  GtsVertex * v10 = gts_vertex_new (gts_vertex_class (),
+                                    0.48, 1.032, 0.117);
+
+  GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2);
+  GtsEdge * e2 = gts_edge_new (gts_edge_class (), v1, v3);
+  GtsEdge * e3 = gts_edge_new (gts_edge_class (), v3, v2);
+  GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v5);
+  GtsEdge * e5 = gts_edge_new (gts_edge_class (), v5, v6);
+  GtsEdge * e6 = gts_edge_new (gts_edge_class (), v6, v4);
+  GtsEdge * e7 = gts_edge_new (gts_edge_class (), v5, v3);
+  GtsEdge * e8 = gts_edge_new (gts_edge_class (), v7, v5);
+  GtsEdge * e9 = gts_edge_new (gts_edge_class (), v7, v3);
+  GtsEdge * e10 = gts_edge_new (gts_edge_class (), v3, v8);
+  GtsEdge * e11 = gts_edge_new (gts_edge_class (), v2, v8);
+  GtsEdge * e12 = gts_edge_new (gts_edge_class (), v7, v8);
+  GtsEdge * e13 = gts_edge_new (gts_edge_class (), v7, v4);
+  GtsEdge * e14 = gts_edge_new (gts_edge_class (), v9, v3);
+  GtsEdge * e15 = gts_edge_new (gts_edge_class (), v9, v1);
+  GtsEdge * e16 = gts_edge_new (gts_edge_class (), v10, v5);
+  GtsEdge * e17 = gts_edge_new (gts_edge_class (), v9, v5);
+  GtsEdge * e18 = gts_edge_new (gts_edge_class (), v10, v9);
+  GtsEdge * e19 = gts_edge_new (gts_edge_class (), v10, v6);
+
+  GtsFace * f1 = gts_face_new (gts_face_class (),
+			       e1, e2, e3);
+  GtsFace * f2 = gts_face_new (gts_face_class (),
+			       e4, e5, e6);
+  GtsFace * f3 = gts_face_new (gts_face_class (),
+			       e7, e8, e9);
+  GtsFace * f4 = gts_face_new (gts_face_class (),
+			       e10, e11, e3);
+  GtsFace * f5 = gts_face_new (gts_face_class (),
+			       e10, e9, e12);
+  GtsFace * f6 = gts_face_new (gts_face_class (),
+			       e8, e4, e13);
+  GtsFace * f7 = gts_face_new (gts_face_class (),
+			       e14, e2, e15);
+  GtsFace * f8 = gts_face_new (gts_face_class (),
+			       e16, e17, e18);
+  GtsFace * f9 = gts_face_new (gts_face_class (),
+			       e7, e14, e17);
+  GtsFace * f10 = gts_face_new (gts_face_class (),
+                                e16, e19, e5);
+ 
+  GtsVertex * v;
+
+  gts_surface_add_face (surface, f1);
+  gts_surface_add_face (surface, f2);
+  gts_surface_add_face (surface, f3);
+  gts_surface_add_face (surface, f4);
+  gts_surface_add_face (surface, f5);
+  gts_surface_add_face (surface, f6);
+  gts_surface_add_face (surface, f7);
+  gts_surface_add_face (surface, f8);
+  gts_surface_add_face (surface, f9);
+  gts_surface_add_face (surface, f10);
+
+  gts_surface_print_stats (surface, stderr);
+  fprintf (stderr, "volume: %g\n", gts_surface_volume (surface));
+
+#if 1
+  v = edge_collapse (surface, e7, gts_volume_optimized_vertex);
+#else
+  v = gts_volume_optimized_vertex (e7, gts_vertex_class ());
+  fprintf (stderr, "(%g, %g, %g) edge cost: %g cost: %g\n", 
+	   GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z,
+	   edge_volume_cost (e7, v),
+	   gts_volume_optimized_cost (e7));
+#endif
+
+  gts_surface_print_stats (surface, stderr);
+  fprintf (stderr, "volume: %g\n", gts_surface_volume (surface));
+
+  gts_surface_write (surface, stdout);
+
+  return 0;
+}
diff --git a/test/coarsen/c3.c b/test/coarsen/c3.c
new file mode 100644
index 0000000..81e9b0b
--- /dev/null
+++ b/test/coarsen/c3.c
@@ -0,0 +1,153 @@
+#include "gts.h"
+
+static GtsVertex * edge_collapse (GtsSurface * s,
+				  GtsEdge * e,
+				  GtsCoarsenFunc coarsen_func,
+				  gpointer coarsen_data)
+{
+  GtsVertex  * v1 = GTS_SEGMENT (e)->v1, * v2 = GTS_SEGMENT (e)->v2, * mid;
+  GtsSplit * vs;
+  GtsObject * o1, * o2;
+
+  /* if the edge is degenerate (i.e. v1 == v2), destroy and return */
+  if (v1 == v2) {
+    gts_object_destroy (GTS_OBJECT (e));
+    return NULL;
+  }
+
+  mid = (*coarsen_func) (e, s->vertex_class, coarsen_data);
+  o1 = GTS_OBJECT (v1);
+  o2 = GTS_OBJECT (v2);
+  vs = gts_split_new (gts_split_class (), mid, o1, o2);
+  gts_split_collapse (vs, s->edge_class, NULL);
+
+  return mid;
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * surface = gts_surface_new (gts_surface_class (),
+					  gts_face_class (),
+					  gts_edge_class (),
+					  gts_vertex_class ());
+
+  GtsVertex * v1 = gts_vertex_new (gts_vertex_class (),
+				   11640, 15867.5, 1080);
+  GtsVertex * v2 = gts_vertex_new (gts_vertex_class (),
+				   11700, 15720, 1070);
+  GtsVertex * v3 = gts_vertex_new (gts_vertex_class (),
+				   11616, 15728.8, 1084);
+  GtsVertex * v4 = gts_vertex_new (gts_vertex_class (),
+				   11580, 15840, 1090);
+  GtsVertex * v5 = gts_vertex_new (gts_vertex_class (),
+				   11460, 15840, 1100);
+  GtsVertex * v6 = gts_vertex_new (gts_vertex_class (),
+				   11520, 15840, 1100);
+  GtsVertex * v7 = gts_vertex_new (gts_vertex_class (),
+				   11520, 15780, 1100);
+  GtsVertex * v8 = gts_vertex_new (gts_vertex_class (),
+				   11700, 15660, 1070);
+  GtsVertex * v9 = gts_vertex_new (gts_vertex_class (),
+				   11672.4, 15600.1, 1074.6);
+  GtsVertex * v10 = gts_vertex_new (gts_vertex_class (),
+                                    11520, 15751.7, 1100);
+  GtsVertex * v11 = gts_vertex_new (gts_vertex_class (),
+                                    11569.5, 15646.1, 1091.75);
+  GtsVertex * v;
+
+  GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2);
+  GtsEdge * e2 = gts_edge_new (gts_edge_class (), v1, v3);
+  GtsEdge * e3 = gts_edge_new (gts_edge_class (), v3, v2);
+  GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v1);
+  GtsEdge * e5 = gts_edge_new (gts_edge_class (), v3, v4);
+  GtsEdge * e6 = gts_edge_new (gts_edge_class (), v5, v6);
+  GtsEdge * e7 = gts_edge_new (gts_edge_class (), v5, v7);
+  GtsEdge * e8 = gts_edge_new (gts_edge_class (), v6, v7);
+  GtsEdge * e9 = gts_edge_new (gts_edge_class (), v8, v2);
+  GtsEdge * e10 = gts_edge_new (gts_edge_class (), v8, v3);
+  GtsEdge * e11 = gts_edge_new (gts_edge_class (), v6, v4);
+  GtsEdge * e12 = gts_edge_new (gts_edge_class (), v6, v3);
+  GtsEdge * e13 = gts_edge_new (gts_edge_class (), v8, v9);
+  GtsEdge * e14 = gts_edge_new (gts_edge_class (), v3, v9);
+  GtsEdge * e15 = gts_edge_new (gts_edge_class (), v7, v10);
+  GtsEdge * e16 = gts_edge_new (gts_edge_class (), v10, v5);
+  GtsEdge * e17 = gts_edge_new (gts_edge_class (), v11, v3);
+  GtsEdge * e18 = gts_edge_new (gts_edge_class (), v9, v11);
+  GtsEdge * e19 = gts_edge_new (gts_edge_class (), v10, v11);
+  GtsEdge * e20 = gts_edge_new (gts_edge_class (), v11, v7);
+  GtsEdge * e21 = gts_edge_new (gts_edge_class (), v7, v3);
+
+  GtsFace * f1 = gts_face_new (gts_face_class (),
+			       e1, e2, e3);
+  GtsFace * f2 = gts_face_new (gts_face_class (),
+			       e4, e5, e2);
+  GtsFace * f3 = gts_face_new (gts_face_class (),
+			       e6, e7, e8);
+  GtsFace * f4 = gts_face_new (gts_face_class (),
+			       e9, e3, e10);
+  GtsFace * f5 = gts_face_new (gts_face_class (),
+			       e11, e12, e5);
+  GtsFace * f6 = gts_face_new (gts_face_class (),
+			       e13, e10, e14);
+  GtsFace * f7 = gts_face_new (gts_face_class (),
+			       e15, e7, e16);
+  GtsFace * f8 = gts_face_new (gts_face_class (),
+			       e17, e18, e14);
+  GtsFace * f9 = gts_face_new (gts_face_class (),
+			       e19, e20, e15);
+  GtsFace * f10 = gts_face_new (gts_face_class (),
+                                e21, e12, e8);
+  GtsFace * f11 = gts_face_new (gts_face_class (),
+                                e21, e20, e17);
+
+  GtsVolumeOptimizedParams params = { 0.5, 0.5, 0. };
+  
+  gts_surface_add_face (surface, f1);
+  gts_surface_add_face (surface, f2);
+  gts_surface_add_face (surface, f3);
+  gts_surface_add_face (surface, f4);
+  gts_surface_add_face (surface, f5);
+  gts_surface_add_face (surface, f6);
+  gts_surface_add_face (surface, f7);
+  gts_surface_add_face (surface, f8);
+  gts_surface_add_face (surface, f9);
+  gts_surface_add_face (surface, f10);
+  gts_surface_add_face (surface, f11);
+
+  gts_surface_print_stats (surface, stderr);
+  fprintf (stderr, "volume: %g\n", gts_surface_volume (surface));
+
+#if 0
+  v = edge_collapse (surface, e21, 
+		     (GtsCoarsenFunc) gts_volume_optimized_vertex, 
+		     &params);
+#else
+  v = gts_volume_optimized_vertex (e21, gts_vertex_class (), &params);
+fprintf (stderr, "v: %.10g %.10g %.10g\n",
+	 GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z);
+  fprintf (stderr, "before: check for folds...\n");
+  gts_edge_collapse_creates_fold (e21, v, 0.999695413509);
+  v = edge_collapse (surface, e21, 
+		     (GtsCoarsenFunc) gts_volume_optimized_vertex, 
+		     &params);
+  fprintf (stderr, "after: check for folds...\n");
+  {
+    GSList * i = v->segments;
+    while (i) {
+      GtsEdge * e = i->data;
+      gts_triangles_are_folded (e->triangles,  
+				GTS_SEGMENT (e)->v1,
+				GTS_SEGMENT (e)->v2,
+				0.999695413509);
+      i = i->next;
+    }
+  }
+#endif
+
+  gts_surface_print_stats (surface, stderr);
+  fprintf (stderr, "volume: %g\n", gts_surface_volume (surface));
+
+  gts_surface_write (surface, stdout);
+
+  return 0;
+}
diff --git a/test/coarsen/cartesian.c b/test/coarsen/cartesian.c
new file mode 100644
index 0000000..2353077
--- /dev/null
+++ b/test/coarsen/cartesian.c
@@ -0,0 +1,84 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "gts.h"
+
+int main (int argc, char * argv[])
+{
+  guint i, j, nx, ny;
+  gdouble cosa, sina, noise;
+  GtsSurface * surface;
+  GSList * l, * vertices = NULL;
+  GtsTriangle * t;
+  GtsVertex * v1, * v2, * v3;
+
+  if (argc != 5) {
+    fprintf (stderr, "usage: cartesian nx ny angle noise\n");
+    return 1;
+  }
+
+  nx = atoi (argv[1]);
+  ny = atoi (argv[2]);
+  cosa = cos (atof (argv[3]));
+  sina = sin (atof (argv[3]));
+  noise = atof (argv[4]);
+  
+  for (i = 0; i < nx; i++) {
+    gdouble x = (gdouble) i/(gdouble) (nx - 1); 
+    for (j = 0; j < ny; j++) {
+      gdouble y = (gdouble) j/(gdouble) (nx - 1); 
+      vertices = g_slist_prepend (vertices, 
+		   gts_vertex_new (gts_vertex_class (),
+				   cosa*x - sina*y, 
+				   sina*x + cosa*y,
+				   noise*rand()/(gdouble) RAND_MAX));
+    }
+  }
+
+  t = gts_triangle_enclosing (gts_triangle_class (), vertices, 100.);
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+  surface = gts_surface_new (gts_surface_class (),
+			     gts_face_class (),
+			     gts_edge_class (),
+			     gts_vertex_class ());
+  gts_surface_add_face (surface, gts_face_new (gts_face_class (),
+					       t->e1, t->e2, t->e3));
+  l = vertices;
+  while (l) {
+    g_assert (gts_delaunay_add_vertex (surface, l->data, NULL) == NULL);
+    l = l->next;
+  }
+
+  gts_allow_floating_vertices = TRUE;
+  gts_object_destroy (GTS_OBJECT (v1));
+  gts_object_destroy (GTS_OBJECT (v2));
+  gts_object_destroy (GTS_OBJECT (v3));
+  gts_allow_floating_vertices = FALSE;
+
+  gts_surface_write (surface, stdout);
+
+  if (gts_delaunay_check (surface)) {
+    fprintf (stderr, "WARNING: surface is not Delaunay\n");
+    return 1;
+  }
+
+  return 0;
+}
diff --git a/test/coarsen/double_prism.c b/test/coarsen/double_prism.c
new file mode 100644
index 0000000..9c3dbd7
--- /dev/null
+++ b/test/coarsen/double_prism.c
@@ -0,0 +1,94 @@
+#include "gts.h"
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * surface = gts_surface_new (gts_surface_class (),
+                                          gts_face_class (),
+                                          gts_edge_class (),
+                                          gts_vertex_class ());
+
+  GtsVertex * v1 = gts_vertex_new (gts_vertex_class (), 0, 0, 0);
+  GtsVertex * v2 = gts_vertex_new (gts_vertex_class (), 0, -0.5, 1);
+  GtsVertex * v3 = gts_vertex_new (gts_vertex_class (), 0, 0.5, 1);
+  GtsVertex * v4 = gts_vertex_new (gts_vertex_class (), 1, 0, 0);
+  GtsVertex * v5 = gts_vertex_new (gts_vertex_class (), 0, -0.5, -1);
+  GtsVertex * v6 = gts_vertex_new (gts_vertex_class (), 1, -0.5, -1);
+  GtsVertex * v7 = gts_vertex_new (gts_vertex_class (), 1, 0.5, -1);
+  GtsVertex * v8 = gts_vertex_new (gts_vertex_class (), 1, -0.5, 1);
+  GtsVertex * v9 = gts_vertex_new (gts_vertex_class (), 1, 0.5, 1);
+  GtsVertex * v10 = gts_vertex_new (gts_vertex_class (), 0, 0.5, -1);
+
+  GtsEdge * e1 = gts_edge_new (gts_edge_class (), v1, v2);
+  GtsEdge * e2 = gts_edge_new (gts_edge_class (), v1, v3);
+  GtsEdge * e3 = gts_edge_new (gts_edge_class (), v2, v3);
+  GtsEdge * e4 = gts_edge_new (gts_edge_class (), v4, v5);
+  GtsEdge * e5 = gts_edge_new (gts_edge_class (), v4, v6);
+  GtsEdge * e6 = gts_edge_new (gts_edge_class (), v5, v6);
+  GtsEdge * e7 = gts_edge_new (gts_edge_class (), v1, v4);
+  GtsEdge * e8 = gts_edge_new (gts_edge_class (), v1, v5);
+  GtsEdge * e9 = gts_edge_new (gts_edge_class (), v6, v7);
+  GtsEdge * e10 = gts_edge_new (gts_edge_class (), v4, v7);
+  GtsEdge * e11 = gts_edge_new (gts_edge_class (), v1, v7);
+  GtsEdge * e12 = gts_edge_new (gts_edge_class (), v8, v9);
+  GtsEdge * e13 = gts_edge_new (gts_edge_class (), v4, v9);
+  GtsEdge * e14 = gts_edge_new (gts_edge_class (), v4, v8);
+  GtsEdge * e15 = gts_edge_new (gts_edge_class (), v5, v10);
+  GtsEdge * e16 = gts_edge_new (gts_edge_class (), v1, v10);
+  GtsEdge * e17 = gts_edge_new (gts_edge_class (), v10, v7);
+  GtsEdge * e18 = gts_edge_new (gts_edge_class (), v1, v8);
+  GtsEdge * e19 = gts_edge_new (gts_edge_class (), v2, v8);
+  GtsEdge * e20 = gts_edge_new (gts_edge_class (), v4, v3);
+  GtsEdge * e21 = gts_edge_new (gts_edge_class (), v3, v9);
+
+  GtsFace * f1 = gts_face_new (gts_face_class (),
+                                e1, e2, e3);
+  GtsFace * f2 = gts_face_new (gts_face_class (),
+                                e4, e5, e6);
+  GtsFace * f3 = gts_face_new (gts_face_class (),
+                                e7, e4, e8);
+  GtsFace * f4 = gts_face_new (gts_face_class (),
+                                e9, e5, e10);
+  GtsFace * f5 = gts_face_new (gts_face_class (),
+                                e11, e10, e7);
+  GtsFace * f6 = gts_face_new (gts_face_class (),
+                                e12, e13, e14);
+  GtsFace * f7 = gts_face_new (gts_face_class (),
+                                e15, e16, e8);
+  GtsFace * f8 = gts_face_new (gts_face_class (),
+                                e17, e11, e16);
+  GtsFace * f9 = gts_face_new (gts_face_class (),
+                                e18, e14, e7);
+  GtsFace * f10 = gts_face_new (gts_face_class (),
+                                e19, e18, e1);
+  GtsFace * f11 = gts_face_new (gts_face_class (),
+                                e20, e13, e21);
+  GtsFace * f12 = gts_face_new (gts_face_class (),
+                                e7, e20, e2);
+  GtsVertex * v;
+  GtsVolumeOptimizedParams params = { 0.5, 0.5, 0.0 };
+  GtsSplit * vs;
+
+  gts_surface_add_face (surface, f1);
+  gts_surface_add_face (surface, f2);
+  gts_surface_add_face (surface, f3);
+  gts_surface_add_face (surface, f4);
+  gts_surface_add_face (surface, f5);
+  gts_surface_add_face (surface, f6);
+  gts_surface_add_face (surface, f7);
+  gts_surface_add_face (surface, f8);
+  gts_surface_add_face (surface, f9);
+  gts_surface_add_face (surface, f10);
+  gts_surface_add_face (surface, f11);
+  gts_surface_add_face (surface, f12);
+
+  g_assert (gts_edge_collapse_is_valid (e7));
+  v = gts_volume_optimized_vertex (e7, gts_vertex_class (), &params);
+  vs = gts_split_new (gts_split_class (), v, 
+		      GTS_OBJECT (GTS_SEGMENT (e7)->v1),
+		      GTS_OBJECT (GTS_SEGMENT (e7)->v2));
+  gts_split_collapse (vs, gts_edge_class (), NULL);
+
+  gts_surface_write (surface, stdout);
+
+  return 0;
+}
diff --git a/test/coarsen/flat.sh b/test/coarsen/flat.sh
new file mode 100755
index 0000000..ba1d557
--- /dev/null
+++ b/test/coarsen/flat.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+./cartesian 10 10 0 0 | ../../examples/coarsen -n 116 -v 2> /tmp/tutu > /dev/null
+if awk 'BEGIN {area = 0.} { if ($4 == "area:") { if (area) { if (area == $5) exit 1; else exit 0;} else area = $5;}}' < /tmp/tutu; then
+    exit 1
+fi
+exit 0
+
diff --git a/test/coarsen/flat1.sh b/test/coarsen/flat1.sh
new file mode 100755
index 0000000..34999fd
--- /dev/null
+++ b/test/coarsen/flat1.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+./cartesian 15 15 0 0 | ../../examples/coarsen -n 100 -v 2> /tmp/tutu > /dev/null
+if awk 'BEGIN {area = 0.} { if ($4 == "area:") { if (area) { if (area == $5) exit 1; else exit 0;} else area = $5;}}' < /tmp/tutu; then
+    exit 1
+fi
+exit 0
+
diff --git a/test/delaunay/Makefile.am b/test/delaunay/Makefile.am
new file mode 100644
index 0000000..1a62a60
--- /dev/null
+++ b/test/delaunay/Makefile.am
@@ -0,0 +1,17 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) \
+	 -DG_LOG_DOMAIN=\"Gts-test\"
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+check_PROGRAMS = cartesian random
+
+TESTS = cartesian.sh two_segments.sh too_close.sh
+
+EXTRA_DIST = \
+	cartesian.sh \
+	cartesian_speed.sh \
+	random_speed.sh \
+	two_segments.gts two_segments.sh \
+	too_close.gts too_close.sh
diff --git a/test/delaunay/Makefile.in b/test/delaunay/Makefile.in
new file mode 100644
index 0000000..3108e95
--- /dev/null
+++ b/test/delaunay/Makefile.in
@@ -0,0 +1,352 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) 	 -DG_LOG_DOMAIN=\"Gts-test\"
+
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+check_PROGRAMS = cartesian random
+
+TESTS = cartesian.sh two_segments.sh too_close.sh
+
+EXTRA_DIST =  	cartesian.sh 	cartesian_speed.sh 	random_speed.sh 	two_segments.gts two_segments.sh 	too_close.gts too_close.sh
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+LIBS = @LIBS@
+cartesian_SOURCES = cartesian.c
+cartesian_OBJECTS =  cartesian.o
+cartesian_LDADD = $(LDADD)
+cartesian_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+cartesian_LDFLAGS = 
+random_SOURCES = random.c
+random_OBJECTS =  random.o
+random_LDADD = $(LDADD)
+random_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+random_LDFLAGS = 
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = cartesian.c random.c
+OBJECTS = cartesian.o random.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/delaunay/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-checkPROGRAMS:
+
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+distclean-checkPROGRAMS:
+
+maintainer-clean-checkPROGRAMS:
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+cartesian: $(cartesian_OBJECTS) $(cartesian_DEPENDENCIES)
+	@rm -f cartesian
+	$(LINK) $(cartesian_LDFLAGS) $(cartesian_OBJECTS) $(cartesian_LDADD) $(LIBS)
+
+random: $(random_OBJECTS) $(random_DEPENDENCIES)
+	@rm -f random
+	$(LINK) $(random_LDFLAGS) $(random_OBJECTS) $(random_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = test/delaunay
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+cartesian.o: cartesian.c ../../src/gts.h ../../src/gtsconfig.h
+random.o: random.c ../../src/gts.h ../../src/gtsconfig.h
+
+check-TESTS: $(TESTS)
+	@failed=0; all=0; \
+	srcdir=$(srcdir); export srcdir; \
+	for tst in $(TESTS); do \
+	  if test -f $$tst; then dir=.; \
+	  else dir="$(srcdir)"; fi; \
+	  if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+	    all=`expr $$all + 1`; \
+	    echo "PASS: $$tst"; \
+	  elif test $$? -ne 77; then \
+	    all=`expr $$all + 1`; \
+	    failed=`expr $$failed + 1`; \
+	    echo "FAIL: $$tst"; \
+	  fi; \
+	done; \
+	if test "$$failed" -eq 0; then \
+	  banner="All $$all tests passed"; \
+	else \
+	  banner="$$failed of $$all tests failed"; \
+	fi; \
+	dashes=`echo "$$banner" | sed s/./=/g`; \
+	echo "$$dashes"; \
+	echo "$$banner"; \
+	echo "$$dashes"; \
+	test "$$failed" -eq 0
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-checkPROGRAMS mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-checkPROGRAMS clean-compile clean-libtool clean-tags \
+		clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-checkPROGRAMS distclean-compile \
+		distclean-libtool distclean-tags distclean-generic \
+		clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-checkPROGRAMS \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-checkPROGRAMS distclean-checkPROGRAMS \
+clean-checkPROGRAMS maintainer-clean-checkPROGRAMS mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir check-TESTS info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/delaunay/cartesian.c b/test/delaunay/cartesian.c
new file mode 100644
index 0000000..acc2bae
--- /dev/null
+++ b/test/delaunay/cartesian.c
@@ -0,0 +1,99 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "gts.h"
+
+int main (int argc, char * argv[])
+{
+  guint i, j, nx, ny;
+  gdouble cosa, sina;
+  GtsSurface * surface;
+  GSList * l, * vertices = NULL;
+  GtsTriangle * t;
+  GtsVertex * v1, * v2, * v3;
+  GTimer * timer;
+
+  if (argc != 4) {
+    fprintf (stderr, "usage: cartesian nx ny angle\n");
+    return 0;
+  }
+
+  nx = atoi (argv[1]);
+  ny = atoi (argv[2]);
+  cosa = cos (atof (argv[3]));
+  sina = sin (atof (argv[3]));
+
+  timer = g_timer_new ();
+  g_timer_start (timer);
+  for (i = 0; i < nx; i++) {
+    gdouble x = (gdouble) i/(gdouble) (nx - 1); 
+    for (j = 0; j < ny; j++) {
+      gdouble y = (gdouble) j/(gdouble) (nx - 1); 
+      vertices = g_slist_prepend (vertices, 
+		     gts_vertex_new (gts_vertex_class (),
+				     cosa*x - sina*y, sina*x + cosa*y, 0.));
+    }
+  }
+
+  t = gts_triangle_enclosing (gts_triangle_class (), vertices, 100.);
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+  surface = gts_surface_new (gts_surface_class (),
+			     gts_face_class (),
+			     gts_edge_class (),
+			     gts_vertex_class ());
+  gts_surface_add_face (surface, gts_face_new (gts_face_class (),
+					       t->e1, t->e2, t->e3));
+  g_timer_stop (timer);
+  fprintf (stderr, "Input: %g s\n", g_timer_elapsed (timer, NULL));
+  g_timer_reset (timer);
+
+  g_timer_start (timer);
+  l = vertices;
+  while (l) {
+    g_assert (gts_delaunay_add_vertex (surface, l->data, NULL) == NULL);
+    l = l->next;
+  }
+
+  gts_allow_floating_vertices = TRUE;
+  gts_object_destroy (GTS_OBJECT (v1));
+  gts_object_destroy (GTS_OBJECT (v2));
+  gts_object_destroy (GTS_OBJECT (v3));
+  gts_allow_floating_vertices = FALSE;
+  g_timer_stop (timer);
+
+  fprintf (stderr, "Triangulation: %g s speed: %.0f vertex/s\n", 
+	   g_timer_elapsed (timer, NULL),
+	   g_slist_length (vertices)/g_timer_elapsed (timer, NULL));
+  g_timer_reset (timer);
+
+  g_timer_start (timer);
+  gts_surface_write (surface, stdout);
+  g_timer_stop (timer);
+
+  fprintf (stderr, "Output: %g s\n", g_timer_elapsed (timer, NULL));
+
+  if (gts_delaunay_check (surface)) {
+    fprintf (stderr, "WARNING: surface is not Delaunay\n");
+    return 0;
+  }
+
+  return 1;
+}
diff --git a/test/delaunay/cartesian.sh b/test/delaunay/cartesian.sh
new file mode 100755
index 0000000..7fdcf55
--- /dev/null
+++ b/test/delaunay/cartesian.sh
@@ -0,0 +1,5 @@
+#! /bin/bash
+if ./cartesian 10 10 0.1 2> /dev/null > /dev/null; then
+    exit 1
+fi
+exit 0
diff --git a/test/delaunay/cartesian_speed.sh b/test/delaunay/cartesian_speed.sh
new file mode 100755
index 0000000..582e366
--- /dev/null
+++ b/test/delaunay/cartesian_speed.sh
@@ -0,0 +1,33 @@
+#! /bin/bash
+rm -f cartesian_speed
+if ./cartesian 32 32 0.1 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "1024 $speed" >> cartesian_speed
+
+if ./cartesian 45 45 0.1 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "2025 $speed" >> cartesian_speed
+
+if ./cartesian 64 64 0.1 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "4096 $speed" >> cartesian_speed
+
+if ./cartesian 90 90 0.1 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "8100 $speed" >> cartesian_speed
+
+if ./cartesian 128 128 0.1 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "16384 $speed" >> cartesian_speed
+
+exit 0
diff --git a/test/delaunay/random.c b/test/delaunay/random.c
new file mode 100644
index 0000000..6c9ce8c
--- /dev/null
+++ b/test/delaunay/random.c
@@ -0,0 +1,90 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "gts.h"
+
+int main (int argc, char * argv[])
+{
+  guint i, n;
+  GtsSurface * surface;
+  GSList * l, * vertices = NULL;
+  GtsTriangle * t;
+  GtsVertex * v1, * v2, * v3;
+  GTimer * timer;
+
+  if (argc != 2) {
+    fprintf (stderr, "usage: random n\n");
+    return 0;
+  }
+
+  n = atoi (argv[1]);
+
+  timer = g_timer_new ();
+  g_timer_start (timer);
+  for (i = 0; i < n; i++)
+    vertices = g_slist_prepend (vertices, 
+				gts_vertex_new (gts_vertex_class (),
+						rand (), rand (), 0.));
+
+  t = gts_triangle_enclosing (gts_triangle_class (), vertices, 100.);
+  gts_triangle_vertices (t, &v1, &v2, &v3);
+  surface = gts_surface_new (gts_surface_class (),
+			     gts_face_class (),
+			     gts_edge_class (),
+			     gts_vertex_class ());
+  gts_surface_add_face (surface, gts_face_new (gts_face_class (),
+					       t->e1, t->e2, t->e3));
+  g_timer_stop (timer);
+  fprintf (stderr, "Input: %g s\n", g_timer_elapsed (timer, NULL));
+  g_timer_reset (timer);
+
+  g_timer_start (timer);
+  l = vertices;
+  while (l) {
+    gts_delaunay_add_vertex (surface, l->data, NULL);
+    l = l->next;
+  }
+
+  gts_allow_floating_vertices = TRUE;
+  gts_object_destroy (GTS_OBJECT (v1));
+  gts_object_destroy (GTS_OBJECT (v2));
+  gts_object_destroy (GTS_OBJECT (v3));
+  gts_allow_floating_vertices = FALSE;
+  g_timer_stop (timer);
+
+  fprintf (stderr, "Triangulation: %g s speed: %.0f vertex/s\n", 
+	   g_timer_elapsed (timer, NULL),
+	   g_slist_length (vertices)/g_timer_elapsed (timer, NULL));
+  g_timer_reset (timer);
+
+  g_timer_start (timer);
+  gts_surface_write (surface, stdout);
+  g_timer_stop (timer);
+
+  fprintf (stderr, "Output: %g s\n", g_timer_elapsed (timer, NULL));
+
+  if (gts_delaunay_check (surface)) {
+    fprintf (stderr, "WARNING: surface is not Delaunay\n");
+    return 0;
+  }
+
+  return 1;
+}
diff --git a/test/delaunay/random_speed.sh b/test/delaunay/random_speed.sh
new file mode 100755
index 0000000..3a0c1cf
--- /dev/null
+++ b/test/delaunay/random_speed.sh
@@ -0,0 +1,51 @@
+#! /bin/bash
+rm -f random_speed
+if ./random 1000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "1000 $speed" >> random_speed
+
+if ./random 2000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "2000 $speed" >> random_speed
+
+if ./random 4000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "4000 $speed" >> random_speed
+
+if ./random 8000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "8000 $speed" >> random_speed
+
+if ./random 16000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "16000 $speed" >> random_speed
+
+if ./random 32000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "32000 $speed" >> random_speed
+
+if ./random 64000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "64000 $speed" >> random_speed
+
+if ./random 128000 > /dev/null 2> /tmp/speed; then
+    exit 1
+fi
+speed=`awk '{if ($4 == "speed:") print $5}' < /tmp/speed`
+echo "128000 $speed" >> random_speed
+
+exit 0
diff --git a/test/delaunay/too_close.gts b/test/delaunay/too_close.gts
new file mode 100644
index 0000000..6fd4f67
--- /dev/null
+++ b/test/delaunay/too_close.gts
@@ -0,0 +1,9 @@
+6 2 0
+-1 0 0
+0.5 0 0
+-0.5 -0.15 0
+1 -0.5 0
+0 1 0
+0 -1 0
+1 2
+3 4
diff --git a/test/delaunay/too_close.sh b/test/delaunay/too_close.sh
new file mode 100755
index 0000000..86cb094
--- /dev/null
+++ b/test/delaunay/too_close.sh
@@ -0,0 +1,5 @@
+#! /bin/bash
+if ../../examples/delaunay -o < too_close.gts > /dev/null; then
+    exit 0
+fi
+exit 1
diff --git a/test/delaunay/two_segments.gts b/test/delaunay/two_segments.gts
new file mode 100644
index 0000000..5f218c1
--- /dev/null
+++ b/test/delaunay/two_segments.gts
@@ -0,0 +1,9 @@
+6 2 0
+-1 0 0
+0.5 0 0
+-0.5 0 0
+1 0 0
+0 1 0
+0 -1 0
+1 2
+3 4
diff --git a/test/delaunay/two_segments.sh b/test/delaunay/two_segments.sh
new file mode 100755
index 0000000..229e3a8
--- /dev/null
+++ b/test/delaunay/two_segments.sh
@@ -0,0 +1,5 @@
+#! /bin/bash
+if ../../examples/delaunay < two_segments.gts > /dev/null; then
+    exit 0
+fi
+exit 1
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644
index 0000000..baec9b0
--- /dev/null
+++ b/tools/Makefile.am
@@ -0,0 +1,8 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir)\
+	 -DG_LOG_DOMAIN=\"Gts-tools\"
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+bin_PROGRAMS = gts2oogl gtscompare
diff --git a/tools/Makefile.in b/tools/Makefile.in
new file mode 100644
index 0000000..9fd4ee9
--- /dev/null
+++ b/tools/Makefile.in
@@ -0,0 +1,339 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DLLTOOL = @DLLTOOL@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_CONFIG = @GLIB_CONFIG@
+GLIB_DEPLIBS = @GLIB_DEPLIBS@
+GLIB_LIBS = @GLIB_LIBS@
+GTS_MAJOR_VERSION = @GTS_MAJOR_VERSION@
+GTS_MICRO_VERSION = @GTS_MICRO_VERSION@
+GTS_MINOR_VERSION = @GTS_MINOR_VERSION@
+GTS_VERSION = @GTS_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+glib_cflags = @glib_cflags@
+glib_libs = @glib_libs@
+glib_thread_cflags = @glib_thread_cflags@
+glib_thread_libs = @glib_thread_libs@
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(includedir) 	 -DG_LOG_DOMAIN=\"Gts-tools\"
+
+LDADD = $(top_builddir)/src/libgts.la -lm
+DEPS = $(top_builddir)/src/libgts.la
+
+bin_PROGRAMS = gts2oogl gtscompare
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+PROGRAMS =  $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+LIBS = @LIBS@
+gts2oogl_SOURCES = gts2oogl.c
+gts2oogl_OBJECTS =  gts2oogl.o
+gts2oogl_LDADD = $(LDADD)
+gts2oogl_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+gts2oogl_LDFLAGS = 
+gtscompare_SOURCES = gtscompare.c
+gtscompare_OBJECTS =  gtscompare.o
+gtscompare_LDADD = $(LDADD)
+gtscompare_DEPENDENCIES =  $(top_builddir)/src/libgts.la
+gtscompare_LDFLAGS = 
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = gts2oogl.c gtscompare.c
+OBJECTS = gts2oogl.o gtscompare.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps tools/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+	    $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	done
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+gts2oogl: $(gts2oogl_OBJECTS) $(gts2oogl_DEPENDENCIES)
+	@rm -f gts2oogl
+	$(LINK) $(gts2oogl_LDFLAGS) $(gts2oogl_OBJECTS) $(gts2oogl_LDADD) $(LIBS)
+
+gtscompare: $(gtscompare_OBJECTS) $(gtscompare_DEPENDENCIES)
+	@rm -f gtscompare
+	$(LINK) $(gtscompare_LDFLAGS) $(gtscompare_OBJECTS) $(gtscompare_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = tools
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+gts2oogl.o: gts2oogl.c ../config.h ../src/gts.h ../src/gtsconfig.h
+gtscompare.o: gtscompare.c ../config.h ../src/gts.h ../src/gtsconfig.h
+srf2oogl.o: srf2oogl.c ../config.h ../src/gts.h ../src/gtsconfig.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-binPROGRAMS clean-compile clean-libtool clean-tags \
+		clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-binPROGRAMS distclean-compile distclean-libtool \
+		distclean-tags distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-binPROGRAMS \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tools/gts2oogl.c b/tools/gts2oogl.c
new file mode 100644
index 0000000..b5d6b83
--- /dev/null
+++ b/tools/gts2oogl.c
@@ -0,0 +1,618 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+typedef enum { NONE, QUALITY, AREA, EPV, INCOMP, FOLD, HEIGHT } ColorOptions;
+
+ColorOptions color = NONE;
+gboolean autoscale = TRUE;
+gboolean boundary = FALSE;
+gdouble min = 0.0, max = 1.0;
+gdouble maxcosine2 = 1.0;
+
+typedef struct {
+  gdouble r, g, b;
+} Color;
+
+typedef struct {
+  GPtrArray * colors;
+  gboolean reversed;
+} Colormap;
+
+Colormap * colormap = NULL;
+
+static Color * color_new (gdouble r, gdouble g, gdouble b)
+{
+  Color * c = g_malloc (sizeof (Color));
+  c->r = r; c->g = g; c->b = b;
+  return c;
+}
+
+static Colormap * colormap_read (FILE * fptr)
+{
+  Colormap * cmap = g_malloc (sizeof (Colormap));
+  Color c;
+  cmap->reversed = FALSE;
+  cmap->colors = g_ptr_array_new ();
+  while (fscanf (fptr, "%lf %lf %lf", &c.r, &c.g, &c.b) == 3)
+    g_ptr_array_add (cmap->colors, color_new (c.r/255., c.g/255., c.b/255.));
+  return cmap;
+}
+
+static Colormap * colormap_jet (void)
+{
+  Colormap * cmap = g_malloc (sizeof (Colormap));
+  gint i;
+
+  cmap->reversed = FALSE;
+  cmap->colors = g_ptr_array_new ();
+  for (i = 0; i < 127; i++) {
+    gdouble r = 
+      i <= 46 ? 0. : 
+      i >= 111 ? -0.03125*(i - 111) + 1. :
+      i >= 78 ? 1. : 
+      0.03125*(i - 46);
+    gdouble g = 
+      i <= 14 || i >= 111 ? 0. : 
+      i >= 79 ? -0.03125*(i - 111) : 
+      i <= 46 ? 0.03125*(i - 14) : 
+      1.;
+    gdouble b =
+      i >= 79 ? 0. :
+      i >= 47 ? -0.03125*(i - 79) :
+      i <= 14 ? 0.03125*(i - 14) + 1.:
+      1.;
+
+    g_ptr_array_add (cmap->colors, color_new (r, g, b));
+  }
+  return cmap;
+}
+
+static Color colormap_color (Colormap * cmap, gdouble val)
+{
+  Color c = {1., 1., 1.}, * c1, * c2;
+  guint i, n;
+  gdouble coef;
+
+  g_return_val_if_fail (cmap != NULL, c);
+
+  if (val > 1.0) val = 1.0;
+  else if (val < 0.0) val = 0.0;
+  if (cmap->reversed)
+    val = 1.0 - val;
+
+  n = cmap->colors->len;
+  if (n == 0)
+    return c;
+  if (n == 1)
+    return *((Color *)cmap->colors->pdata[0]);
+
+  i = floor((gdouble)val*(gdouble)(n - 1));
+  if (i == n - 1)
+    return *((Color *)cmap->colors->pdata[cmap->colors->len - 1]);
+  coef = val*(gdouble)(n - 1) - (gdouble)i;
+  c1 = cmap->colors->pdata[i];
+  c2 = cmap->colors->pdata[i+1];
+  c.r = c1->r + coef*(c2->r - c1->r);
+  c.g = c1->g + coef*(c2->g - c1->g);
+  c.b = c1->b + coef*(c2->b - c1->b);
+  return c;
+}
+
+static void foreach_vertex (GtsVertex * v, gpointer * info) 
+{
+  FILE * fp = info[0];
+  GHashTable * hash = info[1];
+  guint * nv = info[2];
+
+  fprintf (fp, "%g %g %g", 
+	   GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z);
+  switch (color) {
+  case EPV: {
+    Color c = colormap_color (colormap,
+		((gdouble)g_slist_length (v->segments) - min)/(max - min));
+    fprintf (fp, " %g %g %g 1.0\n", c.r, c.g, c.b);
+    break;
+  }
+  case HEIGHT: {
+    Color c = colormap_color (colormap,
+			      (GTS_POINT (v)->z - min)/(max - min));
+    fprintf (fp, " %g %g %g 1.0\n", c.r, c.g, c.b);
+    break;
+  }
+  default:
+    fprintf (fp, "\n");
+  }
+  g_hash_table_insert (hash, v, GUINT_TO_POINTER (++(*nv)));
+}
+
+static void foreach_edge (GtsEdge * e, gpointer info)
+{
+  FILE * fp = info;
+
+  if (gts_edge_is_boundary (e, NULL))
+    fprintf (fp, "VECT 1 2 0 2 0 %g %g %g %g %g %g\n",
+	     GTS_POINT (GTS_SEGMENT (e)->v1)->x, 
+	     GTS_POINT (GTS_SEGMENT (e)->v1)->y, 
+	     GTS_POINT (GTS_SEGMENT (e)->v1)->z,
+	     GTS_POINT (GTS_SEGMENT (e)->v2)->x, 
+	     GTS_POINT (GTS_SEGMENT (e)->v2)->y, 
+	     GTS_POINT (GTS_SEGMENT (e)->v2)->z);
+}
+
+static void foreach_triangle (GtsTriangle * t, gpointer * info)
+{
+  FILE * fp = info[0];
+  GHashTable * hash = info[1];
+  guint p1 = 0, p2 = 0, p3 = 0;
+
+  p1 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v1));
+  if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v2));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+    }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v1));
+  }
+  else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v1));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v2));
+  }
+  else
+    g_assert_not_reached ();
+  g_return_if_fail (p1 && p2 && p3);
+  fprintf (fp, "3 %u %u %u", p1 - 1, p2 - 1, p3 - 1);
+  switch (color) {
+  case QUALITY: {
+    Color c = colormap_color (colormap, 
+			      (gts_triangle_quality (t) - min)/(max - min));
+    fprintf (fp, " %g %g %g\n", c.r, c.g, c.b);
+    break;
+  }
+  case AREA: {
+    Color c = colormap_color (colormap, 
+			      (gts_triangle_area (t) - min)/(max - min));
+    fprintf (fp, " %g %g %g\n", c.r, c.g, c.b);
+    break;
+  }
+  case INCOMP: {
+    gboolean compatible = TRUE;
+    GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3;
+    GSList * i = e1->triangles;
+    while (compatible && i) {
+      GtsTriangle * t1 = i->data;
+      if (t1 != t && !gts_triangles_are_compatible (t, t1, e1))
+	compatible = FALSE;
+      i = i->next;
+    }
+    i = e2->triangles;
+    while (compatible && i) {
+      GtsTriangle * t1 = i->data;
+      if (t1 != t && !gts_triangles_are_compatible (t, t1, e2))
+	compatible = FALSE;
+      i = i->next;
+    }
+    i = e3->triangles;
+    while (compatible && i) {
+      GtsTriangle * t1 = i->data;
+      if (t1 != t && !gts_triangles_are_compatible (t, t1, e3))
+	compatible = FALSE;
+      i = i->next;
+    }
+    if (!compatible)
+      fputs (" 1. 0. 0.", fp);
+    fputc ('\n', fp);
+    break;
+  }
+  case FOLD: {
+    gboolean fold = FALSE;
+    GtsEdge * e1 = t->e1, * e2 = t->e2, * e3 = t->e3;
+    fold = gts_triangles_are_folded (e1->triangles, 
+				     GTS_SEGMENT (e1)->v1,
+				     GTS_SEGMENT (e1)->v2,
+				     maxcosine2);
+    if (!fold)
+      fold = gts_triangles_are_folded (e2->triangles, 
+				       GTS_SEGMENT (e2)->v1,
+				       GTS_SEGMENT (e2)->v2,
+				       maxcosine2);
+    if (!fold)
+      fold = gts_triangles_are_folded (e3->triangles, 
+				       GTS_SEGMENT (e3)->v1,
+				       GTS_SEGMENT (e3)->v2,
+				       maxcosine2);      
+    if (fold)
+      fputs (" 1. 0. 0.", fp);
+    fputc ('\n', fp);
+  }
+  default:
+    fputc ('\n', fp);
+  }
+}
+
+static void oogl_surface (GtsSurface * s, FILE * fptr)
+{
+  gpointer info[3];
+  GtsSurfaceStats stats;
+  GtsSurfaceQualityStats qstats;
+  guint np = 0;
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  info[0] = fptr;
+  info[1] = g_hash_table_new (NULL, NULL);
+  info[2] = &np;
+
+  gts_surface_stats (s, &stats);
+  switch (color) {
+  case AREA:
+    if (autoscale) {
+      gts_surface_quality_stats (s, &qstats);
+      min = qstats.face_area.min;
+      max = qstats.face_area.max;
+    }
+    break;
+  case QUALITY:
+    if (autoscale) {
+      gts_surface_quality_stats (s, &qstats);
+      min = qstats.face_quality.min;
+      max = qstats.face_quality.max;
+    }
+    break;
+  case EPV:
+    if (autoscale) {
+      min = stats.edges_per_vertex.min;
+      max = stats.edges_per_vertex.max;
+    }
+    break;
+  case HEIGHT:
+    if (autoscale) {
+      GtsBBox * bbox = gts_bbox_surface (gts_bbox_class (), s);
+      min = bbox->z1;
+      max = bbox->z2;
+      gts_object_destroy (GTS_OBJECT (bbox));
+    }
+    break;
+  default:
+  }
+  if (max == min)
+    max = min + 1.;
+  if (color == EPV || color == HEIGHT)
+    fputs ("COFF ", fptr);
+  else
+    fputs ("OFF ", fptr);
+  fprintf (fptr, "%u %u %u\n",
+	   stats.edges_per_vertex.n, 
+	   stats.n_faces,
+	   stats.faces_per_edge.n);
+  gts_surface_foreach_vertex (s, (GtsFunc)foreach_vertex, info);
+  gts_surface_foreach_face (s, (GtsFunc)foreach_triangle, info);
+
+  g_hash_table_destroy (info[1]);
+}
+
+static GtsVertex * next_vertex (GtsVertex * v)
+{
+  GSList * j = v->segments;
+
+  while (j) {
+    GtsSegment * s = j->data;
+
+    if (GTS_OBJECT (s)->reserved == s) {
+      GTS_OBJECT (s)->reserved = NULL;
+      return s->v1 != v ? s->v1 : s->v2;
+    }
+    j = j->next;
+  }
+
+  return NULL;
+}
+
+static GSList * chain_segments (GSList * segments)
+{
+  GSList * chains = NULL, * i;
+  
+  i = segments;
+  while (i) {
+    GTS_OBJECT (i->data)->reserved = i->data;
+    i = i->next;
+  }
+
+  i = segments;
+  while (i) {
+    GtsSegment * s = i->data;
+
+    if (GTS_OBJECT (s)->reserved == s) {
+      GSList * chain = g_slist_prepend (NULL, s->v1);
+      GtsVertex * v = s->v2;
+
+      GTS_OBJECT (s)->reserved = NULL;
+      while (v) {
+	chain = g_slist_prepend (chain, v);
+	v = next_vertex (v);
+      }
+      chains = g_slist_prepend (chains, chain);
+    }
+    i = i->next;
+  }
+
+  return chains;
+}
+
+static void write_isolines (GtsSurface * surface, 
+			    GNode * stree,
+			    gdouble level,
+			    FILE * fp)
+{
+  GNode * ptree;
+  GtsSurface * plane;
+  GtsVertex * v1, * v2, * v3;
+  GtsSurfaceInter * si;
+  GSList * chains, * i;
+  guint nvertices = 0;
+
+  g_return_if_fail (surface != NULL);
+  g_return_if_fail (stree != NULL);
+  g_return_if_fail (fp != NULL);
+
+  plane = gts_surface_new (gts_surface_class (),
+			   gts_face_class (),
+			   gts_edge_class (),
+			   gts_vertex_class ());
+  v1 = gts_vertex_new (gts_vertex_class (), -1e10, -1e10, level);
+  v2 = gts_vertex_new (gts_vertex_class (), 1e10, -1e10, level);
+  v3 = gts_vertex_new (gts_vertex_class (), 0., 1e10, level);
+  gts_surface_add_face (plane, gts_face_new (gts_face_class(),
+			       gts_edge_new (gts_edge_class (), v1, v2),
+			       gts_edge_new (gts_edge_class (), v2, v3),
+			       gts_edge_new (gts_edge_class (), v3, v1)));
+  ptree = gts_bb_tree_surface (plane);
+  si = gts_surface_inter_new (gts_surface_inter_class (),
+			      surface, plane, stree, ptree);
+  chains = chain_segments (si->edges);
+
+  i = chains;
+  while (i) {
+    GSList * chain = i->data;
+    nvertices += g_slist_length (chain);
+    i = i->next;
+  }
+
+  fprintf (fp, "VECT %d %d 0\n", g_slist_length (chains), nvertices);
+  i = chains;
+  while (i) {
+    GSList * chain = i->data;
+
+    fprintf (fp, "%d ", g_slist_length (chain));
+    i = i->next;
+  }
+  i = chains;
+  while (i) {
+    fprintf (fp, "0 ");
+    i = i->next;
+  }
+  fprintf (fp, "\n");
+  i = chains;
+  while (i) {
+    GSList * chain = i->data;
+    GSList * j = chain;
+    
+    while (j) {
+      GtsPoint * p = j->data;
+
+      fprintf (fp, "%g %g %g\n", p->x, p->y, p->z);
+      j = j->next;
+    }
+    g_slist_free (chain);
+    i = i->next;
+  }
+  g_slist_free (chains);
+  gts_object_destroy (GTS_OBJECT (si));
+  gts_bb_tree_destroy (ptree, TRUE);
+  gts_object_destroy (GTS_OBJECT (plane));
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * surface;
+  gboolean verbose = FALSE;
+  gboolean nosurface = FALSE;
+  int c = 0;
+  guint line;
+  guint isolines = 0;
+
+  colormap = colormap_jet (); /* default */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"quality", no_argument, (int *)&color, QUALITY},
+      {"area", no_argument, (int *)&color, AREA},
+      {"incomp", no_argument, (int *)&color, INCOMP},
+      {"fold", required_argument, NULL, 'f'},
+      {"epv", no_argument, (int *)&color, EPV},
+      {"height", no_argument, (int *)&color, HEIGHT},
+      {"boundary", no_argument, &boundary, TRUE},
+      {"isolines", required_argument, NULL, 'i'},
+      {"cmap", required_argument, NULL, 'c'},
+      {"help", no_argument, NULL, 'h'},
+      {"min", required_argument, NULL, 'm'},
+      {"max", required_argument, NULL, 'M'},
+      {"nosurface", no_argument, NULL, 'n'},
+      {"reverse", no_argument, NULL, 'r'},
+      {"verbose", no_argument, NULL, 'v'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "c:hm:M:rvf:i:n",
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "c:hm:M:rvf:i:n"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'c': { /* colormap file */
+      FILE * fptr = fopen (optarg, "rt");
+      if (!fptr) {
+	fprintf (stderr, "%s: cannot open colormap file `%s'.\n",
+		 argv[0], optarg);
+	return 1;
+      }
+      colormap = colormap_read (fptr);
+      fclose (fptr);
+      break;
+    }
+    case 'i': /* isolines */
+      isolines = atoi (optarg);
+      break;
+    case 'f': /* fold */
+      color = FOLD;
+      maxcosine2 = cos (atof (optarg)*3.14159265359/180.);
+      maxcosine2 *= maxcosine2;
+      break;
+    case 'm': /* minimum value */
+      autoscale = FALSE;
+      min = atof (optarg);
+      break;
+    case 'M': /* maximum value */
+      autoscale = FALSE;
+      max = atof (optarg);
+      break;
+    case 'n': /* nosurface */
+      nosurface = TRUE;
+      break;
+    case 'r': /* reverse colormap */
+      colormap->reversed = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+             "Usage: gts2oogl [OPTION]... < input.srf > output.oogl\n"
+	     "Convert a GTS file (surface file format generated by the Gts Library)\n"
+	     "to OOGL file format (Geomview).\n"
+	     "\n"
+	     "          --quality      color faces according to their quality\n"
+	     "          --area         color faces according to their area\n"
+	     "          --incomp       color incompatible faces\n"
+	     "  -f VAL  --fold=VAL     color faces which make an angle smaller\n" 
+	     "                         than VAL degrees with any of their neighbors\n"
+	     "          --epv          color vertices according to number of edges per vertex\n"
+	     "          --height       color vertices according to their height\n"
+	     "          --boundary     output boundary edges\n"
+	     "  -i N    --isolines=N   draw N isolines (levels of constant altitude)\n"
+	     "          --cmap=FILE    load FILE as colormap\n"
+	     "  -m VAL, --min=VAL      use VAL as minimum scaling value\n"
+	     "  -M VAL, --max=VAL      use VAL as maximum scaling value\n"
+	     "  -r,     --reverse      reverse colormap\n"
+             "  -n      --nosurface    do not output surface\n"
+	     "  -v,     --verbose      display surface statistics\n"
+	     "  -h,     --help         display this help and exit\n"
+	     "\n"
+	     "Report bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0;
+      break;
+    case 'v':
+      verbose = TRUE;
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `gts2oogl --help' for more information.\n");
+      return 1;
+    }
+  }
+
+  surface = gts_surface_new (gts_surface_class (),
+			     gts_face_class (),
+			     gts_edge_class (),
+			     gts_vertex_class ());
+  line = gts_surface_read (surface, stdin);
+
+  if (line) {
+    fputs ("gts2oogl: the file on standard input is not a valid GTS file\n", 
+	   stderr);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+  
+  if (verbose)
+    gts_surface_print_stats (surface, stderr);
+
+  if (boundary || isolines) {
+    if (!nosurface) {
+      puts ("(geometry \"surface\" { = ");
+      oogl_surface (surface, stdout);
+      puts ("})");
+    }
+    if (boundary) {
+      if (!nosurface || isolines)
+	puts ("(geometry \"boundary\" { = ");
+      puts ("LIST {");
+      gts_surface_foreach_edge (surface, (GtsFunc) foreach_edge, stdout);
+      puts ("}");
+      if (!nosurface || isolines)
+	puts ("})");
+    }
+    if (isolines > 0) {
+      GNode * stree;
+      gdouble z, dz;
+      GtsBBox * bbox;
+      guint i;
+
+      stree = gts_bb_tree_surface (surface);
+      bbox = stree->data;
+      dz = (bbox->z2 - bbox->z1)/(isolines + 1);
+      z = bbox->z1 + dz;
+      if (!nosurface || boundary)
+	puts ("(geometry \"isolines\" { = ");
+      puts ("LIST {");
+      for (i = 0; i < isolines; i++, z += dz)
+	write_isolines (surface, stree, z, stdout);
+      puts ("}");
+      if (!nosurface || boundary)
+	puts ("})\n");
+      gts_bb_tree_destroy (stree, TRUE);
+    }
+  }
+  else if (!nosurface) {
+    if (min == max) 
+      max = min + 1.;
+    oogl_surface (surface, stdout);
+  }
+
+  return 0;
+}
diff --git a/tools/gtscompare.c b/tools/gtscompare.c
new file mode 100644
index 0000000..90c4538
--- /dev/null
+++ b/tools/gtscompare.c
@@ -0,0 +1,500 @@
+/* GTS - Library for the manipulation of triangulated surfaces
+ * Copyright (C) 1999 St�phane Popinet
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <math.h>
+#include <stdlib.h>
+#include "config.h"
+#ifdef HAVE_GETOPT_H
+#  include <getopt.h>
+#endif /* HAVE_GETOPT_H */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#include "gts.h"
+
+gdouble min = G_MAXDOUBLE, max = - G_MAXDOUBLE;
+gboolean logscale = FALSE;
+
+typedef struct {
+  gdouble r, g, b;
+} Color;
+
+typedef struct {
+  GPtrArray * colors;
+  gboolean reversed;
+} Colormap;
+
+Colormap * colormap = NULL;
+
+static void build_list (GtsTriangle * t, GSList ** list)
+{
+  *list = g_slist_prepend (*list, gts_bbox_triangle (gts_bbox_class (), t));
+}
+
+static Color * color_new (gdouble r, gdouble g, gdouble b)
+{
+  Color * c = g_malloc (sizeof (Color));
+  c->r = r; c->g = g; c->b = b;
+  return c;
+}
+
+static Colormap * colormap_read (FILE * fptr)
+{
+  Colormap * cmap = g_malloc (sizeof (Colormap));
+  Color c;
+  cmap->reversed = FALSE;
+  cmap->colors = g_ptr_array_new ();
+  while (fscanf (fptr, "%lf %lf %lf", &c.r, &c.g, &c.b) == 3)
+    g_ptr_array_add (cmap->colors, color_new (c.r/255., c.g/255., c.b/255.));
+  return cmap;
+}
+
+static Colormap * colormap_red_blue (void)
+{
+  Colormap * cmap = g_malloc (sizeof (Colormap));
+  cmap->reversed = FALSE;
+  cmap->colors = g_ptr_array_new ();
+  g_ptr_array_add (cmap->colors, color_new (1.0, 0.0, 0.0));
+  g_ptr_array_add (cmap->colors, color_new (0.0, 0.0, 1.0));
+  return cmap;
+}
+
+static Color colormap_color (Colormap * cmap, gdouble val)
+{
+  Color c = {1., 1., 1.}, * c1, * c2;
+  guint i, n;
+  gdouble coef;
+
+  g_return_val_if_fail (cmap != NULL, c);
+
+  if (val > 1.0) val = 1.0;
+  else if (val < 0.0) val = 0.0;
+  if (cmap->reversed)
+    val = 1.0 - val;
+
+  n = cmap->colors->len;
+  if (n == 0)
+    return c;
+  if (n == 1)
+    return *((Color *)cmap->colors->pdata[0]);
+
+  i = floor((gdouble)val*(gdouble)(n - 1));
+  if (i == n - 1)
+    return *((Color *)cmap->colors->pdata[cmap->colors->len - 1]);
+  coef = val*(gdouble)(n - 1) - (gdouble)i;
+  c1 = cmap->colors->pdata[i];
+  c2 = cmap->colors->pdata[i+1];
+  c.r = c1->r + coef*(c2->r - c1->r);
+  c.g = c1->g + coef*(c2->g - c1->g);
+  c.b = c1->b + coef*(c2->b - c1->b);
+  return c;
+}
+
+static void foreach_vertex (GtsVertex * v, gpointer * info) 
+{
+  FILE * fp = info[0];
+  GHashTable * hash = info[1];
+  guint * nv = info[2];
+  GNode * tree = info[3];
+  gdouble d = sqrt (gts_bb_tree_point_distance (tree, GTS_POINT (v),
+			(GtsBBoxDistFunc) gts_point_triangle_distance2,
+			NULL));
+  Color c;
+  
+  if (logscale) {
+    c = d > 0.0 ? 
+      colormap_color (colormap, (log10 (d) - min)/(max - min)) :
+      colormap_color (colormap, 0.0);
+  }
+  else
+    c = colormap_color (colormap, (d - min)/(max - min));
+
+  fprintf (fp, "%g %g %g %g %g %g 1.0\n",
+	   GTS_POINT (v)->x, GTS_POINT (v)->y, GTS_POINT (v)->z,
+	   c.r, c.g, c.b);
+
+  g_hash_table_insert (hash, v, GUINT_TO_POINTER (++(*nv)));
+}
+
+static void foreach_triangle (GtsTriangle * t, gpointer * info)
+{
+  FILE * fp = info[0];
+  GHashTable * hash = info[1];
+  guint p1 = 0, p2 = 0, p3 = 0;
+
+  p1 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, GTS_SEGMENT (t->e1)->v1));
+  if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v2));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+    }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v1));
+  }
+  else if (GTS_SEGMENT (t->e1)->v1 == GTS_SEGMENT (t->e2)->v2) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v1));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+  }
+  else if (GTS_SEGMENT (t->e1)->v2 == GTS_SEGMENT (t->e2)->v1) {
+    p2 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e1)->v2));
+    p3 = GPOINTER_TO_UINT (g_hash_table_lookup (hash, 
+						GTS_SEGMENT (t->e2)->v2));
+  }
+  else
+    g_assert_not_reached ();
+  g_return_if_fail (p1 && p2 && p3);
+  fprintf (fp, "3 %u %u %u\n", p1 - 1, p2 - 1, p3 - 1);
+}
+
+static void oogl_surface (GtsSurface * s, FILE * fptr, GNode * tree)
+{
+  gpointer info[4];
+  GtsSurfaceStats stats;
+  guint np = 0;
+
+  g_return_if_fail (s != NULL);
+  g_return_if_fail (fptr != NULL);
+
+  info[0] = fptr;
+  info[1] = g_hash_table_new (NULL, NULL);
+  info[2] = &np;
+  info[3] = tree;
+  
+  gts_surface_stats (s, &stats);
+  fprintf (fptr, "COFF %u %u %u\n",
+	   stats.edges_per_vertex.n, 
+	   stats.n_faces,
+	   stats.faces_per_edge.n);
+  gts_surface_foreach_vertex (s, (GtsFunc)foreach_vertex, info);
+  gts_surface_foreach_face (s, (GtsFunc)foreach_triangle, info);
+
+  g_hash_table_destroy (info[1]);
+}
+
+static void build_bbox (GtsPoint * p, GtsBBox * bbox)
+{
+  if (p->x > bbox->x2)
+    bbox->x2 = p->x;
+  if (p->x < bbox->x1)
+    bbox->x1 = p->x;
+  if (p->y > bbox->y2)
+    bbox->y2 = p->y;
+  if (p->y < bbox->y1)
+    bbox->y1 = p->y;
+  if (p->z > bbox->z2)
+    bbox->z2 = p->z;
+  if (p->z < bbox->z1)
+    bbox->z1 = p->z;
+}
+
+int main (int argc, char * argv[])
+{
+  GtsSurface * s1, * s2;
+  GtsSurfaceStats ss1, ss2;
+  GtsSurfaceQualityStats sq1, sq2;
+  gboolean image = FALSE;
+  gboolean symmetric = FALSE;
+  int c = 0;
+  guint line;
+  FILE * fptr;
+  GtsRange fd1, fd2, bd1, bd2;
+  gdouble delta, v1, v2, l1, l2;
+  GtsBBox * bbox;
+
+  colormap = colormap_red_blue (); /* default */
+  while (c != EOF) {
+#ifdef HAVE_GETOPT_LONG
+    static struct option long_options[] = {
+      {"log", no_argument, NULL, 'l'},
+      {"symmetric", no_argument, NULL, 's'},
+      {"image", no_argument, NULL, 'i'},
+      {"cmap", required_argument, NULL, 'c'},
+      {"help", no_argument, NULL, 'h'},
+      {"min", required_argument, NULL, 'm'},
+      {"max", required_argument, NULL, 'M'},
+      {"reverse", no_argument, NULL, 'r'}
+    };
+    int option_index = 0;
+    switch ((c = getopt_long (argc, argv, "c:hm:M:risl",
+			      long_options, &option_index))) {
+#else /* not HAVE_GETOPT_LONG */
+    switch ((c = getopt (argc, argv, "c:hm:M:risl"))) {
+#endif /* not HAVE_GETOPT_LONG */
+    case 'l':
+      logscale = TRUE;
+      break;
+    case 's':
+      symmetric = TRUE;
+      break;
+    case 'i': 
+      image = TRUE;
+      break;
+    case 'c': { /* colormap file */
+      FILE * fptr = fopen (optarg, "rt");
+      if (!fptr) {
+	fprintf (stderr, "%s: cannot open colormap file `%s'.\n",
+		 argv[0], optarg);
+	return 1;
+      }
+      colormap = colormap_read (fptr);
+      fclose (fptr);
+      break;
+    }
+    case 'm': /* minimum value */
+      min = atof (optarg);
+      break;
+    case 'M': /* maximum value */
+      max = atof (optarg);
+      break;
+    case 'r': /* reverse colormap */
+      colormap->reversed = TRUE;
+      break;
+    case 'h': /* help */
+      fprintf (stderr,
+	     "Usage: gtscompare [OPTION]... FILE1 FILE2 DELTA\n"
+	     "Compare two GTS files. DELTA is the sampling length expressed as\n"
+	     "a fraction of the bounding box diagonal of the second surface.\n"
+	     "\n"
+	     "  -s,     --symmetric    symmetric statistics\n"
+	     "  -i,     --image        output visualisation mesh\n"
+	     "  -c FILE --cmap=FILE    load FILE as colormap\n"
+	     "  -m VAL, --min=VAL      use VAL as minimum scaling value\n"
+	     "  -M VAL, --max=VAL      use VAL as maximum scaling value\n"
+	     "  -r,     --reverse      reverse colormap\n"
+	     "  -l,     --log          use log scale\n"
+	     "  -h,     --help         display this help and exit\n"
+	     "\n"
+	     "Report bugs to %s\n",
+	     GTS_MAINTAINER);
+      return 0;
+      break;
+    case '?': /* wrong options */
+      fprintf (stderr, "Try `gtscompare --help' for more information.\n");
+      return 1;
+    }
+  }
+
+  if (optind + 2 >= argc) {
+    fprintf (stderr, "gtscompare: missing FILE1, FILE2 or DELTA argument\n");
+    fprintf (stderr, "Try `gtscompare --help' for more information.\n");
+    return 1;
+  }
+
+  delta = atof (argv[optind + 2]);
+  if (delta <= 0. || delta >= 1.0) {
+    fprintf (stderr, "gtscompare: DELTA must be in ]0,1[\n");
+    fprintf (stderr, "Try `gtscompare --help' for more information.\n");
+    return 1;
+  }
+
+  if ((fptr = fopen (argv[optind], "rt")) == NULL) {
+    fprintf (stderr, "gtscompare: %s: No such file or directory\n", 
+	     argv[optind]);
+    return 1;
+  }
+  s1 = gts_surface_new (gts_surface_class (),
+			gts_face_class (),
+			gts_edge_class (),
+			gts_vertex_class ());
+  line = gts_surface_read (s1, fptr);
+  fclose (fptr);
+  if (line) {
+    fprintf (stderr, "gtscompare: file `%s' is not a valid GTS file\n", 
+	     argv[optind]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+
+  if ((fptr = fopen (argv[optind + 1], "rt")) == NULL) {
+    fprintf (stderr, "gtscompare: %s: No such file or directory\n", 
+	     argv[optind + 1]);
+    return 1;
+  }
+  s2 = gts_surface_new (gts_surface_class (),
+			gts_face_class (),
+			gts_edge_class (),
+			gts_vertex_class ());
+  line = gts_surface_read (s2, fptr);
+  fclose (fptr);
+  if (line) {
+    fprintf (stderr, "gtscompare: file `%s' is not a valid GTS file\n", 
+	     argv[optind + 1]);
+    fprintf (stderr, "Format error at line %d\n", line);
+    return 1;
+  }
+
+  gts_surface_stats (s1, &ss1);
+  gts_surface_stats (s2, &ss2);
+  gts_surface_quality_stats (s1, &sq1);
+  gts_surface_quality_stats (s2, &sq2);
+  gts_surface_distance (s1, s2, delta, &fd1, &bd1);
+  v1 = gts_surface_volume (s1);
+  v2 = gts_surface_volume (s2);
+  bbox = gts_bbox_new (GTS_BBOX_CLASS (gts_bbox_class()),
+		       GTS_OBJECT (s1),
+		       0., 0., 0., 0., 0., 0.);
+  bbox->x1 = bbox->y1 = bbox->z1 = G_MAXDOUBLE;
+  bbox->x2 = bbox->y2 = bbox->z2 = - G_MAXDOUBLE;
+  gts_surface_foreach_vertex (s1, (GtsFunc) build_bbox, bbox);
+  l1 = bbox->x1 == G_MAXDOUBLE ? 0.0 : sqrt (gts_bbox_diagonal2 (bbox));
+
+  bbox->x1 = bbox->y1 = bbox->z1 = G_MAXDOUBLE;
+  bbox->x2 = bbox->y2 = bbox->z2 = - G_MAXDOUBLE;
+  gts_surface_foreach_vertex (s2, (GtsFunc) build_bbox, bbox);
+  l2 = bbox->x1 == G_MAXDOUBLE ? 1.0 : sqrt (gts_bbox_diagonal2 (bbox));
+  gts_object_destroy (GTS_OBJECT (bbox));
+
+  fprintf (stderr, 
+	   "-------------------------------------------------------------\n"
+	   "                             surface 1            surface 2\n"
+	   "-------------------------------------------------------------\n"
+	   "Vertices:             %16u %20u\n"
+	   "Edges:                %16u %20u\n"
+	   "Faces:                %16u %20u\n"
+	   "------------------------ Topology ---------------------------\n"
+	   "Incompatible faces:   %16u %20u\n"
+	   "Duplicate faces:      %16u %20u\n"
+	   "Duplicate edges:      %16u %20u\n"
+	   "Boundary edges:       %16u %20u\n"
+	   "Non-manifold edges:   %16u %20u\n"
+	   "Edge per vertex avg.: %16.2g %20.2g\n"
+	   "Edge per vertex max:  %16g %20g\n"
+	   "Faces per edge avg.:  %16.2g %20.2g\n"
+	   "Faces per edge max:   %16g %20g\n"
+	   "------------------------ Geometry ---------------------------\n"
+	   "Volume:               %16.4g %20.4g\n"
+	   "Area:                 %16.4g %20.4g\n"
+	   "BBox diagonal:        %16.4g %20.4g\n"
+	   "Face quality min:     %16.4g %20.4g\n"
+	   "Face quality avg.:    %16.4g %20.4g\n"
+	   "Face quality max:     %16.4g %20.4g\n"
+	   "Face area min:        %16.4g %20.4g\n"
+	   "Face area avg.:       %16.4g %20.4g\n"
+	   "Face area max:        %16.4g %20.4g\n"
+	   "Edge length min:      %16.4g %20.4g\n"
+	   "Edge length avg.:     %16.4g %20.4g\n"
+	   "Edge length max:      %16.4g %20.4g\n",
+	   ss1.edges_per_vertex.n,   ss2.edges_per_vertex.n,
+	   ss1.faces_per_edge.n,     ss2.faces_per_edge.n,
+	   ss1.n_faces,              ss2.n_faces,
+	   ss1.n_incompatible_faces, ss2.n_incompatible_faces,
+	   ss1.n_duplicate_faces,    ss2.n_duplicate_faces,
+	   ss1.n_duplicate_edges,    ss2.n_duplicate_edges,
+	   ss1.n_boundary_edges,     ss2.n_boundary_edges,
+	   ss1.n_non_manifold_edges, ss2.n_non_manifold_edges,
+	   ss1.edges_per_vertex.mean, ss2.edges_per_vertex.mean,
+	   ss1.edges_per_vertex.max, ss2.edges_per_vertex.max,
+	   ss1.faces_per_edge.mean,   ss2.faces_per_edge.mean,
+	   ss1.faces_per_edge.max,   ss2.faces_per_edge.max,
+	   v1,                       v2,
+	   gts_surface_area (s1),    gts_surface_area (s2),
+	   l1,                       l2,
+	   sq1.face_quality.min,     sq2.face_quality.min,
+	   sq1.face_quality.mean,    sq2.face_quality.mean,
+	   sq1.face_quality.max,     sq2.face_quality.max,
+	   sq1.face_area.min,        sq2.face_area.min,
+	   sq1.face_area.mean,       sq2.face_area.mean,
+	   sq1.face_area.max,        sq2.face_area.max,
+	   sq1.edge_length.min,      sq2.edge_length.min,
+	   sq1.edge_length.mean,     sq2.edge_length.mean,
+	   sq1.edge_length.max,      sq2.edge_length.max);
+
+  if (l2 == 0.0) l2 = 1.0;
+  if (l1 == 0.0) l1 = 1.0;
+  if (symmetric) {
+    gts_surface_distance (s2, s1, delta, &fd2, &bd2);
+    fprintf (stderr,
+	   "------------------ Distance between faces -------------------\n"
+	   "Minimum:     %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n"
+	   "Average:     %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n"
+	   "Deviation:   %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n"
+           "Maximum:     %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n",
+	     fd1.min, 100.*fd1.min/l1, fd2.min, 100.*fd2.min/l2, 
+	     fd1.mean, 100.*fd1.mean/l1, fd2.mean, 100.*fd2.mean/l2, 
+	     fd1.stddev, 100.*fd1.stddev/l1, fd2.stddev, 100.*fd2.stddev/l2, 
+	     fd1.max, 100.*fd1.max/l1, fd2.max, 100.*fd2.max/l2);
+    if (ss1.n_boundary_edges > 0)
+      fprintf (stderr,
+	   "---------------- Distance between boundaries ----------------\n"
+	   "Minimum:     %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n"
+	   "Average:     %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n"
+	   "Deviation:   %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n"
+           "Maximum:     %16.4g (%5.2f%%) %12.4g (%5.2f%%)\n",
+	       bd1.min, 100.*bd1.min/l1, bd2.min, 100.*bd2.min/l2, 
+	       bd1.mean, 100.*bd1.mean/l1, bd2.mean, 100.*bd2.mean/l2, 
+	       bd1.stddev, 100.*bd1.stddev/l1, bd2.stddev, 100.*bd2.stddev/l2, 
+	       bd1.max, 100.*bd1.max/l1, bd2.max, 100.*bd2.max/l2);	     
+  }
+  else {
+    fprintf (stderr,
+	   "------------------ Distance between faces -------------------\n"
+	   "Minimum:     %16.4g (%5.2f%%)\n"
+	   "Average:     %16.4g (%5.2f%%)\n"
+	   "Deviation:   %16.4g (%5.2f%%)\n"
+           "Maximum:     %16.4g (%5.2f%%)\n",
+	     fd1.min, 100.*fd1.min/l1,
+	     fd1.mean, 100.*fd1.mean/l1,
+	     fd1.stddev, 100.*fd1.stddev/l1,
+	     fd1.max, 100.*fd1.max/l1);
+    if (ss1.n_boundary_edges > 0)
+      fprintf (stderr,
+           "---------------- Distance between boundaries ----------------\n"
+	   "Minimum:     %16.4g (%5.2f%%)\n"
+	   "Average:     %16.4g (%5.2f%%)\n"
+	   "Deviation:   %16.4g (%5.2f%%)\n"
+           "Maximum:     %16.4g (%5.2f%%)\n",
+	       bd1.min, 100.*bd1.min/l1,
+	       bd1.mean, 100.*bd1.mean/l1,
+	       bd1.stddev, 100.*bd1.stddev/l1,
+	       bd1.max, 100.*bd1.max/l1);
+  }
+
+  if (image) {
+    GSList * bboxes = NULL;
+    GNode * tree;
+    
+    gts_surface_foreach_face (s2, (GtsFunc) build_list, &bboxes);
+    tree = gts_bb_tree_new (bboxes);
+    g_slist_free (bboxes);
+  
+    if (min == G_MAXDOUBLE) {
+      if (logscale)
+	min = fd1.min > 0.0 ? log10 (fd1.min) : -10.;
+      else
+	min = fd1.min;
+    }
+    if (max == - G_MAXDOUBLE) {
+      if (logscale)
+	max = fd1.max > 0.0 ? log10 (fd1.max) : 1.;
+      else
+	max = fd1.max;
+    }
+    oogl_surface (s1, stdout, tree);
+    gts_bb_tree_destroy (tree, TRUE);
+  }
+
+  return 0;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gts.git



More information about the debian-science-commits mailing list