Approximate a mathematical function into a Bézier path or polygon
![Task](http://static.miraheze.org/rosettacodewiki/thumb/b/ba/Rcode-button-task-crushed.png/64px-Rcode-button-task-crushed.png)
You are encouraged to solve this task according to the task description, using any language you may know.
Approximate a mathematical function into a Bézier path or polygon, like GeoGebra does to display them.