Plot 3d closed surface with sparse data

Hello,
I am trying to plot a heart, chest , lung etc, surface with matlab. I have the scattered data, and the clockwise arrangemnt of triangles, by this I mean I have the nodes of each corner of each triangle, the list looks like this,
for the nodes: x y z 1 0.0473 0.0409 0.0428 2 0.0856 0.0285 0.0068 3 0.0724 0.0755 0.0081 4 0.0178 0.0815 0.0118 5 0.0746 0.0033 -0.0366 6 0.0896 0.0546 -0.0355 and for the triangles node 1 2 3 1 50 51 144 2 50 144 140 3 140 144 145 4 140 145 141 5 141 145 146 6 141 146 147
Is there some way to plot the triangular surface in matlab with just one color?. When I call delanuay the mesh is different from the defined one by this list, and the color depends on the hight, I have not been able to plot the whole surface with just one color.

댓글 수: 1

The format of the list was not added correctly, but it is like this first nodes and then triangles vertex index
if true
% code
1 0.0473 0.0409 0.0428
2 0.0856 0.0285 0.0068
3 0.0724 0.0755 0.0081
4 0.0178 0.0815 0.0118
5 0.0746 0.0033 -0.0366
6 0.0896 0.0546 -0.0355
7 0.0473 0.0921 -0.0389
8 0.0089 0.0534 -0.0335
end2
if true
% code
1 50 51 144
2 50 144 140
3 140 144 145
4 140 145 141
5 141 145 146
6 141 146 147
7 141 147 148
8 141 148 149
end

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2013년 3월 26일

0 개 추천

doc patch

댓글 수: 5

Pedro
Pedro 2013년 3월 26일
but how do i use that command?
Sean de Wolski
Sean de Wolski 2013년 3월 26일
You feed it the triangulation faces and vertices and it draw them
Did you open the doc?
Pedro
Pedro 2013년 3월 27일
thanks Sean, it worked, now i have another problem, I need to use another triangulation matrix with just 3 elements instead of 4, this means 3 nodes for a triangle, instead of 4 for a polygon, I am not really sure if trimesh or trisurf, or other matlab function can manage that.
Sean de Wolski
Sean de Wolski 2013년 3월 27일
patch can...
Pedro
Pedro 2013년 3월 27일
can I use only 3 vertices for a 3d surface?

댓글을 달려면 로그인하십시오.

카테고리

제품

태그

질문:

2013년 3월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by