S
S
Sergey Sokolov2018-09-20 09:52:40
Mathematics
Sergey Sokolov, 2018-09-20 09:52:40

How to choose a pursuit curve of a given shape?

There is such a way of drawing curves: the pursuit trajectory. The virtual "pencil" tends to some kind of control point (CT). That, in turn, to the other. Another - to the third. So there can be several links in the chain. And finally, the first tends to the specified Principal Point (GT). GT moves abruptly or smoothly. The CT and the "pencil" smoothly approach their "parent" point, slowing down as they approach.
Examples:

  • manual - move the mouse over the field. There is a mouse, two pursuers and a pencil. 3-link chain;
  • autonomous - GT jumps to a new random location as soon as the "pencil" gets closer than the threshold value.

The question is how to solve the inverse problem . Having an arbitrary line, get a set of positions of the Main Points and timestamps, when to be in them, so that with the given parameters of the pursuit chain, the original curve would be drawn with an accuracy of X. The number of GTs must be minimized. It is clear that one could arrange a point for every millimeter, this is almost the same as making a smooth curve from many short straight segments.
The original curve can be provided both as a vector shape and as a scanned image. The second is probably closer to a practical task, and it will be possible to evaluate the quality of a hit by the degree of shading of dark pixels in the scan.
For example, create a process for generating "one line drawing" - drawings with one line without lifting your hand:
5ba34970bce29092900692.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan., 2018-09-20
@LaRN

If I understand correctly, maybe this will suit you:
https://habr.com/post/314218/
The essence is to approximate an arbitrary line with a spline of a certain order.
And here all the complexity comes down to choosing the order of the spline and key points.
This article is about just that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question