How to draw a pyramid with height and slant heigth with TikZ?












2















How to draw a pyramid with height(altitude) and slant heigth with TikZ. According to the figure enter image description here










share|improve this question


















  • 1





    Maybe you can post the code that you have tried so far?

    – vaettchen
    Jan 13 '17 at 17:11






  • 1





    @vaettchen Hi, I'm new using tikz, so I do not have codes. :(

    – casio
    Jan 13 '17 at 17:47






  • 1





    Possible duplicate of Pyramid Commutative Diagram for Cones

    – user177954
    3 hours ago
















2















How to draw a pyramid with height(altitude) and slant heigth with TikZ. According to the figure enter image description here










share|improve this question


















  • 1





    Maybe you can post the code that you have tried so far?

    – vaettchen
    Jan 13 '17 at 17:11






  • 1





    @vaettchen Hi, I'm new using tikz, so I do not have codes. :(

    – casio
    Jan 13 '17 at 17:47






  • 1





    Possible duplicate of Pyramid Commutative Diagram for Cones

    – user177954
    3 hours ago














2












2








2








How to draw a pyramid with height(altitude) and slant heigth with TikZ. According to the figure enter image description here










share|improve this question














How to draw a pyramid with height(altitude) and slant heigth with TikZ. According to the figure enter image description here







tikz-3dplot






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 13 '17 at 16:44









casiocasio

12118




12118








  • 1





    Maybe you can post the code that you have tried so far?

    – vaettchen
    Jan 13 '17 at 17:11






  • 1





    @vaettchen Hi, I'm new using tikz, so I do not have codes. :(

    – casio
    Jan 13 '17 at 17:47






  • 1





    Possible duplicate of Pyramid Commutative Diagram for Cones

    – user177954
    3 hours ago














  • 1





    Maybe you can post the code that you have tried so far?

    – vaettchen
    Jan 13 '17 at 17:11






  • 1





    @vaettchen Hi, I'm new using tikz, so I do not have codes. :(

    – casio
    Jan 13 '17 at 17:47






  • 1





    Possible duplicate of Pyramid Commutative Diagram for Cones

    – user177954
    3 hours ago








1




1





Maybe you can post the code that you have tried so far?

– vaettchen
Jan 13 '17 at 17:11





Maybe you can post the code that you have tried so far?

– vaettchen
Jan 13 '17 at 17:11




1




1





@vaettchen Hi, I'm new using tikz, so I do not have codes. :(

– casio
Jan 13 '17 at 17:47





@vaettchen Hi, I'm new using tikz, so I do not have codes. :(

– casio
Jan 13 '17 at 17:47




1




1





Possible duplicate of Pyramid Commutative Diagram for Cones

– user177954
3 hours ago





Possible duplicate of Pyramid Commutative Diagram for Cones

– user177954
3 hours ago










2 Answers
2






active

oldest

votes


















1














You can see at the link Pyramid Commutative Diagram for Cones or you can use sketch-lib



**



http://alexdu.github.io/sketch-lib/



**
or Drawing polyhedra using TikZ with semi-transparent and shading effect.






share|improve this answer


























  • I hope to be a help to you. Available for anything else.

    – Sebastiano
    Jan 17 '17 at 8:31



















1














You can do this with tikz-3dplot.



documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
begin{document}
tdplotsetmaincoords{70}{-20}
begin{tikzpicture}[tdplot_main_coords,line cap=butt,line join=bevel]
pgfmathsetmacro{B}{4}
pgfmathsetmacro{H}{4}
draw[blue,thick] (-B/2,-B/2,0) -- (B/2,-B/2,0) -- (B/2,B/2,0) -- (-B/2,B/2,0) -- cycle;
draw[blue,thick] (B/2,B/2,0) -- (0,0,H)
node[above,font=largebfseries]{Regular Pyramid};
draw[dashed,blue] (0,0,0) -- (0,0,H) coordinate[midway](aux1);
draw[blue] (0,0,0.3) -- (0.3,0,0.3) -- (0.3,0,0);
draw[dashed,blue] (-2,0,0) -- (0,0,H) coordinate[pos=0.3](aux2);
draw[blue] (-B/2+0.15,0,0.3) -- (-B/2+0.15,-0.3,0.3) -- (-B/2,-0.3,0);
coordinate (aux3) at (1,0,0);
draw[blue,thick,fill=cyan,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (B/2,-B/2,0) -- cycle;
draw[blue,thick,fill=blue,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (-B/2,B/2,0) -- cycle;
begin{scope}[tdplot_screen_coords]
draw (aux1) -- ++ (2,0.1) node[right,font=itshape] {Altitude};
draw (aux2) -- ++ (-1.5,0.3) node[left,font=itshape] {Slant Height};
draw (aux3) -- ++ (1,-1) node[below right,font=itshape] {Base};
end{scope}
end{tikzpicture}
end{document}


enter image description here






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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f348577%2fhow-to-draw-a-pyramid-with-height-and-slant-heigth-with-tikz%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









    1














    You can see at the link Pyramid Commutative Diagram for Cones or you can use sketch-lib



    **



    http://alexdu.github.io/sketch-lib/



    **
    or Drawing polyhedra using TikZ with semi-transparent and shading effect.






    share|improve this answer


























    • I hope to be a help to you. Available for anything else.

      – Sebastiano
      Jan 17 '17 at 8:31
















    1














    You can see at the link Pyramid Commutative Diagram for Cones or you can use sketch-lib



    **



    http://alexdu.github.io/sketch-lib/



    **
    or Drawing polyhedra using TikZ with semi-transparent and shading effect.






    share|improve this answer


























    • I hope to be a help to you. Available for anything else.

      – Sebastiano
      Jan 17 '17 at 8:31














    1












    1








    1







    You can see at the link Pyramid Commutative Diagram for Cones or you can use sketch-lib



    **



    http://alexdu.github.io/sketch-lib/



    **
    or Drawing polyhedra using TikZ with semi-transparent and shading effect.






    share|improve this answer















    You can see at the link Pyramid Commutative Diagram for Cones or you can use sketch-lib



    **



    http://alexdu.github.io/sketch-lib/



    **
    or Drawing polyhedra using TikZ with semi-transparent and shading effect.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:35









    Community

    1




    1










    answered Jan 14 '17 at 9:38









    SebastianoSebastiano

    9,31641756




    9,31641756













    • I hope to be a help to you. Available for anything else.

      – Sebastiano
      Jan 17 '17 at 8:31



















    • I hope to be a help to you. Available for anything else.

      – Sebastiano
      Jan 17 '17 at 8:31

















    I hope to be a help to you. Available for anything else.

    – Sebastiano
    Jan 17 '17 at 8:31





    I hope to be a help to you. Available for anything else.

    – Sebastiano
    Jan 17 '17 at 8:31











    1














    You can do this with tikz-3dplot.



    documentclass[tikz,border=3.14mm]{standalone}
    usepackage{tikz-3dplot}
    begin{document}
    tdplotsetmaincoords{70}{-20}
    begin{tikzpicture}[tdplot_main_coords,line cap=butt,line join=bevel]
    pgfmathsetmacro{B}{4}
    pgfmathsetmacro{H}{4}
    draw[blue,thick] (-B/2,-B/2,0) -- (B/2,-B/2,0) -- (B/2,B/2,0) -- (-B/2,B/2,0) -- cycle;
    draw[blue,thick] (B/2,B/2,0) -- (0,0,H)
    node[above,font=largebfseries]{Regular Pyramid};
    draw[dashed,blue] (0,0,0) -- (0,0,H) coordinate[midway](aux1);
    draw[blue] (0,0,0.3) -- (0.3,0,0.3) -- (0.3,0,0);
    draw[dashed,blue] (-2,0,0) -- (0,0,H) coordinate[pos=0.3](aux2);
    draw[blue] (-B/2+0.15,0,0.3) -- (-B/2+0.15,-0.3,0.3) -- (-B/2,-0.3,0);
    coordinate (aux3) at (1,0,0);
    draw[blue,thick,fill=cyan,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (B/2,-B/2,0) -- cycle;
    draw[blue,thick,fill=blue,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (-B/2,B/2,0) -- cycle;
    begin{scope}[tdplot_screen_coords]
    draw (aux1) -- ++ (2,0.1) node[right,font=itshape] {Altitude};
    draw (aux2) -- ++ (-1.5,0.3) node[left,font=itshape] {Slant Height};
    draw (aux3) -- ++ (1,-1) node[below right,font=itshape] {Base};
    end{scope}
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer






























      1














      You can do this with tikz-3dplot.



      documentclass[tikz,border=3.14mm]{standalone}
      usepackage{tikz-3dplot}
      begin{document}
      tdplotsetmaincoords{70}{-20}
      begin{tikzpicture}[tdplot_main_coords,line cap=butt,line join=bevel]
      pgfmathsetmacro{B}{4}
      pgfmathsetmacro{H}{4}
      draw[blue,thick] (-B/2,-B/2,0) -- (B/2,-B/2,0) -- (B/2,B/2,0) -- (-B/2,B/2,0) -- cycle;
      draw[blue,thick] (B/2,B/2,0) -- (0,0,H)
      node[above,font=largebfseries]{Regular Pyramid};
      draw[dashed,blue] (0,0,0) -- (0,0,H) coordinate[midway](aux1);
      draw[blue] (0,0,0.3) -- (0.3,0,0.3) -- (0.3,0,0);
      draw[dashed,blue] (-2,0,0) -- (0,0,H) coordinate[pos=0.3](aux2);
      draw[blue] (-B/2+0.15,0,0.3) -- (-B/2+0.15,-0.3,0.3) -- (-B/2,-0.3,0);
      coordinate (aux3) at (1,0,0);
      draw[blue,thick,fill=cyan,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (B/2,-B/2,0) -- cycle;
      draw[blue,thick,fill=blue,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (-B/2,B/2,0) -- cycle;
      begin{scope}[tdplot_screen_coords]
      draw (aux1) -- ++ (2,0.1) node[right,font=itshape] {Altitude};
      draw (aux2) -- ++ (-1.5,0.3) node[left,font=itshape] {Slant Height};
      draw (aux3) -- ++ (1,-1) node[below right,font=itshape] {Base};
      end{scope}
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer




























        1












        1








        1







        You can do this with tikz-3dplot.



        documentclass[tikz,border=3.14mm]{standalone}
        usepackage{tikz-3dplot}
        begin{document}
        tdplotsetmaincoords{70}{-20}
        begin{tikzpicture}[tdplot_main_coords,line cap=butt,line join=bevel]
        pgfmathsetmacro{B}{4}
        pgfmathsetmacro{H}{4}
        draw[blue,thick] (-B/2,-B/2,0) -- (B/2,-B/2,0) -- (B/2,B/2,0) -- (-B/2,B/2,0) -- cycle;
        draw[blue,thick] (B/2,B/2,0) -- (0,0,H)
        node[above,font=largebfseries]{Regular Pyramid};
        draw[dashed,blue] (0,0,0) -- (0,0,H) coordinate[midway](aux1);
        draw[blue] (0,0,0.3) -- (0.3,0,0.3) -- (0.3,0,0);
        draw[dashed,blue] (-2,0,0) -- (0,0,H) coordinate[pos=0.3](aux2);
        draw[blue] (-B/2+0.15,0,0.3) -- (-B/2+0.15,-0.3,0.3) -- (-B/2,-0.3,0);
        coordinate (aux3) at (1,0,0);
        draw[blue,thick,fill=cyan,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (B/2,-B/2,0) -- cycle;
        draw[blue,thick,fill=blue,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (-B/2,B/2,0) -- cycle;
        begin{scope}[tdplot_screen_coords]
        draw (aux1) -- ++ (2,0.1) node[right,font=itshape] {Altitude};
        draw (aux2) -- ++ (-1.5,0.3) node[left,font=itshape] {Slant Height};
        draw (aux3) -- ++ (1,-1) node[below right,font=itshape] {Base};
        end{scope}
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer















        You can do this with tikz-3dplot.



        documentclass[tikz,border=3.14mm]{standalone}
        usepackage{tikz-3dplot}
        begin{document}
        tdplotsetmaincoords{70}{-20}
        begin{tikzpicture}[tdplot_main_coords,line cap=butt,line join=bevel]
        pgfmathsetmacro{B}{4}
        pgfmathsetmacro{H}{4}
        draw[blue,thick] (-B/2,-B/2,0) -- (B/2,-B/2,0) -- (B/2,B/2,0) -- (-B/2,B/2,0) -- cycle;
        draw[blue,thick] (B/2,B/2,0) -- (0,0,H)
        node[above,font=largebfseries]{Regular Pyramid};
        draw[dashed,blue] (0,0,0) -- (0,0,H) coordinate[midway](aux1);
        draw[blue] (0,0,0.3) -- (0.3,0,0.3) -- (0.3,0,0);
        draw[dashed,blue] (-2,0,0) -- (0,0,H) coordinate[pos=0.3](aux2);
        draw[blue] (-B/2+0.15,0,0.3) -- (-B/2+0.15,-0.3,0.3) -- (-B/2,-0.3,0);
        coordinate (aux3) at (1,0,0);
        draw[blue,thick,fill=cyan,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (B/2,-B/2,0) -- cycle;
        draw[blue,thick,fill=blue,fill opacity=0.3] (-B/2,-B/2,0) -- (0,0,H) -- (-B/2,B/2,0) -- cycle;
        begin{scope}[tdplot_screen_coords]
        draw (aux1) -- ++ (2,0.1) node[right,font=itshape] {Altitude};
        draw (aux2) -- ++ (-1.5,0.3) node[left,font=itshape] {Slant Height};
        draw (aux3) -- ++ (1,-1) node[below right,font=itshape] {Base};
        end{scope}
        end{tikzpicture}
        end{document}


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 1 hour ago

























        answered 1 hour ago









        marmotmarmot

        92.1k4108201




        92.1k4108201






























            draft saved

            draft discarded




















































            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%2f348577%2fhow-to-draw-a-pyramid-with-height-and-slant-heigth-with-tikz%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