Error with VoronoiDiagram[] function

• To: mathgroup at smc.vnet.net
• Subject: [mg113296] Error with VoronoiDiagram[] function
• From: guerom00 <guerom00 at gmail.com>
• Date: Fri, 22 Oct 2010 01:37:08 -0400 (EDT)

```Hello everyone,

I have a list of (x,y) coordinates for 9 points i.e.

{{-9.896, -5.1406}, {-6.2832, 0.}, {-2.6703,
5.1406}, {-3.6129, -5.1406}, {0., 0.}, {3.6129,
5.1406}, {2.6703, -5.1406}, {6.2832, 0.}, {9.896, 5.1406}}.

I use the VoronoiDiagram[] function (I use that to calculate a
Brillouin zone...) and it works fine :

{{{-6.8348, -3.4825}, {-3.1416, -1.6007}, {-3.1416,
1.6007}, {-0.55157, -3.4825}, {0.55157,
3.4825}, {3.1416, -1.6007}, {3.1416, 1.6007}, {6.8348, 3.4825},
Ray[{-6.8348, -3.4825}, {-13.213, 1.1516}],
Ray[{-6.8348, -3.4825}, {-6.8348, -11.366}],
Ray[{-3.1416, 1.6007}, {-9.5198, 6.2348}],
Ray[{0.55157, 3.4825}, {0.55157, 11.366}],
Ray[{-0.55157, -3.4825}, {-0.55157, -11.366}],
Ray[{6.8348, 3.4825}, {6.8348, 11.366}],
Ray[{3.1416, -1.6007}, {9.5198, -6.2348}],
Ray[{6.8348, 3.4825}, {13.213, -1.1516}]}, {{1, {1, 9, 10}}, {2, {1,
2, 3, 11, 9}}, {3, {3, 5, 12, 11}}, {4, {4, 2, 1, 10,
13}}, {5, {3, 2, 4, 6, 7, 5}}, {6, {5, 7, 8, 14, 12}}, {7, {6, 4,
13, 15}}, {8, {8, 7, 6, 15, 16}}, {9, {8, 16, 14}}}}

However, for slightly different coordinates for my nine points :

{{-9.8871, -5.1469}, {-6.2832, 0.}, {-2.6793,
5.1469}, {-3.6039, -5.1469}, {0., 0.}, {3.6039,
5.1469}, {2.6793, -5.1469}, {6.2832, 0.}, {9.8871, 5.1469}}

the VoronoiDiagram[] function fails as

10/21/10 18:01:42 During evaluation of (Main) In[34]:= First::first:
{} has a length of zero and no first element. >>

10/21/10 18:01:43 During evaluation of (Main) In[34]:= Power::infy:
Infinite expression 1/0. encountered. >>

10/21/10 18:01:43 During evaluation of (Main) In[34]:= \
[Infinity]::indet: Indeterminate expression 0. ComplexInfinity
encountered. >>

10/21/10 18:01:43 During evaluation of (Main) In[34]:= \
[Infinity]::indet: Indeterminate expression 0. ComplexInfinity
encountered. >>

10/21/10 18:01:43 (Main) Out[37]= {{{-8.,
2.}, {-6.7455, -3.5115}, {-3.1416, -1.6354}, {-3.1416,
1.6354}, {-0.46229, -3.5115}, {0.46229,
3.5115}, {5.8209, -0.24066}, {6.7455,
3.5115}, {6.7455, -0.3237}, {8., -2.}, {Indeterminate,
Indeterminate}, Ray[{-8., 2.}, {-18.655, 8.6626}],
Ray[{-6.7455, -3.5115}, {-6.7455, -11.43}],
Ray[{0.46229, 3.5115}, {0.46229, 11.43}],
Ray[{-0.46229, -3.5115}, {-0.46229, -11.43}],
Ray[{6.7455, -0.3237}, {6.7455, 11.43}],
Ray[{6.7455, -0.3237}, {17.039, -7.5315}]}, {{1, {2, 1, 12,
13}}, {2, {2, 3, 4, 1}}, {3, {1, 4, 6, 14, 12}}, {4, {5, 3, 2, 13,
15}}, {5, {4, 3, 5, 7, 6}}, {6, {6, 7, 9, 16, 14}}, {7, {9, 7, 5,
15, 17}}, {8, {{8, 9, 9}}}, {9, {8, 9, 10}}}}

Obviously, it means that the VoronoiDiagram[] function is not
robust... Any idea how to solve this issue ? Or does anyone knows of
another method to calculate a Brillouin zone given a list of
coordinates ?