I am beginner and I'd like to know if it is possible to recreate this image in Latex.

XYZ Coordinate System

I've tried to find some examples to help me, but I didn't succeed.

Thanks in advance

  • 4
    Welcome! What do you have so far? In what sense is that an email? The TikZ manual has good tutorials at the beginning. You should be able to draw a good chunk of it from that. – cfr Jul 19 '17 at 15:47
  • 1
    Check out tex.stackexchange.com/questions/63370/… – John Kormylo Jul 19 '17 at 15:50
  • @cfr I am trying to draw at least the coordinate system. I'll check the TikZ manual. Thanks! – Paulo Araujo Jul 19 '17 at 17:58
  • @JohnKormylo thanks! That's almost what I need, I'll work on that as well. – Paulo Araujo Jul 19 '17 at 18:00
  • tikz-3dplot might also be useful, but probably overkill for this. (Will probably just complicate things.) – cfr Jul 19 '17 at 18:55

after some hours and following your tips I've arrived at a acceptable solution.

            [axis/.style={thin, black, ->, >=stealth'}]

            \draw[axis] (0,0) -- (0,2) node [above, black] {\scriptsize +Z};
            \draw[axis] (0,0) -- (0,-2) node [below, black] {\scriptsize -Z};
            \draw[axis] (0,0) -- (-20:2) node [right, black] {\scriptsize +X};
            \draw[axis] (0,0) -- (160:2) node [left, black] {\scriptsize -X};
            \draw[axis] (0,0) -- (20:2) node [right, black] {\scriptsize +Y};
            \draw[axis] (0,0) -- (200:2) node [left, black] {\scriptsize -Y};

            \draw [thick](0,0.6) ellipse (0.3 and 0.1);
            \draw [thick](-0.3,0.6) -- (-0.3,0);
            \draw [thick](-0.3,0) arc (180:360:0.3 and 0.1);
            \draw [thick](0.3,0.6) -- (0.3,0);  
            \fill [lightgray,opacity=1] (-0.3,0.6) -- (-0.3,0) arc (180:360:0.3 and 0.1) -- (0.3,0.6) arc (0:180:0.3 and -0.1);
            \fill [white, opacity=1] (-0.26,0.6) arc (180:360:0.26 and 0.085) -- (-0.26,0.6);

           \draw [thick, <->, >=stealth'] (0.1,1) arc (-80:260:15pt and 5pt) node [right=14pt, black] {\scriptsize C};
           \draw [thick, <->, >=stealth'] (1,-0.45) arc (-170:170:5pt and 15pt) node [right=16pt, above=0pt, black] {\scriptsize A};
           \draw [thick, <->, >=stealth'] (-1,-0.3) arc (10:350:5pt and 15pt) node [left=17pt, above=4pt, black] {\scriptsize B};



XYZ Coordinate System

  • Good job ! If I remember, maybe I'll showcase the interest in using tikz-3dplot tomorrow. You still forgot to explain the email part, though ! – marsupilam Jul 19 '17 at 21:20
  • @marsupilam I just revised my initial message, the word "email" was not supposed to be there rs I'll correct it. Thanks! – Paulo Araujo Jul 19 '17 at 22:42
  • Nice work! Thanks for clearing up the email mystery. I was quite puzzled by that. ;) – cfr Jul 20 '17 at 2:46

Using the tikz-3dplot package and the undocumented 3d tikz library.

The output

enter image description here

The code


%% viewing angles %%
\def\angThe{70}   %%
\def\angPhi{120}  %%

\begin{tikzpicture}[tdplot_main_coords, >=stealth',scale=4]

  \begin{scope}[<->] %% axis lines
    \draw (-\l,0) -- (1.5*\l,0) node [pos=1.05] {$x$};
    \draw (0,-\l) -- (0,\l)     node [pos=1.05] {$y$};
    \draw (0,0,-.6) -- (0,0,\l) node [pos=1.05] {$z$};

  \def\r{.3} % radius of cylinder
  \def\z{.6} % height of cylinder
  \draw [fill=blue!20](0,0,\z) circle (\r) ; % top disk of cylinder

  %% vertical facet of the cylinder  %------------------------------------%

  \draw [fill=blue!10] (\angPhi:\r) arc (\angPhi:\angPhiOpp:\r) 
                    -- (\angPhiOpp:\r) arc (\angPhiOpp:\angPhi:\r) 
  } -- cycle;

  % whoops, need to redraw this !
  \draw [shift={(0,0,\z)}](0,0) -- (\angPhi+90:\r) ;

  %% circular arrows %----------------------------------------------------%

  \def\rr{.2} % radius for the circular arrows arrows
  \begin{scope}[canvas is xy plane at z=-.3]
    \draw [<->](\angS:\rr) arc (\angS:\angE:\rr) ;
  \begin{scope}[canvas is yz plane at x=.9]
    \draw [<->](\angS:\rr) arc (\angS:\angE:\rr) ;
  \begin{scope}[canvas is zx plane at y=.6]
    \draw [<->](\angS:\rr) arc (\angS:\angE:\rr) ;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.