getting inside points of cuboid

2 visualizaciones (últimos 30 días)
yogesh jain
yogesh jain el 11 de Dic. de 2015
Comentada: yogesh jain el 18 de Feb. de 2016
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 .

Respuesta aceptada

Walter Roberson
Walter Roberson el 14 de Dic. de 2015
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 comentario
yogesh jain
yogesh jain el 18 de Feb. de 2016
How to define a particular cuboid here (which has 8 vertices)

Iniciar sesión para comentar.

Más respuestas (1)

Brian Hannan
Brian Hannan el 11 de Dic. de 2015
It sounds like you want to use inpolyhedron.
  1 comentario
yogesh jain
yogesh jain el 12 de Dic. de 2015
I want to get points , don't want to check whether it is inside or not ...

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by