<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" 
               "http://www.w3.org/TR/MathML2/dtd/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>
<link rel="stylesheet" type="text/css" href="../../../comsci/css/s011.css"/>
<link rel='SHORTCUT ICON' href='../../../comsci/images/FrameHome.ico' />
<style type="text/css">
</style>
<title> 
Quick-Hull Mesh Generation with Minimization 
 </title>
</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-03-19 &nbsp; Modified 
<!--UPDATE_DATE_MODIFIED-->
<!--UPDATE_DATE_BEGIN-->
2007-01-01
<br/>
<a href="mailto:chelton.evans@yahoo.com">Chelton Evans</a>
<!--UPDATE_DATE_END-->
</div>

<h1> 
<a href="geom.html"> <img alt="proj" src="../../../comsci/images/compgeom.png" /></a>
Quick-Hull Mesh Generation with Minimization 
<a href="../../../../index.html">
<img alt="home" src="../../../comsci/images/Frame.gif" /> </a>
</h1>

<p>

<a href="#Intro">Intro</a><br/>
<a href="#Splitting_2_Simplex_with_Points_Inside_Example">
  Splitting 2-Simplex with Points Inside Example</a><br/>
<a href="#Splitting_2_Simplex_Process">
 Splitting 2-Simplex Process</a><br/>
<a href="#Algorithm">Algorithm</a><br/>

</p>


<div class="float25">
<a id="Intro"></a>
<h2>Intro</h2>

<p>
This is another tessellation algorithm which simply partitions
 the reaming points recursively until in N dimension N points
 remain in the trees leaf.  These are the primitive shapes generated.
</p>

<p>
The algorithm complexity is I believe 
 expected 
<math xmlns="&mathml;">
  <mi>O</mi>
  <mo>(</mo>
  <mi>n</mi>
  <mi>log</mi>
  <mo>(</mo>
  <mi>n</mi>
  <mo>)</mo> 
  <mo>)</mo>
</math> and worst case

<math xmlns="&mathml;">
  <mi>O</mi>
  <mo>(</mo>
  <mi>n</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
  <mo>)</mo>
</math>  

. 
 I have not implemented the algorithm yet. When I do I will test it.
 Further this algorithm will definitely already be known because
 its so simple.  However I have not come across the name yet.
 If you know please contact me with the name so I can look it up. 
</p>


</div>

<div class="float25">
<a id="Tessellation"> </a>
<h2>Tessellation</h2>

<p>
The <a href="g024.html"> Quick-Hull </a> algorithm can be used for tessellation because it does produce
 triangles with other points inside.  
</p>

<img src="diagg02402.png" alt="diagg02402.png" />

</div>



<div class="spacer" />

<div class="float25">
<a id="Splitting_2_Simplex_with_Points_Inside_Example"></a>
<h2>Splitting 2-Simplex with Points Inside Example</h2>

<img src="diagg02404.png" alt="diagg02404.png" />
<p> An example in 2D without the mesh being rebalanced.</p>
</div>

<div class="float25">
<a id="Splitting_2_Simplex_Process"></a>
<h2>Splitting 2-Simplex Process</h2>
<img src="diagg02403.png" alt="diagg02403.png" />
</div>


<div class="spacer" />



<div class="float25">
<a id="Algorithm"></a>
<h2>Algorithm</h2>

<p class="alg1">
N is the dimension of the space. 
A simplex is a N-simplex in 
<math xmlns="&mathml;">
  <mi>R</mi>
  <msup>
    <mi></mi>
    <mrow><mi>N</mi></mrow>
  </msup>
</math>
.  

  For example 
  a triangle is a 2-simplex in 
<math xmlns="&mathml;">
  <mi>R</mi>
  <msup>
    <mi></mi>
    <mrow><mi>2</mi></mrow>
  </msup>
</math>, 

  a tetrahedron is a 3-simplex in 
<math xmlns="&mathml;">
  <mi>R</mi>
  <msup>
    <mi></mi>
    <mrow><mi>3</mi></mrow>
  </msup>
</math>
.

</p>

<p class="alg1">
Use the Quick-Hull algorithm to construct simplexes with 0 or more
 points inside them.
 Have a <a href="g028.html">Primitive Mesh with State</a> x 
 and a stack cs of simplexes with points inside the simplex. 
</p>

<p class="alg1">
All simplexes with no points inside them 
 are pushed into x. The simplex becomes one of the meshes primitive 
 shapes.  This primitive shape is rebalanced in the mesh 
 insertion which I call simplex minimization. 
 Whenever a new simplex is inserted the mesh is rebalanced.
</p>

<p class="alg1">
 The other simplexes with their points are put into cs.  
 cs is the current stack and these are further processed.  
</p>

<p class="alg1">
For each simplex and its list of points in cs do
</p>

<p class="alg2">
  Pop the simplex and its list of points.
  Split the simplex about an inside arbitrary point,
  creating N simplexes and push them onto x and cs depending on
 whether or they have no points inside them or they do. 
</p>

<p class="alg1">
while cs is not empty
</p>

</div>

<div class="float25">


</div>

<div class="float25">
<h2>Generalized Simplex Half-Space</h2>

<p>
The need to have a balanced mesh is the most difficult
 part of the algorithm.  When a simplex is inserted into
 the mesh, how is it connected to the mesh in constant time?
</p>

<p>
 The algorithm so far has assumed that this can be done. The following
 is a development to realize this. A data structure is introduced
 to have a two layered system of mesh generation.  The mesh is the bottom 
 layer. A top layer of Generalized Simplex Half-Spaces covers the mesh
 and inserts simplexes into the mesh.
</p>

<p class="equ">
gshs data structure <br/>
<math xmlns="&mathml;">
  <mo>{</mo>  
  <mi>h</mi>
  <mo>,</mo>
  <mi>p</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
  <mo>,</mo>
  <mi>n</mi>
  <msub>
    <mi></mi>
    <mrow><mi>k</mi></mrow>
  </msub>
  <mo>,</mo>
  <mi>s</mi>
  <msub>
    <mi></mi>
    <mrow><mi>k</mi></mrow>
  </msub>
  <mo>}</mo>
</math>
<br/>
 &nbsp; &nbsp; 
<math xmlns="&mathml;">
  <mi>k</mi>  
  <mo>=</mo>
  <mi>0</mi>
  <mo>..</mo>
  <mi>N</mi>
</math>
 corresponds with simplex sides,

<br/>
  &nbsp; &nbsp;  
<math xmlns="&mathml;">
  <mi>h</mi>  
</math>
 is the half space,

<br/> 
  &nbsp; &nbsp;  
<math xmlns="&mathml;">
  <mi>p</mi>
  <msub>
    <mi></mi>
    <mrow><mi>i</mi></mrow>
  </msub>
</math>
 is the list of points in the half space

<br/> 
  &nbsp; &nbsp;  
<math xmlns="&mathml;">
  <mi>n</mi>
  <msub>
    <mi></mi>
    <mrow><mi>k</mi></mrow>
  </msub>
</math>
<math xmlns="&mathml;">
  
</math>
 is the neighboring gshs's,

<br/> 
  &nbsp; &nbsp;  

<math xmlns="&mathml;">
  <mi>s</mi>
  <msub>
    <mi></mi>
    <mrow><mi>k</mi></mrow>
  </msub>  
</math>
 is the simplex inside this gshs and bordering the associated side.
</p>

<p>
The process of mesh construction is linked to gshs mesh construction.
 When a new gshs is created it creates more gshs's and moves any points
 that are visible to these out of its point list and into theirs.
 So all the gshs structures point lists have points inside their gshs.
</p>

<p>
The gshs processes its point list and builds a local mesh of connected simplexes.
  This is done by partitioning an arbitrary point dividing the simplex into
 N+1 simplexes. The other points are repartitioned into their respective simplexes 
 and the process continues recursively until the local mesh is built.
</p>

<p>
The gshs maintains pointers to its boundaries.  Once it completes its local mesh,
 it iterates around its border asking neighboring gshs structures if they have
 completed their local mesh. If so it minimizes their respective boundary simplexes
 and sets its link to that neighbor to null as the two boundaries are now
 joined at the mesh level.
</p>

<p>From an implementation point of view the gshs structures are expensive so its
 a good idea for them to be destroyed after they have done their job.
 Since I use integer indexes for random access these must remain constant. A dequeue with
 negative indexes could be used as the parent gshs is constructed and destroyed before
 the child. A special dequeue that adjusts itself so its indexes that it initially gives
 always refer to the object inserted can be created for this job.
</p>


</div>




</body>
</html>

