2

This is what I want to achieve.

enter image description here

And this is what I got so far.

enter image description here

Q1. How to add a dotted line between CE?

Q2. How to add length 8?

Q3. How to add equal length sign for CD and DA?

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

    \item[b)]\leavevmode\vadjust{\vspace{-\baselineskip}}\newline
      \begin{tikzpicture}
        \tkzDefPoint(0,0){A}
        \tkzDefPoint(5,0){B}
        \tkzDefPoint(3,3){C}
        \tkzDefPoint(0,3){D}
        \tkzDefPoint(3,0){E}
        \tkzDrawPolygon[fill=gray!10](A,B,C,D)
        \tkzDrawSegment(C,E)
        \tkzLabelSegment[above=4pt](D,C){$5$}
        \tkzLabelSegment[right](B,C){$y$}
        \tkzLabelSegment[below](E,B){$x$}
        \tkzMarkRightAngle(C,D,A)
        \tkzMarkRightAngle(D,A,E)
        \tkzMarkRightAngle(C,E,B)
      \end{tikzpicture}
\end{document}

1 Answer 1

5
  1. You can pass the dotted option to \tkzDrawSegment.

  2. You can still use standard TikZ commands.

  3. You have \tkzMarkSegments and you can use different marks with options.

The code:

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

\begin{document}
      \begin{tikzpicture}
        \tkzDefPoint(0,0){A}
        \tkzDefPoint(5,0){B}
        \tkzDefPoint(3,3){C}
        \tkzDefPoint(0,3){D}
        \tkzDefPoint(3,0){E}
        \tkzDrawPolygon[fill=gray!10](A,B,C,D)
        \tkzDrawSegment[dotted](C,E)
        \tkzLabelSegment[above=4pt](D,C){$5$}
        \tkzLabelSegment[right](B,C){$y$}
        \tkzLabelSegment[below](E,B){$x$}
        \tkzMarkSegments[mark=|,size=4pt](C,D A,D)
        \tkzMarkRightAngle(C,D,A)
        \tkzMarkRightAngle(D,A,E)
        \tkzMarkRightAngle(C,E,B)
        \foreach \Nodo in {A,B}
           \draw ([yshift=-7pt]\Nodo) -- ([yshift=-13pt]\Nodo);
        \draw[<->,>=latex] ([yshift=-10pt]A) -- node[fill=white] {$8$\,cm} ([yshift=-10pt]B);
      \end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

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