How to create cuboid with known parameters?

조회 수: 6 (최근 30일)
rohit
rohit 2020년 5월 18일
답변: darova 2020년 5월 18일
I want to create a cuboid in 3D, the information known are:
Coordinates of center of Cuboid (COG -x,y,z) and it's length, breadth, height.
So far I've expressed each coordinates in terms of COG and l,b,h. Is there any other better methods to do it or inbuilt approach ?

채택된 답변

Star Strider
Star Strider 2020년 5월 18일
See if: Plot a Cube centered at the origin can provide some inspiration.

추가 답변 (1개)

darova
darova 2020년 5월 18일
Plot cube as a surface
[x,y] = meshgrid([-1 -1 1 1 -1],[-1 -1 1 1]);
z = x*0-1/2;
z([6 7 10 11]) = 1/2;
surf(x/2,y/2,z)
axis vis3d

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by