How to draw a 3d cube in matlab and rotate it using rotation matrix in all three directions.

63 ビュー (過去 30 日間)
I want to draw a 3D cube in Matlab and rotate it in 3D using all rotation matrices. for an example if I change the angle of the x axis it should rotate in x axis. If I change the angle of the y axis then it should rotate in y axis. The rotation should be in animation. i.e. step by step. I am new to Matlab. I have googled it but could not find enough information. Can someone please help?

回答 (2 件)

Vishal Bhutani
Vishal Bhutani 2018 年 7 月 30 日
Hi, I have written the code to rotate the cube with the following theta in the function. You will have to edit the code to specify about which axis you to rotate the cube. By default it will rotate the cube along x-axis by 360 degree.
Thanks Vishal Kumar Bhutani
  1 件のコメント
Ayush singhal
Ayush singhal 2021 年 4 月 21 日
can you eleborate your code little bit more. Like how you opt points for sufaces?

サインインしてコメントする。


alejandro perez
alejandro perez 2020 年 2 月 2 日
In the description of this video is the code of a cube which rotates, moves and grows up.

カテゴリ

Help Center および File ExchangeLanguage Fundamentals についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by