Why does the 3D plot viewer skew as I rotate the point of view?

18 ビュー (過去 30 日間)
Hassan Iqbal
Hassan Iqbal 2016 年 10 月 3 日
コメント済み: Adam 2016 年 10 月 3 日
I basically used line command to draw lines in 3D, the intention being to create a cube with the objective of later using object transforms (translate, scale and rotate) to learn about them. It seems I shall have to write a function to draw the wireframe cube as none exists in MATLAB.
In the plot window there is a button that allows us to rotate the view. This can change the 2D plot view to 3D plot view also as we rotate. However, the axes seem to get skewed as I rotate about. Why is that?
Basically, as I rotate the length of the vertical axis changes (coordinates remain same), the same happens with the other axes. This causes the axes octant (XYZ axes space) to sometimes look like a cube, sometimes longer horizontally and sometimes vertically. How do I make it stop doing this?

回答 (1 件)

Adam
Adam 2016 年 10 月 3 日
編集済み: Adam 2016 年 10 月 3 日
There is a right-click option when you are in Rotate mode: Rotate Options -> Fixed Aspect Ratio Axes.
axis( hAxes, 'vis3d' )
will do this programmatically.
I use this for rotating a wireframe box also. e.g
  2 件のコメント
Hassan Iqbal
Hassan Iqbal 2016 年 10 月 3 日
Good, using axis vis3d has solved the problem. I have one more question, is it possible to get a type of popup box showing coordinates of a point as I hover on them with the mouse? Visually reading the coordinates of a point is very hard with a 3d plot.
Adam
Adam 2016 年 10 月 3 日
You can click on points when you are in the right mode from the Data Cursor mode.

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

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by