A Conversation for Virtual earthquake

Neat-O!

Post 1

SilverSolstice

Wow! That's freaky!


Neat-O!

Post 2

Is mise Duncan

It started off life as a washing machine program, but nobody could be bothered waiting for it to get to the spin cycle...but such is life smiley - smiley


Neat-O!

Post 3

Surfer

man that earthquake thing is mint if you sit there doing it over and over it dont half make yo feel like your pissed up or something!!!


The Nerdy stuff...

Post 4

Is mise Duncan

The source is:

<!-- Begin
function shake(n) {
if (self.moveBy) {
for (i = 15; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->


Now, a real earthquake would fade away exponentially but I'm not really sure how you'd get that in here. I suppose dividing the amount moved (i) by two on each loop mich work...*thinks code thoughts*


Key: Complain about this post

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more