5.0

5.0 | 9 ratings Rate this file 63 downloads (last 30 days) File Size: 341.35 KB File ID: #10408

Contours for triangular grids

by Darren Engwirda

 

17 Mar 2006 (Updated 15 May 2006)

No BSD License  

Generate smooth contours for functions defined on unstructured triangular grids

Download Now | Watch this File

File Information
Description

Plots the contours of a function defined on an unstructured triangular grid directly, without the need to interpolate back onto a Cartesian array.

I have attempted to replicate much of the functionality of the regular "contour" function.

Type "help tricontour"

Type "contourdemo" for some examples

You may also find my mesh generator "mesh2d.m" in the physics and Chem section helpful.

UPDATE 11/05/2006
- Can now be used with clabel
- A bit faster

UPDATE 15/05/2006
- Much more accurate (now uses quadratic interpolation)

MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files contour_stuff/contourdemo.m,
contour_stuff/driven_cavity.mat,
contour_stuff/tricontour.m,
contour_stuff/vortex_shedding.mat
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
20 Mar 2006 John D'Errico

Very nice. This is a function that should have been in Matlab itself since the day they provided trisurf and trimesh. It handled some troublesome cases I tried when I tried to break it. I'll give it a 5 rating because it deserves that rating. My only wish is that it was even more compatible with the contour functionality of matlab. For example, no handles are returned, in case you wish to set a line color or style. It might also be nice to provide a way to label the contours via clabel.

21 Mar 2006 M. Oswald

Very good contribution. I wish the author could extend the tricontour function to handle 3D triangle meshes as well.

21 Mar 2006 Kong Zuor

This is what I have been looking for since I start using Matlab. Great job well done! I wish to see this code in the next Matlab release. I find this code very useful to those who solve CFD problems with matlab. The author deserve my five star ranking. I would encourage the author to advance this code for 3D case. I am free at last!
Many thanks

29 Mar 2006 Babak Asghari  
05 May 2006 prabhakaran sundhararaju

it's very usefull for chemical, mechanical and civil. to analysis critical domain. i wish to develop 3D domain also

08 Aug 2006 Rabi Tahir

Works well... seems to be a bit slow, but I may be showing a bias (comparing with traditional fortran generated machine code)

13 Jan 2007 Friedemann Groh  
03 Feb 2009 Clemens Moser

Works very well, there is just a minor issue: the contours are not interpolated at the boundaries of the surface .

19 Apr 2009 Nik F  
01 Sep 2009 Jack Kohoutek  
Please login to add a comment or rating.
Updates
11 May 2006

clabel support

15 May 2006

quadratic interpolation

Tag Activity for this File
Tag Applied By Date/Time
specialized Darren Engwirda 22 Oct 2008 08:18:50
plotting Darren Engwirda 22 Oct 2008 08:18:50
unstructured Darren Engwirda 22 Oct 2008 08:18:50
mesh Darren Engwirda 22 Oct 2008 08:18:50
contours Darren Engwirda 22 Oct 2008 08:18:50
graphics Darren Engwirda 22 Oct 2008 08:18:50
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com