OpenSCAD Conic Bezier Curve
by donb, 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
Conic BÃ©zier Curve for OpenSCAD
also known as Quadratic Bezier Curve
also known as Bezier Curve with 3 control points
also known as 'Conic Arcs' or 'Parabolic Segments'
By Don B, 2011, released into the Public Domain
What's it for
Bezier curves allow you to pick a small number of 'control points', then let the computer fill in a pretty curve between them. In this thing, 3 control points are used.
This is for 3-point bezier curves; there is another popular type, the 4-point 'Cubic', that this code doesn't do.
This is inspired by William Adam's cubic bezier Thingiverse OpenSCAD code. His code now also handles Conics; I guess I will leave this thing here as a sort of 'super simple' 'for dummies' version.
The first sample image shows a simple 3 control-point curved polygon, and a rod around which it can be rotated. The result of this rotation is shown in the big smooth object.
The next sample image shows the code itself; the module is only about 10 lines long thanks to OpenSCAD's built-in vector math.
Please see also
http://www.thingiverse.com/thing:8443 by William A Adams (Cubic Beziers)
http://en.wikipedia.org/wiki/File:Bezier_2_big.gif by Phil Tregoning
http://en.wikipedia.org/wiki/B%C3%A9zier_curve by Wikipedia editors
http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html David Turner + Freetype team
Using the code
- download the .scad file, below
- copy/paste the BezConic module to your own code
- call it like this:
BÃ©zier are named after Pierre BÃ©zier, who used the work of Paul de Casteljau to make curves on car bodies. Casteljau worked at Citroen and Bezier worked at Renault.
They are named 'conic' because 3-point Bezier's are basically parabolas. A parabola is basically the intersection of a cone with a plane (i.e. a conic section). Please see wikipedia for more info.
Conic Arc BÃ©zier Curves (3 control points) are used by TrueType fonts.
An example .stl file is included just for giggles.
Upgrade this Thing with Thingiverse AppsCustomization
Edit, personalize, or revise this ThingPrint Fulfilment
Order a print of this ThingTools and Utilities
Repair, slice, or enhance this Thing
OpenSCAD Conic Bezier Curve by donb 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 donb a tip and help them continue to share amazing Things with the Thingiverse community.Tip Designer
We're sure donb 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).