필터 지우기
필터 지우기

Writing text on 3D moving object

조회 수: 1 (최근 30일)
Yuval Froman
Yuval Froman 2019년 8월 8일
댓글: Yuval Froman 2019년 8월 9일
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
darova
darova 2019년 8월 8일
Maybe it will help
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