test_constrained_map.m.svn-base

来自「fast marching method」· SVN-BASE 代码 · 共 32 行

SVN-BASE
32
字号
% test for propagation constrained to a sub-set of pointsn = 300;name = 'mountain';name = 'constant';% number of pointsp = 80;start_points = floor(rand(2,p)*(n-1))+1;x = linspace(-1,1,n);[Y,X] = meshgrid(x,x);L = zeros(n)-Inf;  I = find(X.^2 + Y.^2 < 0.6^2); L(I) = Inf;options.constraint_map = L;[M,W] = load_potential_map(name, n);[D,Z,Q] = perform_fast_marching(W, start_points, options);clf;subplot(1,2,1);hold on;imagesc(Q'); axis image; axis off;plot(start_points(1,:), start_points(2,:), 'k.');hold off;subplot(1,2,2);hold on;imagesc(D'); axis image; axis off;plot(start_points(1,:), start_points(2,:), 'k.');hold off;

⌨️ 快捷键说明

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