To build a 3d room with 4 walls
33 次查看(过去 30 天)
显示 更早的评论
I have been experiencing a difficulty in designing a room with 4 walls to be preseted in 3D .a help would be much appreciated as I'm stuck in my middle of thesis.
With regards ,
GIRISH
7 个评论
Jan
2021-5-11
编辑:Jan
2021-5-11
A cube has 6 walls, if you consider floor and ceiling.
The example you are showing contains much more details than "4 walls". It is not clear what "design a room" exactly means. Adding "furnature" can be implemented as complicated as you want. You cannot expect, that the forum writes you a 3D modelling software. So please post, what you have tried so far. I've asked already, how your inputs are defined. But your current explanations are far too abstract to allow to help you.
采纳的回答
Adam Danz
2021-5-11
编辑:Adam Danz
2021-5-11
> can you help in finding the patch
I can help you understand the concept so you can apply it to your thesis work.
There are multiple ways to draw 2D rectangles or 3D cubes within 3D axes. I'll use patch but also see surf which isn't much different from patch.
First read through the documentation page for the patch function and look at the examples. If you want to show only the edges of the rectangles/cubes, then set the FaceColor of surf/patch objects to None.
Example
% 2D wall
x = [-5 5 5 -5];
y = [6 6 6 6];
z = [0 0 3 3];
Just by looking at the [x,y,z] coordinates above, imagine where this wall will be in 3D axes. If you can't imagine where it will be then you don't understand a 3D coordinate systems and you'll need to fill that gap before you're able to move on.
figure()
patch(x,y,z,[1 1 1],'FaceColor','none','EdgeColor','m','LineWidth',2)
view(3)
xlabel('x')
ylabel('y')
zlabel('z')
grid on
axis equal % important
xlim([-6 6])
ylim([-6 6])
zlim([-1 6])
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!