From 21b98f562b0969d0b0d24224cdbf36eb2635c49a Mon Sep 17 00:00:00 2001 From: Xin Li Date: Mon, 13 Jun 2022 11:58:14 -0700 Subject: [PATCH] [update] edtior_boundary --- code/TPSR/boundary_editor.m | 46 ++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/code/TPSR/boundary_editor.m b/code/TPSR/boundary_editor.m index 50fb496..564759b 100644 --- a/code/TPSR/boundary_editor.m +++ b/code/TPSR/boundary_editor.m @@ -1,21 +1,29 @@ +%% +% Description -- boundary_editor(fn) +% Draw the region of interest +% Parameter(s): +% fn[string] -- file name. +% +% +% +%% +function boundary_editor(fn) %% boundary editot: % Generate the solve boundary, and a fix reasonable value, with ecc and % polar value - close all;clc;clear -addpath(genpath('geometry-processing-package')); -addpath('utilities'); -rng(0) +% close all;clc;clear +% addpath(genpath('geometry-processing-package')); +% addpath('utilities'); +% rng(0) global para_R0 para_k para_R0 =25; para_k = 0.1; - -fn = '100610lh.m'; +% fn = '100610lh.m'; [Fm,Vm, Em]=read_mfile(['../data/mesh_data/' fn]); - uvm = disk_conformal_map(Fm, Vm); % % uvm = disk_area_mapping(Fm, Vm, uv_c, [4154], [0,0]); @@ -35,7 +43,7 @@ % plot_surf(face,vertex, prf_value_2_color('ecc', prf(:,2)) ) figure % plot_surf(face,vertex, ) -plot_surf(face,uvm, prf_value_2_color('lh', prf(:,1))*0.2+0.8* Em.Vertex_rgb) +plot_surf(face,vertex, prf_value_2_color('lh', prf(:,1))*0.2+0.8* Em.Vertex_rgb) axis off xy =[]; @@ -71,7 +79,6 @@ prf = Em.Vertex_prf(vfather,:); - figure plot_mesh(F, uv, 'FaceVertexCData', Em.Vertex_rgb(vfather,:)) @@ -114,11 +121,11 @@ ang_smoothed = smoothn(eccs, weight_from_R2(R2(id(sid)))); - figure(102); hold off; - plot(thetas, eccs, thetas, ang_smoothed); hold on; +% figure(102); hold off; +% plot(thetas, eccs, thetas, ang_smoothed); hold on; s = spline(thetas,ang_smoothed,rhoi); - plot(rhoi, s, 'go') - ylim([0, 10]) +% plot(rhoi, s, 'go') +% ylim([0, 10]) % fit a function anchorpos(i,1) =s; @@ -147,11 +154,11 @@ ang_smoothed = smoothn(angs, R2line); - figure(102); hold off; - plot(thetas, angs, thetas, ang_smoothed); hold on; +% figure(102); hold off; +% plot(thetas, angs, thetas, ang_smoothed); hold on; s = spline(thetas,ang_smoothed,thetai); - plot(thetai, s, 'go') - plot(thetas,0.1*R2line,'b-'); +% plot(thetai, s, 'go') +% plot(thetas,0.1*R2line,'b-'); % fit a function anchorpos(i,2) =s; @@ -169,8 +176,9 @@ save(fn, 'id2delete','anchor', 'anchorpos') -figure +% figure % -plot(anchorpos(:,1), anchorpos(:,2)) +% plot(anchorpos(:,1), anchorpos(:,2)) %% +end