C2 continuity of 5th Bézier curve
$begingroup$
I'm trying to fuse multiple Bézier curves and get a C2 continuous curve. Every document or book that I read says that imposing:
$B_1(1) = B_2(0)$
$B_1'(1) = B_2'(0)$
$B_1''(1) = B_2''(0)$
But this is does not really means C2 continuity since the second derivative has only a point constraint, a peak can happen in the second derivative curve (which in turn will make curvature discontinuous). So where is the problem: is it my definition of continuity that is wrong or really some other constraint must be applied to achieve a C2 continuous bézier curve (and therefore a continuous curvature).
Let me give an example: using 5th Bézier curve to find a path between (0,0), (10,5) and (25,5). Using the method given in https://ieeexplore.ieee.org/document/5354805 without any optimization these are the results:
Path obtained
Derivative module
Curvature
In the second image the blue plot is the 1st derivative and the red plot is the second derivative. One can see that in the red plot, in the connection point (x = 10) present is discontinuity, which is propagated in the curvature. This is consistent with the constraint, since the 2nd derivative curve does obey the point constraint, but nonetheless is discontinuous. This behavior is also observed considering a 3rd degree Bézier curve and $C_1$ continuity.
Ps.: curvature:
$kappa(s) = frac{Q'(s) times Q''(s)}{left||Q'(s)right||^3} $
EDIT:
I mixed continuity with differentiability. The 2nd derivative is continuous by the $epsilon-delta$ definition, but is not differentiable due to different lateral limits. Therefore to obtain a continuous and differentiable curvature more than $C_2$ is necessary. Thanks.
continuity curvature bezier-curve
$endgroup$
add a comment |
$begingroup$
I'm trying to fuse multiple Bézier curves and get a C2 continuous curve. Every document or book that I read says that imposing:
$B_1(1) = B_2(0)$
$B_1'(1) = B_2'(0)$
$B_1''(1) = B_2''(0)$
But this is does not really means C2 continuity since the second derivative has only a point constraint, a peak can happen in the second derivative curve (which in turn will make curvature discontinuous). So where is the problem: is it my definition of continuity that is wrong or really some other constraint must be applied to achieve a C2 continuous bézier curve (and therefore a continuous curvature).
Let me give an example: using 5th Bézier curve to find a path between (0,0), (10,5) and (25,5). Using the method given in https://ieeexplore.ieee.org/document/5354805 without any optimization these are the results:
Path obtained
Derivative module
Curvature
In the second image the blue plot is the 1st derivative and the red plot is the second derivative. One can see that in the red plot, in the connection point (x = 10) present is discontinuity, which is propagated in the curvature. This is consistent with the constraint, since the 2nd derivative curve does obey the point constraint, but nonetheless is discontinuous. This behavior is also observed considering a 3rd degree Bézier curve and $C_1$ continuity.
Ps.: curvature:
$kappa(s) = frac{Q'(s) times Q''(s)}{left||Q'(s)right||^3} $
EDIT:
I mixed continuity with differentiability. The 2nd derivative is continuous by the $epsilon-delta$ definition, but is not differentiable due to different lateral limits. Therefore to obtain a continuous and differentiable curvature more than $C_2$ is necessary. Thanks.
continuity curvature bezier-curve
$endgroup$
$begingroup$
"a peak can happen in the second derivative curve (which in turn will make curvature discontinuous)" I don't understand what you mean here. Can you elaborate? "in the red plot, in the connection point (x = 10) present is discontinuity" It looks pretty continuous to me. It might not be differentiable, but that doesn't mean it's discontinuous.
$endgroup$
– Rahul
Dec 19 '18 at 8:11
$begingroup$
You are right, I did mixed continuity with differentiability (I'm going to edit my answer). This solves the problem, I think, since $C_2$ imply continuity, not that the function is differentiable (with by the plot it is not).
$endgroup$
– Nelson
Dec 19 '18 at 9:34
$begingroup$
I still don't know why you say "Therefore to obtain a continuous curvature more than $C_2$ is necessary." The curvature depends continuously on the second derivative, which is continuous, therefore the curvature is also continuous. If you are finding that the second derivative is continuous but curvature is not, there is probably some bug in your curvature computation.
$endgroup$
– Rahul
Dec 19 '18 at 11:09
add a comment |
$begingroup$
I'm trying to fuse multiple Bézier curves and get a C2 continuous curve. Every document or book that I read says that imposing:
$B_1(1) = B_2(0)$
$B_1'(1) = B_2'(0)$
$B_1''(1) = B_2''(0)$
But this is does not really means C2 continuity since the second derivative has only a point constraint, a peak can happen in the second derivative curve (which in turn will make curvature discontinuous). So where is the problem: is it my definition of continuity that is wrong or really some other constraint must be applied to achieve a C2 continuous bézier curve (and therefore a continuous curvature).
Let me give an example: using 5th Bézier curve to find a path between (0,0), (10,5) and (25,5). Using the method given in https://ieeexplore.ieee.org/document/5354805 without any optimization these are the results:
Path obtained
Derivative module
Curvature
In the second image the blue plot is the 1st derivative and the red plot is the second derivative. One can see that in the red plot, in the connection point (x = 10) present is discontinuity, which is propagated in the curvature. This is consistent with the constraint, since the 2nd derivative curve does obey the point constraint, but nonetheless is discontinuous. This behavior is also observed considering a 3rd degree Bézier curve and $C_1$ continuity.
Ps.: curvature:
$kappa(s) = frac{Q'(s) times Q''(s)}{left||Q'(s)right||^3} $
EDIT:
I mixed continuity with differentiability. The 2nd derivative is continuous by the $epsilon-delta$ definition, but is not differentiable due to different lateral limits. Therefore to obtain a continuous and differentiable curvature more than $C_2$ is necessary. Thanks.
continuity curvature bezier-curve
$endgroup$
I'm trying to fuse multiple Bézier curves and get a C2 continuous curve. Every document or book that I read says that imposing:
$B_1(1) = B_2(0)$
$B_1'(1) = B_2'(0)$
$B_1''(1) = B_2''(0)$
But this is does not really means C2 continuity since the second derivative has only a point constraint, a peak can happen in the second derivative curve (which in turn will make curvature discontinuous). So where is the problem: is it my definition of continuity that is wrong or really some other constraint must be applied to achieve a C2 continuous bézier curve (and therefore a continuous curvature).
Let me give an example: using 5th Bézier curve to find a path between (0,0), (10,5) and (25,5). Using the method given in https://ieeexplore.ieee.org/document/5354805 without any optimization these are the results:
Path obtained
Derivative module
Curvature
In the second image the blue plot is the 1st derivative and the red plot is the second derivative. One can see that in the red plot, in the connection point (x = 10) present is discontinuity, which is propagated in the curvature. This is consistent with the constraint, since the 2nd derivative curve does obey the point constraint, but nonetheless is discontinuous. This behavior is also observed considering a 3rd degree Bézier curve and $C_1$ continuity.
Ps.: curvature:
$kappa(s) = frac{Q'(s) times Q''(s)}{left||Q'(s)right||^3} $
EDIT:
I mixed continuity with differentiability. The 2nd derivative is continuous by the $epsilon-delta$ definition, but is not differentiable due to different lateral limits. Therefore to obtain a continuous and differentiable curvature more than $C_2$ is necessary. Thanks.
continuity curvature bezier-curve
continuity curvature bezier-curve
edited Dec 19 '18 at 13:22
Nelson
asked Dec 14 '18 at 10:23
NelsonNelson
62
62
$begingroup$
"a peak can happen in the second derivative curve (which in turn will make curvature discontinuous)" I don't understand what you mean here. Can you elaborate? "in the red plot, in the connection point (x = 10) present is discontinuity" It looks pretty continuous to me. It might not be differentiable, but that doesn't mean it's discontinuous.
$endgroup$
– Rahul
Dec 19 '18 at 8:11
$begingroup$
You are right, I did mixed continuity with differentiability (I'm going to edit my answer). This solves the problem, I think, since $C_2$ imply continuity, not that the function is differentiable (with by the plot it is not).
$endgroup$
– Nelson
Dec 19 '18 at 9:34
$begingroup$
I still don't know why you say "Therefore to obtain a continuous curvature more than $C_2$ is necessary." The curvature depends continuously on the second derivative, which is continuous, therefore the curvature is also continuous. If you are finding that the second derivative is continuous but curvature is not, there is probably some bug in your curvature computation.
$endgroup$
– Rahul
Dec 19 '18 at 11:09
add a comment |
$begingroup$
"a peak can happen in the second derivative curve (which in turn will make curvature discontinuous)" I don't understand what you mean here. Can you elaborate? "in the red plot, in the connection point (x = 10) present is discontinuity" It looks pretty continuous to me. It might not be differentiable, but that doesn't mean it's discontinuous.
$endgroup$
– Rahul
Dec 19 '18 at 8:11
$begingroup$
You are right, I did mixed continuity with differentiability (I'm going to edit my answer). This solves the problem, I think, since $C_2$ imply continuity, not that the function is differentiable (with by the plot it is not).
$endgroup$
– Nelson
Dec 19 '18 at 9:34
$begingroup$
I still don't know why you say "Therefore to obtain a continuous curvature more than $C_2$ is necessary." The curvature depends continuously on the second derivative, which is continuous, therefore the curvature is also continuous. If you are finding that the second derivative is continuous but curvature is not, there is probably some bug in your curvature computation.
$endgroup$
– Rahul
Dec 19 '18 at 11:09
$begingroup$
"a peak can happen in the second derivative curve (which in turn will make curvature discontinuous)" I don't understand what you mean here. Can you elaborate? "in the red plot, in the connection point (x = 10) present is discontinuity" It looks pretty continuous to me. It might not be differentiable, but that doesn't mean it's discontinuous.
$endgroup$
– Rahul
Dec 19 '18 at 8:11
$begingroup$
"a peak can happen in the second derivative curve (which in turn will make curvature discontinuous)" I don't understand what you mean here. Can you elaborate? "in the red plot, in the connection point (x = 10) present is discontinuity" It looks pretty continuous to me. It might not be differentiable, but that doesn't mean it's discontinuous.
$endgroup$
– Rahul
Dec 19 '18 at 8:11
$begingroup$
You are right, I did mixed continuity with differentiability (I'm going to edit my answer). This solves the problem, I think, since $C_2$ imply continuity, not that the function is differentiable (with by the plot it is not).
$endgroup$
– Nelson
Dec 19 '18 at 9:34
$begingroup$
You are right, I did mixed continuity with differentiability (I'm going to edit my answer). This solves the problem, I think, since $C_2$ imply continuity, not that the function is differentiable (with by the plot it is not).
$endgroup$
– Nelson
Dec 19 '18 at 9:34
$begingroup$
I still don't know why you say "Therefore to obtain a continuous curvature more than $C_2$ is necessary." The curvature depends continuously on the second derivative, which is continuous, therefore the curvature is also continuous. If you are finding that the second derivative is continuous but curvature is not, there is probably some bug in your curvature computation.
$endgroup$
– Rahul
Dec 19 '18 at 11:09
$begingroup$
I still don't know why you say "Therefore to obtain a continuous curvature more than $C_2$ is necessary." The curvature depends continuously on the second derivative, which is continuous, therefore the curvature is also continuous. If you are finding that the second derivative is continuous but curvature is not, there is probably some bug in your curvature computation.
$endgroup$
– Rahul
Dec 19 '18 at 11:09
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
When we say that the junction between two curves is $C_2$-continuous, we mean (by definition) that their first and second derivatives are the same at the junction point. Except in very unusual situations (like when the first derivative vector is zero), this means that the two curves will also have the same curvature at the junction.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
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
});
}
});
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%2f3039189%2fc2-continuity-of-5th-b%25c3%25a9zier-curve%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
When we say that the junction between two curves is $C_2$-continuous, we mean (by definition) that their first and second derivatives are the same at the junction point. Except in very unusual situations (like when the first derivative vector is zero), this means that the two curves will also have the same curvature at the junction.
$endgroup$
add a comment |
$begingroup$
When we say that the junction between two curves is $C_2$-continuous, we mean (by definition) that their first and second derivatives are the same at the junction point. Except in very unusual situations (like when the first derivative vector is zero), this means that the two curves will also have the same curvature at the junction.
$endgroup$
add a comment |
$begingroup$
When we say that the junction between two curves is $C_2$-continuous, we mean (by definition) that their first and second derivatives are the same at the junction point. Except in very unusual situations (like when the first derivative vector is zero), this means that the two curves will also have the same curvature at the junction.
$endgroup$
When we say that the junction between two curves is $C_2$-continuous, we mean (by definition) that their first and second derivatives are the same at the junction point. Except in very unusual situations (like when the first derivative vector is zero), this means that the two curves will also have the same curvature at the junction.
answered Dec 17 '18 at 9:33
bubbabubba
30.2k33086
30.2k33086
add a comment |
add a comment |
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%2f3039189%2fc2-continuity-of-5th-b%25c3%25a9zier-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
$begingroup$
"a peak can happen in the second derivative curve (which in turn will make curvature discontinuous)" I don't understand what you mean here. Can you elaborate? "in the red plot, in the connection point (x = 10) present is discontinuity" It looks pretty continuous to me. It might not be differentiable, but that doesn't mean it's discontinuous.
$endgroup$
– Rahul
Dec 19 '18 at 8:11
$begingroup$
You are right, I did mixed continuity with differentiability (I'm going to edit my answer). This solves the problem, I think, since $C_2$ imply continuity, not that the function is differentiable (with by the plot it is not).
$endgroup$
– Nelson
Dec 19 '18 at 9:34
$begingroup$
I still don't know why you say "Therefore to obtain a continuous curvature more than $C_2$ is necessary." The curvature depends continuously on the second derivative, which is continuous, therefore the curvature is also continuous. If you are finding that the second derivative is continuous but curvature is not, there is probably some bug in your curvature computation.
$endgroup$
– Rahul
Dec 19 '18 at 11:09