Draw Solid on matlab

조회 수: 7 (최근 30일)
aya
aya 2013년 5월 2일
I have about 100 points data, they form a perfect cube. How can I draw surfaces through these points to connect them and form a solid shape on Matlab?
Thanks,

답변 (2개)

Youssef  Khmou
Youssef Khmou 2013년 5월 2일
hi try :
P=randn(100,1);
r=reshape(P,10,10);
mesh(r), shading interp;
  댓글 수: 1
aya
aya 2013년 5월 2일
This code doesnt work if i need a cube.. :(

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


Jan
Jan 2013년 5월 2일
It depends. There is a very large number of possible surfaces through 100 points. So you have to decide for one. It could be e.g. the convex hull, or you can use the information that the points are comming from a cube and determine the smallest cube, which contains all points (attention: this must not be unique). Or you can create an hull, which is convex considering all points in a certain distance only (this would e.g. allow a cube with a cyclinder shaped hole through the center).
The decision to a specific surface depends on your needs. How it can be displayed afterwards might be a proper question for the forum.
  댓글 수: 1
aya
aya 2013년 5월 2일
Actually i just need simply to form a perfect solid out of these points.. the points form the solid but i just need to connect them to have this solid..

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

카테고리

Help CenterFile Exchange에서 Bodies에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by