Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Composite Bézier curve
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Using four curves=== Considering only the 90-degree [[unit circle|unit-circular]] arc in the [[Cartesian coordinate system#Quadrants and octants|first quadrant]], we define the endpoints <math>\mathbf{A}</math> and <math>\mathbf{B}</math> with control points <math>\mathbf{A'}</math> and <math>\mathbf{B'}</math>, respectively, as: :<math> \begin{align} \mathbf{A} & = [0, 1] \\ \mathbf{A'} & = [\mathbf{k}, 1] \\ \mathbf{B'} & = [1, \mathbf{k}] \\ \mathbf{B} & = [1, 0] \\ \end{align} </math> From the definition of the cubic Bézier curve, we have: :<math>\mathbf{C}(t)=(1-t)^3\mathbf{A} + 3(1-t)^2t\mathbf{A'}+3(1-t)t^2\mathbf{B'}+t^3\mathbf{B}</math> With the point <math>\mathbf{C}(t=0.5)</math> as the midpoint of the arc, we may write the following two equations: :<math> \begin{align} \mathbf{C} &= \frac{1}{8}\mathbf{A} + \frac{3}{8}\mathbf{A'}+\frac{3}{8}\mathbf{B'}+\frac{1}{8}\mathbf{B} \\ \mathbf{C} &= \sqrt{1/2} = \sqrt{2}/2 \end{align} </math> Solving these equations for the x-coordinate (and identically for the y-coordinate) yields: :<math>\frac{0}{8}\mathbf + \frac{3}{8}\mathbf{k}+\frac{3}{8} + \frac{1}{8} = \sqrt{2}/2</math> :<math>\mathbf{k} = \frac{4}{3}(\sqrt{2} - 1) \approx 0.5522847498</math> Note however that the resulting Bézier curve is entirely outside the circle, with a maximum deviation of the radius of about 0.00027. By adding a small correction to intermediate points such as :<math> \begin{align} \mathbf{A'} & = [\mathbf{k}+0.0009, 1-0.00103] \\ \mathbf{B'} & = [1-0.00103, \mathbf{k}+0.0009] , \end{align} </math> the magnitude of the radius deviation to 1 is reduced by a factor of about 3, to 0.000068 (at the expense of the derivability of the approximated circle curve at endpoints).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)