refactored out sierpinski's ngon as a stand-alone function.