From b14c64bda4efd8674f48d373eaeb41eb12e07c30 Mon Sep 17 00:00:00 2001 From: mathstoof Date: Sat, 29 Sep 2018 06:27:01 -0700 Subject: [PATCH] Update koch-snowflake.tex --- tikz/koch-snowflake/koch-snowflake.tex | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tikz/koch-snowflake/koch-snowflake.tex b/tikz/koch-snowflake/koch-snowflake.tex index 9565ebd..4c86f1c 100644 --- a/tikz/koch-snowflake/koch-snowflake.tex +++ b/tikz/koch-snowflake/koch-snowflake.tex @@ -10,6 +10,20 @@ % \draw[fill=gray!10] { { { decorate{ (0,0) -- (3,0) -- (1.5,-3) -- (0,0)}}}}; % \draw[fill=gray!10] { { decorate{ decorate{ (0,0) -- (3,0) -- (1.5,-3) -- (0,0)}}}}; % \draw[fill=gray!10] { decorate{ decorate{ decorate{ (0,0) -- (3,0) -- (1.5,-3) -- (0,0)}}}}; -\draw[fill=gray!10] decorate{ decorate{ decorate{ decorate{ (0,0) -- (3,0) -- (1.5,-3) -- (0,0)}}}}; +%\draw[fill=gray!10] decorate{ decorate{ decorate{ decorate{ (0,0) -- (3,0) -- (1.5,-3) -- (0,0)}}}}; +%(0,0) -- (3,0) -- (1.5,-3) -- (0,0) does not form an equilateral triangle, so the Koch curves along (3,0) -- (1.5,-3) and (1.5,-3) -- (0,0) are longer than they should be + +%using shifts and rotations makes an equilateral triangle easily without dealing explicitly with any irrational coordinates +\draw decorate{ decorate{ decorate{ decorate{ (0,0) -- (1,0) }}}}; +\begin{scope}[shift={(1,0)}] +\begin{scope}[rotate=-120] +\draw decorate{ decorate{ decorate{ decorate{ (0,0) -- (1,0) }}}}; +\end{scope} +\end{scope} +\begin{scope}[shift={(-1,0)}] +\begin{scope}[rotate around={120:(1,0)}] +\draw decorate{ decorate{ decorate{ decorate{ (0,0) -- (1,0) }}}}; +\end{scope} +\end{scope} \end{tikzpicture} \end{document}