{"id":20804504,"url":"https://github.com/libigl/triangle","last_synced_at":"2025-05-07T03:43:19.208Z","repository":{"id":51787524,"uuid":"43692675","full_name":"libigl/triangle","owner":"libigl","description":"This is a mirror of the latest stable version of Triangle.","archived":false,"fork":false,"pushed_at":"2025-04-15T12:44:37.000Z","size":197,"stargazers_count":139,"open_issues_count":1,"forks_count":68,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-07T03:43:15.198Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libigl.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-05T15:20:50.000Z","updated_at":"2025-04-23T14:11:51.000Z","dependencies_parsed_at":"2023-01-17T21:45:45.585Z","dependency_job_id":null,"html_url":"https://github.com/libigl/triangle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libigl%2Ftriangle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libigl%2Ftriangle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libigl%2Ftriangle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libigl%2Ftriangle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libigl","download_url":"https://codeload.github.com/libigl/triangle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810272,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T19:09:42.900Z","updated_at":"2025-05-07T03:43:19.179Z","avatar_url":"https://github.com/libigl.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Triangle\nA Two-Dimensional Quality Mesh Generator and Delaunay Triangulator.\nVersion 1.6\n\nShow Me\nA Display Program for Meshes and More.\nVersion 1.6\n\nCopyright 1993, 1995, 1997, 1998, 2002, 2005 Jonathan Richard Shewchuk\n2360 Woolsey #H\nBerkeley, California  94705-1927\nPlease send bugs and comments to jrs@cs.berkeley.edu\n\nCreated as part of the Quake project (tools for earthquake simulation).\nSupported in part by NSF Grant CMS-9318163 and an NSERC 1967 Scholarship.\nThere is no warranty whatsoever.  Use at your own risk.\n\n\nTriangle generates exact Delaunay triangulations, constrained Delaunay\ntriangulations, conforming Delaunay triangulations, Voronoi diagrams, and\nhigh-quality triangular meshes.  The latter can be generated with no small\nor large angles, and are thus suitable for finite element analysis.\nShow Me graphically displays the contents of the geometric files used by\nTriangle.  Show Me can also write images in PostScript form.\n\nInformation on the algorithms used by Triangle, including complete\nreferences, can be found in the comments at the beginning of the triangle.c\nsource file.  Another listing of these references, with PostScript copies\nof some of the papers, is available from the Web page\n\n    http://www.cs.cmu.edu/~quake/triangle.research.html\n\n------------------------------------------------------------------------------\n\nThese programs may be freely redistributed under the condition that the\ncopyright notices (including the copy of this notice in the code comments\nand the copyright notice printed when the `-h' switch is selected) are\nnot removed, and no compensation is received.  Private, research, and\ninstitutional use is free.  You may distribute modified versions of this\ncode UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT\nIN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH\nSOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND\nCLEAR NOTICE IS GIVEN OF THE MODIFICATIONS.  Distribution of this code as\npart of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT\nWITH THE AUTHOR.  (If you are not directly supplying this code to a\ncustomer, and you are instead telling them how they can obtain it for\nfree, then you are not required to make any arrangement with me.)\n\n------------------------------------------------------------------------------\n\nThe files included in this distribution are:\n\n  README           The file you're reading now.\n  triangle.c       Complete C source code for Triangle.\n  showme.c         Complete C source code for Show Me.\n  triangle.h       Include file for calling Triangle from another program.\n  tricall.c        Sample program that calls Triangle.\n  makefile         Makefile for compiling Triangle and Show Me.\n  A.poly           A sample input file.\n\nEach of Triangle and Show Me is a single portable C file.  The easiest way\nto compile them is to edit and use the included makefile.  Before\ncompiling, read the makefile, which describes your options, and edit it\naccordingly.  You should specify:\n\n  The source and binary directories.\n\n  The C compiler and level of optimization.\n\n  The \"correct\" directories for include files (especially X include files),\n  if necessary.\n\n  Do you want single precision or double?  (The default is double.)  Do you\n  want to leave out some of Triangle's features to reduce the size of the\n  executable file?  Investigate the SINGLE, REDUCED, and CDT_ONLY symbols.\n\n  If yours is not a Unix system, define the NO_TIMER symbol to remove the\n  Unix-specific timing code.  Also, don't try to compile Show Me; it only\n  works with X Windows.\n\n  If you are compiling on an Intel x86 CPU and using gcc w/Linux or\n  Microsoft C, be sure to define the LINUX or CPU86 (for Microsoft) symbol\n  during compilation so that the exact arithmetic works right.\n\nOnce you've done this, type \"make\" to compile the programs.  Alternatively,\nthe files are usually easy to compile without a makefile:\n\n  cc -O -o triangle triangle.c -lm\n  cc -O -o showme showme.c -lX11\n\nOn some systems, the C compiler won't be able to find the X include files\nor libraries, and you'll need to specify an include path or library path:\n\n  cc -O -I/usr/local/include -o showme showme.c -L/usr/local/lib -lX11\n\nSome processors, including Intel x86 family and possibly Motorola 68xxx\nfamily chips, are IEEE conformant but have extended length internal\nfloating-point registers that may defeat Triangle's exact arithmetic\nroutines by failing to cause enough roundoff error!  Typically, there is a\nway to set these internal registers so that they are rounded off to IEEE\nsingle or double precision format.  I believe (but I'm not certain) that\nTriangle has the right incantations for x86 chips, if you have gcc running\nunder Linux (define the LINUX compiler symbol) or Microsoft C (define the\nCPU86 compiler symbol).\n\nIf you have a different processor or operating system, or if I got the\nincantations wrong, you should check your C compiler or system manuals to\nfind out how to configure these internal registers to the precision you are\nusing.  Otherwise, the exact arithmetic routines won't be exact at all.\nSee http://www.cs.cmu.edu/~quake/robust.pc.html for details.  Triangle's\nexact arithmetic hasn't a hope of working on machines like the Cray C90 or\nY-MP, which are not IEEE conformant and have inaccurate rounding.\n\nTriangle and Show Me have both text and HTML documentation.  The latter is\nillustrated.  Find it on the Web at\n\n  http://www.cs.cmu.edu/~quake/triangle.html\n  http://www.cs.cmu.edu/~quake/showme.html\n\nComplete text instructions are printed by invoking each program with the\n`-h' switch:\n\n  triangle -h\n  showme -h\n\nThe instructions are long; you'll probably want to pipe the output to\n`more' or `lpr' or redirect it to a file.\n\nBoth programs give a short list of command line options if they are invoked\nwithout arguments (that is, just type `triangle' or `showme').\n\nTry out Triangle on the enclosed sample file, A.poly:\n\n  triangle -p A\n  showme A.poly \u0026\n\nTriangle will read the Planar Straight Line Graph defined by A.poly, and\nwrite its constrained Delaunay triangulation to A.1.node and A.1.ele.\nShow Me will display the figure defined by A.poly.  There are two buttons\nmarked \"ele\" in the Show Me window; click on the top one.  This will cause\nShow Me to load and display the triangulation.\n\nFor contrast, try running\n\n  triangle -pq A\n\nNow, click on the same \"ele\" button.  A new triangulation will be loaded;\nthis one having no angles smaller than 20 degrees.\n\nTo see a Voronoi diagram, try this:\n\n  cp A.poly A.node\n  triangle -v A\n\nClick the \"ele\" button again.  You will see the Delaunay triangulation of\nthe points in A.poly, without the segments.  Now click the top \"voro\" button.\nYou will see the Voronoi diagram corresponding to that Delaunay triangulation.\nClick the \"Reset\" button to see the full extent of the diagram.\n\n------------------------------------------------------------------------------\n\nIf you wish to call Triangle from another program, instructions for doing\nso are contained in the file `triangle.h' (but read Triangle's regular\ninstructions first!).  Also look at `tricall.c', which provides an example\nof how to call Triangle.\n\nType \"make trilibrary\" to create triangle.o, a callable object file.\nAlternatively, the object file is usually easy to compile without a\nmakefile:\n\n  cc -DTRILIBRARY -O -c triangle.c\n\nType \"make distclean\" to remove all the object and executable files created\nby make.\n\n------------------------------------------------------------------------------\n\nIf you use Triangle, and especially if you use it to accomplish real work,\nI would like very much to hear from you.  A short letter or email (to\njrs@cs.berkeley.edu) describing how you use Triangle will mean a lot to me.\nThe more people I know are using this program, the more easily I can\njustify spending time on improvements and on the three-dimensional\nsuccessor to Triangle, which in turn will benefit you.  Also, I can put you\non a list to receive email whenever a new version of Triangle is available.\n\nIf you use a mesh generated by Triangle or plotted by Show Me in a\npublication, please include an acknowledgment as well.  And please spell\nTriangle with a capital `T'!  If you want to include a citation, use\n`Jonathan Richard Shewchuk, ``Triangle:  Engineering a 2D Quality Mesh\nGenerator and Delaunay Triangulator,'' in Applied Computational Geometry:\nTowards Geometric Engineering (Ming C. Lin and Dinesh Manocha, editors),\nvolume 1148 of Lecture Notes in Computer Science, pages 203-222,\nSpringer-Verlag, Berlin, May 1996.  (From the First ACM Workshop on Applied\nComputational Geometry.)'\n\n\nJonathan Richard Shewchuk\nJuly 27, 2005\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibigl%2Ftriangle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibigl%2Ftriangle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibigl%2Ftriangle/lists"}