Fitting splines to famous curves programmatically
$begingroup$
this may be a bit of a naive question. I am looking for a way to input a Cartesian description of a famous curve and map that to some spline say NURBS to make spline paths. Is this at all possible?
Examples of curves in question:
http://www-history.mcs.st-and.ac.uk/Curves/Curves.html
Ideally I would like to input the equation describing the curve and fit a spline over a given range
curves spline
$endgroup$
add a comment |
$begingroup$
this may be a bit of a naive question. I am looking for a way to input a Cartesian description of a famous curve and map that to some spline say NURBS to make spline paths. Is this at all possible?
Examples of curves in question:
http://www-history.mcs.st-and.ac.uk/Curves/Curves.html
Ideally I would like to input the equation describing the curve and fit a spline over a given range
curves spline
$endgroup$
add a comment |
$begingroup$
this may be a bit of a naive question. I am looking for a way to input a Cartesian description of a famous curve and map that to some spline say NURBS to make spline paths. Is this at all possible?
Examples of curves in question:
http://www-history.mcs.st-and.ac.uk/Curves/Curves.html
Ideally I would like to input the equation describing the curve and fit a spline over a given range
curves spline
$endgroup$
this may be a bit of a naive question. I am looking for a way to input a Cartesian description of a famous curve and map that to some spline say NURBS to make spline paths. Is this at all possible?
Examples of curves in question:
http://www-history.mcs.st-and.ac.uk/Curves/Curves.html
Ideally I would like to input the equation describing the curve and fit a spline over a given range
curves spline
curves spline
edited Dec 20 '18 at 10:00
Blake Thompson
asked Dec 20 '18 at 9:11
Blake ThompsonBlake Thompson
32
32
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
In many cases, it won’t be possible to represent the given curve exactly in NURBS form. But you can certainly construct NURBS approximations that are as accurate as you want.
The easiest way to create an approximation is to construct a spline curve that interpolates a sequence of points lying on the given curve. So, how do you get this sequence of points? If the given curve has known parametric equations, this is easy: you just take a sequence of parameter values $t_1, t_2, ldots$, and calculate points $P_i = left( x(t_i), y(t_i) right)$. If you have only an implicit equation for the given curve, then things are more difficult. This paper outlines one possible approach: https://www.sciencedirect.com/science/article/pii/S0377042703004114
$endgroup$
$begingroup$
Thanks for your reply. I am aware the NURBS can be used to create these types of curves, dm.unibo.it/~casciola/html/papers/giulio.pdf however I am having trouble wrapping my head around constructing them using their function equations. I would like to be able to construct an algorithm that takes an equation over a range and creates a spline that approximates it. Are you aware of any resources that might get me started on tackling this?
$endgroup$
– Blake Thompson
Dec 20 '18 at 18:39
add a comment |
$begingroup$
In theory, as long as you can evaluate points on these curves, you can fit a spline to any range of these curves. There are tons of curve fitting techniques (interpolation vs approximation) over the internet that you can search for and therefore I won't elaborate here.
However, there is one issue you need to pay attention to: some of these famous curves have $C^1$ discontinuities (e.g., Astroid and Cardioid). If the range of curve you would like to fit a spline to contains such $C^1$ discontinuities, you need to know where these $C^1$ discontinuities occur so that they will be handled properly during curve fitting. On the other hand, depending on what your original purpose is, it will be easier for you to simply approximate the curve by a polyline and you do not need to be concerned with the $C^1$ discontinuities issue.
PS: Some curves listed in the "Famous Curve Index" page only have implicit representation (e.g., Bicorn, Cartesian Oval). It will be much harder to evaluate points on these curves and this is probably the reason that they do not show up on the "Famous Curve Applet Index" page (the page pointed to by a link in the "Famous Curve Index" page).
$endgroup$
$begingroup$
thanks for your response! My intent is to create a series of interpolated flight patterns for a game I am developing.
$endgroup$
– Blake Thompson
Dec 20 '18 at 20:43
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%2f3047329%2ffitting-splines-to-famous-curves-programmatically%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$
In many cases, it won’t be possible to represent the given curve exactly in NURBS form. But you can certainly construct NURBS approximations that are as accurate as you want.
The easiest way to create an approximation is to construct a spline curve that interpolates a sequence of points lying on the given curve. So, how do you get this sequence of points? If the given curve has known parametric equations, this is easy: you just take a sequence of parameter values $t_1, t_2, ldots$, and calculate points $P_i = left( x(t_i), y(t_i) right)$. If you have only an implicit equation for the given curve, then things are more difficult. This paper outlines one possible approach: https://www.sciencedirect.com/science/article/pii/S0377042703004114
$endgroup$
$begingroup$
Thanks for your reply. I am aware the NURBS can be used to create these types of curves, dm.unibo.it/~casciola/html/papers/giulio.pdf however I am having trouble wrapping my head around constructing them using their function equations. I would like to be able to construct an algorithm that takes an equation over a range and creates a spline that approximates it. Are you aware of any resources that might get me started on tackling this?
$endgroup$
– Blake Thompson
Dec 20 '18 at 18:39
add a comment |
$begingroup$
In many cases, it won’t be possible to represent the given curve exactly in NURBS form. But you can certainly construct NURBS approximations that are as accurate as you want.
The easiest way to create an approximation is to construct a spline curve that interpolates a sequence of points lying on the given curve. So, how do you get this sequence of points? If the given curve has known parametric equations, this is easy: you just take a sequence of parameter values $t_1, t_2, ldots$, and calculate points $P_i = left( x(t_i), y(t_i) right)$. If you have only an implicit equation for the given curve, then things are more difficult. This paper outlines one possible approach: https://www.sciencedirect.com/science/article/pii/S0377042703004114
$endgroup$
$begingroup$
Thanks for your reply. I am aware the NURBS can be used to create these types of curves, dm.unibo.it/~casciola/html/papers/giulio.pdf however I am having trouble wrapping my head around constructing them using their function equations. I would like to be able to construct an algorithm that takes an equation over a range and creates a spline that approximates it. Are you aware of any resources that might get me started on tackling this?
$endgroup$
– Blake Thompson
Dec 20 '18 at 18:39
add a comment |
$begingroup$
In many cases, it won’t be possible to represent the given curve exactly in NURBS form. But you can certainly construct NURBS approximations that are as accurate as you want.
The easiest way to create an approximation is to construct a spline curve that interpolates a sequence of points lying on the given curve. So, how do you get this sequence of points? If the given curve has known parametric equations, this is easy: you just take a sequence of parameter values $t_1, t_2, ldots$, and calculate points $P_i = left( x(t_i), y(t_i) right)$. If you have only an implicit equation for the given curve, then things are more difficult. This paper outlines one possible approach: https://www.sciencedirect.com/science/article/pii/S0377042703004114
$endgroup$
In many cases, it won’t be possible to represent the given curve exactly in NURBS form. But you can certainly construct NURBS approximations that are as accurate as you want.
The easiest way to create an approximation is to construct a spline curve that interpolates a sequence of points lying on the given curve. So, how do you get this sequence of points? If the given curve has known parametric equations, this is easy: you just take a sequence of parameter values $t_1, t_2, ldots$, and calculate points $P_i = left( x(t_i), y(t_i) right)$. If you have only an implicit equation for the given curve, then things are more difficult. This paper outlines one possible approach: https://www.sciencedirect.com/science/article/pii/S0377042703004114
edited Dec 21 '18 at 4:55
answered Dec 20 '18 at 11:20
bubbabubba
30.5k33188
30.5k33188
$begingroup$
Thanks for your reply. I am aware the NURBS can be used to create these types of curves, dm.unibo.it/~casciola/html/papers/giulio.pdf however I am having trouble wrapping my head around constructing them using their function equations. I would like to be able to construct an algorithm that takes an equation over a range and creates a spline that approximates it. Are you aware of any resources that might get me started on tackling this?
$endgroup$
– Blake Thompson
Dec 20 '18 at 18:39
add a comment |
$begingroup$
Thanks for your reply. I am aware the NURBS can be used to create these types of curves, dm.unibo.it/~casciola/html/papers/giulio.pdf however I am having trouble wrapping my head around constructing them using their function equations. I would like to be able to construct an algorithm that takes an equation over a range and creates a spline that approximates it. Are you aware of any resources that might get me started on tackling this?
$endgroup$
– Blake Thompson
Dec 20 '18 at 18:39
$begingroup$
Thanks for your reply. I am aware the NURBS can be used to create these types of curves, dm.unibo.it/~casciola/html/papers/giulio.pdf however I am having trouble wrapping my head around constructing them using their function equations. I would like to be able to construct an algorithm that takes an equation over a range and creates a spline that approximates it. Are you aware of any resources that might get me started on tackling this?
$endgroup$
– Blake Thompson
Dec 20 '18 at 18:39
$begingroup$
Thanks for your reply. I am aware the NURBS can be used to create these types of curves, dm.unibo.it/~casciola/html/papers/giulio.pdf however I am having trouble wrapping my head around constructing them using their function equations. I would like to be able to construct an algorithm that takes an equation over a range and creates a spline that approximates it. Are you aware of any resources that might get me started on tackling this?
$endgroup$
– Blake Thompson
Dec 20 '18 at 18:39
add a comment |
$begingroup$
In theory, as long as you can evaluate points on these curves, you can fit a spline to any range of these curves. There are tons of curve fitting techniques (interpolation vs approximation) over the internet that you can search for and therefore I won't elaborate here.
However, there is one issue you need to pay attention to: some of these famous curves have $C^1$ discontinuities (e.g., Astroid and Cardioid). If the range of curve you would like to fit a spline to contains such $C^1$ discontinuities, you need to know where these $C^1$ discontinuities occur so that they will be handled properly during curve fitting. On the other hand, depending on what your original purpose is, it will be easier for you to simply approximate the curve by a polyline and you do not need to be concerned with the $C^1$ discontinuities issue.
PS: Some curves listed in the "Famous Curve Index" page only have implicit representation (e.g., Bicorn, Cartesian Oval). It will be much harder to evaluate points on these curves and this is probably the reason that they do not show up on the "Famous Curve Applet Index" page (the page pointed to by a link in the "Famous Curve Index" page).
$endgroup$
$begingroup$
thanks for your response! My intent is to create a series of interpolated flight patterns for a game I am developing.
$endgroup$
– Blake Thompson
Dec 20 '18 at 20:43
add a comment |
$begingroup$
In theory, as long as you can evaluate points on these curves, you can fit a spline to any range of these curves. There are tons of curve fitting techniques (interpolation vs approximation) over the internet that you can search for and therefore I won't elaborate here.
However, there is one issue you need to pay attention to: some of these famous curves have $C^1$ discontinuities (e.g., Astroid and Cardioid). If the range of curve you would like to fit a spline to contains such $C^1$ discontinuities, you need to know where these $C^1$ discontinuities occur so that they will be handled properly during curve fitting. On the other hand, depending on what your original purpose is, it will be easier for you to simply approximate the curve by a polyline and you do not need to be concerned with the $C^1$ discontinuities issue.
PS: Some curves listed in the "Famous Curve Index" page only have implicit representation (e.g., Bicorn, Cartesian Oval). It will be much harder to evaluate points on these curves and this is probably the reason that they do not show up on the "Famous Curve Applet Index" page (the page pointed to by a link in the "Famous Curve Index" page).
$endgroup$
$begingroup$
thanks for your response! My intent is to create a series of interpolated flight patterns for a game I am developing.
$endgroup$
– Blake Thompson
Dec 20 '18 at 20:43
add a comment |
$begingroup$
In theory, as long as you can evaluate points on these curves, you can fit a spline to any range of these curves. There are tons of curve fitting techniques (interpolation vs approximation) over the internet that you can search for and therefore I won't elaborate here.
However, there is one issue you need to pay attention to: some of these famous curves have $C^1$ discontinuities (e.g., Astroid and Cardioid). If the range of curve you would like to fit a spline to contains such $C^1$ discontinuities, you need to know where these $C^1$ discontinuities occur so that they will be handled properly during curve fitting. On the other hand, depending on what your original purpose is, it will be easier for you to simply approximate the curve by a polyline and you do not need to be concerned with the $C^1$ discontinuities issue.
PS: Some curves listed in the "Famous Curve Index" page only have implicit representation (e.g., Bicorn, Cartesian Oval). It will be much harder to evaluate points on these curves and this is probably the reason that they do not show up on the "Famous Curve Applet Index" page (the page pointed to by a link in the "Famous Curve Index" page).
$endgroup$
In theory, as long as you can evaluate points on these curves, you can fit a spline to any range of these curves. There are tons of curve fitting techniques (interpolation vs approximation) over the internet that you can search for and therefore I won't elaborate here.
However, there is one issue you need to pay attention to: some of these famous curves have $C^1$ discontinuities (e.g., Astroid and Cardioid). If the range of curve you would like to fit a spline to contains such $C^1$ discontinuities, you need to know where these $C^1$ discontinuities occur so that they will be handled properly during curve fitting. On the other hand, depending on what your original purpose is, it will be easier for you to simply approximate the curve by a polyline and you do not need to be concerned with the $C^1$ discontinuities issue.
PS: Some curves listed in the "Famous Curve Index" page only have implicit representation (e.g., Bicorn, Cartesian Oval). It will be much harder to evaluate points on these curves and this is probably the reason that they do not show up on the "Famous Curve Applet Index" page (the page pointed to by a link in the "Famous Curve Index" page).
answered Dec 20 '18 at 20:30
fangfang
2,472166
2,472166
$begingroup$
thanks for your response! My intent is to create a series of interpolated flight patterns for a game I am developing.
$endgroup$
– Blake Thompson
Dec 20 '18 at 20:43
add a comment |
$begingroup$
thanks for your response! My intent is to create a series of interpolated flight patterns for a game I am developing.
$endgroup$
– Blake Thompson
Dec 20 '18 at 20:43
$begingroup$
thanks for your response! My intent is to create a series of interpolated flight patterns for a game I am developing.
$endgroup$
– Blake Thompson
Dec 20 '18 at 20:43
$begingroup$
thanks for your response! My intent is to create a series of interpolated flight patterns for a game I am developing.
$endgroup$
– Blake Thompson
Dec 20 '18 at 20:43
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%2f3047329%2ffitting-splines-to-famous-curves-programmatically%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