Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rich, I'd like to have an old smoothing plugin
#10
(02-25-2022, 05:17 PM)Ofnuts Wrote: ...

Didn't dig too much in the code of the current smooth plugin, but I would guess that it splits a stroke into several splines if there are angles that aren't smoothed, smoothes these individually, and then splice them back, throwing away the "external" handle so if there is at least one unprocessed angle in the stroke, everything is fine...

Ofnuts, a small puzzle, not that this matters much, just out of curiosity it would be nice to know. Please don't bother to use any more time on this. I know that I don't. Sorry for this waste of bandwidth.

I think that the plugin does not work in that natural way to leave some corners unprocessed. I haven't looked at the code but I made the following experiments. I made the straight-edge figure on the left:

   

Then I made two experiments:
  1. I called smooth-path.exe so that it left the sharpest corner C unprocessed (it smoothed only corners between 90 and 180 degrees). The result is the blue path on the right.
  2. I cut the straight-edge path into two strokes at C. (I created an extra anchor near C, deleted the small edge in between, by 'snap to grid' moved the new anchor to C, carefully collapsed all handles to 0.) Either stroke had C as an end point. Then I called the plugin. The result is the red path on the right.
If the plugin worked as you suggested the results should be the same I think. They are not. Either I don't understand this right or some different logic is applied when a corner has to be left unprocessed.

In experiment 1 the created path has zero handles at C. In experiment 2 the handles are non-zero.

I also repeated experiment 2 with my own plugin which I am currently developing and uses the same idea (C2-continuity and f''(t)=0 at stroke ends). The result was quite identical with the red path.
Reply


Messages In This Thread
RE: Rich, I'd like to have an old smoothing plugin - by Ottia Tuota - 02-26-2022, 01:46 PM

Forum Jump: