What's the simplest way to draw an triangle (not as a node!) with tikz with a given side and two given angles?

  • Interesting, but how about the orientation of triangle in the plane? Should we assume the given edge is parallel to page borders? – Pouya Apr 24 '14 at 13:34
  • I think you may assume this, because one can easily rotate the result via scope... – student Apr 24 '14 at 13:36
  • Two or three angles? :) – percusse Apr 24 '14 at 13:47
  • @percusse, obviously two would suffice. [edit: oops! didn't see the :) face at the end of your comment...] – Pouya Apr 24 '14 at 13:48

Got an example by googling Solving ASA triangles .

% Given
\draw (0,0) -- (0:\myside)
     let \n1={(180-(\myanga+\myangb))},
         \n2={(\myside*(sin(\myanga)/sin(\n1))} in
     -- (\myangb:\n2) -- cycle node{\n1,\n2};

enter image description here

  • 3
    Damn you're faster than superman :) – Trefex Apr 24 '14 at 14:08

Not as simple as percusse's answer but easy to understand.

\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{intersections, angles, quotes}

\draw coordinate[label=below:a] (a) --++(0:4cm) coordinate[label=below:b] (b);

\path[name path=ac] (a)--++(30:3cm);
\path[name path=bc] (b)--++(180-37:3cm);

\path [name intersections={of = ac and bc, by=c}];

\node[above] at (c) {c};

\draw[use as bounding box] (a)--(b)--(c)--cycle%
     pic[draw, "$30^\circ$", angle eccentricity=1.6] {angle=b--a--c}
    pic[draw, "$37^\circ$", angle eccentricity=1.6] {angle=c--b--a};

enter image description here


It is too long as a comment but too short for typing exercise.




enter image description here

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.