News for hackers. Stuff that matters.
Re:Parallel Curves of Cubic Béziers by coffeeaddict1 on Friday September 09, 2022 @05:50PM (#32785332)
Interesting! I remember running up into the same problem when I was trying to recreate a way to simulate pen ink strokes digitally but eventually gave up because it was quite difficult to get something working in all cases.

Could this approach be extended to variable thickness offsets? I mean can you setup an initial offset and a final offset and then interpolate between them along the curve?

Re:Parallel Curves of Cubic Béziers by raphlinus on Friday September 09, 2022 @06:23PM (#32785615)
Yes. The core curve-fitting technique is very general and can be adapted to any scenario where you can sample the desired curve (with normals) and compute a couple of numerical integrals on it. I am confident that includes variable-width strokes, though I also imagine it will be a nontrivial amount of work to make everything fit together in a satisfying fashion.