3

I am trying to find the intersection of (A,B) with the orthogonal line through P. The following code results in "No shape named C is known":

\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}

\begin{tikzpicture}
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(11,0){B}
  \tkzDefPoint(10,10){P}
  \tkzDefLine[orthogonal=through P](B,A) \tkzGetPoint{X_1}
  \tkzInterLL(P,X_1)(A,B) \tkzGetPoint(C)
  \tkzLabelPoints(C)
\end{tikzpicture}

\end{document}

and I don't understand why that intersection point should not exist.

3
  • Wrong braces. Use \tkzGetPoint{C} instead of \tkzGetPoint(C).
    – Bobyandbob
    Mar 8, 2017 at 21:16
  • See also tex.stackexchange.com/questions/282879/… on the right in the Related-list.
    – Marijn
    Mar 8, 2017 at 21:18
  • 1
    @Bobyandbob Would you put your comment as an answer, which can be accepted so this question can then disappear from the unanswered queue?
    – jjdb
    May 5, 2017 at 10:43

1 Answer 1

5

You only have to use \tkzGetPoint{C} instead of \tkzGetPoint(C). Syntax change.

I also added (drawing) the points and lines with \tkzDrawPoints(C,X_1) and \tkzDrawLine(A,B) to visualize the solution. \tkzLabelPoints(A,B) plots the label.

Define a orthogonal line to a other line (A,B) going through a Ponit P: Therefore you can use \tkzDefLine[orthogonal=through P](B,A), the second point of the line you can get with \tkzGetPoint{X_1}(first point is P) defined as X_1.

Compute the intersection of two line:
\tkzInterLL(P,X_1)(A,B): computes the intersection of the two lines (P,X_1) and (A,B). With \tkzGetPoint{C} you get the intersection point, saved as C.

Solution:

enter image description here

MWE:

\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(11,0){B}
  \tkzDefPoint(10,10){P}
  \tkzDrawPoints(A,B,P)\tkzLabelPoints(A,B,P)
  %
  \tkzDefLine[orthogonal=through P](B,A)     
  \tkzGetPoint{X_1}
  %  
  \tkzInterLL(P,X_1)(A,B)
  \tkzGetPoint{C}
  \tkzDrawPoints(C,X_1)\tkzLabelPoints(C,X_1)
  %
   \tkzDrawLine(A,B)
   \tkzDrawLine(P,X_1)
\end{tikzpicture}
\end{document}

You must log in to answer this question.

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