davidalber/Sandbox — Issue #1: Delaunay: n=5 list index out of range
Author: davidalber
Created: 2011-11-18 06:24:37+00:00
State: open

When running:

delaunay -n 5 --no-plot --summary -s 7

The following exception is raised.

```python
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/Current/bin/delaunay", line 9, in
load_entry_point('Algbox==0.1', 'console_scripts', 'delaunay')()
File "/Users/David/fun/Algbox/src/algbox/__init__.py", line 4, in do_delaunay
return delaunay.delaunay()
File "/Users/David/fun/Algbox/src/algbox/delaunay.py", line 351, in delaunay
d.triangulation()
File "/Users/David/fun/Algbox/src/algbox/delaunay.py", line 44, in triangulation
middle_point = self.initial_triangles_from_hull()
File "/Users/David/fun/Algbox/src/algbox/delaunay.py", line 133, in initial_triangles_from_hull
if self.check_and_flip(key):
File "/Users/David/fun/Algbox/src/algbox/delaunay.py", line 146, in check_and_flip
angle2 = self.get_angle(tri2, list(set(tri2)-set(shared_edge))[0])
IndexError: list index out of range
```