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

17 Ansichten (letzte 30 Tage)
Hassan Iqbal
Hassan Iqbal am 3 Okt. 2016
Kommentiert: Adam am 3 Okt. 2016
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?

Antworten (1)

Adam
Adam am 3 Okt. 2016
Bearbeitet: Adam am 3 Okt. 2016
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 Kommentare
Hassan Iqbal
Hassan Iqbal am 3 Okt. 2016
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 am 3 Okt. 2016
You can click on points when you are in the right mode from the Data Cursor mode.

Melden Sie sich an, um zu kommentieren.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by