Expanding Wave-method

Hide text Hide pseudo-code

Important notice! The automatic assessment does not always seem to work correctly with this exercise. If the assessment gives you odd feedback (e.g. no points when you think you should gain some) contact the course staff. Especially if the feedback reads "0 points out of 0 correct" contact the course staff.

Find the Delaunay triangulation for the given point set using the Expanding Wave method. The required auxiliary points have been created around the point set and the first point to be handled has been put into the queue.

1. Let Q be a queue
2. Initialize the helper vertices 
   into a rectangle around the input
   vertices
3. Insert lower left help vertex to Q

4. While Q is not empty
5.  Let A be the anchor vertex and N the neighbour vertex
6.  dequeue a vertex from Q and set it to A
7.  Find a known neighbour of A and set it to N
8.  if N has not been queueud, queue N
9.  while A has more possible neighbours
10.   Let N1 be the next neighbour vertex
11.   make connections (A,N1), (N,N1)
12.   set value of N to N1
13.   if N has not been queued, queue N


  Created Wed Jun 20 16:00:43 EEST 2007 - Powered by SVG-hut