开发者

easiest framework for a simple 2D animation

Well I am going to bed right now, and in next 2 days I have to code a simple program with animation that will simulate an inverted broom on a cart (a pole balancing genetic algorithm problem) the cart has to be pushed constantly from both sides to prevent the broom from falling down

You can see it in this video http://www.youtube.com/watch?v=Ums3eGIVgks or this picture image http://lis.epfl.ch/research/projects/EvolutionOfAnalogNetworks/ArtificialNeuralNetworks/images/mechanik_small.png

Well, I need to simulate physical behavior of this, but 开发者_如何转开发I have very little time, so I need something that I can understand and start using fast (the assignment is more into physics and genetic programming, so the simulation has to be just to show how it works).

Thank you


I'd use HTML5 Canvas and pure javascript. It's super easy, you don't need to compile. All you need is notepad, Chrome/Firefox/IE9, and a little time. There are tons of examples out there:

http://3.paulhamill.com/node/36


If you want an application, create a java application which uses a JPanel in a JFrame. In the JPanel override the paintComponent(Graphics g) method, and look at the graphics class which allows you to draw simple shapes like lines, rectangles, and ellipses.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜