getting inside points of cuboid

5 ビュー (過去 30 日間)
yogesh jain
yogesh jain 2015 年 12 月 11 日
コメント済み: yogesh jain 2016 年 2 月 18 日
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 日
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 日
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 ...

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

Community Treasure Hunt

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

Start Hunting!

Translated by