0

I wish to draw the following figures:

  1. Three circles in a row having radius 2cm, 3cm and 4cm respectively by using tkz-euclide.

  2. Three equilaterals triangles in a row having length of sides 2cm, 3cm and 4cm respectively by using tkz-euclide.

  3. Three squares in a row having length of sides 2cm, 3cm and 4cm respectively by using tikz-euclide.

This is what I have achieved so far:

\documentclass[12pt, letterpaper]{article}
\usepackage[
a4paper,top=1in,bottom=1in,left=0.7in,right=0.7in,headheight=14.5pt,]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
    \begin{tikzpicture}
\draw (0,0) circle (2cm);
\draw (4,0) circle (1.5cm);
\draw (6.95,0) circle (1cm);
\end{tikzpicture}

\vspace{1cm}
\begin{tikzpicture}
\draw (0,0) -- (2,0) -- (2,2) -- (0,2) -- (0,0);
\draw (3,0) -- (6,0) -- (6,3) -- (3,3) -- (3,0);
\draw (7,0) -- (11,0) -- (11,4) -- (7,4) -- (7,0);
\end{tikzpicture}
\end{document}
2
  • 1
    Your code uses tikz and not tkz-euclide. There is not difficulty to get what you want with tikz.. You can remove ` \usepackage{tkz-euclide} \usetkzobj{all} ` Mar 17 '16 at 6:13
  • radius or diameter ? Mar 17 '16 at 7:05
4

If you really want to use tkz-euclide. In this case you avoid the call to tikz because euclide loads it

\documentclass[12pt]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\noindent
\begin{tikzpicture}
    \foreach \d/\x/\y in {2/-2/0,3/1/0,4/5/0}{%
        \tkzDefPoint(\x,\y){K}
        \tkzDefShiftPoint[K](0:\d){M}
        \tkzDefSquare(K,M)\tkzGetPoints{N}{O}
        \tkzDrawPolygon[color=red](K,M,N,O)
        \tkzLabelSegment[below](K,M){Square side=\d cm}
      }
\end{tikzpicture}

\begin{tikzpicture}
      \foreach \d/\x/\y in {2/-2/0,3/2/0,4/6/0}{%
          \tkzDefPoint(\x,\y){J}
          \tkzDefShiftPoint[J](0:\d){L}
          \tkzDrawTriangle[equilateral,color=blue](J,L)
          \tkzLabelSegment[below](J,L){Tr. Equ. side=\d cm}
      }
\end{tikzpicture}

\begin{tikzpicture}
           \foreach \d/\x/\y in {1/0/0,1.5/3.5/0,2/8/0}{%
              \tkzDefPoint(\x,\y){I} \tkzDefShiftPoint[I](60:\d){T}
              \tkzDrawPoints[size=4,fill=gray](I,T) \tkzDrawSegment(I,T)
              \tkzDrawCircle[R,color=purple](I,\d cm)
              \tkzLabelCircle[R,text width=3cm,text centered]
                          (I,\d cm+1cm)(-60){Circle R=\d cm}}
\end{tikzpicture}

\end{document}

enter image description here

11
  • Yes sir , actually i want to draw all figures in a raw
    – Math-Man
    Mar 17 '16 at 8:28
  • i mean three circles with mentioned radius in a raw, three squares in a raw as well as equilateral triangles in a single raw.
    – Math-Man
    Mar 17 '16 at 8:28
  • i by mistake i add package tkz, i really want to draw by tkz-euclid
    – Math-Man
    Mar 17 '16 at 8:30
  • Like the output answered by flav
    – Math-Man
    Mar 17 '16 at 8:32
  • It's not a real problem to place objects in a row ( my english is not good I don't know what a raw is ?) You want radius =4cm but you wrote 2cm in your example Mar 17 '16 at 8:33
1

like this :

\documentclass[12pt, letterpaper]{article}
\usepackage[
a4paper,top=1in,bottom=1in,left=0.7in,right=0.7in,headheight=14.5pt,]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
\draw (0,0) circle (2cm);
\draw (4,0) circle (1.5cm);
\draw (6.95,0) circle (1cm);
\end{tikzpicture}

\vspace{1cm}
\begin{tikzpicture}
\draw (0,0) rectangle (2,2);
\draw (3,0) rectangle (6,3);
\draw (7,0) rectangle (11,4);
\end{tikzpicture}
\vspace{1cm}

\begin{tikzpicture}
  \draw (0cm,0cm) -- ++(0:2cm) -- ++(120:2cm) -- ++(-120:2cm);
  \draw (4cm,0cm) -- ++(0:3cm) -- ++(120:3cm) -- ++(-120:3cm);
  \draw (8cm,0cm) -- ++(0:4cm) -- ++(120:4cm) -- ++(-120:4cm);
\end{tikzpicture}
\end{document}

enter image description here

2
  • in the circle, how can i put (draw) a dot as a center of circle and one line segment (radius) of the circle.
    – Math-Man
    Mar 17 '16 at 8:31
  • yes sir, its exactly what i need but i am looking for same out put by using tkz-euclid
    – Math-Man
    Mar 17 '16 at 8:37

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.