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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -