Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smoothing a path: a better algorithm
#3
Well, I would rather just delete the simple plugin. I feel that the point in the plugin "G2-continuity" is just that it creates G2-continuous paths (continuous curvature), so there is not much point in offering there an option to make paths that are not G2-continuous, however simple the algorithm is.

The point in the simple plugin, on the other hand, was precisely that it was simple and quick to make. I also put there an option to remove superfluous anchors, and the better plugin does not have that feature. So I think I shall delete nothing and keep both plugins.

Instead, now I tell you a story: How it happened that I wanted to have paths with continuous curvature. You may recall that I made a plugin "Replicate path along circle" and I put there two distortion methods that I called "polar coordinates" and "exponential". The former is what everybody probably finds more natural. The latter is based on a property of the complex exponential function which makes it very natural for the job since we are dealing with a circle. I could draw a nice picture about that property but I skip that now.

Then I made another plugin "Replicate path along another path", and there I made distortion with the same idea as in "polar coordinates". Then I got some reason to think that it might be good to have "exponential" distortion in this plugin as well. Here we have a path instead of a circle but one could do the distortion locally by using circles of curvature. You note that the notion of "curvature" sneaked in. I made such a plugin, but it appeared to give bad results. To get better results the curvature should be continuous.

So, we need paths with continuous curvature. The idea now was to make a plugin that (1) takes a path; (2) smooths it to have continuous curvature (that is, to be G2-continuous); (3) does the replication job with locally exponential distortion. And I indeed made such a plugin and I got it working to such extent that I could look at what it produced. The results were not so very wonderful to justify publication. In addition, the replicated paths had faults here and there, hence the plugin would still require extra work. At that point I decided to give up.

So, that was a dead end. But in the course of the work I had got code for making a path G2-continuous. I took that code and developed it further to a plugin and published it.

What I want to say with this story is that the plugin "G2-continuity" is not only about smoothing a path: it is about making a path with that special property, G2-continuity. Even if this effort of mine failed, it may happen that some day somebody has a need for paths with continuous curvature. And now we have such a plugin. Therefore I feel that it is better to keep it as such, without putting there an option for that simple algorithm. Thanks for the suggestion anyway.
Reply


Messages In This Thread
RE: Smoothing a path: a better algorithm - by Ottia Tuota - 04-22-2022, 08:04 AM

Forum Jump: