title: Most efficient way to implement mouse smoothing
body: <p>I'm finishing up a drawing application that uses OpenGL ES 2.0 (WebGL) and JS. Things work pretty well unless I draw with very quick movements. See the image below:</p>
  
  <p><img src="https://i.stack.imgur.com/pXrX1.jpg" alt="Faceted loop"></p>
  
  <p>This loop was drawn with a smooth motion, but because JS was only able to get mouse readings at specific locations, the result is faceted. This happens to a certain degree in Photoshop if you have mouse smoothing turned off, though obviously much less because PS has the ability to poll at a much higher rate.</p>
  
  <p>So, I would like to implement some mouse smoothing, but I'm concerned about making sure it's very efficient so that it doesn't bog down the actual pixel drawing operations. I was originally thinking about using the mouse locations that JS is able to grab to generate splines and interpolate between readings to give a smoother result. I'm not sure if this is the best approach, though. If it is, how do I make sure I sample the correct locations on the intermediate spline? Most of the spline equations I've found don't have uniformly-distributed values for <code>t = [0, 1]</code>.</p>
  
  <p>Any help/guidance/advice would be very appreciated. Thanks!</p>