Benjamin Joffe

Colliding Discs

Sometimes it's fun to make little animations in JavaScript, especially when there's physics involved. The latest culmination of my interest in these two topics is Colliding Discs. What should I do with this... make a billiards widget? An incredible machine clone? Or something else?

Today I dream of home...Blue skies are the solution

Comments

Eivind Figenschau SkjellumEivindFS Wednesday, May 16, 2007 10:45:56 PM

Nice work. Add surface friction too, would be cool if they slowed down :-)

Henrik HelmersHelmers Thursday, July 5, 2007 9:42:43 AM

They seem to slow down and speed up, how do you prevent them from all coming to a halt? bigsmile

Benjamin Joffe Thursday, July 5, 2007 9:47:34 AM

The system has zero energy loss because friction is not considered. The reason it appears to speed up and slow down is because if the large discs get some momentum then they will contain most of the collective energy but be moving slowly. If the tiny balls get knocked then they can go very fast without taking much energy from the system.

At any one point the sum of each ball's mass*velocity is constant.

FataL Saturday, November 17, 2007 6:25:31 AM

You can create simple game from this neat demo probably in just 2-3 hours.
All you need is:
idea Add some kind of "cursor", that can be moved by mouse
idea Add timer
idea Every 3 minutes push new ball to an play arena

Player's mission is run away from balls as long as he can.

Profit! bigsmile

It's a pity that you can't create global top scores board with Opera Widgets...

Write a comment

New comments have been disabled for this post.

May 2012
M T W T F S S
April 2012June 2012
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31