To view this content, you need to install Java from java.com

Description

This experiment is an almost complete 2D rigid body physics engine. I say 'almost' because it is lacking two features: air friction and resting contact. I have used the SAT algorithm for collision detection which can be easily adapted for a 3D game. The physics works for any polygon, from eggs to circles so it doesn't have to be one of the shapes above. All objects are made from seperate materials. There isn't much else I can say about it apart from the fact that it is by far the largest experiment I've done so far and by far the most challenging. The code has been written with extra thought so it should make an easy read for anyone who is interested in implementing a physics engine. Kudos go to Yonas Sandbaek (seltar.org) for helping me throughout the project. Built with Processing (www.processing.org).

Comments

If you fling them upwards...where do they go? Very impressive!

Jalada

The walls on the side are only a certain length. You will flip the objects over the walls.

ADMIN

Pretty cool. Is there no way to pick up the objects without using a spring? How about fixed hold movement, where the rotation stays the same, and constant point of balance where you have exact control on the position but it rotates to its centre of gravity. Some sort of 'create shape' feature would be good for the demonstration on the site, to add objects, balls? Maybe make up a spawn/destroy object - rolling balls down a springy obstacle course?

Markavian

Wow. Very impressive.

Christian

This would be really awesome as a library. All the works here are pretty good, and the website is awesome!!

Ricard

Update: I have added a wall to prevent objects from exiting the screen from the top.

ADMIN

Another nice project. I'm taking a look at the code now, makes for an interesting read, very well executed.

Craig

Impressive. Congratulations.

Massoud

I like this experiment and also the new website make over. Nice work.

Yahya Islami

cool, i liked the old theme better though :P

kevin

WOW! It's actually intresting.

SALIK

blyat' gde zdes' forums?!! kronjev@yandex.ru

Alexey

if you push the triangle really hard to the right it disapears

supermike

cool!hmm didnt know that physics is actually interesting

syameen afira

Oh wow - this is absolutely fantastic! I'm gonna have to browse through your code for this. :D

barryvan




© 2002-2010 Seyed Mohammadali Eslami