title: Using Qt To Draw the Graph of Sin(x)
body: <p>I'm experimenting with ways to draw a sinusoidal graph. </p>
  
  <p>My widget is only expecting to get passed in a few arbitrary data points. I have to fit these data points to a sinusoidal line curve:</p>
  
  <p><img src="https://intmstat.com/trigonometric-graphs/sinx.gif" alt="Sin(x)"></p>
  
  <p>So far, I've tried a few methods using <a href="http://doc.qt.nokia.com/latest/qpainterpath.html" rel="nofollow noreferrer">QPainterPath</a>.</p>
  
  <ol>
  <li>QPainterPath::lineTo - I tried using this function to plot the curve by taking my data points and creating so many points BETWEEN them, that the line actually smooths out a bit. This is a little too computationally intensive though, I feel.</li>
  <li>QPainterPath::cubicTo - From what I gathered from RTFM, this is the best way to go. The only problem is that I'm not sure how to plot my control points at spots where it will consistently and programmatically smooth out the curve the way I want it to. I was unable to get the desired result with this function.</li>
  </ol>
  
  <p>After some googling, I came across a few forum posts that were using Qwt for curve plotting. It would be great if I could use Qwt, but it's not an option since I'm restricted to only using Qt.</p>
  
  <p>Does anyone have helpful feedback/suggestions?</p>