Rank: 175 based on 358 downloads (last 30 days) and 6 files submitted
Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Darren View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
12 Oct 2009 Screenshot MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda fem, mesh generation, modeling, simulation, fvm, mathematics 166 29
  • 5.0
5.0 | 14 ratings
03 Dec 2007 Screenshot Fast points-in-polygon test Fast test to determine points located inside general polygon regions. Should be significantly faster Author: Darren Engwirda points inside polygon, image processing, inpolygon, polygon 62 20
  • 4.375
4.4 | 17 ratings
30 Nov 2006 Screenshot tinterp - an alternative to griddata Linear and quadratic interpolation for scattered data Author: Darren Engwirda scattered interpolati..., 2d, quadratic, linear, approximation, interpolation 8 4
  • 5.0
5.0 | 3 ratings
15 May 2006 Screenshot Contours for triangular grids Generate smooth contours for functions defined on unstructured triangular grids Author: Darren Engwirda contours, specialized, unstructured, mesh, plotting, graphics 113 16
  • 5.0
5.0 | 16 ratings
03 Apr 2006 Fast sparse matrix vector product sparse matrix vector product Author: Darren Engwirda linear algebra, sparse, matrix, vector, product 3 7
  • 3.8
3.8 | 5 ratings
Comments and Ratings by Darren View all
Updated File Comments Rating
09 Aug 2011 MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda

Hi Philippe, you may want to have a look at the utility "connectivity" routine. Amongst other things, it will identify the boundary nodes in a mesh.

14 Oct 2009 MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda

Author comment: v24 was posted to resolve a licence conflict. The Mathworks no longer allows code to be released under a GNU GPL, so this has been removed for v24.

There are some (minor) revisions to the code, based on user feedback. Specifically, v24 may be slightly slower than v23, but should generally produce higher quality meshes, especially for complex geometries.

Comments/feedback is always welcome - d_engwirda@hotmail.com

Comments and Ratings on Darren's Files View all
Updated File Comment by Comments Rating
08 May 2013 MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda Pirayesh, Elias

There are some useful examples on meshing a 3D surface on: http://persson.berkeley.edu/distmesh/

07 May 2013 MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda Evgeny

How can I use it on 3D surface?
Is there some algorithm to create unstructured triangular meshes for 3D geometry?

03 Apr 2013 MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda Barnhart, William

One more fix. In quadtree.m, near line 528 (right before %Undo rotation, p=rotate(p,-theta)), add:

% remove duplicate nodes
goodid=find(h~=0);
p=p(goodid,:);
h=h(goodid);
for i=1:length(goodid)
t(t==goodid(i))=i;
end

So that's three places to fix with the comments below:
meshfaces.m, line 203
mytsearch.m, line 69
quadtree.m, line 528 (or thereabouts)

02 Apr 2013 MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda Barnhart, William

**Correction**

In my tsearch, replace:
i(j) = tsearch(x,y,t,xi(j),yi(j));

with:
for k=1:size(t,1)
temp=inpolygon(xi,yi,x(t(k,:)),y(t(k,:)));
i(temp)=k;
end

Then, no need to worry about delaunay triangulations

02 Apr 2013 MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda Barnhart, William

Tsearch fix courtesy of Rowena Lohman.
tsearch.m needs to be replaced in two locations. First:

in meshfaces.m, line 203 replace:
i=tsearch(ph(:,1),ph(:,2),th,p(:,1),p(:,2));

with:

for j=1:size(th,1)
temp=inpolygon(p(:,1),p(:,2),ph(th(j,:),1),ph(th(j,:),2));
i(temp)=j;
end

In mytsearch.m line 69, replace:
i(j) = tsearch(x,y,t,xi(j),yi(j));

with

t = DelaunayTri([x y]);
i(j)= pointLocation(t,[xi(j) yi(j)]);

This uses DelaunayTri which is being fazed out, but delaunayTriangulation can be equally used

Top Tags Applied by Darren
linear algebra, mathematics, 2d, approximation, contours
Files Tagged by Darren View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
12 Oct 2009 Screenshot MESH2D - Automatic Mesh Generation Generates unstructured triangular meshes for general 2D geometry. Author: Darren Engwirda fem, mesh generation, modeling, simulation, fvm, mathematics 166 29
  • 5.0
5.0 | 14 ratings
03 Dec 2007 Screenshot Fast points-in-polygon test Fast test to determine points located inside general polygon regions. Should be significantly faster Author: Darren Engwirda points inside polygon, image processing, inpolygon, polygon 62 20
  • 4.375
4.4 | 17 ratings
30 Nov 2006 Screenshot tinterp - an alternative to griddata Linear and quadratic interpolation for scattered data Author: Darren Engwirda scattered interpolati..., 2d, quadratic, linear, approximation, interpolation 8 4
  • 5.0
5.0 | 3 ratings
15 May 2006 Screenshot Contours for triangular grids Generate smooth contours for functions defined on unstructured triangular grids Author: Darren Engwirda contours, specialized, unstructured, mesh, plotting, graphics 113 16
  • 5.0
5.0 | 16 ratings
03 Apr 2006 Fast sparse matrix vector product sparse matrix vector product Author: Darren Engwirda linear algebra, sparse, matrix, vector, product 3 7
  • 3.8
3.8 | 5 ratings

Contact us