Drawing circles, ellipse and S curves in drawing app

I want to add a tool to help users draw S curves as well as circles and ellipses in a drawing app I'm working on. Does anyone know of a library that does that or how to find one?
Drawing circles, ellipse and S curves in drawing app
 
 
Q