help on matlab isosurface (3D object projects to 2 D plane)

5 ビュー (過去 30 日間)
SL
SL 2014 年 1 月 21 日
回答済み: Gökalp 2015 年 6 月 30 日
Hi, I would like to ask for a projection issue in isosurface command.
More precisely, I hope to project a 3D object to the 2D plane, which can be found in the following figure.
I have made a short code to produce a simple geometric object. Hope someone could help me to visualize the object as the figure do. Thanks!
%------------------------------------
% mesh:
xx=1:20;
yy=1:20;
zz=1:20;
[X,Y,Z] = meshgrid(xx,yy,zz);
%init the test volume data test
test = zeros(size(X));
%small cube at lower
test(5:8,5:8,5:7)=50;
%large cube at higher
test(7:11,7:11,8:11)=60;
%isosurface
p= patch(isosurface(X,Y,Z,test,1));
isonormals(X,Y,Z,test,p)
set(p,'FaceColor','red','EdgeColor','none');
daspect([1 1 1])
view(3); axis([1,20,1,20,1,20])
camlight
lighting gouraud
grid on
%-------------------------------------------

回答 (2 件)

Sampath
Sampath 2014 年 2 月 11 日
When we run this code, we don't get the results shown above!!
  2 件のコメント
Walter Roberson
Walter Roberson 2014 年 2 月 11 日
The sample code does not attempt to work with the teapot. It works with some artificial data which is two cubes stuck together.
SL
SL 2014 年 2 月 11 日
Thanks a lot for the remarks.
Actually the figure here is featured from one research article and we want to have the same shadow as it has.
The code here only allows to generate a simple object in 3D but I do not know how to tune "isosurface" command to obtain the shadow in 2D plane. Please kindly help me if you know how, thanks!

サインインしてコメントする。


Gökalp
Gökalp 2015 年 6 月 30 日
Hi
did you find any proper solution to obtain projection over 2d plane?

カテゴリ

Help Center および File ExchangeScalar Volume Data についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by