4.0

4.0 | 1 rating Rate this file 9 downloads (last 30 days) File Size: 25.78 KB File ID: #6169

surfi

by Ben Mitch

 

02 Nov 2004 (Updated 29 Nov 2004)

Code covered by the BSD License  

plot (or return) surface interpolated from supplied vertices.

Download Now | Watch this File

File Information
Description

i often need to visualise a surface formed by a set of vertices when those vertices are not on a regular grid. surf() won't do this, so i made this file to generate the surface then plot it. the suffix `i' refers to interpolate.

i'm not sure if the R14 surf function can do this, i couldn't work out the syntax - if it can, perhaps someone can post a comment with the syntax, and i'll withdraw this submission.

also included is triangulate (a port from third party code, see help for details), which returns the surface without plotting it. source for this is included, and a binary for R14 under XP - you will need to compile for use on other platforms.

UPDATE: note that you will need to sort vertices before passing them to the function if they are not already sorted - see the demo for details.

MATLAB release MATLAB 7 (R14)
Other requirements should be ok on 6.5, and probably 6, but untested. if not running under XP R14, you may need to recompile. if not running under Windows, you will need to recompile.
Zip File Content  
Other Files triangulate.m,
triangulate.c,
triangulate.dll,
surfi.m,
surfi_demo.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
23 Nov 2004 gok gok

great stuff!
found that results depends on sorting direction.
are you going to add contour generator?

Please login to add a comment or rating.
Updates
29 Nov 2004

more info

Tag Activity for this File
Tag Applied By Date/Time
specialized Ben Mitch 22 Oct 2008 07:34:36
plotting Ben Mitch 22 Oct 2008 07:34:36
surface surf interpolate patch triangle vertices vertex Ben Mitch 22 Oct 2008 07:34:36
 

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