\documentclass[a4paper,12pt]{mwart}
\usepackage{polski}
\usepackage[utf8]{inputenc}
\usepackage[margin=0.6cm, hmargin=2cm]{geometry}


\def\linecolor{black}
\input{NaszeLiczniki}
\input{edge.tex}

\begin{document}

\section{Polecenie \textit{rightside}}

\begin{tikzpicture}
  \rightside{2}{2}{red!50!white}
  \edef\kbeta{60}
  \edef\b{1}
  \rightside{4}{3}{red!50!blue}
  \edef\kbeta{-60}
  \rightside{6}{3}{red!50!blue}  
\end{tikzpicture}

\section{Polecenie \textit{lefttside}}

\begin{tikzpicture}
  \leftside{2}{2}{red!50!white}
  \edef\alfa{45}
  \edef\c{2}
  \leftside{4}{3}{red!50!green}
  \edef\alfa{-45}
  \leftside{6}{3}{red!50!blue}  
\end{tikzpicture}

\section{Polecenie \textit{toptside}}

\begin{tikzpicture}
  \edef\a{2}
  \edef\b{2}
  \topside{2}{2}{red!50!white}
  \edef\alfa{40}
  \edef\kbeta{25}
  \topside{6}{2}{red!50!green}
\end{tikzpicture}

\section{Polecenie \textit{cube}}

\begin{tikzpicture}
  \cube{2}{2}{green}{blue!40!white}{red}
  \edef\linecolor{white}
  \cube{4}{2}{blue!10!white}{blue!40!white}{blue!10!white}
  \edef\alfa{0}
  \cube{6}{2}{green}{blue!40!white}{red}
\end{tikzpicture}

\section{Polecenie \textit{tower}}

\begin{tikzpicture}
  \tower{2}{2}{3}{blue!10!white}{blue!40!white}{blue!10!white}{0}
  \tower{4}{2}{3}{blue!10!white}{blue!40!white}{blue!10!white}{0}
  \tower{4}{2}{2}{green}{blue!40!white}{red}{3}
  \edef\kbeta{0}
  \tower{6}{2}{3}{blue!10!white}{blue!40!white}{blue!10!white}{1}
%  \tower{8}{2}{2}{green}{blue!40!white}{red}{3}{-1}
%  \tower{2}{2}{{1, 3, 5}}{blue!40!white}{blue!10!white}{blue!10!white}{-1}
\end{tikzpicture}

\section{Polecenie \textit{wall}}

\begin{tikzpicture}
  \wall{2}{2}{{3/0,2/0,3/1}}{blue!10!white}{blue!40!white}{blue!10!white}
  \wall{6}{2}{{2/1,2/0,3/1}}{blue!10!white}{green!40!white}{green!10!white}
  \edef\kbeta{10}
  \pgfmathparse{round(100*\b*cos(\kbeta))/100}
  \edef\xwalloffset{\pgfmathresult}
  \wall{10}{2}{{2/1,2/0,3/1}}{blue!10!white}{green!40!white}{green!10!white}
\end{tikzpicture}

\section{Polecenie \textit{pyramid} i zmiana koloru krawędzi}

\edef\linecolor{white}

\begin{tikzpicture}
  \pyramid{2}{2}{{3/0,3/0,2/0},{3/0,1/0,3/0},{1/0,3/0,1/1}}{blue!40!white}{blue!10!white}{blue!10!white}
  \contour{2}{2}{3}{3}{3}{green}
\end{tikzpicture}

\section{Polecenie \textit{contour}}

\begin{tikzpicture}
  \contour{2}{2}{4}{3}{2}{red}
  \contour{7}{2}{1}{1}{1}{red}
\end{tikzpicture}

\edef\linecolor{red}
\edef\kbeta{10}
\pgfmathparse{round(100*\b*cos(\kbeta))/100}
\edef\xwalloffset{\pgfmathresult}
\pgfmathparse{-round(100*\b*sin(\kbeta))/100}
\edef\ywalloffset{\pgfmathresult}

\section{Polecenie \textit{pyramide} i zmiana kolor krawędzi}

\begin{tikzpicture}
  \pyramid{2}{2}{{3/0,3/0,2/0},{3/0,1/0,3/0},{1/0,3/0,1/1}}{blue!40!white}{blue!10!white}{blue!10!white}
  \contour{2}{2}{3}{3}{3}{green}
  \pyramid{7}{2}{{3/0},{3/0}}{blue!40!white}{blue!10!white}{blue!10!white}
\end{tikzpicture}

\section{Polecenie \textit{pyramide} i ,,zerowanie'' kąta \textit{beta}}

\edef\kbeta{0}
\edef\linecolor{black}
\update

\begin{tikzpicture}
	\pyramid{2}{2}{{3/0,3/0,2/0},{3/0,1/0,3/0},{1/0,3/0,1/1}}{blue!40!white}{blue!10!white}{blue!10!white}
	\contour{2}{2}{3}{3}{3}{green}
	\pyramid{7}{2}{{3/0},{3/0}}{blue!40!white}{blue!10!white}{blue!10!white}
\end{tikzpicture}

\section{Polecenie \textit{pyramide} i ,,zerowanie'' kąta \textit{alfa}}

\edef\kbeta{40}
\edef\alfa{0}
\update

\begin{tikzpicture}
	\pyramid{2}{2}{{3/0,3/0,2/0},{3/0,1/0,3/0},{1/0,3/0,1/1}}{blue!40!white}{blue!10!white}{blue!10!white}
	\contour{2}{2}{3}{3}{3}{green}
	\pyramid{7}{2}{{3/0},{3/0}}{blue!40!white}{blue!10!white}{blue!10!white}
\end{tikzpicture}

\end{document}




