title: In tkinter is there a way to draw a smoothed out curved line?
body: <p>The below provided lines are from the <a href="https://tkdocs.com/tutorial/canvas.html#types" rel="nofollow noreferrer">the tkdocs website</a>.</p>
  <blockquote>
  <p>A line item can actually be a series of line segments, not just one; in
  our example, we could have chosen to use a single line item for each
  complete stroke. The line can also be drawn directly point-to-point,
  or smoothed out into a curved line.</p>
  </blockquote>
  <p>The documentation points out at the end that &quot;<em>a line(on the tkinter canvas) can be drawn directly point-to-point, or smoothed out into a curved line.</em>&quot;. But I have not yet been able to find a way to do that.</p>
  <hr />
  <p><strong>EDIT:</strong></p>
  <p>The full code used in my project is too big and irrelevant to be provided, but given below is a short portion of it, which is concerned with the problem described above. Hopefully the below code can be helpful in describing what I have tried as of yet.</p>
  <pre><code>def clear_prev_draw_coords(event = None) :
      global last_draw_x, last_draw_y, pen_color, pen_size
  
      last_draw_x, last_draw_y = None, None
      drawing_coord_list.clear()
      return
  
  def draw() :
      last_img_x = 0
      last_img_y = 0
      canvas.create_line(last_draw_x, last_draw_y, x2, y2, fill = pen_color, width = pen_size, tag = tag, smooth = 1)
  
      last_draw_x, last_draw_y = x2, y2
      return
  
  def toggle_pen_mode(dummy = None) :
      global mode
  
      mode = 'pen'
  
      root.bind(&quot;&lt;B1-Motion&gt;&quot;, draw)
      root.bind(&quot;&lt;ButtonRelease-1&gt;&quot;, clear_prev_draw_coords)
      return
  </code></pre>