Skip to content

A little haskell program which generates diagrams of all possible juggling patterns for a given number of balls and a max throw height.

Notifications You must be signed in to change notification settings

oisincar/siteswap-diagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

siteswap-diagram

Here's a little program that can generate arbitrarily large state transition diagrams...

State transition diagrams are a pretty neat way of coming up with new siteswaps. Each column is a 'state' and you 'transition' from a state by picking a number in that column, and following the arrow to the end.. Any loop you create doing this will be a valid siteswap.

Here's some demos. The colour was added afterwards, showing some possible loops (i.e. siteswaps) that can be found.

531 (blue) and 51 (red) for 3 balls
7531 (blue), (5)561(3) (red), and 7777000 (green).

Compiling/ running.

You need to have ghc installed, and then run:

ghc -o gen generator.hs

to compile it, and

./gen (#balls) (#max_throw_height)

E.g. ./gen 3 5 to generate a diagram for 3 balls up to throw height 5.

It might be quite slow for larger throw heights. As right now generating the states is O(n!).

About

A little haskell program which generates diagrams of all possible juggling patterns for a given number of balls and a max throw height.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published