简体   繁体   中英

How to smooth a line ( point array ) in c#?

Suppose you have an array of Points that draw a line like this

在此处输入图片说明

yet it is a bit jagged and you want o make it smoother. what would you suggest?

Thanks

You could average the points you have: Iterate through all the points in groups of three and bring the middle point in each of the groups closer to the center point between the two points. It would need some experimenting on how much to bring the points closer, but you could average the array several times.

代替绘制点,而是使用Graphics.DrawCurve(...)用这些点绘制一条曲线。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM