algorithm - Methods to sample a 2-dim curve efficiently -
i ask efficient method / algorithm sample 2-dim curve following criteria. curve guaranteed not cross itself.
- the number of points should minimized;
- the sample curve, connects sample points lines, should resemble original one.
for example, since sample points connected lines, line should sampled 2 points on both ends. arc, there more points along make sample curve accurate enough.
you can try simplify polyline, constructed given points, douglas-peucker algorithm, build kind of smooth curve through reduced point set.
to make smooth curve, can use splines (e.g. catmull-rom) or this approach (intended closed curves, might adapted open ones)
Comments
Post a Comment