Closed Thread Icon

Topic awaiting preservation: September 20lines Javascript Contest - Sir Issac - Winner (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=23506" title="Pages that link to Topic awaiting preservation: September 20lines Javascript Contest - Sir Issac - Winner (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: September 20lines Javascript Contest - Sir Issac - Winner <span class="small">(Page 1 of 1)</span>\

 
kastner
Nervous Wreck (II) Inmate

From:
Insane since: Aug 2004

posted posted 10-01-2004 13:50

Ok, first the entries!



Sorry it was such a vague topic, and that I didn't have time to contribute. I guess a september contest is tough for everyone - school, work, etc.
Thanks for everyone who did enter, I know that everyone has other responsibilities!

Here is the Winner:
BillyRayPreachersSon.

It was VERY close - all three were great.
shingebis: I think your idea had BY FAR the most potential, and well done!
Grumble: I really like where you were going with this - very very cool effect in JS, for a different topic, it would have won (not that it doesn't involve physics, just that the other two were more... cause and effect)

Thanks again everyone - BRP - your turn, I'm really looking forward to your contest, I hope you learn from my mistake and don't make it too generic - I'm hoping I can enter in Oct!

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 10-01-2004 14:04

Congrats to BRPS!
Too bad I couldn't enter my Newton's cradle simulator. I managed to get it working but only with just one ball initially moving

/TwoD

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-01-2004 14:06

Congratulations!
Unfortunately I didn't entered the september issue. The topic was interresting but I wasn't in the mood for code I hope, I'll get my mojo back real soon.

I'm curious to see what BillyRayPreachersSon will ask us. And don't forget to create an "October 20lines Javascript Contest - your theme - entries" and an "October 20lines Javascript Contest - your theme - comments" threads, and to provide the rules for the new comers.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 10-01-2004 14:29

congrats!

kastner
Nervous Wreck (II) Inmate

From:
Insane since: Aug 2004

posted posted 10-01-2004 22:20

Yea, that was my pipe dream as well - a newton's cradle, I even went to spencer's gifts to go play with one...
the idea made my head hurt

Iron Wallaby
Paranoid (IV) Inmate

From: USA
Insane since: May 2004

posted posted 10-02-2004 05:18

I wouldn't think a newton's cradle would be *that* tough... you would have to make a few classes and make them interact elegantly. It would take a good deal of time to get to work nicely, though. And a lot more time to get it to fit in 20 lines.

Congrats to the winner (loved your entry), wish I had the time to submit something to this one. Maybe next month... *hopes*

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

(Edited by Iron Wallaby on 10-02-2004 05:29)

TwoD
Nervous Wreck (II) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 10-02-2004 17:09

Iron Wallaby-> it is, belive me lol. Atleast if you try to make it dynamic so it follows the rules of physics.


I managed to get it working with N balls and 1 ball initially moving. The problem I faced is that I don't understand
the math behind how the impulse forces get distributed like this: 1:2:2:.....:2:2:1 between the balls at the time of impact when two balls are initially moving.

Both moving balls have the speed V, which means the same kinetic energy.

oo-> ooooooo < Balls before impact
ooooooooo < Balls during impact
ooooooo oo-> < Balls after impact

Same thing with the two balls leaving the collision.


According to Newton's laws every force faces an equal counterforce.
The first ball from left must face a force equal to its kinetic energy since it stops dead. Hence the 1 in the force ratio.
The second ball has its kinetic energy plus the energy from the first ball, why? because it must 'release' a force to stop ball 1. The counterforce to that force is the same force it takes to stop ball 1. That force is equal to the second ball's kinetic energy, therefore, the kinetic energy in ball 2 is doubled at the impact.
That means it must face a force as big as its kinetic energy to stop. Hence the first 2 in the force ratio.

The third ball doesn't move. That means all forces affecting it have a sum of 0. That in turn means it has the big force on both its sides. Hence the second 2 in the force ratio. Same goes for the rest of the balls in the middle.
But what happens when you get to the end?
This I don't understand. We know the last collision force ratios must be 2:1 since the two balls move away at the same speed.
But what stops the last ball from leaving with twice the speed of the two original balls and why is the last part of the ratio this way?
If someone could please explain this to me I'd be very grateful.
Maybe a JS forum isn't the place to ask this, but since I'm trying to make a JS physics sim based on the answer it'd probably be better to ask a fellow programmer

/TwoD

« BackwardsOnwards »

Show Forum Drop Down Menu