On another note, I thought this code would work well for animating a Chinese dragon but after replacing the front cube with Suzanne, I realized the tail pieces self intersect. Just didn't notice it before. Still think it would be good code base for that but would have to rewrite it to take that into account and adjust for it. :)