<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" [ <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> ]>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>C++ Simplest Delaunay Triangulation Algorithms</title>
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="../documentation/s011.css" />
<link rel='SHORTCUT ICON' href='../documentation/images/FrameHome.ico' />
</head>

<body>

<div class="message_right">
  <a href="http://validator.w3.org/check/referer">
    <img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1!" height="31" width="88" />
  </a>
  <a href="http://jigsaw.w3.org/css-validator/">
    <img style="width:88px;height:31px"
       src="http://jigsaw.w3.org/css-validator/images/vcss" 
       alt="Valid CSS!" />
  </a>
  <br />
  Created 2005-06-21 &nbsp;  Modified 
<!--UPDATE_DATE_BEGIN-->
2009-04-11<br />
<a class="reflocal" href="../../../../doc02.html">Chelton Evans</a>

<!--UPDATE_DATE_END-->
</div>

<h1> 
<a href="../doc.html">
<img alt="proj" src="../../../comsci/images/code.png" /> </a>
delaunaysimple
<a href="../../../../index.html">
<img alt="home" src="../../../comsci/images/Frame.gif" /> </a>
</h1>

<p>
<a class="reflocal2" href="#Intro">Intro</a><br />
<a class="reflocal2" href="#Design_Algorithm">Design Algorithm</a><br />
<a class="reflocal" href="../../../math/geometry/g031.xml"> Theory </a> <br />
<a class="reflocal2" href="#Source"> Source </a><br />
<a class="reflocal2" href="#Simplest_DT_Algorithm">
  Simplest DT Algorithm </a> <br />
<a class="reflocal2" href="#References">References</a> <br />
<a class="reflocal2" href="#&lt;TODO&gt;">&lt;TODO&gt;</a>
</p>

<div class="float25">

<a id="Intro"></a>
<h2>Intro</h2>

<p>The simplest Delaunay Triangulation (DT) algorithm
 consists of encasing the simplex in a circle/sphere of
 that dimension (circle in 2D, sphere in 3D, ...) and 
 rejecting the simplex if another point in the tessellation 
 is within the generalized circle.
</p>

<p>These algorithms are not practical
 because of their complexity. 
<br />
 In 2D DT is  
<math xmlns="&mathml;">
  <mi>O</mi>
  <mo>(</mo>
  <mi>n</mi>
  <msup>
    <mi></mi>
    <mrow><mi>4</mi></mrow>
  </msup>
  <mo>)</mo>
</math>
<br />
 and in 3D DT is 
<math xmlns="&mathml;">
  <mi>O</mi>
  <mo>(</mo>
  <mi>n</mi>
  <msup>
    <mi></mi>
    <mrow><mi>5</mi></mrow>
  </msup>
  <mo>)</mo>
</math>
<br />
 ...
</p>

<p> These algorithms work on the whole set of points at a time. </p>

<a href="img01.png" >
<img src="img01small.png" alt="img01small.png" />
</a>

</div>

<!--UPDATE_SOURCE_TABLE-->
<!--UPDATE_SOURCE_TABLE_BEGIN-->
<div class="float25">
<a id="Source"> </a>
<h2> <a class="reflocal" href="../../download.html">Source</a> </h2>
<h3> Files </h3>
<a class="reflocal" href="Makefile">Makefile</a> <br/>
<a class="reflocal" href="delaunaysimpleD2.h">delaunaysimpleD2.h</a> <br/>
<a class="reflocal" href="delaunaysimpleD2test.cpp">delaunaysimpleD2test.cpp</a> <br/>
<a class="reflocal" href="delaunaysimpleD2test.h">delaunaysimpleD2test.h</a> <br/>
<a class="reflocal" href="main.cpp">main.cpp</a> <br/>
<br/>
<a class="reflocal" href="projcompile.txt">projcompile.txt</a> <br/>
<a class="reflocal" href="unittestsreport.txt">unittestsreport.txt</a> <br/>
<br/>
</div>
<div class="float25">
<h3> Doxygen </h3>
<a class="reflocal" href="../html/delaunay2D_2main_8cpp.html">main.cpp</a> <br/>
<a class="reflocal" href="Makefile.html"> Makefile </a> <br/>
<a class="reflocal" href="../html/classdelaunaysimpleD2.html">delaunaysimpleD2</a> <br/>
<a class="reflocal" href="../html/classdelaunaysimpleD2test.html">delaunaysimpleD2test</a> <br/>
</div>
<!--UPDATE_SOURCE_TABLE_END-->

<div class="float25">

<a id="Simplest_DT_Algorithm"></a>
<h2> Simplest DT Algorithm in 2D </h2>



<p class="alg1">
There are n points. Refer to the points
 by integer indexes. <br />
Let x be the stack of triangles
</p>

<p class="alg0">
function EvaluateTriangle(i,j,k)
</p>

<p class="alg1">
Find the circle c through i,j,k <br />
for w=0..n-1 &nbsp; where 
<math xmlns="&mathml;">
  <mi>w</mi>
  <mo>&NotEqual;</mo>
  <mi>i</mi>
  <mo>,</mo>
  <mi>j</mi>
  <mo>,</mo>
  <mi>k</mi>
</math>
</p>

<p class="alg2">
If w is inside c
</p>

<p class="alg3">
Reject the triangle i,j,k and exit function.
</p>

<p class="alg1">
Accept the triangle i,j,k  and push it onto x.
</p>


<p class="alg0">
function main()
</p>


<p class="alg1">
for i=0..n-3
</p>

<p class="alg2">
for j=i+1..n-2
</p>

<p class="alg3">
for k=j+1..n-1
</p>

<p class="alg4">
EvaluateTriangle(i,j,k)
</p>

</div>
<div class="float25">

<a id="References"></a>
<h2>References</h2>

<ol>
<li>
 O'Rourke, Joseph(1984). Computational geometry in C.
  ISBN 0-521-445922
</li>

</ol>

</div>
<div class="float25">

<a id="Design_Algorithm"></a> 
<h2><a class="reflocal" href="../documentation/doc07.html#Design_Algorithm"> Design Algorithm</a> </h2>

<a href="img02.png" >
<img src="img02small.png" alt="img02small.png" />
</a>

</div>
<div class="float25">

<a id="TODO"></a>
<h2>TODO</h2>

<ul>

<li>Merge Delaynay3D which is miss spelt.</li>
<li>Redocument and recode.</li>

<li>Come up with a universal tessellation 2D data structure.</li>

</ul>

</div>

</body>
</html>


