Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to create a smiley face using matlab that will roll across the screen.

189 views
Skip to first unread message

BC Tan

unread,
Oct 25, 2009, 8:09:01 AM10/25/09
to
Hi All,

Can anyone advise me on how to create a smiley face that will roll across the screen using matlab program?

Tks alot for your advise

Jan Simon

unread,
Oct 25, 2009, 4:55:02 PM10/25/09
to
Dear BC Tan!

> Can anyone advise me on how to create a smiley face that will roll across the screen using matlab program?

This is a very general question...
You can do this fairly easy in a Matlab window by drawing the smiley as texture map on a surface and let the camera roll. But if you want to roll the smiley outside a Matlab window ("across the screen"), I have a more funny advice:
Use the installation disk and some paint to construct your smiley. Then pull a thread through the hole and move it in front of the screen.

If you want to let it look more "professional", I'd recommend another programming tool.
And if you've finsihed your work, please don't forget to tell me, if the sophisticated software implementation or my energy efficient, programming and debug time-optimal, hardware base method did impress the audience more!

Good luck, Jan

BC Tan

unread,
Oct 26, 2009, 9:50:19 AM10/26/09
to
"Jan Simon" <matlab.T...@nMINUSsimon.de> wrote in message <hc2dv6$obj$1...@fred.mathworks.com>...
Hi Jan,

How do i draw the the smiley as texture map on a surface and let the camera roll?

Pls advise. Tks

Jan Simon

unread,
Oct 26, 2009, 4:25:18 PM10/26/09
to
Dear BC Tan!

> How do i draw the the smiley as texture map on a surface and let the camera roll?

What have you done so far?
Do you have a smiley as picture? Which format? Do you know how to call IMREAD? Have you searched in the FileExchange, e.g.
http://www.mathworks.com/matlabcentral/fileexchange/21881

Good luck, Jan

BC Tan

unread,
Oct 27, 2009, 6:09:03 AM10/27/09
to
Hi Jan,

Yap I had a smiley face save as .gif..

Yap I know IMREAD can read in the picture. However, how do I make the figure move across the figure window in matlab? Can advise as the link give below give no details of animation.

Rgds

Jan Simon

unread,
Oct 27, 2009, 8:49:04 AM10/27/09
to
Dear BC Tan!

> Yap I had a smiley face save as .gif..
>
> Yap I know IMREAD can read in the picture. However, how do I make the figure move across the figure window in matlab? Can advise as the link give below give no details of animation.

The linked function let you display the image on a surface object. The only thing left to do is using CAMORBIT and CAMROLL. Or you can move the camera position manually: Set the properties CameraPosition, CameraTarget, CamerUpVector and CameraViewAngle of the AXES object in a for loop and insert some PAUSE commands.

Good luck for the next step, Jan

0 new messages