These are some extensions to the TikZ folding library. I've described these extensions in a series of blog posts: