octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

developing the delaunayTriangulation class for Octave


From: Linux User
Subject: developing the delaunayTriangulation class for Octave
Date: Mon, 10 Feb 2014 11:38:14 -0500

I am very interested in writing delaunayTriangulation class for Octave. I have already wrote functions that create a list of neighbors for all triangles from delaunayn(), functions which sort the neighbors list in different ways, computes the surface vectors for all triangles, including surface area and direction, volume of the triangles, and wrote functions that plot the mesh with special numerical labeling for debugging purposes. These functions work in any dimension.

The next step is to package all of these functions into a class for Octave users, which I need help in finding documentation in learning how to do this. 

I am a physics student with good math skills, moderate documenting skills and moderate programming skills. I created these functions from my knowledge of math without looking up the source code for Matlab. 

http://stackoverflow.com/questions/21662640/how-to-return-a-list-of-all-neighbors-for-all-triangles-from-octaves-delaunay

I like Octave's "T = delaunay( p )" for constructing triangular meshes from a given set of points "p," but I am confused on how to call all neighbors for a specified triangle list "T." The example Octave code below uses a crude function I wrote that computes all neighbors in a O(n^2) number of steps.

octave:15> [(1:size(T,1))' T neighbors ]
ans =

   1   3   2   1   0   4   2
   2   5   3   2   1   3   5
   3   5   4   2   0   2   6
   4   7   3   1   1   0   5
   5   5   7   3   4   2   7
   6   6   5   4   3   8   7
   7   6   5   7   5   9   6
   8   6   4   8   0   9   6
   9   6   7   8   0   8   7

The first column contains the numerically ordered triangles. The second through fourth columns are the numerically labeled points contained by the triangles computed from T = delaunay(p). The fifth through seventh columns are the numerically labeled triangles who are neighbors to the specified ordered triangles.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]