rendering Bézier Curves using the Casteljau's algorithm
(n) New Point
(m) Delete point
(p) Enable/Disable PreRendering
(h) Hide/Show construction lines
(g) Enable/Disable grid
Select and move a point using the mouse
The code is a bit messy, sorry