This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%ASHAPE an ASLIB wrapper to compute ALPHA SHAPEs | |
% | |
% ASHAPE is a convenient wrapper for the | |
% ALPHA SHAPE library ASLIB | |
% for instructions/options see also: ASLIB | |
% | |
%SYNTAX | |
%------------------------------------------------------------------------------- | |
% P = ASHAPE(X,Y,R,OPT) | |
% P = ASHAPE(PO,OPT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [V,S] = alphavol(X,R,fig) | |
%ALPHAVOL Alpha shape of 2D or 3D point set. | |
% V = ALPHAVOL(X,R) gives the area or volume V of the basic alpha shape | |
% for a 2D or 3D point set. X is a coordinate matrix of size Nx2 or Nx3. | |
% | |
% R is the probe radius with default value R = Inf. In the default case | |
% the basic alpha shape (or alpha hull) is the convex hull. | |
% | |
% [V,S] = ALPHAVOL(X,R) outputs a structure S with fields: | |
% S.tri - Triangulation of the alpha shape (Mx3 or Mx4) |