first of all, thank you so much for your work! My project would not have been possible without it. I gave the due credits in multiple places.
My project involved implementing a variant of your offsetting algorithm in LaTeX (you can check it out at https://github.com/jonschz/tikz-nfold if you are interested). While implementing the code I discovered some improvements which I explain here, p. 6 ff in detail. A quick summary:
Dear Pomax,
first of all, thank you so much for your work! My project would not have been possible without it. I gave the due credits in multiple places.
My project involved implementing a variant of your offsetting algorithm in LaTeX (you can check it out at https://github.com/jonschz/tikz-nfold if you are interested). While implementing the code I discovered some improvements which I explain here, p. 6 ff in detail. A quick summary:
s > 1/2
; furthermore, theabs()
is redundant becauseacos()
never returns a negative value.t=0
andt=1
will not work if the first two or the last two control points are equal. I computed the tangent (and hence the normal) int=0
as follows (pseudocode):Don't feel obligated to implement any of these improvements, I merely wanted to share what I found out.