# Created by Octave 3.6.2, Sun Jun 10 09:53:43 2012 UTC # name: cache # type: cell # rows: 3 # columns: 4 # name: # type: sq_string # elements: 1 # length: 13 delaunayGraph # name: # type: sq_string # elements: 1 # length: 780 -- Function File: [POINTS EDGES]= delaunayGraph (POINTS) Graph associated to Delaunay triangulation of input points Compute the Delaunay triangulation of the set of input points, and convert to a set of edges. The output NODES is the same as the input POINTS. Example % Draw a planar graph correpspionding to Delaunay triangulation points = rand(30, 2) * 100; [nodes edges] = delaunayGraph(points); figure; drawGraph(nodes, edges); % Draw a 3Dgraph corresponding to Delaunay tetrahedrisation points = rand(20, 3) * 100; [nodes edges] = delaunayGraph(points); figure; drawGraph(nodes, edges); view(3); See also: delaunay, delaunayn # name: # type: sq_string # elements: 1 # length: 59 Graph associated to Delaunay triangulation of input points # name: # type: sq_string # elements: 1 # length: 9 drawGraph # name: # type: sq_string # elements: 1 # length: 1735 -- Function File: drawGraph (NODES, EDGES) -- Function File: drawGraph (NODES, EDGES, FACES) -- Function File: drawGraph (GRAPH) -- Function File: drawGraph (..., SNODES) -- Function File: drawGraph (..., SNODES, SEDGES) -- Function File: drawGraph (..., SNODES, SEDGES, SFACES) -- Function File: H = drawGraph (...) -- Function File: [H HE] = drawGraph (...) -- Function File: [H HE HF] = drawGraph (...) Draw a graph, given as a set of vertices and edges DRAWGRAPH(NODES, EDGES) draw a graph specified by a set of nodes (array N*2 or N*3, corresponding to coordinate of each node), and a set of edges (an array Ne*2, containing for each edge the first and the second node). Default drawing is a red circle for nodes and a blue line for edges. DRAWGRAPH(NODES, EDGES, FACES) also draw faces of the graph as patches. DRAWGRAPH(GRAPH) passes argument in a srtucture with at least 2 fields named 'nodes' and 'edges', and possibly one field 'faces', corresponding to previously described parameters. GRAPH can also be a cell array, whose first element is node array, second element is edges array, and third element, if present, is faces array. DRAWGRAPH(..., SNODES) DRAWGRAPH(..., SNODES, SEDGES) DRAWGRAPH(..., SNODES, SEDGES, SFACES) specify the draw mode for each element, as in the classical 'plot' function. To not display some elements, uses 'none'. H = DRAWGRAPH(...) return handle to the set of edges. [HN, HE] = DRAWGRAPH(...) return handle to the set of nodes and to the set of edges. [HN, HE, HF] = DRAWGRAPH(...) Also return handle to the set of faces. # name: # type: sq_string # elements: 1 # length: 51 Draw a graph, given as a set of vertices and edges # name: # type: sq_string # elements: 1 # length: 8 knnGraph # name: # type: sq_string # elements: 1 # length: 254 -- Function File: EDGES = knnGrpah (NODES) Create the k-nearest neighbors graph of a set of points EDGES = knnGraph(NODES) Example nodes = rand(10, 2); edges = knnGraph(nodes); drawGraph(nodes, edges); # name: # type: sq_string # elements: 1 # length: 56 Create the k-nearest neighbors graph of a set of points # name: # type: sq_string # elements: 1 # length: 9 voronoi2d # name: # type: sq_string # elements: 1 # length: 371 -- Function File: [NODES EDGES FACES] = voronoi2d (GERMS) Compute a voronoi diagram as a graph structure [NODES EDGES FACES] = voronoi2d(GERMS) GERMS an array of points with dimension 2 NODES, EDGES, FACES: usual graph representation, FACES as cell array Example [n e f] = voronoi2d(rand(100, 2)*100); drawGraph(n, e); # name: # type: sq_string # elements: 1 # length: 47 Compute a voronoi diagram as a graph structure