Operators and Keywords

C++ API

# isonormals.m File Reference

## Functions

if (ischar(varargin{nargin})) na
if (strcmp(lower(varargin{nargin}),"negate")) negate
else error ("Unknown option '%s'", varargin{nargin})
otherwise print_usage ()
endswitch if (ismatrix(vp)&&size(vp, 2)==3) pa
elseif (ishandle(vp)) pa
else error ("Last argument is no vertex list and no patch handle")
endif if (negate) normals
endif switch nargout case if (!isempty(pa)) set(pa
!assert (size(v), size(n))
!assert (all(np==-nn))

## Variables

function varargout
negate = false
endif endif switch na case c = varargin{1}
vp = varargin{2}
x = 1:size (c, 2)
y = 1:size (c, 1)
z = 1:size (c, 3)
v = vp
else normals = __interp_cube__ (x, y, z, c, v, "normals")
endif switch nargout case VertexNormals
endswitch endfunction !test [x, y, z] = meshgrid (0:.5:2, 0:.5:2, 0:.5:2)
!c = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2)
!n = isosurface (x, y, z, c, .4, y) isonormals (x, y, z, c, v)
!np = isosurface (x, y, z, c, .4, y) isonormals (x, y, z, c, v)
!nn = isonormals (x, y, z, c, v, "negate")

## Function Documentation

 !assert ( all(np==-nn) )

 !assert ( size(v) , size(n) )

 elseif ( ishandle(vp) )

 else error ( "Last argument is no vertex list and no patch handle" )

 else error ( "Unknown option '%s'" )

 endif switch nargout case if ( ! isemptypa )

 endif if ( negate )

 endswitch if ( ismatrix(vp)&&size(vp, 2) = `=3` )

 if ( strcmp(lower(varargin{nargin}),"negate") )

 if ( ischar(varargin{nargin}) )

 otherwise print_usage ( )

## Variable Documentation

 !c = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2)

 !n = isosurface (x, y, z, c, .4, y) isonormals (x, y, z, c, v)

 !nn = isonormals (x, y, z, c, v, "negate")

 !np = isosurface (x, y, z, c, .4, y) isonormals (x, y, z, c, v)

 !test[x, y, z] = meshgrid (0:.5:2, 0:.5:2, 0:.5:2)

 c = varargin{1}

 negate = false

 endif switch nargout case normals = __interp_cube__ (x, y, z, c, v, "normals")

 v = vp

 endif case varargout

Initial value:

``` isonormals(varargin)
na = nargin
```

 endif switch nargout case VertexNormals

 vp = varargin{2}

 case x = 1:size (c, 2)

 y = 1:size (c, 1)

 z = 1:size (c, 3)