How to construct BezierFunction for BezierCurve with npts>4 and SplineDegree -> 3?How can I create a ColorFunction using Blend?How to maintain a smooth surface in CDFs while playing?How to draw symmetrical parts of a circleHow to put single points inside the plot?How can I add an arbritrary label to a detail in a Plot or Plot3D?ListPlot with different color optionsProblem in coloring network links with linear gradients through VertexColorsPlanetary motion of a curve within a regionHow can I get high precision circle drawing in Graphics, across ten orders of magnitudeWhy does BezierFunction not follow BezierCurve at npts>4?
Why have both: BJT and FET transistors on IC output?
How to construct BezierFunction for BezierCurve with npts>4 and SplineDegree -> 3?
A verb for when some rights are not violated?
How does shared_ptr<void> know which destructor to use?
Why does Shift-right says it is bound to right?
What is the reason behind water not falling from a bucket at the top of loop?
Astable 555 circuit not oscillating
Is the first page of Novel really that important?
What is Modern Vipassana?
How can I perform a deterministic physics simulation?
HackerRank Implement Queue using two stacks Solution
Can I say "Gesundheit" if someone is coughing?
Why wasn't interlaced CRT scanning done back and forth?
How does Rust's 128-bit integer `i128` work on a 64-bit system?
Difference between "jail" and "prison" in German
Is it uncompelling to continue the story with lower stakes?
Subverting the essence of fictional and/or religious entities; is it acceptable?
Does the problem of P vs NP come under the category of Operational Research?
Do moonless nights cause dim light to become darkness, and bright light (e.g. from torches) to become dim light?
Subtle ways to render a planet uninhabitable
Generate random number in Unity without class ambiguity
Reasons for using monsters as bioweapons
Different answers of calculations in LuaLaTeX on local computer, lua compiler and on overleaf
Speaker impedance: rewiring four 8 Ω speakers for use with 8 Ω amp output
How to construct BezierFunction for BezierCurve with npts>4 and SplineDegree -> 3?
How can I create a ColorFunction using Blend?How to maintain a smooth surface in CDFs while playing?How to draw symmetrical parts of a circleHow to put single points inside the plot?How can I add an arbritrary label to a detail in a Plot or Plot3D?ListPlot with different color optionsProblem in coloring network links with linear gradients through VertexColorsPlanetary motion of a curve within a regionHow can I get high precision circle drawing in Graphics, across ten orders of magnitudeWhy does BezierFunction not follow BezierCurve at npts>4?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I would like to use BezierCurve with npts=7 and SplineDegree -> 3 and access its BezierFunction. This code helps:
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f1 = BezierFunction[pts[[1;;4]]]
f2 = BezierFunction[pts[[4;;7]]]
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f1[t],f2[t], t, 0, 1],Graphics[Blue, Dashed,
BezierCurve[pts, SplineDegree -> 3]]]
Can it be done better, defining f as a single function, whose plot is BezierCurve?
graphics splines
New contributor
$endgroup$
add a comment |
$begingroup$
I would like to use BezierCurve with npts=7 and SplineDegree -> 3 and access its BezierFunction. This code helps:
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f1 = BezierFunction[pts[[1;;4]]]
f2 = BezierFunction[pts[[4;;7]]]
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f1[t],f2[t], t, 0, 1],Graphics[Blue, Dashed,
BezierCurve[pts, SplineDegree -> 3]]]
Can it be done better, defining f as a single function, whose plot is BezierCurve?
graphics splines
New contributor
$endgroup$
add a comment |
$begingroup$
I would like to use BezierCurve with npts=7 and SplineDegree -> 3 and access its BezierFunction. This code helps:
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f1 = BezierFunction[pts[[1;;4]]]
f2 = BezierFunction[pts[[4;;7]]]
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f1[t],f2[t], t, 0, 1],Graphics[Blue, Dashed,
BezierCurve[pts, SplineDegree -> 3]]]
Can it be done better, defining f as a single function, whose plot is BezierCurve?
graphics splines
New contributor
$endgroup$
I would like to use BezierCurve with npts=7 and SplineDegree -> 3 and access its BezierFunction. This code helps:
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f1 = BezierFunction[pts[[1;;4]]]
f2 = BezierFunction[pts[[4;;7]]]
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f1[t],f2[t], t, 0, 1],Graphics[Blue, Dashed,
BezierCurve[pts, SplineDegree -> 3]]]
Can it be done better, defining f as a single function, whose plot is BezierCurve?
graphics splines
graphics splines
New contributor
New contributor
edited 7 hours ago
Alexey Popkov
39.2k4 gold badges111 silver badges271 bronze badges
39.2k4 gold badges111 silver badges271 bronze badges
New contributor
asked 8 hours ago
IgorIgor
511 bronze badge
511 bronze badge
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
(1) Partition
pts
into blocks of 4 with offset 3,
(2) Use BezierFunction
on each block and
(3) To get a single function, compose Through
with the list of Bezier functions.
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f0 = Through @* (BezierFunction /@ Partition[pts, 4, 3]);
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f0[t], t, 0, 1, PlotStyle -> Directive[Opacity[.7, Red], Thickness[.01]]],
Graphics[Blue, Dashed, BezierCurve[pts, SplineDegree -> 3]]]
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Igor 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%2fmathematica.stackexchange.com%2fquestions%2f203261%2fhow-to-construct-bezierfunction-for-beziercurve-with-npts4-and-splinedegree%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$
(1) Partition
pts
into blocks of 4 with offset 3,
(2) Use BezierFunction
on each block and
(3) To get a single function, compose Through
with the list of Bezier functions.
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f0 = Through @* (BezierFunction /@ Partition[pts, 4, 3]);
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f0[t], t, 0, 1, PlotStyle -> Directive[Opacity[.7, Red], Thickness[.01]]],
Graphics[Blue, Dashed, BezierCurve[pts, SplineDegree -> 3]]]
$endgroup$
add a comment |
$begingroup$
(1) Partition
pts
into blocks of 4 with offset 3,
(2) Use BezierFunction
on each block and
(3) To get a single function, compose Through
with the list of Bezier functions.
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f0 = Through @* (BezierFunction /@ Partition[pts, 4, 3]);
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f0[t], t, 0, 1, PlotStyle -> Directive[Opacity[.7, Red], Thickness[.01]]],
Graphics[Blue, Dashed, BezierCurve[pts, SplineDegree -> 3]]]
$endgroup$
add a comment |
$begingroup$
(1) Partition
pts
into blocks of 4 with offset 3,
(2) Use BezierFunction
on each block and
(3) To get a single function, compose Through
with the list of Bezier functions.
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f0 = Through @* (BezierFunction /@ Partition[pts, 4, 3]);
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f0[t], t, 0, 1, PlotStyle -> Directive[Opacity[.7, Red], Thickness[.01]]],
Graphics[Blue, Dashed, BezierCurve[pts, SplineDegree -> 3]]]
$endgroup$
(1) Partition
pts
into blocks of 4 with offset 3,
(2) Use BezierFunction
on each block and
(3) To get a single function, compose Through
with the list of Bezier functions.
pts = 0, 0, 1, 1, 2, -1, 3, 0, 5, 2, 6, -1, 7, 3;
f0 = Through @* (BezierFunction /@ Partition[pts, 4, 3]);
Show[Graphics[Red, Point[pts], Green, Line[pts], Axes -> True],
ParametricPlot[f0[t], t, 0, 1, PlotStyle -> Directive[Opacity[.7, Red], Thickness[.01]]],
Graphics[Blue, Dashed, BezierCurve[pts, SplineDegree -> 3]]]
edited 2 hours ago
answered 8 hours ago
kglrkglr
209k10 gold badges241 silver badges478 bronze badges
209k10 gold badges241 silver badges478 bronze badges
add a comment |
add a comment |
Igor is a new contributor. Be nice, and check out our Code of Conduct.
Igor is a new contributor. Be nice, and check out our Code of Conduct.
Igor is a new contributor. Be nice, and check out our Code of Conduct.
Igor is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica 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%2fmathematica.stackexchange.com%2fquestions%2f203261%2fhow-to-construct-bezierfunction-for-beziercurve-with-npts4-and-splinedegree%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