The question is, how can I make my polyline look good and more curvy without that many points. Or better yet, how do I create a bezier curve after I draw my polyline?
Well, take a look
http://www.youtube.com/watch?v=v63NAzQE7Bw
The video shows two algorithms, a variant of the Douglas-Peucker polygon point reduction algorithm and Philip J Schneider’s CurveFit algorithm from Graphic Gems I with material from Philip’s book Geometric Tools for Computer Graphics, as well as material from Mark de Berg Computational Geometry and lastly, Gerald Farin’s Curves and Surfaces for CADG 5th Edition.
I will post the source with comments soon. Who wants it?
Edit: Here is a cleaned up version of the code running on the iPhone. http://developer.anscamobile.com/assets/curvefitting.mp4
Carlos
twitter.com/carlosicaza
[import]uid: 24 topic_id: 4732 reply_id: 304732[/import]