Public Domain OpenScad Bezier Function
by WilliamAAdams, published
Liked ByView All
Give a Shout Out
If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.Print Thing Tag
After playing around with fillets on this thing: http://www.thingiverse.com/thing:8416 I was determined to create a generalized Bezier function for usage in OpenScad.
This thing, or rather the OpenScad file, is public domain code for creating Bezier curves within OpenScad.
It is a foundational piece. It will only create Bezier curves defined by 4 control points. Those are typically the most useful in hand constructed graphics as found in OpenScad.
Hopefully this little piece of goodness will enable people to create very curvacious things in OpenScad. Extending the function to 3D can be easily done.
UPDATE: Added a couple more pictures that show different ways of using the beast. Perhaps the coolest is using a Bezier curve to change color over the surface of the object.
1) Create some appropriate control points
2) Choose a focal point
3) Call the BezQuadCurve() module
If you're actually going to use the BezQuadCurve module, then you'll want to comment out the part that prints the control points.
The 'focalPoint' is the point from which all triangle fans will originate. You can choose this to be something appropriate for the kind of solid you're trying to create. The Bezier curve points themselves remain the same.
You can use the 'PointAlongBez4' function to calculate any point along the bezier curve defined by your control points, and the 'u' factor (between 0 and 1).
It's standard graphics stuff, but oh so useful.
Upgrade this Thing with Thingiverse Apps
Public Domain OpenScad Bezier Function by WilliamAAdams is licensed under the Public Domain license.
What does this mean?
- Remixing or Changing this Thing is allowed.
- Commercial use is allowed.
Show Some Love
Say thanks by giving WilliamAAdams a tip and help them continue to share amazing Things with the Thingiverse community.Tip Designer
We're sure WilliamAAdams would love to see what you've printed. Please document your print and share a Make with the community.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. It’s even easier to post a Make via the Thingiverse Mobile app (available via Google Play and Apple App Store).