i need help with this triangle (Image 1), i don't know draw this in tex :cImage 1

  • 1
    Welcome! Although somebody may decide to draw your diagram for you from scratch, it isn't really fair to ask it. What have you tried so far? If you can post some code - ideally in the form of a Minimal Working Example - people will find it easier and more interesting to help (and will therefore be more likely to do so). (Very nearly almost) All questions on this site should include an MWE or an MnWE (if the question is about why it is not-Working an MWE wouldn't be possible or helpful, of course). – cfr Jun 11 '16 at 22:35

Read up on tikz:

\draw[-,thick] (0,0) -- (2,0) -- (0,1.5);
\node [anchor = east] at (0,0) {O};
\node [anchor = east] at (0,1.5) {L};
\node [anchor = west] at (2,0) {T};
\node [anchor = east] at (0,0.75) {H};
\node [anchor = east] at (1,0.375) {h};
\node [anchor = south] at (0.5,0) {\textit{vt}};
\draw[-,very thick] (0,0) -- (0,1.5);
\draw[-,very thick] (1,0) -- (1,0.75);
\draw[{Bar[width=7mm][sep]Triangle[angle=20:10pt]}-{Triangle[angle=20:10pt][sep]Bar[width=7mm]},thick] (0,-0.25) -- node [anchor=north]{y} (2,-0.25);

This requires \usetikzlibrary{arrows.meta}

tikz drawing

  • You're welcome. I'm just learning tikz myself. – 804b18f832fb419fb142 Jun 11 '16 at 23:10
  • 1
    It works but if you change the size of the triangle you have to make many changes. Have a look at the sections Relative and Incremental Coordinates and Coordinate Calculations and learn how to compute coordinates from other coordinates. Also the 'pos=' option may be useful fro positioning the labels. – user10274 Jun 12 '16 at 12:14
  • Yeah, I've used them before for control diagrams, but it somehow didn't come to my mind in this case. – 804b18f832fb419fb142 Jun 12 '16 at 22:11
  • So, then, now's your chance to show how to do this properly. BTW if you reply to somebody in your reply, please use '@<name>' or the recipient may not notice your reply. – user10274 Jun 13 '16 at 15:48

And now a solution with pstricks:

\documentclass[x11names, border=3pt]{standalone}


    \psset{dimen=middle, unit=2, labelsep=0.8ex, linejoin=1, arrowinset=0.12, arrowsize=4pt, tbarsize=10pt, PointSymbol=none, shortput=nab}
    \ncline[offset=-3ex, arrows=|<->|]{O}{T}\lput*{0}{$ y $}
    \psset{PointName=none, linewidth = 1.5pt, }
    \ncline{cc-cc}{O}{L}^{$ H $}
    \ncline{I}{K}^{$ h $}
    \ncline[linestyle=none]{O}{I}^{$ vt $}


enter image description here


and one more TikZ solution:


    \coordinate[label=left:$O$] (O);
    \coordinate[above=50mm of O, label= left:$L$] (L);
    \coordinate[right=50mm of O, label=right:$T$] (T);
    \draw[thick](O) -- node[left] {$H$} (L) 
                    -- coordinate (h) (T)
                    -- node[pos=0.75,above]   {$vt$}  cycle;
    \draw[thick](h) -- node[left] {$h$}   (h |- O);
        ($(O)-(0,4mm)$) -- node [fill=white] {$y$} ($(T)-(0,4mm)$);

enter image description here


Another PSTricks solution:



% parameters
\def\widthSmall{2} % < \width


  \pcline[offset = -9pt]{|<*->|*}(O)(T)
 \psset{linestyle = none}
  \pcline[offset = 8pt](O)(L)
  \pcline[offset = 6.5pt](O)(h)
  \pcline[offset = -6.5pt](H)(h)



All you have to do is change the values of the parameters and the drawing will by adjusted accordingly.

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.