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).
If you fling them upwards...where do they go? Very impressive!
JaladaThe walls on the side are only a certain length. You will flip the objects over the walls.
ADMINPretty 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?
MarkavianWow. Very impressive.
ChristianThis would be really awesome as a library. All the works here are pretty good, and the website is awesome!!
RicardUpdate: I have added a wall to prevent objects from exiting the screen from the top.
ADMINAnother nice project. I'm taking a look at the code now, makes for an interesting read, very well executed.
CraigImpressive. Congratulations.
MassoudI like this experiment and also the new website make over. Nice work.
Yahya Islamicool, i liked the old theme better though :P
kevinWOW! It's actually intresting.
SALIKblyat' gde zdes' forums?!! kronjev@yandex.ru
Alexeyif you push the triangle really hard to the right it disapears
supermikecool!hmm didnt know that physics is actually interesting
syameen afiraOh wow - this is absolutely fantastic! I'm gonna have to browse through your code for this. :D
barryvan