-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsol_vis.m
95 lines (85 loc) · 2.05 KB
/
sol_vis.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
%clear;clc;
close all;
system_id_old;
comsol_file = 'Z:\Spinal Cord Model\COMSOL\roots_of_passage\just_cord';
%fem = mphload([comsol_file '.mph']);
geom = 'geom1';
%get_geom_names;
%% View Geometry
nice_colors = parula(21);
f1 = rfig();
ax = gca;
hold on;
% Plot neuron
% [tree, name, path] = load_tree([tempdata_address 'model_tree.neu']);
% plot_tree(tree{1},[1 0 0]);
% hold on;
% plot_tree(tree{2},[1 0 0]);
mphplot(fem,'pg5','rangenum', 1);
%edges
mphviewselection(fem,geom,el_edge, ...
'entity', 'edge', ...
'parent',ax, ...
'facealpha', 0, ...
'geommode', 'off', ...
'edgemode', 'on', ...
'edgecolorselected', [0 0 0], ...
'edgecolor', [0 0 0] ...
);
%faces
mphviewselection(fem,geom,el_dom, ...
'entity', 'domain', ...
'parent',ax, ...
'facealpha', 1, ...
'facecolor', [1 0 0], ...
'facecolorselected', nice_colors(1,:), ...
'geommode', 'off', ...
'edgemode', 'on', ...
'edgecolorselected', 'k', ...
'edgecolor', 'k' ...
);
% Plot GM
%edges
mphviewselection(fem,geom,gm_edge, ...
'entity', 'edge', ...
'parent',ax, ...
'facemode', 'off', ...
'geommode', 'off', ...
'edgemode', 'on', ...
'edgecolorselected', [0 0 0], ...
'edgecolor', [0 0 0] ...
);
%faces
mphviewselection(fem,geom,gm_dom(1:6), ...
'entity', 'domain', ...
'parent',ax, ...
'facealpha', 0.6, ...
'facecolor', [1 0 0], ...
'facecolorselected', nice_colors(1,:), ...
'geommode', 'off', ...
'edgemode', 'on', ...
'edgecolorselected', 'k', ...
'edgecolor', 'k' ...
);
%faces
mphviewselection(fem,geom,gm_dom(7:end), ...
'entity', 'domain', ...
'parent',ax, ...
'facealpha', 0.6, ...
'facecolor', [1 0 0], ...
'facecolorselected', nice_colors(1,:), ...
'geommode', 'off', ...
'edgemode', 'on', ...
'edgecolorselected', 'k', ...
'edgecolor', 'k' ...
);
%%
view(2);
campos([5e3 -5e3 -50e3]);
camtarget([0e3 0e3 10e3]);
camroll(45);
zoom(1.2);
xlabel('x (mm)');
ylabel('y (mm)');
zlabel('z (mm)');
print('-dpng',[tempdata_address 'cd_view']);