getting inside points of cuboid
2 次查看(过去 30 天)
显示 更早的评论
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 .
0 个评论
采纳的回答
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!