3

Let us consider a setting where I have two coordinates A and B. The points have been built through a series of fransformations, so I don't really know their coordinates.
Now I want to build point C such that the angle ABC = 72° and the length BC=2cm

I guess I will have to use some kind of coordinate shift, but I can't figure out how to configure it, since I don't know the angle between (AB) and the horizontal line.

It seems to me like it should be fairly simple to do, but I've been struggling for some time now, any help would be appreciated !

I don't really have anything interesting to put in a MWE, but let's begin to build one anyway, it'll be easier to test the suggestions:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
    \node (A) at (4.3, 2.55) {A};
    \node (B) at (2.9, 1.7) {B};
    % I want node (C) such that ABC = 72° and BC=2cm
\end{tikzpicture}
\end{document}

I've tried things like \node (C) at ($(B) + (70:2cm)$) {C};, but it is not what I'm looking for. What I really need is to move the referential line to line AB. Then, it'll be easy to build C. Any idea?

Thanks!

5

See page 144 of the PGF manual (v3.0.1a)

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
    \node (A) at (4.3, 2.55) {A};
    \node (B) at (2.9, 1.7) {B};
    \node (C) at ($(B)!2cm!72:(A)$) {C};
\end{tikzpicture}
\end{document}

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.