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.

  1. the number of points should minimized;
  2. 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

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -