Hello all , I have all information about a cuboid (vertices,faces,L,B and H also) , how can I get all inside points of the cuboid ? Thanks in advance .

 채택된 답변

Walter Roberson
Walter Roberson 2015년 12월 14일

0 개 추천

xvec = 0 : B;
yvec = 0 : L;
zvec = 0 : H;
[X, Y, Z] = ndgrid(xvec, yvec, zvec);
is_in_cuboid = true(size(X));
Xc = X(is_in_cuboid);
Yc = Y(is_in_cuboid);
Zc = Z(is_in_cuboid);
pointsize = 20;
scatter3(Xc, Yc, Zc, pointsize, 'filled')

댓글 수: 1

yogesh jain
yogesh jain 2016년 2월 18일
How to define a particular cuboid here (which has 8 vertices)

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

추가 답변 (1개)

Brian Hannan
Brian Hannan 2015년 12월 11일

0 개 추천

It sounds like you want to use inpolyhedron.

댓글 수: 1

yogesh jain
yogesh jain 2015년 12월 12일
I want to get points , don't want to check whether it is inside or not ...

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

질문:

2015년 12월 11일

댓글:

2016년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by