How to draw 2D dendrite shape with surface normal?












0















I found another answer to draw a smooth dendrite: draw a smooth dendrite



I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.



enter image description here










share|improve this question









New contributor




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
















  • 1





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    4 hours ago











  • It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.

    – samcarter
    3 hours ago
















0















I found another answer to draw a smooth dendrite: draw a smooth dendrite



I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.



enter image description here










share|improve this question









New contributor




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
















  • 1





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    4 hours ago











  • It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.

    – samcarter
    3 hours ago














0












0








0








I found another answer to draw a smooth dendrite: draw a smooth dendrite



I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.



enter image description here










share|improve this question









New contributor




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












I found another answer to draw a smooth dendrite: draw a smooth dendrite



I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.



enter image description here







tikz-pgf






share|improve this question









New contributor




TikzNewbie 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




TikzNewbie 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 3 hours ago









TikzNewbie

31




31






New contributor




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









asked 4 hours ago









TikzNewbieTikzNewbie

1




1




New contributor




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





New contributor





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






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








  • 1





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    4 hours ago











  • It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.

    – samcarter
    3 hours ago














  • 1





    Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

    – samcarter
    4 hours ago











  • It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.

    – samcarter
    3 hours ago








1




1





Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

– samcarter
4 hours ago





Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.

– samcarter
4 hours ago













It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.

– samcarter
3 hours ago





It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.

– samcarter
3 hours ago










1 Answer
1






active

oldest

votes


















2














Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.



documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[thick,scale=0.4,
dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
foreach X in {0,...,10}
{ -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
-- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
foreach X in {10,9,...,0}
{ -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
}}]
path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
[rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
[rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
[rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
[rotate=-90] to[out=45,in=-135] cycle;
draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
end{tikzpicture}
end{document}


enter image description here



I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    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
    });


    }
    });






    TikzNewbie 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%2ftex.stackexchange.com%2fquestions%2f480762%2fhow-to-draw-2d-dendrite-shape-with-surface-normal%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









    2














    Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.



    documentclass[tikz,border=3.14mm]{standalone}
    begin{document}
    begin{tikzpicture}[thick,scale=0.4,
    dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
    foreach X in {0,...,10}
    { -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
    -- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
    to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
    foreach X in {10,9,...,0}
    { -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
    }}]
    path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
    draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
    [rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
    [rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
    [rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
    [rotate=-90] to[out=45,in=-135] cycle;
    draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
    end{tikzpicture}
    end{document}


    enter image description here



    I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.






    share|improve this answer




























      2














      Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.



      documentclass[tikz,border=3.14mm]{standalone}
      begin{document}
      begin{tikzpicture}[thick,scale=0.4,
      dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
      foreach X in {0,...,10}
      { -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
      -- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
      to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
      foreach X in {10,9,...,0}
      { -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
      }}]
      path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
      draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
      [rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
      [rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
      [rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
      [rotate=-90] to[out=45,in=-135] cycle;
      draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
      end{tikzpicture}
      end{document}


      enter image description here



      I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.






      share|improve this answer


























        2












        2








        2







        Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.



        documentclass[tikz,border=3.14mm]{standalone}
        begin{document}
        begin{tikzpicture}[thick,scale=0.4,
        dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
        foreach X in {0,...,10}
        { -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
        -- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
        to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
        foreach X in {10,9,...,0}
        { -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
        }}]
        path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
        draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
        [rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
        [rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
        [rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
        [rotate=-90] to[out=45,in=-135] cycle;
        draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
        end{tikzpicture}
        end{document}


        enter image description here



        I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.






        share|improve this answer













        Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.



        documentclass[tikz,border=3.14mm]{standalone}
        begin{document}
        begin{tikzpicture}[thick,scale=0.4,
        dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
        foreach X in {0,...,10}
        { -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
        -- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
        to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
        foreach X in {10,9,...,0}
        { -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
        }}]
        path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
        draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
        [rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
        [rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
        [rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
        [rotate=-90] to[out=45,in=-135] cycle;
        draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
        end{tikzpicture}
        end{document}


        enter image description here



        I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        marmotmarmot

        110k5137256




        110k5137256






















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










            draft saved

            draft discarded


















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













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












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
















            Thanks for contributing an answer to TeX - LaTeX 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.


            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%2ftex.stackexchange.com%2fquestions%2f480762%2fhow-to-draw-2d-dendrite-shape-with-surface-normal%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

            Lallio

            Futebolista

            Jornalista