Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cover curve merging #393

Open
Pomax opened this issue Apr 18, 2024 · 3 comments
Open

cover curve merging #393

Pomax opened this issue Apr 18, 2024 · 3 comments

Comments

@Pomax
Copy link
Owner

Pomax commented Apr 18, 2024

it's implied in the text but there should just be a dedicated short chapter on merging curves by contructing new curves and performing MSE fitting or the like

@tbrowder
Copy link

tbrowder commented Sep 7, 2024

And that would be a perfect time to mention the PDF ISO standard's graphics operators for Bezier curves:

c - x1 y1 x2 y2 x3 y3  : cubic Bezier to
v - x2 y2 x3 y3        : Bezier with (x1,x2) = current [path]
y - x1 y1 x3 y3        : Bezier with (x2 y2) = (x3 y3)

Using the Raku (formerly Perl 6) module 'PDF::Content' (see https://github.com/pdf-raku/PDF-Content-raku) those
operators are implemented in mnemonic routines

CurveTo,
CurveToInitial, and 
CurveToFinal,

respectively.

@Pomax
Copy link
Owner Author

Pomax commented Sep 8, 2024

Can you explain why you think those instructions would make sense in that section? Curve merging takes two or more curves, and approximates their combined path using a new single curve.

(as far as I can tell, those instructions are just draw commands for individual curves, not related to specifying multiple curves and having the command(s) auto-convert those to single curves?)

@tbrowder
Copy link

tbrowder commented Sep 8, 2024

Well, I was thinking of my current project where I need to create a fillet of constant radius to draw an object consisting of a wheel rim with four spokes. To me, that's almost like merging two curves.

But I think I see your point. Your approach is mathematical while I am constrained by my graphics language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants