\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*{Oktaedri}
\def\orientation{1}
\input{orientation.tex}
Tehdään origamioktaedri. 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 (2 kpl). Taita sivut äskettäin syntyneille taitoksille (2 kpl).

\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[\stylea] (w)--(e);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\hspace{2cm}
\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] (w)--(e);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\filldraw[\ptable] (na)--(a)--(b)--(sb)--cycle;
\filldraw[\pback] (n)--(na)--(sb)--(s)--cycle;
\draw (n) -- (s);
\draw (na) -- (sb);
\foldpoint{a}{n}{right}
\foldpoint{b}{s}{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[\stylea] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

Aseta: Taita paperi puoliksi. Taita nurkka pystyviivalle pitäen keskipiste kiinnitettynä (2 kpl).

\begin{tikzpicture}
\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] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\filldraw[\ptable] (e)--(b)--(c)--(w)--cycle;
\draw (e)--(w);
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\hspace{4cm}
\begin{tikzpicture}
\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] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\filldraw[\ptable] (e)--(b)--(c)--(w)--cycle;
\draw (e)--(w);
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;

\path (0,0) coordinate (o) --(30:1.5) coordinate (p);
\filldraw[\ptable] (0,0)--(1,0)--(1,0.57735)--cycle;
\begin{scope}[mirror=(o)--(p)]
\draw (1,0) coordinate (E);
\filldraw[blue!40,draw=black] (0,0)--(1,0)--(1,0.57735)--cycle;
\draw (0.5,0) -- (0.5, 0.288675);
\end{scope}
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\foldpoint{e}{E}{right}
\end{tikzpicture}
\begin{tikzpicture}
\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] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\styleb] (o)--(ap);
\draw[\styleb] (o)--(dp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

Avaa paperi. Käännä taitoksien suunnat. Paina tummennetut osat sisälle päin.

\begin{tikzpicture}
\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] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\styleb] (o)--(ap);
\draw[\styleb] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\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[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{0}
\input{orientation.tex}

\filldraw[\pfront] (a) -- (b) -- (c) -- (d) -- cycle;
\fill[blue!40] (o)--(ap)--(bp)--cycle;
\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{0}
\input{orientation.tex}

\filldraw[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;

\fill[\pfront] (s)--(o)--(bp)--(b)--cycle;
\fill[\pfront] (s)--(o)--(cp)--(c)--cycle;
%\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

Taita sivut keskipystyviivalle (2 kpl +2 kpl).

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

\filldraw[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;

\fill[\pfront] (s)--(o)--(bp)--(b)--cycle;
\fill[\pfront] (s)--(o)--(cp)--(c)--cycle;
%\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\draw (e)--(sp)--(sbu)--(bp)--cycle;
\fill[\pback] (bp)--(sbu)--(sp)--(s)--(b)--cycle;
\draw (sbu)--(sb);
\fill[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;
\foldpoint{bp}{sp}{left}

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

\filldraw[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;

\fill[\pfront] (s)--(o)--(bp)--(b)--cycle;
\fill[\pfront] (s)--(o)--(cp)--(c)--cycle;
%\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\draw (e)--(sp)--(sbu)--(bp)--cycle;
\filldraw[\pback,draw=black] (sbu)--(sp)--(scu)--(sc)--(sb)--cycle;
\draw (sbu)--(sb);
\draw (o)--(s);
\draw (w)--(sp);
\fill[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;
\fill[\ptable] (a) -- (b) -- (sb)--(na)--(nd)--(sc)--(c)--(d)--cycle;


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

Taita merkittyjen viivojen yli, jotta saat runsaasti tasasivuisia kolmioita.

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

\filldraw[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;

\fill[\pfront] (s)--(o)--(bp)--(b)--cycle;
\fill[\pfront] (s)--(o)--(cp)--(c)--cycle;
%\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\draw (e)--(sp)--(sbu)--(bp)--cycle;
\filldraw[\pback,draw=black] (sbu)--(sp)--(scu)--(sc)--(sb)--cycle;
\draw (sbu)--(sb);
\draw (o)--(s);
\draw (w)--(sp);
\fill[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;
\fill[\ptable] (a) -- (b) -- (sb)--(na)--(nd)--(sc)--(c)--(d)--cycle;
\draw[thick,black] (w)--(sp);
\draw[thick,black] (e)--(sp);

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

Avaa hieman. Taita päältä kulmat sisälle (2 kpl). Taita alta kulmat sisälle (2 kpl).

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

\filldraw[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;

\fill[\pfront] (s)--(o)--(bp)--(b)--cycle;
\fill[\pfront] (s)--(o)--(cp)--(c)--cycle;
%\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\draw (w)--(sbbp);
\draw (e)--(sccp);
\draw (bp)--(ssbp);
\draw (cp)--(sscp);
\fill[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{0}
\input{orientation.tex}

\filldraw[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;

\fill[\pfront] (s)--(o)--(bp)--(b)--cycle;
\fill[\pfront] (s)--(o)--(cp)--(c)--cycle;
%\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\draw (w)--(sbbp);
\draw (e)--(sccp);
\draw (bp)--(ssbp);
\draw (cp)--(sscp);
\fill[\pback] (cp)--(sscp)--(c)--cycle;
\fill[\pback] (bp)--(ssbp)--(b)--cycle;
\fill[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}
\begin{tikzpicture}
\input{reverseclip.tex}
\input{coordinates.tex}
\def\orientation{0}
\input{orientation.tex}

\filldraw[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;

\fill[\pfront] (s)--(o)--(bp)--(b)--cycle;
\fill[\pfront] (s)--(o)--(cp)--(c)--cycle;
%\fill[blue!40] (o)--(dp)--(cp)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ready lines
\draw[\stylea] (n)--(s);
\draw[\styleb] (w)--(e);
\draw[\stylea] (na)--(sb);
\draw[\stylea] (nd)--(sc);
\draw[\stylea] (o)--(ap);
\draw[\stylea] (o)--(dp);
\draw[\stylea] (o)--(bp);
\draw[\stylea] (o)--(cp);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\draw (w)--(sbbp);
\draw (e)--(sccp);
\draw (bp)--(ssbp);
\draw (cp)--(sscp);
\fill[\ptable] (cp)--(sscp)--(c)--cycle;
\fill[\ptable] (bp)--(ssbp)--(b)--cycle;
\fill[\ptable] (cp) -- (d) -- (a) -- (bp) -- (o)--cycle;
\draw[black,thin] (a)--(b)--(c)--(d)--cycle;
\end{tikzpicture}

Loppu on hieman hankala. Katso video [5:21$\to$]:\\
\url{https://www.youtube.com/watch?v=phhVl-N9M4Y&t=321}

\end{document}