[Tex/LaTex] Draw lines by specifying angles


I'd like to be able to draw lines in LaTeX by specifying an angle, rather than specifying it like so


Is this possible? I've looked at tikz and tikz-euclid. I've even tried installing tikz-euclid, but I couldn't even do that (I found these but couldn't find the .ins for tikz-euclid). And I'm not sure if that's what I want anyway.

What do I need to do to accomplish this?

Best Answer

You can read about it in the pgf manual, Section 13: Specifying Coordinates.

An example:


    % Draw a line at 30 degrees and of length 3
    \draw (0,0) -- (30:3cm);

You can also use the relative coordinates:

    % Draw the first line with absolute coordinates and the 
    % second with relative coordinates to the first line
    \draw (0,0) -- (30:3cm) -- ++(80:3cm);
Related Question