Convert section of an equation to a cubic Bezier-curve The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Approximating Bezier curvesEquation for subsection of Bezier curveControl points of offset bezier curveHow to find the N control point of a bezier curve with N+1 points on the curveFind Quadratic Bezier curve equation based on its control pointsFind value of $t$ at a point on a cubic Bezier curve, part 2Are there any cubic bezier curve that cannot imitate by multiple quadratic bezier curve?Calculate Cubic Bezier Curve passing through 6 pointsCan a cubic Bezier curve be a quadratic one if two control points are equal from the cubic one?Retime cubic bezier curve with cubic bezier curve
Can I visit the Trinity College (Cambridge) library and see some of their rare books
Would an alien lifeform be able to achieve space travel if lacking in vision?
Is there a writing software that you can sort scenes like slides in PowerPoint?
Single author papers against my advisor's will?
Sub-subscripts in strings cause different spacings than subscripts
Drawing vertical/oblique lines in Metrical tree (tikz-qtree, tipa)
For what reasons would an animal species NOT cross a *horizontal* land bridge?
Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?
How to read αἱμύλιος or when to aspirate
Make it rain characters
Match Roman Numerals
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
Why not take a picture of a closer black hole?
Deal with toxic manager when you can't quit
"... to apply for a visa" or "... and applied for a visa"?
Example of compact Riemannian manifold with only one geodesic.
different output for groups and groups USERNAME after adding a username to a group
Is every episode of "Where are my Pants?" identical?
Am I ethically obligated to go into work on an off day if the reason is sudden?
Is an up-to-date browser secure on an out-of-date OS?
How to handle characters who are more educated than the author?
Do warforged have souls?
Variable with quotation marks "$()"
Does Parliament hold absolute power in the UK?
Convert section of an equation to a cubic Bezier-curve
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Approximating Bezier curvesEquation for subsection of Bezier curveControl points of offset bezier curveHow to find the N control point of a bezier curve with N+1 points on the curveFind Quadratic Bezier curve equation based on its control pointsFind value of $t$ at a point on a cubic Bezier curve, part 2Are there any cubic bezier curve that cannot imitate by multiple quadratic bezier curve?Calculate Cubic Bezier Curve passing through 6 pointsCan a cubic Bezier curve be a quadratic one if two control points are equal from the cubic one?Retime cubic bezier curve with cubic bezier curve
$begingroup$
I have the equation $$f(x) = frac0.25x1.25 - x$$ that I would like to turn into a cubic Bezier-curve in the window $[0, 1]$. I have tried to find an answer but I can only find sources on how to turn a quadratic equation into a Bezier-curve.
Is it even possible? And if so how would I start?
geometry polynomials bezier-curve
New contributor
$endgroup$
add a comment |
$begingroup$
I have the equation $$f(x) = frac0.25x1.25 - x$$ that I would like to turn into a cubic Bezier-curve in the window $[0, 1]$. I have tried to find an answer but I can only find sources on how to turn a quadratic equation into a Bezier-curve.
Is it even possible? And if so how would I start?
geometry polynomials bezier-curve
New contributor
$endgroup$
2
$begingroup$
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
$endgroup$
– José Carlos Santos
Apr 8 at 8:02
$begingroup$
Thank you, I've attempted to improve the question.
$endgroup$
– ApplePearPerson
Apr 8 at 8:12
add a comment |
$begingroup$
I have the equation $$f(x) = frac0.25x1.25 - x$$ that I would like to turn into a cubic Bezier-curve in the window $[0, 1]$. I have tried to find an answer but I can only find sources on how to turn a quadratic equation into a Bezier-curve.
Is it even possible? And if so how would I start?
geometry polynomials bezier-curve
New contributor
$endgroup$
I have the equation $$f(x) = frac0.25x1.25 - x$$ that I would like to turn into a cubic Bezier-curve in the window $[0, 1]$. I have tried to find an answer but I can only find sources on how to turn a quadratic equation into a Bezier-curve.
Is it even possible? And if so how would I start?
geometry polynomials bezier-curve
geometry polynomials bezier-curve
New contributor
New contributor
edited Apr 8 at 8:59
mathreadler
15.5k72263
15.5k72263
New contributor
asked Apr 8 at 7:56
ApplePearPersonApplePearPerson
1085
1085
New contributor
New contributor
2
$begingroup$
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
$endgroup$
– José Carlos Santos
Apr 8 at 8:02
$begingroup$
Thank you, I've attempted to improve the question.
$endgroup$
– ApplePearPerson
Apr 8 at 8:12
add a comment |
2
$begingroup$
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
$endgroup$
– José Carlos Santos
Apr 8 at 8:02
$begingroup$
Thank you, I've attempted to improve the question.
$endgroup$
– ApplePearPerson
Apr 8 at 8:12
2
2
$begingroup$
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
$endgroup$
– José Carlos Santos
Apr 8 at 8:02
$begingroup$
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
$endgroup$
– José Carlos Santos
Apr 8 at 8:02
$begingroup$
Thank you, I've attempted to improve the question.
$endgroup$
– ApplePearPerson
Apr 8 at 8:12
$begingroup$
Thank you, I've attempted to improve the question.
$endgroup$
– ApplePearPerson
Apr 8 at 8:12
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
The definition of a cubic Bezier curve requires 4 points. The starting and ending points and two additional reference points. In general, the curve will not pass through the reference points. So, to answer your question, there is not a unique way of "converting" the graph of $f$ into a Bezier curve... You need to specify two additional points $(x_1,f(x_1)), (x_2, f(x_2))$ for some $0 < x_1 < x_2 < 1$.
Considering $P_0 ⁼(0,0)$, $P_1=(frac 13 f(frac 13))$, $P_2=(frac 12, f(frac 23))$ and $P_3=(1,1)$, the parametric equation of the Bezier curve is
$$
(1-t)^3 P_0+ 3 (1-t)^2 t P_1 + 3(1-t) t^2 P_2+t^3P_3, quad t in [0,1]
$$
or in this specific case,
$$
left{
beginarrayl
x(t)=t^3+2 (1-t) t^2+frac13 (1-t)^2 t\
y(t)=t^3+frac67 (1-t) t^2+frac111 (1-t)^2 t
endarray
right.
$$
This was obtained with the reference points over the curve. You can also run an optimization procedure to get the reference points that minimize the distance between the original curve and the Bezier cubic. In the following images you can see whet you obtain with the reference point over the curve and placed elsewhere.
$endgroup$
$begingroup$
Is there a method to choose these reference points so that the resulting curve will approximate the line the equation makes?
$endgroup$
– ApplePearPerson
Apr 8 at 8:21
1
$begingroup$
The Bezzier curve has severe limitations when approximating a given curve for arbitrary intervals (if you plot the equations above you will see that the Bezier curve is quite far from the graph of $f$. The best strategy is to subdivide the interval into smaller subintervals.
$endgroup$
– PierreCarre
Apr 8 at 8:56
add a comment |
$begingroup$
Look at the explicit algebraic expression for the curve
$$B(t) = (1-t)^3bf P_0 + (1-t)^2t^1bf P_1 + (1-t)^1t^2bf P_2 + t^3bf P_3$$
And then sample $x,y$ along your curve $t in [0,1]$ and simply set up linear least squares system and solve!
This will work since $bf P_0,P_1,P_2,P_3$ are unknown, and $(1-t)^e_1t^e_2$ is constant for each sample point $t$.
As sanity check you can check that $bf P_0, P_3$ should be close to end-points, or you can add this as a regularization cost, even.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
ApplePearPerson is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3179310%2fconvert-section-of-an-equation-to-a-cubic-bezier-curve%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The definition of a cubic Bezier curve requires 4 points. The starting and ending points and two additional reference points. In general, the curve will not pass through the reference points. So, to answer your question, there is not a unique way of "converting" the graph of $f$ into a Bezier curve... You need to specify two additional points $(x_1,f(x_1)), (x_2, f(x_2))$ for some $0 < x_1 < x_2 < 1$.
Considering $P_0 ⁼(0,0)$, $P_1=(frac 13 f(frac 13))$, $P_2=(frac 12, f(frac 23))$ and $P_3=(1,1)$, the parametric equation of the Bezier curve is
$$
(1-t)^3 P_0+ 3 (1-t)^2 t P_1 + 3(1-t) t^2 P_2+t^3P_3, quad t in [0,1]
$$
or in this specific case,
$$
left{
beginarrayl
x(t)=t^3+2 (1-t) t^2+frac13 (1-t)^2 t\
y(t)=t^3+frac67 (1-t) t^2+frac111 (1-t)^2 t
endarray
right.
$$
This was obtained with the reference points over the curve. You can also run an optimization procedure to get the reference points that minimize the distance between the original curve and the Bezier cubic. In the following images you can see whet you obtain with the reference point over the curve and placed elsewhere.
$endgroup$
$begingroup$
Is there a method to choose these reference points so that the resulting curve will approximate the line the equation makes?
$endgroup$
– ApplePearPerson
Apr 8 at 8:21
1
$begingroup$
The Bezzier curve has severe limitations when approximating a given curve for arbitrary intervals (if you plot the equations above you will see that the Bezier curve is quite far from the graph of $f$. The best strategy is to subdivide the interval into smaller subintervals.
$endgroup$
– PierreCarre
Apr 8 at 8:56
add a comment |
$begingroup$
The definition of a cubic Bezier curve requires 4 points. The starting and ending points and two additional reference points. In general, the curve will not pass through the reference points. So, to answer your question, there is not a unique way of "converting" the graph of $f$ into a Bezier curve... You need to specify two additional points $(x_1,f(x_1)), (x_2, f(x_2))$ for some $0 < x_1 < x_2 < 1$.
Considering $P_0 ⁼(0,0)$, $P_1=(frac 13 f(frac 13))$, $P_2=(frac 12, f(frac 23))$ and $P_3=(1,1)$, the parametric equation of the Bezier curve is
$$
(1-t)^3 P_0+ 3 (1-t)^2 t P_1 + 3(1-t) t^2 P_2+t^3P_3, quad t in [0,1]
$$
or in this specific case,
$$
left{
beginarrayl
x(t)=t^3+2 (1-t) t^2+frac13 (1-t)^2 t\
y(t)=t^3+frac67 (1-t) t^2+frac111 (1-t)^2 t
endarray
right.
$$
This was obtained with the reference points over the curve. You can also run an optimization procedure to get the reference points that minimize the distance between the original curve and the Bezier cubic. In the following images you can see whet you obtain with the reference point over the curve and placed elsewhere.
$endgroup$
$begingroup$
Is there a method to choose these reference points so that the resulting curve will approximate the line the equation makes?
$endgroup$
– ApplePearPerson
Apr 8 at 8:21
1
$begingroup$
The Bezzier curve has severe limitations when approximating a given curve for arbitrary intervals (if you plot the equations above you will see that the Bezier curve is quite far from the graph of $f$. The best strategy is to subdivide the interval into smaller subintervals.
$endgroup$
– PierreCarre
Apr 8 at 8:56
add a comment |
$begingroup$
The definition of a cubic Bezier curve requires 4 points. The starting and ending points and two additional reference points. In general, the curve will not pass through the reference points. So, to answer your question, there is not a unique way of "converting" the graph of $f$ into a Bezier curve... You need to specify two additional points $(x_1,f(x_1)), (x_2, f(x_2))$ for some $0 < x_1 < x_2 < 1$.
Considering $P_0 ⁼(0,0)$, $P_1=(frac 13 f(frac 13))$, $P_2=(frac 12, f(frac 23))$ and $P_3=(1,1)$, the parametric equation of the Bezier curve is
$$
(1-t)^3 P_0+ 3 (1-t)^2 t P_1 + 3(1-t) t^2 P_2+t^3P_3, quad t in [0,1]
$$
or in this specific case,
$$
left{
beginarrayl
x(t)=t^3+2 (1-t) t^2+frac13 (1-t)^2 t\
y(t)=t^3+frac67 (1-t) t^2+frac111 (1-t)^2 t
endarray
right.
$$
This was obtained with the reference points over the curve. You can also run an optimization procedure to get the reference points that minimize the distance between the original curve and the Bezier cubic. In the following images you can see whet you obtain with the reference point over the curve and placed elsewhere.
$endgroup$
The definition of a cubic Bezier curve requires 4 points. The starting and ending points and two additional reference points. In general, the curve will not pass through the reference points. So, to answer your question, there is not a unique way of "converting" the graph of $f$ into a Bezier curve... You need to specify two additional points $(x_1,f(x_1)), (x_2, f(x_2))$ for some $0 < x_1 < x_2 < 1$.
Considering $P_0 ⁼(0,0)$, $P_1=(frac 13 f(frac 13))$, $P_2=(frac 12, f(frac 23))$ and $P_3=(1,1)$, the parametric equation of the Bezier curve is
$$
(1-t)^3 P_0+ 3 (1-t)^2 t P_1 + 3(1-t) t^2 P_2+t^3P_3, quad t in [0,1]
$$
or in this specific case,
$$
left{
beginarrayl
x(t)=t^3+2 (1-t) t^2+frac13 (1-t)^2 t\
y(t)=t^3+frac67 (1-t) t^2+frac111 (1-t)^2 t
endarray
right.
$$
This was obtained with the reference points over the curve. You can also run an optimization procedure to get the reference points that minimize the distance between the original curve and the Bezier cubic. In the following images you can see whet you obtain with the reference point over the curve and placed elsewhere.
edited Apr 8 at 9:11
answered Apr 8 at 8:15
PierreCarrePierreCarre
2,178215
2,178215
$begingroup$
Is there a method to choose these reference points so that the resulting curve will approximate the line the equation makes?
$endgroup$
– ApplePearPerson
Apr 8 at 8:21
1
$begingroup$
The Bezzier curve has severe limitations when approximating a given curve for arbitrary intervals (if you plot the equations above you will see that the Bezier curve is quite far from the graph of $f$. The best strategy is to subdivide the interval into smaller subintervals.
$endgroup$
– PierreCarre
Apr 8 at 8:56
add a comment |
$begingroup$
Is there a method to choose these reference points so that the resulting curve will approximate the line the equation makes?
$endgroup$
– ApplePearPerson
Apr 8 at 8:21
1
$begingroup$
The Bezzier curve has severe limitations when approximating a given curve for arbitrary intervals (if you plot the equations above you will see that the Bezier curve is quite far from the graph of $f$. The best strategy is to subdivide the interval into smaller subintervals.
$endgroup$
– PierreCarre
Apr 8 at 8:56
$begingroup$
Is there a method to choose these reference points so that the resulting curve will approximate the line the equation makes?
$endgroup$
– ApplePearPerson
Apr 8 at 8:21
$begingroup$
Is there a method to choose these reference points so that the resulting curve will approximate the line the equation makes?
$endgroup$
– ApplePearPerson
Apr 8 at 8:21
1
1
$begingroup$
The Bezzier curve has severe limitations when approximating a given curve for arbitrary intervals (if you plot the equations above you will see that the Bezier curve is quite far from the graph of $f$. The best strategy is to subdivide the interval into smaller subintervals.
$endgroup$
– PierreCarre
Apr 8 at 8:56
$begingroup$
The Bezzier curve has severe limitations when approximating a given curve for arbitrary intervals (if you plot the equations above you will see that the Bezier curve is quite far from the graph of $f$. The best strategy is to subdivide the interval into smaller subintervals.
$endgroup$
– PierreCarre
Apr 8 at 8:56
add a comment |
$begingroup$
Look at the explicit algebraic expression for the curve
$$B(t) = (1-t)^3bf P_0 + (1-t)^2t^1bf P_1 + (1-t)^1t^2bf P_2 + t^3bf P_3$$
And then sample $x,y$ along your curve $t in [0,1]$ and simply set up linear least squares system and solve!
This will work since $bf P_0,P_1,P_2,P_3$ are unknown, and $(1-t)^e_1t^e_2$ is constant for each sample point $t$.
As sanity check you can check that $bf P_0, P_3$ should be close to end-points, or you can add this as a regularization cost, even.
$endgroup$
add a comment |
$begingroup$
Look at the explicit algebraic expression for the curve
$$B(t) = (1-t)^3bf P_0 + (1-t)^2t^1bf P_1 + (1-t)^1t^2bf P_2 + t^3bf P_3$$
And then sample $x,y$ along your curve $t in [0,1]$ and simply set up linear least squares system and solve!
This will work since $bf P_0,P_1,P_2,P_3$ are unknown, and $(1-t)^e_1t^e_2$ is constant for each sample point $t$.
As sanity check you can check that $bf P_0, P_3$ should be close to end-points, or you can add this as a regularization cost, even.
$endgroup$
add a comment |
$begingroup$
Look at the explicit algebraic expression for the curve
$$B(t) = (1-t)^3bf P_0 + (1-t)^2t^1bf P_1 + (1-t)^1t^2bf P_2 + t^3bf P_3$$
And then sample $x,y$ along your curve $t in [0,1]$ and simply set up linear least squares system and solve!
This will work since $bf P_0,P_1,P_2,P_3$ are unknown, and $(1-t)^e_1t^e_2$ is constant for each sample point $t$.
As sanity check you can check that $bf P_0, P_3$ should be close to end-points, or you can add this as a regularization cost, even.
$endgroup$
Look at the explicit algebraic expression for the curve
$$B(t) = (1-t)^3bf P_0 + (1-t)^2t^1bf P_1 + (1-t)^1t^2bf P_2 + t^3bf P_3$$
And then sample $x,y$ along your curve $t in [0,1]$ and simply set up linear least squares system and solve!
This will work since $bf P_0,P_1,P_2,P_3$ are unknown, and $(1-t)^e_1t^e_2$ is constant for each sample point $t$.
As sanity check you can check that $bf P_0, P_3$ should be close to end-points, or you can add this as a regularization cost, even.
answered Apr 8 at 9:08
mathreadlermathreadler
15.5k72263
15.5k72263
add a comment |
add a comment |
ApplePearPerson is a new contributor. Be nice, and check out our Code of Conduct.
ApplePearPerson is a new contributor. Be nice, and check out our Code of Conduct.
ApplePearPerson is a new contributor. Be nice, and check out our Code of Conduct.
ApplePearPerson is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3179310%2fconvert-section-of-an-equation-to-a-cubic-bezier-curve%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
$endgroup$
– José Carlos Santos
Apr 8 at 8:02
$begingroup$
Thank you, I've attempted to improve the question.
$endgroup$
– ApplePearPerson
Apr 8 at 8:12