I'm working on to create illustrations for my class on Mechanics of Materials & Theory of Elasticity!

I am trying to create a wedge and put arrows on plane to show the stresses acting.

Appreciate the help.

CODE: I found the code for a cube! Don't know where to start!

enter image description here

  • You may want to have a look to the tikz-mec library. Sep 24, 2014 at 9:02
  • 3
    Since not everyone here is a mechanical engineer, it would probably help to add a picture of what you want to achieve, and also an example of what you have tried so far.
    – Fritz
    Sep 24, 2014 at 9:04
  • Show us the code you found. :)
    – Dan H.
    Sep 24, 2014 at 10:45

1 Answer 1


No nice code, but something for you to start with. This code is just a rough write up (could need some more time) of the graphic you have supplied. It's not mathematically correct and is just a draw from point a to b-solution. There are other ways to do this much more precisely and more sophisticated.

If you want more control over the figure i suggest you make use of \coordinates and heavy use of the calc-library. You can find every information you need about this in the pgfmanual. There are also many examples that will help you getting together everything you need.

\documentclass[tikz, border=5mm]{standalone}
 \begin{tikzpicture}[>=latex, font=\scriptsize]

  % triangles 
  \draw (0,0,0) -- (4,0,0) -- (0,2,0) -- cycle;
  \draw (0,0,\y) -- (4,0,\y) -- (0,2,\y) -- cycle;

  % connectors of triangles
  \draw (0,0,0) -- (0,0,\y);
  \draw (4,0,0) -- (4,0,\y);
  \draw (0,2,0) -- (0,2,\y);

  % arrows
  \draw [dashed, ->] (0,1,\yy) -- (0,.5,\yy) node [below] {{$\tau_{xy}$}};
  \draw [->] (0,.75,\yy) -- ++(-.5,0,0) node [left] {$\sigma_x$};

  \draw [dashed, ->] (3,0,\yy) -- (1,0,\yy) node [below] {$\tau_{xy}$};
  \draw [->] (2,0,\yy) -- (2,-.5,\yy) node [below] {$\sigma_y$};

  \draw [->] ($(4,0,\yy)!.5!(0,2,\yy)$) -- ($(4,0,\yy)!.75!(0,2,\yy)$) node [above left] {$\tau_n$} ;
  \draw [->] ($(4,0,\yy)!.5!(0,2,\yy)$) -- ++(63:1cm) node [above] {$\sigma_n$};
  \draw [dotted] ($(4,0,\yy)!.5!(0,2,\yy)$) -- ++(1,0,0);

  % theta angles
  \draw ($(4,0,\yy)!.5!(0,2,\yy)$) +(.5,0,0) arc (0:63:.5cm) node [midway, below left=-.1cm] {$\theta$};
  \draw (0,2,\y) +(-90:.5cm) arc (-90:-27:.5cm) node [midway, above left=-.1cm]     {$\theta$};

  % t-label
  \draw [dotted] (4,0,0) -- (4.5,-.25,0);
  \draw [dotted] (4,0,\y) -- (4.5,-.25,\y);
  \draw [<->] (4.25,-.12,0) -- (4.25,-.12,\y) node [midway, below right] {$t$};

Rendered image: rendered image


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .