<?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> 
Dual Convex Mesh Algorithm
 </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 2007-01-04 &nbsp; Modified 

<!--UPDATE_DATE_MODIFIED-->
<!--UPDATE_DATE_BEGIN-->
2007-02-16
<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>
Dual Convex Mesh Algorithm
<a href="../../../../index.html">
<img alt="home" src="../../../comsci/images/Frame.gif" /> </a>
</h1>


<p>
<a href="#Intro">Intro</a><br/>
<a href="#Definitions">Definitions</a><br/>
<a href="#Partitioning_a_Plane_from_a_Convex_Mesh">
  Partitioning a Plane from a Convex Mesh</a><br/>
<a href="#Calculating_Centroid_from_Surface">
  Calculating Centroid from Surface</a><br/>
<a href="#Algorithm">Algorithm</a><br/>
<a href="#Generalized_Duality">
  Generalized Duality</a><br/>
<a href="#Dual_Graph">Dual Graph</a><br/>
<a href="#References">References</a>
</p>

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

<p>A dual of a mesh is some point x inside a mesh element of
 mesh M<sub>1</sub> taken to be a point in 
 mesh M<sub>2</sub>.  
 If two points in M<sub>2</sub> share a surface they are connected. 
</p>

<p>Dual meshes are also used in partitioning. We need to consider polygons with infinite
 area when partitioning the plane.  For a convex 2D mesh the dual is a partition of the
 plane.
</p>

<p>The notion of an inverse with regard to the dual exists.  Applying some
 function f to the mesh, and then applying the dual operator to 
 the mesh to restore the original mesh.
</p>



</div>

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

<p class="equ">
<math xmlns="&mathml;">
  <mi>M</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
  <mo>=</mo>
  <mi>D</mi>
  <mo>(</mo>
  <mi>M</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
  <mo>)</mo>
</math>

<br/>
<math xmlns="&mathml;">
  <mi>M</mi>
  <msub>
    <mi></mi>
    <mrow><mi>1</mi></mrow>
  </msub>
</math>
 is said to be the dual of mesh

<math xmlns="&mathml;">
  <mi>M</mi>
  <msub>
    <mi></mi>
    <mrow><mi>0</mi></mrow>
  </msub>
</math>
<br/>
Iterate over the shapes in M<sub>0</sub> <br/>
  &nbsp; &nbsp;
  Choose an arbitary point inside the shape
  adding it to M<sub>2</sub><br/>
Iterate over the shapes in M<sub>0</sub> <br/>
  &nbsp; &nbsp;
  If this shape has a neighbor <br/>
  &nbsp; &nbsp;
  (ie the shapes share an edge) connect 
  their interior points by a straight line which is added
  to M<sub>2</sub>
</p>

</div>

<div class="spacer" />

<div class="float25">

<a id="Partitioning_a_Plane_from_a_Convex_Mesh"></a>
<h2>Partitioning a Plane from a Convex Mesh</h2>

<p>Here is an example of a convex triangular mesh and its dual.
</p>


<img src="diagg05006.png" alt="diagg05006.png" />
<img src="diagg05004.png" alt="diagg05004.png" />

<p>Here is a partition of the plane formed by extending lines
 from the surface triangles at right angles to the surface.
</p>

<img src="diagg05005.png" alt="diagg05005.png" />
<img src="diagg05002.png" alt="diagg05002.png" />


</div>

<div class="float25">

<p>The dual can be represented by linked shapes.  But when a shape
 has infinite area it becomes necessary to represent it.  Here is
 one possibility where all 0 linkes are treated as the polynomial going to
 infinity in that direction.
</p>

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

<p>Note that the dual of the infintite partition is the original convex mesh.
  From a logical point of view the partition is the meshes dual - assuming
 all outside infinite regions are convex.
</p>

<p>From a computational point of view it would be nice to construtct betoh
</p>



</div>


<div class="spacer" />

<div class="float25">

<a id="Calculating_Centroid_from_Surface"></a>
<h2>Calculating Centroid from Surface</h2>

<p>
For a convex mesh its partition has infinite polyogons
 at its surface. Since these can be identified as such,
 they can be used to get back the hull of the convex mesh.
</p>

<p>
For example we can define a function that for edges on
 the hull creates a dual point outside the hull.  
 The start of the line in the triangle is the centroid and
 it intersects the edge at right angles. The point a
 is choosen so that a ratio of the distances to the edge
 is constant and hence give point a and centroid c the
 edge can be reconstructed. Doing this for all the duals
 edges and finding the intersection points generates the convex
 hull.
</p>


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

<p>A similar function can be constructed for 3D.</p>

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

</div>

<div class="float25">

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

<p class="equ">
Solve the outer points on the hull of the convex mesh.
 Then the problem becomes given the hull and dual construct
 the mesh.
</p>

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

<p class="equ">For each dual point construct a triangle. <br/>
 Link the triangles together.
</p>

<p class="equ">Place the triangles in a list.<br/>
Iterate over the triangles list<br/>
  &nbsp; &nbsp; 
  case: Zero or One known point: <br/>
    &nbsp; &nbsp; &nbsp; &nbsp;
    Push the current triangle to the end of the list.<br/>
    &nbsp; &nbsp; &nbsp; &nbsp;
    Continue<br/>

  &nbsp; &nbsp; 
  case : Two known points: <br/>
    &nbsp; &nbsp; &nbsp; &nbsp;
    Solve for the third point.<br/>
    &nbsp; &nbsp; &nbsp; &nbsp;
    Continue<br/>

  &nbsp; &nbsp; 
  case : Three known points: <br/>
    &nbsp; &nbsp; &nbsp; &nbsp;
    Continue<br/>
</p>



</div>

<div class="float25">

<a id="Generalized_Duality"></a>
<h2>Generalized Duality</h2>

<p>The dual mesh is talked about in regard to 2D, why not generalize this to arbitary dimensions.  
 The idea of shapes sharing a common surface being linked either with a line or a surface.  Where
 I define a surface as 1 dimension lesss that the space.
</p>

<p>I am not clear how this is generalized.
</p>

<p>In 3D lines extending out from the surface shapes would not intersect
 for a convex mesh in 3D.  The surface could be mapped to a sphere
 and retail the surface partition information.  Sending a line through
 the centroid of each of the surfaces 2D shapes and connecting adjacent
 lines by a line that moves over time to sweep a surface. 
</p>

<p>For example given two finite lines in space, create a surface by
 linearly interpolating a point on both lines.  Then join these points
 with a straight line. Now for the above problem one end of the lines
 is infinite so the surface is infinite.
</p>

<p>Now the 3D space is partitioned. This surface is not a plane.
 Although a partition is enough for many practical applications so
 there is no need for an inverse to the partition.
</p>

  

</div>

<div class="float25">
<a id="Dual_Graph"></a>
<h2>Dual Graph</h2>

<p>
A dual graph is similar without the restriction that a point from G to a
 neighboring point does not have to pass throught the face of G* where
 G* is the dual.
</p>

<p>Put simply the mesh does not have to be tiled with convex shapes. This
 may also generalizes into any dimension, though I would like a 
 geometric reasoning program to help. 
</p>

<p>
Ore[1] defines the dual by constructing an edge though each edge in G.
 However his dual construction is not unique. For example a dual G* can
 be constructed with one more point. This is inherent in the problem
 because the outside points of G* can be interpreted as having gone
 to infinity.
</p>

<p>I have quoted Ore's graph and showed another pattern - that being
 the red points are in one to one correspondence with the original
 graph the edges of G. This can be important if we wish to have
 operators such that dual(dual(G*))==G*. With the dual that I am
 suggesting this property is preserved. With Ore's dual I can not
 see how this property can be implemented.
</p>


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


</div>


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

<ol>

<li>Oystein Ore(1963). Graphs And Their Uses. ISBN 0-88385-600-X Vol. 10 0-88385-610-7. Page 101.</li>


</ol>


</div>

</body>
</html>


