Writing text on 3D moving object

1 次查看(过去 30 天)
Hi,
I create a 3D cube that can move (it connect to a microcontroller and simulate his movement).
How can i write a text on the face of the cube? i want of course that the text will "move" with the box.
I also add a picture so you can see what i mean.
Thanks
This is the code of creation of the box:
x=6; y=4; z=2;
xlim([-10,10]); ylim([-10,10]); zlim([-10,10]);
f(1)=patch([-x/2,x/2,x/2,-x/2],[-y/2,-y/2,y/2,y/2],[-z/2,-z/2,-z/2,-z/2],'blue');
f(2)=patch([-x/2,x/2,x/2,-x/2],[-y/2,-y/2,y/2,y/2],[z/2,z/2,z/2,z/2],'red');
f(3)=patch([-x/2,-x/2,x/2,x/2],[-y/2,-y/2,-y/2,-y/2],[-z/2,z/2,z/2,-z/2],'green');
f(4)=patch([x/2,x/2,x/2,x/2],[-y/2,-y/2,y/2,y/2],[-z/2,z/2,z/2,-z/2],'yellow');
f(5)=patch(-[x/2,x/2,x/2,x/2],[y/2,y/2,-y/2,-y/2],[-z/2,z/2,z/2,-z/2],'white');
f(6)=patch([-x/2,-x/2,x/2,x/2],[y/2,y/2,y/2,y/2],[-z/2,z/2,z/2,-z/2],'black');
rotate3d on;
  2 个评论
Yuval Froman
Yuval Froman 2019-8-9
Almost, this answer is about adding images.
I want to add just text, i'm sure there is a way add only text without image no?
Thanks!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by