MATLAB Answers

Why is text() unable to orient output in 3 axes?

8 ビュー (過去 30 日間)
Carl Witthoft
Carl Witthoft 2017 年 10 月 25 日
コメント済み: Jan 2017 年 10 月 26 日
text(x,y,z,string,'rotation',theta) is only capable of rotating about one axis, and even more annoyingly the text rotates on its own when I change the view angle via the rotation toolbar tool. I'd like to be able to place text in 3-space but have it lie "flat" in the X-Y plane with some specified rotation in that plane. Any workarounds? Any plans at MathWorks to implement theta-phy-xsi rotation control?

  0 件のコメント

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

回答 (1 件)

Jan
Jan 2017 年 10 月 25 日
Why is text() unable to orient output in 3 axes?
It is the idea of text() to operate in 2D.
Any workarounds?
You have to draw the text in 2D, capture the part of the screen and use it as TextureMap on surface object. See e.g. https://www.mathworks.com/matlabcentral/fileexchange/15018-createbuttonlabel-string-varargin- .
Any plans at MathWorks to implement theta-phy-xsi rotation control?
This is the public forum and the answers are given voluntarily by other Matlab users (which are partially employed by MathWorks, but do not act officially here). Therefore you will not get a reliable answer here to what MathWorks plans for the future. Personally, I do not expect that 3D text has a high priority, because it is rarely used.

  2 件のコメント

Carl Witthoft
Carl Witthoft 2017 年 10 月 26 日
Well... text can be placed in 3D space, but the orientation is controlled by occult forces unaccessible to mere humans. That seems like a clear opportunity for an upgrade.
Jan
Jan 2017 年 10 月 26 日
The orientation of the text command is not occult, but well defined: It is 2D in the screen plane and the rotation around the vector normal to the screen can be controlled.
Remember that "theta-phi-xsi" is not uniquely defined - the old problem with the order of Euler angles and the definition of the axes. Then some prefer to rotate the object, some the coordinate system.
ImageMagick creates nice and powerful renderings of text. Then mapping it to a surface afterwards seems to be a good solution currently.

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

Community Treasure Hunt

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

Start Hunting!

Translated by