lsexample.m

来自「Image segmentation script (code)」· M 代码 · 共 23 行

M
23
字号
% LSEXAMPLE example of a level set
% Draw a parabaloid intersecting a plane.

x = linspace( -2 * pi, 2 * pi, 25 );
y = x;
[ X, Y ] = meshgrid( x, y );
Z_paraboloid = X.^2 + Y.^2;
Z_plane = repmat( 25, size( X ) );
figure( 1 );
grid off;
axis off;
hold on;

surf( X, Y, Z_paraboloid );
surf( X, Y, Z_plane );

t = linspace( 0, 2 * pi, 100 );
z = repmat( 25, [1,100] );
for i = 24:0.05:26;
  plot3( sqrt(i) * cos( t ), sqrt(i) * sin( t ), z, 'k-' );
end;

hold off;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?