⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 一个用于三角剖分的类.实用性非常好。对于需要从多边形
💻
字号:
TriangleA Two-Dimensional Quality Mesh Generator and Delaunay Triangulator.Version 1.6Show MeA Display Program for Meshes and More.Version 1.6Copyright 1993, 1995, 1997, 1998, 2002, 2005 Jonathan Richard Shewchuk2360 Woolsey #HBerkeley, California  94705-1927Please send bugs and comments to jrs@cs.berkeley.eduCreated as part of the Quake project (tools for earthquake simulation).Supported in part by NSF Grant CMS-9318163 and an NSERC 1967 Scholarship.There is no warranty whatsoever.  Use at your own risk.Triangle generates exact Delaunay triangulations, constrained Delaunaytriangulations, conforming Delaunay triangulations, Voronoi diagrams, andhigh-quality triangular meshes.  The latter can be generated with no smallor large angles, and are thus suitable for finite element analysis.Show Me graphically displays the contents of the geometric files used byTriangle.  Show Me can also write images in PostScript form.Information on the algorithms used by Triangle, including completereferences, can be found in the comments at the beginning of the triangle.csource file.  Another listing of these references, with PostScript copiesof some of the papers, is available from the Web page    http://www.cs.cmu.edu/~quake/triangle.research.html------------------------------------------------------------------------------These programs may be freely redistributed under the condition that thecopyright notices (including the copy of this notice in the code commentsand the copyright notice printed when the `-h' switch is selected) arenot removed, and no compensation is received.  Private, research, andinstitutional use is free.  You may distribute modified versions of thiscode UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO ITIN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTHSOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, ANDCLEAR NOTICE IS GIVEN OF THE MODIFICATIONS.  Distribution of this code aspart of a commercial system is permissible ONLY BY DIRECT ARRANGEMENTWITH THE AUTHOR.  (If you are not directly supplying this code to acustomer, and you are instead telling them how they can obtain it forfree, then you are not required to make any arrangement with me.)------------------------------------------------------------------------------The files included in this distribution are:  README           The file you're reading now.  triangle.c       Complete C source code for Triangle.  showme.c         Complete C source code for Show Me.  triangle.h       Include file for calling Triangle from another program.  tricall.c        Sample program that calls Triangle.  makefile         Makefile for compiling Triangle and Show Me.  A.poly           A sample input file.Each of Triangle and Show Me is a single portable C file.  The easiest wayto compile them is to edit and use the included makefile.  Beforecompiling, read the makefile, which describes your options, and edit itaccordingly.  You should specify:  The source and binary directories.  The C compiler and level of optimization.  The "correct" directories for include files (especially X include files),  if necessary.  Do you want single precision or double?  (The default is double.)  Do you  want to leave out some of Triangle's features to reduce the size of the  executable file?  Investigate the SINGLE, REDUCED, and CDT_ONLY symbols.  If yours is not a Unix system, define the NO_TIMER symbol to remove the  Unix-specific timing code.  Also, don't try to compile Show Me; it only  works with X Windows.  If you are compiling on an Intel x86 CPU and using gcc w/Linux or  Microsoft C, be sure to define the LINUX or CPU86 (for Microsoft) symbol  during compilation so that the exact arithmetic works right.Once you've done this, type "make" to compile the programs.  Alternatively,the files are usually easy to compile without a makefile:  cc -O -o triangle triangle.c -lm  cc -O -o showme showme.c -lX11On some systems, the C compiler won't be able to find the X include filesor libraries, and you'll need to specify an include path or library path:  cc -O -I/usr/local/include -o showme showme.c -L/usr/local/lib -lX11Some processors, including Intel x86 family and possibly Motorola 68xxxfamily chips, are IEEE conformant but have extended length internalfloating-point registers that may defeat Triangle's exact arithmeticroutines by failing to cause enough roundoff error!  Typically, there is away to set these internal registers so that they are rounded off to IEEEsingle or double precision format.  I believe (but I'm not certain) thatTriangle has the right incantations for x86 chips, if you have gcc runningunder Linux (define the LINUX compiler symbol) or Microsoft C (define theCPU86 compiler symbol).If you have a different processor or operating system, or if I got theincantations wrong, you should check your C compiler or system manuals tofind out how to configure these internal registers to the precision you areusing.  Otherwise, the exact arithmetic routines won't be exact at all.See http://www.cs.cmu.edu/~quake/robust.pc.html for details.  Triangle'sexact arithmetic hasn't a hope of working on machines like the Cray C90 orY-MP, which are not IEEE conformant and have inaccurate rounding.Triangle and Show Me have both text and HTML documentation.  The latter isillustrated.  Find it on the Web at  http://www.cs.cmu.edu/~quake/triangle.html  http://www.cs.cmu.edu/~quake/showme.htmlComplete text instructions are printed by invoking each program with the`-h' switch:  triangle -h  showme -hThe instructions are long; you'll probably want to pipe the output to`more' or `lpr' or redirect it to a file.Both programs give a short list of command line options if they are invokedwithout arguments (that is, just type `triangle' or `showme').Try out Triangle on the enclosed sample file, A.poly:  triangle -p A  showme A.poly &Triangle will read the Planar Straight Line Graph defined by A.poly, andwrite its constrained Delaunay triangulation to A.1.node and A.1.ele.Show Me will display the figure defined by A.poly.  There are two buttonsmarked "ele" in the Show Me window; click on the top one.  This will causeShow Me to load and display the triangulation.For contrast, try running  triangle -pq ANow, click on the same "ele" button.  A new triangulation will be loaded;this one having no angles smaller than 20 degrees.To see a Voronoi diagram, try this:  cp A.poly A.node  triangle -v AClick the "ele" button again.  You will see the Delaunay triangulation ofthe points in A.poly, without the segments.  Now click the top "voro" button.You will see the Voronoi diagram corresponding to that Delaunay triangulation.Click the "Reset" button to see the full extent of the diagram.------------------------------------------------------------------------------If you wish to call Triangle from another program, instructions for doingso are contained in the file `triangle.h' (but read Triangle's regularinstructions first!).  Also look at `tricall.c', which provides an exampleof how to call Triangle.Type "make trilibrary" to create triangle.o, a callable object file.Alternatively, the object file is usually easy to compile without amakefile:  cc -DTRILIBRARY -O -c triangle.cType "make distclean" to remove all the object and executable files createdby make.------------------------------------------------------------------------------If you use Triangle, and especially if you use it to accomplish real work,I would like very much to hear from you.  A short letter or email (tojrs@cs.berkeley.edu) describing how you use Triangle will mean a lot to me.The more people I know are using this program, the more easily I canjustify spending time on improvements and on the three-dimensionalsuccessor to Triangle, which in turn will benefit you.  Also, I can put youon a list to receive email whenever a new version of Triangle is available.If you use a mesh generated by Triangle or plotted by Show Me in apublication, please include an acknowledgment as well.  And please spellTriangle with a capital `T'!  If you want to include a citation, use`Jonathan Richard Shewchuk, ``Triangle:  Engineering a 2D Quality MeshGenerator and Delaunay Triangulator,'' in Applied Computational Geometry:Towards Geometric Engineering (Ming C. Lin and Dinesh Manocha, editors),volume 1148 of Lecture Notes in Computer Science, pages 203-222,Springer-Verlag, Berlin, May 1996.  (From the First ACM Workshop on AppliedComputational Geometry.)'Jonathan Richard ShewchukJuly 27, 2005

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -