<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>http://comp.chem.tohoku.ac.jp/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Delaunay_triangulation</id>
	<title>Delaunay triangulation - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="http://comp.chem.tohoku.ac.jp/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Delaunay_triangulation"/>
	<link rel="alternate" type="text/html" href="http://comp.chem.tohoku.ac.jp/mediawiki/index.php?title=Delaunay_triangulation&amp;action=history"/>
	<updated>2026-05-27T17:55:37Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>http://comp.chem.tohoku.ac.jp/mediawiki/index.php?title=Delaunay_triangulation&amp;diff=1118&amp;oldid=prev</id>
		<title>Hirano: ページの作成:「This page provides basic information about &quot;delaunay_tri_struct&quot;. The &quot;delaunay_tri_struct&quot; contains a subroutine that calculates the Delaunay triangulation from given se…」</title>
		<link rel="alternate" type="text/html" href="http://comp.chem.tohoku.ac.jp/mediawiki/index.php?title=Delaunay_triangulation&amp;diff=1118&amp;oldid=prev"/>
		<updated>2026-05-26T04:17:48Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「This page provides basic information about &amp;quot;delaunay_tri_struct&amp;quot;. The &amp;quot;delaunay_tri_struct&amp;quot; contains a subroutine that calculates the Delaunay triangulation from given se…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page provides basic information about &amp;quot;delaunay_tri_struct&amp;quot;. The &amp;quot;delaunay_tri_struct&amp;quot; contains a subroutine that calculates the Delaunay triangulation from given set of vertices(2D/3D).&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
[[File:Delaunay_circumcircles_vectorial.svg|right|thumb|280px|A Delaunay triangulation in the plane with circumcircles shown]] &lt;br /&gt;
Delaunay triangulation (Feb. 5, 2016, 06:08 UTC). In Wikipedia: The Free Encyclopedia. Retrieved from [https://en.wikipedia.org/wiki/Delaunay_triangulation https://en.wikipedia.org/wiki/Delaunay_triangulation] &lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''In mathematics and computational geometry,  a '''Delaunay triangulation''' for a set '''P''' of points in a plane is a triangulation  DT('''P''') such that no point in '''P''' is inside the circumcircle of any triangle in DT('''P'''). Delaunay triangulations maximize the minimum angle of all the angles of the triangles in the triangulation; they tend to avoid skinny triangles. The triangulation is named after Boris Delaunay for his work on this topic from 1934.''&lt;br /&gt;
&lt;br /&gt;
''For a set of points on the same line there is no Delaunay triangulation (the notion of  triangulation is degenerate for this case).  For four or more points on the same circle (e.g., the vertices of a rectangle) the Delaunay triangulation is not unique: each of the two possible triangulations that split the quadrangle into two triangles satisfies the &amp;quot;Delaunay condition&amp;quot;, i.e., the requirement that the circumcircles of all triangles have empty interiors.''&lt;br /&gt;
&lt;br /&gt;
''...''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
== Module structure ==&lt;br /&gt;
&lt;br /&gt;
The delaunay_tri_module is actually an interface for Fortran programs to call C++ functions.&lt;br /&gt;
&lt;br /&gt;
Interface in Fortran:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;fortran&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 !!! Interface for c++ void function.&lt;br /&gt;
 INTERFACE&lt;br /&gt;
   !!! This function calculates 2d Delaunay triangulation.&lt;br /&gt;
   SUBROUTINE get2dtricpp(cp_vertices,vsize,cp_table) BIND(C,name='get2dtricpp')&lt;br /&gt;
     USE,INTRINSIC :: iso_c_binding&lt;br /&gt;
     TYPE(c_ptr) :: cp_vertices&lt;br /&gt;
     INTEGER(c_int) :: vsize&lt;br /&gt;
     TYPE(c_ptr) :: cp_table&lt;br /&gt;
   END SUBROUTINE get2dtricpp&lt;br /&gt;
&lt;br /&gt;
   !!! This function calculates 3d Delaunay triangulation.&lt;br /&gt;
   SUBROUTINE get3dtricpp(cp_vertices,vsize,cp_table) BIND(C,name='get3dtricpp')&lt;br /&gt;
     USE,INTRINSIC :: iso_c_binding&lt;br /&gt;
     TYPE(c_ptr)  :: cp_vertices&lt;br /&gt;
     INTEGER(c_int) :: vsize&lt;br /&gt;
     TYPE(c_ptr)  :: cp_table&lt;br /&gt;
   END SUBROUTINE get3dtricpp&lt;br /&gt;
&lt;br /&gt;
   !!! This function releases the allocated memory in c++.&lt;br /&gt;
   SUBROUTINE clear_table(cp_table) BIND(C,name='clear_table')&lt;br /&gt;
     USE,INTRINSIC :: iso_c_binding&lt;br /&gt;
     TYPE(c_ptr) :: cp_table&lt;br /&gt;
   END SUBROUTINE&lt;br /&gt;
&lt;br /&gt;
 END INTERFACE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The actual struct:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;fortran&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 !!! Struct for delaunay tessellation.&lt;br /&gt;
 TYPE delaunay_tri_struct&lt;br /&gt;
 CONTAINS&lt;br /&gt;
   PROCEDURE :: calctri !! (vertices(1:2,1:nsite),table(1:nsite,1:nsite))&lt;br /&gt;
 END TYPE delaunay_tri_struct&lt;br /&gt;
&lt;br /&gt;
CONTAINS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C++ functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot;{&lt;br /&gt;
&lt;br /&gt;
/*Void function that takes in flat 2d-array to form 2d-vertices set, calculates delaunay triangulation,&lt;br /&gt;
  then returns flat T/F table*/&lt;br /&gt;
 void get2dtricpp(double** verticesflat, int* vsize, bool** table1d){}&lt;br /&gt;
&lt;br /&gt;
/*Void function that takes in flat 3d-array to form 3d-vertices set, calculates delaunay triangulation,&lt;br /&gt;
then returns flat T/F table*/&lt;br /&gt;
 void get3dtricpp(double** verticesflat, int* vsize, bool** table1d){}&lt;br /&gt;
&lt;br /&gt;
/*Release memory allocated for sstable1d.*/&lt;br /&gt;
 void clear_table(bool** table1d){}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algorithm ==&lt;br /&gt;
&lt;br /&gt;
The algorithm being used to calculate Delaunay triangulation is Bowyer–Watson algorithm.&lt;br /&gt;
The c++ code was based on the code provided by : [http://tercel-sakuragaoka.blogspot.jp TERCEL::DIARY]&lt;br /&gt;
Here is the pseudocode for the algorithm: &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;fortran&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 !!Subroutine for triangulation.&lt;br /&gt;
 SUBROUTINE delaunay_tri(IN[vertex_dict],OUT[simplex_dict])&lt;br /&gt;
&lt;br /&gt;
   Create huge d-simplex that contains all vertices.&lt;br /&gt;
   insert &amp;quot;huge d-simplex&amp;quot; into &amp;quot;simplex_dict&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
   FOR (vertex in &amp;quot;vertex_dict&amp;quot;) DO&lt;br /&gt;
&lt;br /&gt;
     pick next vertex from &amp;quot;vertex_dict&amp;quot;&lt;br /&gt;
&lt;br /&gt;
     FOR (d-simplex in &amp;quot;simplex_dict&amp;quot;) DO&lt;br /&gt;
&lt;br /&gt;
       pick next d-simplex from &amp;quot;simplex_dict&amp;quot;&lt;br /&gt;
       CALL calculate_circumsphere(IN[d-simplex],OUT[circle]) &lt;br /&gt;
       &lt;br /&gt;
       IF (vertex inside circle) THEN&lt;br /&gt;
           delete d-simplex from &amp;quot;simplex_dict&amp;quot;&lt;br /&gt;
           divide d-simplex into (d+1) new and insert into &amp;quot;temp_simplex_dict&amp;quot;&lt;br /&gt;
                                           --&amp;gt;{if already exist in &amp;quot;temp_simplex_dict&amp;quot;,mark it}&lt;br /&gt;
 &lt;br /&gt;
       END IF&lt;br /&gt;
&lt;br /&gt;
     END DO&lt;br /&gt;
&lt;br /&gt;
     FOR (d-simplex in &amp;quot;temp_simplex_dict&amp;quot;) DO&lt;br /&gt;
&lt;br /&gt;
       pick next d-simplex from &amp;quot;temp_simplex_dict&amp;quot;&lt;br /&gt;
       IF [(d-simplex not in &amp;quot;simplex_dict&amp;quot;).AND.(d-simplex .NOT.marked)] THEN&lt;br /&gt;
          insert d-simplex inside &amp;quot;temp_simplex_dict&amp;quot; into &amp;quot;simplex_dict&amp;quot;&lt;br /&gt;
       END IF&lt;br /&gt;
&lt;br /&gt;
     END DO&lt;br /&gt;
&lt;br /&gt;
   END DO&lt;br /&gt;
&lt;br /&gt;
   delete d-simplex that shares vertex with huge d-simplex from &amp;quot;simplex_dict&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 END SUBROUTINE delaunay_tri&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Incomplete triangulation problem ==&lt;br /&gt;
&lt;br /&gt;
When any of the 3 precomputed super triangles' point lies inside a circumcircle determined by any set of points in the given set, the Bowyer–Watson algorithm will suffer from incomplete triangulation problem. &lt;br /&gt;
&lt;br /&gt;
For simplicity, we illustrate this problem in 2d situation, but be aware that this problem applies to arbitrary dimension for Bowyer–Watson algorithm.&lt;br /&gt;
&lt;br /&gt;
The detailed description of the problem is shown here on the Stack Overflow question:[http://stackoverflow.com/questions/30741459/bowyer-watson-algorithm-how-to-fill-holes-left-by-removing-triangles-with-sup Bowyer-Watson algorithm: how to fill “holes” left by removing triangles with super triangle vertices]&lt;br /&gt;
&lt;br /&gt;
No perfect solution exists, while a realistic solution that significantly reduces the chance of having the problem is simply making the super triangle as big as possible.&lt;/div&gt;</summary>
		<author><name>Hirano</name></author>
	</entry>
</feed>