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

+ContinuousBeziersIterator. May need some more refactoring. #30

Closed
wants to merge 1 commit into from

Conversation

ctrlcctrlv
Copy link
Contributor

This is for MFEK/kurbo.rlib#1 and linebender/kurbo#230.

Sorry for the long delay on this @raphlinus. Because your code did not handle discontinuous splines, I had to add support here first for iterating over only the continuous Beziers of a Piecewise Bezier path.

@ctrlcctrlv
Copy link
Contributor Author

Ultimately I think it might be best to split this out of math.rlib and make a new Rust project out of the code, similar to cucoqu.rlib. Called something like discontinue.rlib. Basically, I'd create a crate that'll hard depend on kurbo, and then I'd define the same types as here.

The reason I think it might be best to do it that way is that this is yet more GPT-3 aided code.

I'm simply just not talented enough at this kind of thing to come up with stuff like:

         match G {
            // G^0 continuity
            // The two Bezier splines are connected if the end point of the first Bezier spline
            // equals the start point of the second Bezier spline.
            0 => xdist!() && ydist!(),
            // G^1 continuity
            // The two Bezier splines are connected if the end point of the first Bezier spline
            // equals the start point of the second Bezier spline and the tangent at the end point
            // equals the tangent at the start point.
            1 => xdist!() && ydist!() && taneq!(),
            // G^2 continuity
            // The two Bezier splines are connected if the end point of the first Bezier spline
            // equals the start point of the second Bezier spline and the tangent at the end point
            // equals the tangent at the start point and the second derivative at the end point
            // equals the second derivative at the start point.
            2 => xdist!() && ydist!() && taneq!() && crveq!(),
            const_order => {
                panic!("G continuity of order {} not supported.", const_order);
            }
        }

My policy on this is here: https://github.com/MFEK/cucoqu.rlib/blob/main/GPT-3%20(English).md

I might need to email Dr. Stallman or someone else at the FSF for guidance on this matter, as GPT-3 is becoming more and more important to my workflow.

@ctrlcctrlv
Copy link
Contributor Author

Moving to own lib.

@ctrlcctrlv ctrlcctrlv closed this Jan 8, 2023
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

Successfully merging this pull request may close these issues.

1 participant