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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -