General 2D vector graphics
3 views (last 30 days)
Show older comments
Hi all,
What is the simplest way to create a generic graphics canvas on which to perform general 2D graphics and animation?
I'm busy creating a program to simulate little synthetic organisms that are controlled by little neural net brains.
I'd like to visualize their little world. In C# I usually do all my graphics in OpenGL. How ever, this does not need to be as fancy as OpenGL, just a generic canvases to draw on?
So far I've been experimenting with drawing on figures using lines. This works, but I can't help thinking that figures are not designed for generic graphic and are more specific to graphing and plotting.
I've also taking a look at the SimuLink 3D animation toolbox. It would actually work, but its over kill. I just need to draw up some simple vector graphics bugs and animate them around the screen.
Any ideas?
0 Comments
Accepted Answer
Jan
on 12 Sep 2013
Figures cannot contain lines, because only axes are the parent object of graphic objects like lines. Perhaps your term "canvas" means something like an axes object, but your question is not clear in this point. "Some simple vector graphic bugs" seems like you want to create a patch or surface object. So I suggest to read:
doc axes
doc figure
doc patch
doc surf
Even Matlab can use OpenGL as renderer. But the underlying methods are hidden by high level functions as the ones shown above.
Looking in the FileExchange is always a good idea. Search e.g. for the term "3D animation": http://www.mathworks.com/matlabcentral/fileexchange/index?utf8=%E2%9C%93&term=3D+animation.
0 Comments
More Answers (1)
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!