corners of rectangle by center point

조회 수: 13(최근 30일)
Mariam Ali
Mariam Ali 2022년 1월 18일
편집: DGM 2022년 1월 18일
i want to find corners ABCD of rectangular surface by center point and length and width is given in 3D.
center point = [-9.9366,1.6890,1.3800]
for ease attaching the picture
  댓글 수: 2
Mariam Ali
Mariam Ali 2022년 1월 18일
what i ment that center point of rectangle is given having x y z codinates . hight of rectangle is 1.7 that is in y direction and width is 0.3 which is on z direction and x being the same value of the center point.
now is it possible ?

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

채택된 답변

DGM
DGM 2022년 1월 18일
편집: DGM 2022년 1월 18일
You mean basic addition and subtraction?
c = [-9.9366 1.6890 1.3800];
w = [0 1.7 0.3];
v = c + w/2.*[0 -1 -1; 0 1 -1; 0 1 1; 0 -1 1]
v = 4×3
-9.9366 0.8390 1.2300 -9.9366 2.5390 1.2300 -9.9366 2.5390 1.5300 -9.9366 0.8390 1.5300
patch(v(:,1),v(:,2),v(:,3),'green')
axis equal
grid on
view(3)

추가 답변(1개)

Max Heimann
Max Heimann 2022년 1월 18일
Do you want the corners of the 2D projection of a rotated plane? In that case you could simply calculate the 3D position of each vertice and discard the 3rd dimension. This requires you to know the rotation of the plane in your 3D space. If you know that your problem is solvable with the builtin sin/cos/tan functions.
  댓글 수: 3
Mariam Ali
Mariam Ali 2022년 1월 18일
its 3D [x,y,z] coordinate.

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by