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;








3












$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]]]


coincide



Can it be done better, defining f as a single function, whose plot is BezierCurve?










share|improve this question









New contributor



Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$




















    3












    $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]]]


    coincide



    Can it be done better, defining f as a single function, whose plot is BezierCurve?










    share|improve this question









    New contributor



    Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    $endgroup$
















      3












      3








      3





      $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]]]


      coincide



      Can it be done better, defining f as a single function, whose plot is BezierCurve?










      share|improve this question









      New contributor



      Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      $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]]]


      coincide



      Can it be done better, defining f as a single function, whose plot is BezierCurve?







      graphics splines






      share|improve this question









      New contributor



      Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited 7 hours ago









      Alexey Popkov

      39.2k4 gold badges111 silver badges271 bronze badges




      39.2k4 gold badges111 silver badges271 bronze badges






      New contributor



      Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 8 hours ago









      IgorIgor

      511 bronze badge




      511 bronze badge




      New contributor



      Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Igor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          1 Answer
          1






          active

          oldest

          votes


















          3












          $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]]]


          enter image description here






          share|improve this answer











          $endgroup$

















            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.









            draft saved

            draft discarded


















            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









            3












            $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]]]


            enter image description here






            share|improve this answer











            $endgroup$



















              3












              $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]]]


              enter image description here






              share|improve this answer











              $endgroup$

















                3












                3








                3





                $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]]]


                enter image description here






                share|improve this answer











                $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]]]


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 hours ago

























                answered 8 hours ago









                kglrkglr

                209k10 gold badges241 silver badges478 bronze badges




                209k10 gold badges241 silver badges478 bronze badges























                    Igor is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單