Azzera filtri
Azzera filtri

Writing text on 3D moving object

1 visualizzazione (ultimi 30 giorni)
Yuval Froman
Yuval Froman il 8 Ago 2019
Commentato: Yuval Froman il 9 Ago 2019
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 Commenti
darova
darova il 8 Ago 2019
Maybe it will help
Yuval Froman
Yuval Froman il 9 Ago 2019
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!

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by