How to create cuboid with known parameters?
18 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 ?
0 Commenti
Risposta accettata
Più risposte (1)
darova
il 18 Mag 2020
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293833/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293834/image.png)
0 Commenti
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!