A Conversation for Virtual earthquake
Neat-O!
Is mise Duncan Posted May 13, 2000
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
Neat-O!
Surfer Posted Jun 19, 2000
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...
Is mise Duncan Posted Jun 19, 2000
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
Neat-O!
More Conversations for Virtual earthquake
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."