#- - - - - - - - - - - - - -#
# #
# a bit about falling #
# by: evan #
# #
#- - - - - - - - - - - - - -#
# first of all:
def it_is_ok
# ok?
"ok."
end
# but:
# when a thing
def hits_the_ground_from the_height
# if we can assume that the
remaining_energy = the_height
# then we can say
if remaining_energy
that_the "thing uses some of the #{remaining_energy} to bounce"
# and
rises_to the_next_peak_from(the_height)
else
# the thing just
rests
# and that is the
end # of it
end
# it should be noted that:
# in order to determine the
def the_next_peak_from the_old_height;
unless the_old_height < 0.01
# we assume that
new_height = the_old_height * 0.5
else
# the thing is no longer bouncing
# percievable to this observer, anyway...
end
end
# also,
# when a thing
# is dropped
def from a_height # it
hits_the_ground_from a_height
end
# likewise,
# when a thing
def rises_to a_new_height
# then it will fall
from a_new_height
end
# but...
# and most importantly.
# when the time is just right,
# the thing just
def rests;
and_we_know it_is_ok
#the
end
#----------------------------------------------#
alias :and_we_know :puts
alias :that_the :puts
when run..
hits_the_ground_from 50
thing uses some of the 50 to bounce
thing uses some of the 25.0 to bounce
thing uses some of the 12.5 to bounce
thing uses some of the 6.25 to bounce
thing uses some of the 3.125 to bounce
thing uses some of the 1.5625 to bounce
thing uses some of the 0.78125 to bounce
thing uses some of the 0.390625 to bounce
thing uses some of the 0.1953125 to bounce
thing uses some of the 0.09765625 to bounce
thing uses some of the 0.048828125 to bounce
thing uses some of the 0.0244140625 to bounce
thing uses some of the 0.01220703125 to bounce
thing uses some of the 0.006103515625 to bounce
ok.