Navigation

Operators and Keywords

Function List:

C++ API

surfnorm.m File Reference


Functions

 if (nargin!=1 &&nargin!=3) print_usage()
endif if (nargin==1) z
endif if (nargout==0) endif xx
xx (end,:)-xx(end-1
yy (end,:)-yy(end-1
zz (end,:)-zz(end-1
 newplot ()
 surf (x, y, z, varargin{ioff:end})
 plot3 ([x(:)';x(:).'+nx(:).';NaN(size(x(:).'))](:),[y(:)';y(:).'+ny(:).';NaN(size(y(:).'))](:),[z(:)';z(:).'+nz(:).';NaN(size(z(:).'))](:), varargin{ioff:end})
unwind_protect_cleanup set (h,"nextplot", old_hold_state)
end_unwind_protect
unwind_protect_cleanup 
axes (oldh)
endif endfunction!demo !colormap (jet(64))%![x
 !surfnorm (x, y, z)
!demo !surfnorm (peaks(10))
!demo !surfnorm (peaks(32))

Variables

 function [Nx, Ny, Nz]
 ioff = meshgrid (1:size(z,1), 1:size(z,2)) 2
else x = varargin{1}
 y = varargin{2}
 z = varargin{3}
 xx = [2 .* xx(1,:) - xx(2,:)
yy = [2 .* y(:,1) - y(:,2), y, 2 .* y(:,end) - y(:,end-1)]
zz = [2 .* z(:,1) - z(:,2), z, 2 .* z(:,end) - z(:,end-1)]
 c = cross ([u.x(:), u.y(:), u.z(:)], [v.x(:), v.y(:), v.z(:)])
 nx
 ny
 nz
 len = sqrt (nx.^2 + ny.^2 + nz.^2)
unwind_protect axes (h)
 old_hold_state = get (h, "nextplot")
unwind_protect set (h,"nextplot","add")
end_unwind_protect else Nx = nx
 Ny = ny
 Nz = nz

Function Documentation

endif endfunction !demo !colormap ( jet(64)   ) 

!demo !surfnorm ( peaks(32)   ) 

!demo !surfnorm ( peaks(10)   ) 

!surfnorm ( ,
,
 
)

end_unwind_protect unwind_protect_cleanup axes ( oldh   ) 

endif if ( nargout  = =0  ) 

endif if ( nargin  = =1  ) 

if ( nargin!  = 1 &&nargin!=3  ) 

newplot (  ) 

plot3 ( [x(:)';x(:).'+nx(:).';NaN(size(x(:).'))] (:)  ,
[y(:)';y(:).'+ny(:).';NaN(size(y(:).'))] (:)  ,
[z(:)';z(:).'+nz(:).';NaN(size(z(:).'))] (:)   
)

unwind_protect_cleanup set ( ,
"nextplot"  ,
old_hold_state   
)

surf ( ,
,
 
)

* xx ( end  ,
 
)

* yy ( end  ,
 
)

* zz ( end  ,
 
)


Variable Documentation

c = cross ([u.x(:), u.y(:), u.z(:)], [v.x(:), v.y(:), v.z(:)])

Initial value:

 surfnorm (varargin)

  [h, varargin, nargin] = __plt_get_axis_arg__ ((nargout != 0), "surfnorm", 
                                                varargin{:})

ioff = meshgrid (1:size(z,1), 1:size(z,2)) 2

len = sqrt (nx.^2 + ny.^2 + nz.^2)

nx

Initial value:

 (w.x(1:end-1,1:end-1) + w.x(1:end-1,2:end) +
        w.x(2:end,1:end-1) + w.x(2:end,2:end)) ./ 4

Ny = ny

ny

Initial value:

 (w.y(1:end-1,1:end-1) + w.y(1:end-1,2:end) +
        w.y(2:end,1:end-1) + w.y(2:end,2:end)) ./ 4

Nz = nz

nz

Initial value:

 (w.z(1:end-1,1:end-1) + w.z(1:end-1,2:end) +
        w.z(2:end,1:end-1) + w.z(2:end,2:end)) ./ 4

old_hold_state = get (h, "nextplot")

unwind_protect set(h,"nextplot","add")

w x = varargin{1}

xx = [2 .* xx(1,:) - xx(2,:)

endif endfunction !demo y = varargin{2}

yy = [2 .* y(:,1) - y(:,2), y, 2 .* y(:,end) - y(:,end-1)]

endif endfunction !demo z = varargin{3}

zz = [2 .* z(:,1) - z(:,2), z, 2 .* z(:,end) - z(:,end-1)]