Please help me to draw the following picture in LaTeX:

enter image description here

Thank you for all kind

  • 2
    What have you tried? You could try TiKZ, or pstricks, or asymptote, or metapost, or includegraphics using a drawing you produce in a drawing package. Or you could write in capital letters in your tex file INCLUDE PICTURE 1 HERE, and then draw the picture by hand, and ask your publisher to put in a suitable illustration there. Feb 3, 2015 at 10:05

3 Answers 3


This should get you started (or use Hugos answer, to which he beat me by some minutes).

I didn't want to look up the intersection code, since generally, "draw this for me" questions without any work at all are not the best questions to be asked here on tex.SE.




    \draw (0,0) node [anchor=south east] {\(w\)} -- (1,0) node [anchor=south] {\(u\)} -- (0,-2) node [anchor=north] {\(v\)} -- cycle;
    \draw (0,0) -- (2,0) node [anchor=west] {\(u_{s}\)} -- (0,-1) node [anchor=east] {\(v_{s}\)} -- cycle;
    \draw (0.6,-0.6) node [anchor=north west] {\(tu+(1-t)v\)};




You can achieve it by using the tikz package. Here is the code:



    \coordinate (W) at (-2,-6);
    \coordinate (Vs) at (-1,-3);
    \coordinate (V) at (0,0);
    \coordinate (U) at (5,0);
    \coordinate (Us) at (9,0);

    \draw (W) node[left]{v} -- (Vs) node[left]{$v_s$} -- (V) node[above]{w} -- (U) node[above]{u} -- (Us) node[above]{$u_s$};

    \draw[name path=seg1] (5,0) -- (-2,-6);
    \draw[name path=seg2] (-1,-3) -- (9,0);

    \path [name intersections={of = seg1 and seg2}];
    \coordinate (I)  at (intersection-1);

    \draw (I) node[below, right]{tu+(1-t)v}; 

enter image description here

You can change the coordinates of the points if you need to. Just change the first lines to the appropriate coordinates.

  • 1
    You could merge the three last lines to \node[name intersections={of = seg1 and seg2},below right] at (intersection-1) {$tu+(1-t)v$}; Feb 3, 2015 at 10:25
  • 1
    In addition, try to avoid using the minimal class. Feb 3, 2015 at 11:08

Two other candidates: MetaPost and Asymptote, both drawing programs closely related to (La)TeX. One may prefer such solutions since they are (contrary to TeX, LaTeX and cie) full-fledged programming languages, and thus sometimes easier to handle.

With MetaPost:

input latexmp; setupLaTeXMP(textextlabel = enable, mode = rerun);
numeric u; u = cm ; pair W, Vs, V, U, Us, I ;
V = u*(-2, -6); Vs = u*(-1, -3); W = origin; U = (5u, 0); Us = (9u, 0);
I = whatever[V, U] = whatever[Vs, Us]; % The intersection
  draw U -- V -- W -- Us -- Vs;
  label.top("$w$", W); label.top("$u$", U); label.rt("$u_s$", Us);
  label.lft("$v_s$", Vs); label.lft("$v$", V); 
  label.lrt("$tu+(1-t)v$", I);

To be compiled with LaTeX as TeX engine. In the command line, it needs something like this: mpost --tex = latex mypic.mp, or mptopdf --tex=latex mypic.mp if you prefer direct PDF output.


enter image description here

The same picture with Asymptote now:

pair v = (-2, -6), vs = (-1, -3), w = (0, 0), u = (5, 0), us = (9, 0);
pair I = intersectionpoint(v -- u, vs -- us); // The intersection
draw (u -- v -- w -- us -- vs);
label("$w$", w, N); label("$u$", u, N); label("$u_s$", us, E);
label("$v_s$", vs, W); label("$v$", v, W); 
label("$tu+(1-t)v$", I, SE);

To be compiled (in a Terminal) with an instruction like this: asy mypic.asy

The result:

enter image description here

Note that with both programs the intersection point is easily and automatically computed.


You must log in to answer this question.

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