Plotting the iso-surface in a specific range of values
44 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a 3D matrix and I want to show the isosurface for a range of values, such as the values greater than 0.2, not for a single value.
Could anybody help me to revise my code?
data = smooth3(porosity_median,'box',5);
p1 = patch(isosurface(data, 0.1 ), 'FaceColor','red','EdgeColor','none');
view(3); axis vis3d tight
camlight; lighting phong
0 个评论
采纳的回答
José M. Requena Plens
2021-3-15
编辑:José M. Requena Plens
2021-3-15
Using yor code.
To plot values greater than 0.1:
data = smooth3(porosity_median,'box',5);
p1 = patch(isosurface(data, 0.1 ), 'FaceColor','red','EdgeColor','none');
p2 = patch(isocaps(data,0.1,'enclose','above'),'FaceColor','red','EdgeColor','none');
view(3); axis vis3d tight
camlight; lighting phong
To plot values lower than 0.1:
data = smooth3(porosity_median,'box',5);
p1 = patch(isosurface(data, 0.1 ), 'FaceColor','red','EdgeColor','none');
p2 = patch(isocaps(data,0.1,'enclose','below'),'FaceColor','red','EdgeColor','none');
view(3); axis vis3d tight
camlight; lighting phong
isonormals(data,p1)
5 个评论
José M. Requena Plens
2021-3-15
The value you want to represent must be defined in both patches.
...
p1 = patch(isosurface(data, 0.3 ), 'FaceColor','red','EdgeColor','none');
...
p2 = patch(isocaps(data,0.3,'enclose','above'),'FaceColor','red','EdgeColor','none');
...
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!