Wie zeichnet man die Sechsecke innerhalb des Parallelogramms?

Wie zeichnet man die Sechsecke innerhalb des Parallelogramms?

Ich möchte das folgende Bild zeichnen, das aus einem Parallelogramm und zwei kongruenten regelmäßigen Sechsecken besteht.

Bildbeschreibung hier eingeben

\documentclass[12pt]{article}
\usepackage{geometry} 
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}   
\usepackage[portuguese]{babel} 
\usepackage{tikz,tkz-euclide}   
\usetkzobj{all} 

\begin{document}
\begin{tikzpicture}[scale=0.9]
\tkzInit[xmin=0,xmax=8,ymin=0,ymax=3] 
\tkzClip[space=.5] 
\tkzDefPoint(0,0){A} \tkzDefPoint(6,0){B} 
\tkzDefPoint(7.5,3){C} \tkzDefPoint(1.5,3){D}
\tkzDefPointWith[colinear= at C](B,A)
\tkzDrawPolygon(A,B,C,D)
\end{tikzpicture}
\end{document}

Antwort1

Ein Sechseck ist schön, da alle Winkel 60 Grad betragen, was bedeutet, dass alle Seiten und der Abstand vom Mittelpunkt zu einer Ecke gleich sind. Ich nenne diesen Abstand \D. Dann geht es hauptsächlich darum, Seiten und Winkel zu zählen.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}

\begin{tikzpicture}
  \newcommand\D{2}
  \coordinate (A) at (0,0);
  \path (A) ++(0:\D) ++(-60:\D)coordinate (B);
  %%
  \draw[fill=gray!50] ($(A)+(120:\D)$) 
  -- ($(A)+(120:\D)+(-120:3*\D)$) 
  -- ($(B)+(-60:\D)$) 
  -- ($(B)+(-60:\D)+(60:3*\D)$) -- cycle;
  %% Hexagons
  \draw[fill=white] (A) +(0:\D) -- +(60:\D)  -- +(120:\D)  -- +(180:\D) -- +(240:\D)  -- +(300:\D) -- cycle;
  \draw[fill=white] (B) +(0:\D) -- +(60:\D)  -- +(120:\D)  -- +(180:\D) -- +(240:\D)  -- +(300:\D) -- cycle;
  %% Where are A and B?
  \draw (A) circle (1pt) node[below]{A};
  \draw (B) circle (1pt) node[below]{B};
\end{tikzpicture}
\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen