omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Smoothing out drawn lines

    Pythonista
    drawing curves
    3
    4
    2414
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HT
      HT last edited by

      Hello,

      I would like to know if there is a way to smooth out a drawn line, like shown in this video: https://www.youtube.com/watch?v=Kfy0lWAV16Y

      I know that certain drawing apps do it, is there an easy way to implement it?

      Best wishes.

      cvp 2 Replies Last reply Reply Quote 0
      • cvp
        cvp @HT last edited by

        @HT Do a search of spline in this page

        1 Reply Last reply Reply Quote 0
        • cvp
          cvp @HT last edited by

          @HT This script works fine

          1 Reply Last reply Reply Quote 0
          • JonB
            JonB last edited by

            you have to thin out your points... one way would be to filter data in touch_moved to only register motions larger than X pixels, or that occur after a long delay. then you would use a bezier arc to connect.

            you have to compute the control points yourself, which may be non trivial.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors