When drawing by coordinates with mouse events, you get just connected lines. I looked at several algorithms that make a smooth curve, but all this happens in post-processing, when the user has finished drawing, and even then the lines turn into a curve.
https://i.stack.imgur.com/DzYyO.gif - post processing lines
How can I make a smooth curve in real time like in the gif below? Catmull–Rom spline seem to do something similar, but it seems I'm digging in the wrong place. Is there a standard solution to this problem so as not to reinvent the wheel?
https://i.stack.imgur.com/B8bCx.gif - Smooth curves in real time
P.S I can't use post-processing algorithms if they require the path to be ready. If you use them, then the curve will constantly change. https://soswow.github.io/fit-curve/demo
P.S2 I need the curve to go through the coordinates. And if I understand correctly, then we need interpolation, not approximation.