Approximate a mathematical function into a Bézier path or polygon