How do I draw 3-D axes in TIKZ?












0















Can someone help me draw this? I need it to show the effect of a rotated polarizing component, and things always looks better in tikz, my my skills are sub-standard.



enter image description here










share|improve this question

























  • With tikz-3dplot this is really straightforward. Are you aware of this package?

    – marmot
    Mar 1 at 3:17











  • no how does it work?

    – easychachi
    Mar 1 at 3:25






  • 2





    Welcome to TeX.SX. When you post a question, please provide a "Minimal Working Example" (MWE) that starts with documentclass, includes all relevant usepackage commands, ends with end{document} and compiles without errors, even if it does not produce your desired output. On this site there is an expectation that posters will make an attempt at the solution (even if it's just a start), rather than just asking for someone to do it for them.

    – Sandy G
    Mar 1 at 3:48
















0















Can someone help me draw this? I need it to show the effect of a rotated polarizing component, and things always looks better in tikz, my my skills are sub-standard.



enter image description here










share|improve this question

























  • With tikz-3dplot this is really straightforward. Are you aware of this package?

    – marmot
    Mar 1 at 3:17











  • no how does it work?

    – easychachi
    Mar 1 at 3:25






  • 2





    Welcome to TeX.SX. When you post a question, please provide a "Minimal Working Example" (MWE) that starts with documentclass, includes all relevant usepackage commands, ends with end{document} and compiles without errors, even if it does not produce your desired output. On this site there is an expectation that posters will make an attempt at the solution (even if it's just a start), rather than just asking for someone to do it for them.

    – Sandy G
    Mar 1 at 3:48














0












0








0








Can someone help me draw this? I need it to show the effect of a rotated polarizing component, and things always looks better in tikz, my my skills are sub-standard.



enter image description here










share|improve this question
















Can someone help me draw this? I need it to show the effect of a rotated polarizing component, and things always looks better in tikz, my my skills are sub-standard.



enter image description here







tikz-pgf diagrams physics






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 1 at 4:29









Davislor

6,5621329




6,5621329










asked Mar 1 at 3:12









easychachieasychachi

193




193













  • With tikz-3dplot this is really straightforward. Are you aware of this package?

    – marmot
    Mar 1 at 3:17











  • no how does it work?

    – easychachi
    Mar 1 at 3:25






  • 2





    Welcome to TeX.SX. When you post a question, please provide a "Minimal Working Example" (MWE) that starts with documentclass, includes all relevant usepackage commands, ends with end{document} and compiles without errors, even if it does not produce your desired output. On this site there is an expectation that posters will make an attempt at the solution (even if it's just a start), rather than just asking for someone to do it for them.

    – Sandy G
    Mar 1 at 3:48



















  • With tikz-3dplot this is really straightforward. Are you aware of this package?

    – marmot
    Mar 1 at 3:17











  • no how does it work?

    – easychachi
    Mar 1 at 3:25






  • 2





    Welcome to TeX.SX. When you post a question, please provide a "Minimal Working Example" (MWE) that starts with documentclass, includes all relevant usepackage commands, ends with end{document} and compiles without errors, even if it does not produce your desired output. On this site there is an expectation that posters will make an attempt at the solution (even if it's just a start), rather than just asking for someone to do it for them.

    – Sandy G
    Mar 1 at 3:48

















With tikz-3dplot this is really straightforward. Are you aware of this package?

– marmot
Mar 1 at 3:17





With tikz-3dplot this is really straightforward. Are you aware of this package?

– marmot
Mar 1 at 3:17













no how does it work?

– easychachi
Mar 1 at 3:25





no how does it work?

– easychachi
Mar 1 at 3:25




2




2





Welcome to TeX.SX. When you post a question, please provide a "Minimal Working Example" (MWE) that starts with documentclass, includes all relevant usepackage commands, ends with end{document} and compiles without errors, even if it does not produce your desired output. On this site there is an expectation that posters will make an attempt at the solution (even if it's just a start), rather than just asking for someone to do it for them.

– Sandy G
Mar 1 at 3:48





Welcome to TeX.SX. When you post a question, please provide a "Minimal Working Example" (MWE) that starts with documentclass, includes all relevant usepackage commands, ends with end{document} and compiles without errors, even if it does not produce your desired output. On this site there is an expectation that posters will make an attempt at the solution (even if it's just a start), rather than just asking for someone to do it for them.

– Sandy G
Mar 1 at 3:48










1 Answer
1






active

oldest

votes


















2














This is a rather basic task for the tikz-3dplot package and the 3d library. The package allows you to obtain orthographic projections for any view angles. The 3d library allows you to switch to a plane and project things therein.



documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
usetikzlibrary{3d,arrows.meta}
begin{document}
tdplotsetmaincoords{0}{0}
tdplotsetrotatedcoords{-30}{60}{45}
begin{tikzpicture}[tdplot_rotated_coords,thick,>={Latex[length=5pt]},
font=sffamily,pics/.cd,
3d xy axes/.style args={#1/#2/#3}{code={
draw[->] (-3,0,0) -- (3,0,0) node[pos=1.05] {$#1$};
draw[->] (0,-3,0) -- (0,3,0) node[pos=1.05] {$#2$};
node at (-1.5,-1.5,0) {$#3$};
}}]
foreach X/Y/S [count=Z] in {x/y/S,x/y/S',x'''/y'''/S'''}
{path (0,0,6*Z) pic {3d xy axes={X/Y/S}};
draw[red,->] (0,0,-3+6*Z) -- (0,0,3+6*Z);}
begin{scope}[canvas is xy plane at z=12,rotate=30]
draw[->] (-3,0) -- (3,0) node[pos=1.05] {$x'$};
draw[->] (0,-3) -- (0,3) node[pos=1.05] {$y'$};
draw (1,0) arc(0:-30:1) node[pos=0.5,right,transform shape]{$theta$};
end{scope}
node[anchor=north] at (0,-3.2,6) {Incident beam};
node[anchor=north,align=left] at (0,-3.2,12) {Rotated polarizing\ element};
node[anchor=north] at (0,-3.2,18) {Emerging beam};
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%2f477243%2fhow-do-i-draw-3-d-axes-in-tikz%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














    This is a rather basic task for the tikz-3dplot package and the 3d library. The package allows you to obtain orthographic projections for any view angles. The 3d library allows you to switch to a plane and project things therein.



    documentclass[tikz,border=3.14mm]{standalone}
    usepackage{tikz-3dplot}
    usetikzlibrary{3d,arrows.meta}
    begin{document}
    tdplotsetmaincoords{0}{0}
    tdplotsetrotatedcoords{-30}{60}{45}
    begin{tikzpicture}[tdplot_rotated_coords,thick,>={Latex[length=5pt]},
    font=sffamily,pics/.cd,
    3d xy axes/.style args={#1/#2/#3}{code={
    draw[->] (-3,0,0) -- (3,0,0) node[pos=1.05] {$#1$};
    draw[->] (0,-3,0) -- (0,3,0) node[pos=1.05] {$#2$};
    node at (-1.5,-1.5,0) {$#3$};
    }}]
    foreach X/Y/S [count=Z] in {x/y/S,x/y/S',x'''/y'''/S'''}
    {path (0,0,6*Z) pic {3d xy axes={X/Y/S}};
    draw[red,->] (0,0,-3+6*Z) -- (0,0,3+6*Z);}
    begin{scope}[canvas is xy plane at z=12,rotate=30]
    draw[->] (-3,0) -- (3,0) node[pos=1.05] {$x'$};
    draw[->] (0,-3) -- (0,3) node[pos=1.05] {$y'$};
    draw (1,0) arc(0:-30:1) node[pos=0.5,right,transform shape]{$theta$};
    end{scope}
    node[anchor=north] at (0,-3.2,6) {Incident beam};
    node[anchor=north,align=left] at (0,-3.2,12) {Rotated polarizing\ element};
    node[anchor=north] at (0,-3.2,18) {Emerging beam};
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer






























      2














      This is a rather basic task for the tikz-3dplot package and the 3d library. The package allows you to obtain orthographic projections for any view angles. The 3d library allows you to switch to a plane and project things therein.



      documentclass[tikz,border=3.14mm]{standalone}
      usepackage{tikz-3dplot}
      usetikzlibrary{3d,arrows.meta}
      begin{document}
      tdplotsetmaincoords{0}{0}
      tdplotsetrotatedcoords{-30}{60}{45}
      begin{tikzpicture}[tdplot_rotated_coords,thick,>={Latex[length=5pt]},
      font=sffamily,pics/.cd,
      3d xy axes/.style args={#1/#2/#3}{code={
      draw[->] (-3,0,0) -- (3,0,0) node[pos=1.05] {$#1$};
      draw[->] (0,-3,0) -- (0,3,0) node[pos=1.05] {$#2$};
      node at (-1.5,-1.5,0) {$#3$};
      }}]
      foreach X/Y/S [count=Z] in {x/y/S,x/y/S',x'''/y'''/S'''}
      {path (0,0,6*Z) pic {3d xy axes={X/Y/S}};
      draw[red,->] (0,0,-3+6*Z) -- (0,0,3+6*Z);}
      begin{scope}[canvas is xy plane at z=12,rotate=30]
      draw[->] (-3,0) -- (3,0) node[pos=1.05] {$x'$};
      draw[->] (0,-3) -- (0,3) node[pos=1.05] {$y'$};
      draw (1,0) arc(0:-30:1) node[pos=0.5,right,transform shape]{$theta$};
      end{scope}
      node[anchor=north] at (0,-3.2,6) {Incident beam};
      node[anchor=north,align=left] at (0,-3.2,12) {Rotated polarizing\ element};
      node[anchor=north] at (0,-3.2,18) {Emerging beam};
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer




























        2












        2








        2







        This is a rather basic task for the tikz-3dplot package and the 3d library. The package allows you to obtain orthographic projections for any view angles. The 3d library allows you to switch to a plane and project things therein.



        documentclass[tikz,border=3.14mm]{standalone}
        usepackage{tikz-3dplot}
        usetikzlibrary{3d,arrows.meta}
        begin{document}
        tdplotsetmaincoords{0}{0}
        tdplotsetrotatedcoords{-30}{60}{45}
        begin{tikzpicture}[tdplot_rotated_coords,thick,>={Latex[length=5pt]},
        font=sffamily,pics/.cd,
        3d xy axes/.style args={#1/#2/#3}{code={
        draw[->] (-3,0,0) -- (3,0,0) node[pos=1.05] {$#1$};
        draw[->] (0,-3,0) -- (0,3,0) node[pos=1.05] {$#2$};
        node at (-1.5,-1.5,0) {$#3$};
        }}]
        foreach X/Y/S [count=Z] in {x/y/S,x/y/S',x'''/y'''/S'''}
        {path (0,0,6*Z) pic {3d xy axes={X/Y/S}};
        draw[red,->] (0,0,-3+6*Z) -- (0,0,3+6*Z);}
        begin{scope}[canvas is xy plane at z=12,rotate=30]
        draw[->] (-3,0) -- (3,0) node[pos=1.05] {$x'$};
        draw[->] (0,-3) -- (0,3) node[pos=1.05] {$y'$};
        draw (1,0) arc(0:-30:1) node[pos=0.5,right,transform shape]{$theta$};
        end{scope}
        node[anchor=north] at (0,-3.2,6) {Incident beam};
        node[anchor=north,align=left] at (0,-3.2,12) {Rotated polarizing\ element};
        node[anchor=north] at (0,-3.2,18) {Emerging beam};
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer















        This is a rather basic task for the tikz-3dplot package and the 3d library. The package allows you to obtain orthographic projections for any view angles. The 3d library allows you to switch to a plane and project things therein.



        documentclass[tikz,border=3.14mm]{standalone}
        usepackage{tikz-3dplot}
        usetikzlibrary{3d,arrows.meta}
        begin{document}
        tdplotsetmaincoords{0}{0}
        tdplotsetrotatedcoords{-30}{60}{45}
        begin{tikzpicture}[tdplot_rotated_coords,thick,>={Latex[length=5pt]},
        font=sffamily,pics/.cd,
        3d xy axes/.style args={#1/#2/#3}{code={
        draw[->] (-3,0,0) -- (3,0,0) node[pos=1.05] {$#1$};
        draw[->] (0,-3,0) -- (0,3,0) node[pos=1.05] {$#2$};
        node at (-1.5,-1.5,0) {$#3$};
        }}]
        foreach X/Y/S [count=Z] in {x/y/S,x/y/S',x'''/y'''/S'''}
        {path (0,0,6*Z) pic {3d xy axes={X/Y/S}};
        draw[red,->] (0,0,-3+6*Z) -- (0,0,3+6*Z);}
        begin{scope}[canvas is xy plane at z=12,rotate=30]
        draw[->] (-3,0) -- (3,0) node[pos=1.05] {$x'$};
        draw[->] (0,-3) -- (0,3) node[pos=1.05] {$y'$};
        draw (1,0) arc(0:-30:1) node[pos=0.5,right,transform shape]{$theta$};
        end{scope}
        node[anchor=north] at (0,-3.2,6) {Incident beam};
        node[anchor=north,align=left] at (0,-3.2,12) {Rotated polarizing\ element};
        node[anchor=north] at (0,-3.2,18) {Emerging beam};
        end{tikzpicture}
        end{document}


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 1 at 5:16

























        answered Mar 1 at 4:22









        marmotmarmot

        107k5129243




        107k5129243






























            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%2f477243%2fhow-do-i-draw-3-d-axes-in-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







            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?