Navigation

Operators and Keywords

Function List:

C++ API

isosurface.m File Reference


Functions

 if (nargin >=5) x
 if (nargin >=6 &&ismatrix(varargin{6})) colors
 if (nargin >=3 &&ismatrix(varargin{3})) colors
endif endif if (calc_colors) if(nargout
endif if (isempty(fvc.vertices)||isempty(fvc.faces)) warning("The resulting triangulation is empty")
endif switch (nargout) case 0 new plot()
endif if (!ishold()) set(gca()
otherwise print_usage ()
 !val (:,:, 2)
 !assert (isfield(fv,"vertices"), true)
 !assert (isfield(fv,"faces"), true)
 !assert (size(fv.vertices),[3 3])
 !assert (size(fv.faces),[1 3])
 !assert (isfield(fvc,"vertices"), true)
 !assert (isfield(fvc,"faces"), true)
 !assert (isfield(fvc,"facevertexcdata"), true)
 !assert (size(fvc.vertices),[3 3])
 !assert (size(fvc.faces),[1 3])
 !assert (size(fvc.facevertexcdata),[3 1])
 !assert (size(f),[1 3])
 !assert (size(v),[3 3])
 !assert (size(c),[3 1])

Variables

function varargout
endif calc_colors = false
 f = v = c = []
 verbose = false
 noshare = false
 y = varargin{2}
 z = varargin{3}
 val = varargin{4}
 iso = varargin{5}
 endif [fvc.faces, fvc.vertices, fvc.facevertexcdata] = __marching_cube__ (x, y, z, val, iso, colors)
 else [fvc.faces, fvc.vertices] = __marching_cube__ (x, y, z, val, iso)
else pa
endif view
endif xgrid
endif on
endif ygrid
endif zgrid
endswitch endfunction!shared x
 !val = [0, 0
!test !fv = isosurface (x, y, z, val, 0.3)
!test !fvc = isosurface (x, y, z, val, .3, y)
 !test [f, v] = isosurface (x, y, z, val, .3)
!demo !clf [x, y, z] = meshgrid(-2:0.5:2, -2:0.5:2, -2:0.5:2)
 !v = x.^2 + y.^2 + z.^2

Function Documentation

!assert ( size(c)   ) 

!assert ( size(v)   ) 

!assert ( size(f)   ) 

!assert ( size(fvc.facevertexcdata)   ) 

!assert ( size(fvc.faces)   ) 

!assert ( size(fvc.vertices)   ) 

!assert ( isfield(fvc,"facevertexcdata")  ,
true   
)

!assert ( isfield(fvc,"faces")  ,
true   
)

!assert ( isfield(fvc,"vertices")  ,
true   
)

!assert ( size(fv.faces)   ) 

!assert ( size(fv.vertices)   ) 

!assert ( isfield(fv,"faces")  ,
true   
)

!assert ( isfield(fv,"vertices")  ,
true   
)

!val ( ,
,
 
)

endif if ( ishold()  ) 

endif if ( isempty(fvc.vertices)||isempty(fvc.faces)   ) 

endif endif if ( calc_colors   ) 

if ( nargin >=3 &&  ismatrixvarargin{3}  ) 

if ( nargin >=6 &&  ismatrixvarargin{6}  ) 

if ( nargin >=  5  ) 

otherwise print_usage (  ) 

endif switch ( nargout   )  [new]


Variable Documentation

!demo !clf[x, y, z] = meshgrid(-2:0.5:2, -2:0.5:2, -2:0.5:2)

!test !fv = isosurface (x, y, z, val, 0.3)

!test !fvc = isosurface (x, y, z, val, .3, y)

!test[f, v, c] = isosurface (x, y, z, val, .3)

!v = x.^2 + y.^2 + z.^2

!val = [0, 0

calc_colors = false

else[fvc.faces, fvc.vertices] = __marching_cube__ (x, y, z, val, iso)

endif[fvc.faces, fvc.vertices, fvc.facevertexcdata] = __marching_cube__ (x, y, z, val, iso, colors)

f = v = c = []

iso = varargin{5}

noshare = false

Initial value:

 patch ("Faces", fvc.faces, "Vertices", fvc.vertices, 
                    "FaceColor", "g", "EdgeColor", "k")

endswitch endfunction !shared val[x, y, z] = varargin{4}

case varargout

Initial value:

 isosurface(varargin)

  if (nargin < 2 || nargin > 8 || nargout > 3)
    print_usage ()

verbose = false

endif view

endswitch endfunction !shared y = varargin{2}

endswitch endfunction !shared z = varargin{3}