To determine the different throw patterns, I used Ruby's
repeated_permutation method to find all of the possible throw sequences for throw heights 1-6. Then I added some filters: def is_valid? correct_number? && # number of objects thrown
good_first_throw && # first throw must be high enough
correct_timing == true && # you can only catch one thing at a time
does_not_repeat # don't return 313131 when 31 will suffice
endAt the moment, I'm looking into this nifty JavaScript siteswap animator and seeing what it will take to make my Ruby code generate some sweet animations. I'm thinking that jQuery + an HTML5 canvas element would be pretty cool.
Here's the siteswap repo on GitHub.
No comments:
Post a Comment