Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Implement Hobby Splines inspired by Jake Low's post Hobby’s algorithm for aesthetic Bézier splines that "render down" to bezier curves.
Functionality
hobby_point
function to create a list in the form of [Knot, Control Control, Knot,... ] representing knots and controls for bezier curves defined using hobby's algorithm.close_loop
boolean.The curve from the last knot point to the first is generated regardless of
close_loop
so that the tangents at the first and last knot point are those of the closed hobby spline; this helps keep the curves round and aesthetic. To generate the resulting hobby points the final segment of the curve is set to the closed loop curve is appended if the curve is closed, otherwise only the final point is appended.Changes
hobby_points
function to splines in order to generate bezier curves following Hobby's algorithm.hobby_splines_example.py
with open & closed hobby splines & their polygon projectionshobby_points
totest_splines.py
for open hobby splines usingbezier_controls
in raw, Point2, and Point3 formsExamples
Create hobby curve examples by running
hobby_splines_example.py
.Testing
Test changes using
test_splines.py
.