\documentclass[12pt]{article}

\usepackage{tikz,tkz-euclide}
\usetikzlibrary{positioning}
\usetikzlibrary{patterns,fadings}
\usetkzobj{all}
\usepackage[utf8]{inputenc}
\usepackage[margin=2cm]{geometry}
\usetikzlibrary{arrows}
\usepackage{url}

\usepackage{pgf,tikz,pgfplots}
\pgfplotsset{compat=1.15}

\definecolor{luma-red}{rgb}{0.949019607843137, 0.400000000000000, 0.309803921568627}
\definecolor{luma-purple}{rgb}{0.576470588235294, 0.384313725490196, 0.600000000000000}
\definecolor{luma-blue}{rgb}{0.019607843137255, 0.647058823529412, 0.772549019607843}
\definecolor{luma-green}{rgb}{0.196078431372549, 0.643137254901961, 0.450980392156863}
\definecolor{luma-gold}{rgb}{0.976470588235294, 0.643137254901961, 0.329411764705882}

\usetikzlibrary{fadings,shapes.geometric}

\input{mirror.tex}
\setlength{\parindent}{0pt}

\newcommand{\foldpoint}[3]{
\draw (#1) circle (1pt);
\filldraw (#2) circle (1pt);
\draw[->,>=stealth,red] (#1) to[bend #3](#2);
}
\def\ptable{gray!50}


\begin{document}
\thispagestyle{empty}
\section*{Tetraedri}
\def\orientation{1}
\input{orientation.tex}
Tehdään origamitetraedri. Näissä ohjeissa käytetään paperia, jonka etupuoli on {\color{\pfront} punainen} ja takapuoli on {\color{\pback} sininen}. Paperia pidetään samankokoisella pöydällä, joka on {\color{\ptable}harmaa}.

\begin{tikzpicture}%\pgfmathsetseed{7}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

%paper
\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;
%ready lines

\coordinate (p1) at (1,0);
\coordinate (q1) at (0,1);
\draw (p1) -- (q1);
\filldraw[\ptable] (p1)--(q1)--(a)--cycle;
\begin{scope}
\begin{pgfinterruptboundingbox}
\path [clip] (q1) -- (p1) -- (a) -- cycle [reverseclip];
\end{pgfinterruptboundingbox}
\filldraw[gray!40] (a)--(b)--(c)--(d)--cycle;
\end{scope}
\begin{scope}[mirror=(p1)--(q1)]
\draw (0.98,0.98) coordinate (ap);
\end{scope}

\filldraw[\pback,draw=black,opacity=0.5] (p1)--(q1)--(ap)--cycle;
\foldpoint{a}{ap}{left}

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}

Taita paperi puoliksi toiseen suuntaan (1 kpl). Kannattaa taittaa toiseen suuntaan vasta myöhemmin.

\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;
\filldraw[\ptable] (n)--(s)--(b)--(a)--cycle;
\filldraw[\pback] (n) --(s)--(c)--(d)--cycle;
\draw (n) -- (s);
\foldpoint{a}{d}{right}
\foldpoint{b}{c}{left}
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}

Taita nurkka pystyviivalle pitäen alanurkka kiinnitettynä (4 kpl).

\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw (c)--(eap);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}[mirror=(c)--(eap)]
\draw (1,-1) coordinate (aq);
\filldraw[\pback,draw=black] (-1,-1)--(1,-1)--(eap)--cycle;
\end{scope}
\fill[\ptable] (-1,-1)--(1,-1)--(eap)--cycle;

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
%
%
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\stylea] (a)--(wdp);
\draw[\stylea] (b)--(wcp);
\draw[\stylea] (c)--(eap);
\draw[\stylea] (d)--(ebp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}

Voit tarkistaa lopputuloksen etsimällä pienet kolmiot. Tee pystysuorat taitokset kolmioiden huippujen kautta. Tee nyt myös vaakasuora puolitustaitos.

\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\stylea] (a)--(wdp);
\draw[\stylea] (b)--(wcp);
\draw[\stylea] (c)--(eap);
\draw[\stylea] (d)--(ebp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\fill[red] (eap)--(ebp)--(pikkue)--cycle;
\fill[red] (wdp)--(wcp)--(pikkuw)--cycle;

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\stylea] (a)--(wdp);
\draw[\stylea] (b)--(wcp);
\draw[\stylea] (c)--(eap);
\draw[\stylea] (d)--(ebp);
\draw[\stylea] (pikkua)--(pikkub);
\draw[\stylea] (pikkuc)--(pikkud);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\fill[red] (eap)--(ebp)--(pikkue)--cycle;
\fill[red] (wdp)--(wcp)--(pikkuw)--cycle;

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\stylea] (a)--(wdp);
\draw[\stylea] (b)--(wcp);
\draw[\stylea] (c)--(eap);
\draw[\stylea] (d)--(ebp);
\draw[\stylea] (pikkua)--(pikkub);
\draw[\stylea] (pikkuc)--(pikkud);
\draw[\stylea] (w)--(e);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}

Kierrä 90 $^\circ$. Taita toinen ohut suikale keskelle päin. Taita puoliksi.

\begin{tikzpicture}[rotate=90]
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{1}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\stylea] (a)--(wdp);
\draw[\stylea] (b)--(wcp);
\draw[\stylea] (c)--(eap);
\draw[\stylea] (d)--(ebp);
\draw[\stylea] (pikkua)--(pikkub);
\draw[\stylea] (pikkuc)--(pikkud);
\draw[\stylea] (w)--(e);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fill[\ptable] (pikkuc)--(pikkud)--(d)--(c)--cycle;
\fill[\pback] (pikkuc)--(pikkud)--(pikkudn)--(pikkucs)--cycle;

\draw (pikkuc)--(pikkud);
\draw (pikkucs)--(pikkudn);
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}[rotate=90]
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{0}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\stylea] (a)--(wdp);
\draw[\stylea] (b)--(wcp);
\draw[\stylea] (c)--(eap);
\draw[\stylea] (d)--(ebp);
\draw[\stylea] (pikkua)--(pikkub);
\draw[\stylea] (pikkuc)--(pikkud);
\draw[\stylea] (w)--(e);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fill[\ptable] (pikkuc)--(pikkud)--(d)--(c)--cycle;
\fill[\ptable] (a)--(e)--(w)--(d)--cycle;

%\draw (pikkuc)--(pikkud);

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}

Loppu on hieman hankala. Katso ohjeita:\\
\url{http://www.qland.de/origami/tetra/index.html}

\end{document}