Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smooth linestrings
#1
Hello,

Theres any algoritm to get smooth linestring coordinates (red line) from original linestring coordinates (green line)???

See image, please: http://imgur.com/fDhBQkk

Thanks
Reply
#2
This doesn't seem to be Python-specific. Are you aware of, generally, an algorithm that you could try implementing in Python?
Reply
#3
Those look to be Bezier curves. A web search on "python bezier curves" comes up with a few items on Stack Overflow showing how to implement them with NumPy and SciPy.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#4
Yes, there are algorithms to smooth Bezier curves:

https://www.particleincell.com/2012/bezier-splines/
http://www.math.ucla.edu/~baker/java/hoefer/Spline.htm
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020