next up previous contents
Next: VoronoiRatio Up: Physical/Computational parameters Previous: rstretch: or   Contents

CorrectVoronoi: Boolean

Typical triangulations will always contain degenerate triangles in which one of the angles are close to or greater than 90 degrees. For near-right neighboring triangles, the distance between their Voronoi points can be quite small (zero when two right triangles abut one another), while for obtuse triangles, the Voronoi point lies outside the triangle. This can be corrected in one of two ways.

In the first method, CorrectVoronoi is 1, and the Voronoi points are corrected if they are too close to each other relative to the distance between the centroids of the neighboring triangles. If triangle $1$ and $2$ have centroids defined by $(xc_1,yc_1)$ and $(xc_2,yc_2)$ and Voronoi points defined by $(xv_1,yv_1)$ and $(xv_2,yv_2)$, then the distance between the centroids is given by

\begin{displaymath}
D_c^2 = (xc_2-xc_1)^2 + (yc_2-yc_1)^2 ,
\end{displaymath}

and the distance between the Voronoi points is given by

\begin{displaymath}
D_v^2 = (xv_2-xv_1)^2 + (yv_2-yv_1)^2 .
\end{displaymath}

The Voronoi points are corrected if $D_g/D_c< V_r$, where $V_r$ is the VoronoiRatio parameter, and if this is the case, they are updated with
$\displaystyle xv_1$ $\textstyle =$ $\displaystyle xc + V_r(xc_1-xc) ,$  
$\displaystyle yv_1$ $\textstyle =$ $\displaystyle yc + V_r(yc_1-yc) ,$  
$\displaystyle xv_2$ $\textstyle =$ $\displaystyle xc + V_r(xc_2-xc) ,$  
$\displaystyle yv_2$ $\textstyle =$ $\displaystyle yc + V_r(yc_2-yc) ,$  

where $xc=(xc_1+xc_2)/2$ and $yc=(yc_1+yc_2)/2$. Using this correction methodology, setting $V_r=1$ moves the Voronoi points to the centroids of the cells.

In the second method, CorrectVoronoi is set to -1 and triangles with angles greater than or equal to the angle defined by VoronoiRatio are corrected by moving the Voronoi point to the triangle centroid. While the centroid is guaranteed to be inside the triangle and the distance between centroids is on the same order as the triangle edge lengths, the disadvantage is that the Voronoi edge connecting the Voronoi points is no longer perpendicular to the Delaunay edges. This reduces the accuracy of the gradients defined by differences between values at Voronoi points because it is assumed that the Voronoi-Delaunay intersection is orthogonal.


next up previous contents
Next: VoronoiRatio Up: Physical/Computational parameters Previous: rstretch: or   Contents
2014-08-06