# Drawing a cross using only one quadrant

To draw this cross,

I used the following very long and time consuming code.

I thought of simplifying this code by drawing only one quadrant and using save box to repeat it. But I could not figure out how to precisely do this and avoiding drawing the inside unnecessary lines.

\documentclass{beamer}
\usepackage{verbatim}
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{Coptic Cross}
\includegraphics[width=6.6cm,keepaspectratio]{./cross_coptic.jpg}
\vskip -6.5cm
\hskip .04cm
\begin{tikzpicture}[scale=.9, transform shape]
\tikzset{pics/.cd,
crossa/.style n args={2}{code={
\node [red] at (0,0) (o){\bf .}
([shift={(90.:3.4cm)}]o.center) node [red] (t){\bf .}
([shift={(-90.:3.4cm)}]o.center) node [red] (b){\bf .}
([shift={(180.:3.38cm)}]o.center) node [red] (ol){\bf .}
([shift={(0:3.38cm)}]o.center) node [red] (or){\bf .}
([shift={(90.:.6cm)}]o.center) node [red] (oua){\bf .}%up 1 level
([shift={(180.:.6cm)}]oua.center) node [red] (oual){\bf .}
([shift={(0:.6cm)}]oua.center) node [red] (ouar){\bf .}
([shift={(180.:2.5cm)}]oua.center) node [red] (ouall){\bf .}
([shift={(0:2.5cm)}]oua.center) node [red] (ouarr){\bf .}
([shift={(90.:1.6cm)}]o.center) node [red] (ouaa){\bf .}%up 2 levels
([shift={(180.:2.12cm)}]ouaa.center) node [red] (ouaal){\bf .}
([shift={(0:2.12cm)}]ouaa.center) node [red] (ouaar){\bf .}
([shift={(90.:2.1cm)}]o.center) node [red] (ouaaa){\bf .}%up 3 levels
([shift={(180.:1.6cm)}]ouaaa.center) node [red] (ouaaal){\bf .}
([shift={(0:1.6cm)}]ouaaa.center) node [red] (ouaaar){\bf .}
([shift={(90.:2.45cm)}]o.center) node [red] (ouaaaa){\bf .}%up 4 levels
([shift={(180.:.6cm)}]ouaaaa.center) node [red] (ouaaaal){\bf .}
([shift={(0:.6cm)}]ouaaaa.center) node [red] (ouaaaar){\bf .}
([shift={(-90.:.6cm)}]o.center) node [red] (oda){\bf .}%down 1 level
([shift={(180.:.6cm)}]oda.center) node [red] (odal){\bf .}
([shift={(0:.6cm)}]oda.center) node [red] (odar){\bf .}
([shift={(180.:2.5cm)}]oda.center) node [red] (odall){\bf .}
([shift={(0:2.5cm)}]oda.center) node [red] (odarr){\bf .}
([shift={(-90.:1.6cm)}]o.center) node [red] (odaa){\bf .}%down 2 levels
([shift={(180.:2.12cm)}]odaa.center) node [red] (odaal){\bf .}
([shift={(0:2.12cm)}]odaa.center) node [red] (odaar){\bf .}
([shift={(-90.:2.1cm)}]o.center) node [red] (odaaa){\bf .}%down 3 levels
([shift={(180.:1.6cm)}]odaaa.center) node [red] (odaaal){\bf .}
([shift={(0:1.6cm)}]odaaa.center) node [red] (odaaar){\bf .}
([shift={(-90.:2.45cm)}]o.center) node [red] (odaaaa){\bf .}%down 4 levels
([shift={(180.:.6cm)}]odaaaa.center) node [red] (odaaaal){\bf .}
([shift={(0:.6cm)}]odaaaa.center) node [red] (odaaaar){\bf .}
;
}}}
\pic at (0,0) {crossa={1.4}{.4}};
\draw[line width=.1cm,red, fill=red!20!white, opacity=.5] (oual.center)
to [out=90,in=-20, looseness=1.] (ouaaal.center)
to [out=50,in=180, looseness=1.] (ouaaaal.center)
to [out=90,in=-150, looseness=1.] (t.center)
to [out=-30,in=90, looseness=1.] (ouaaaar.center)
to [out=0,in=130, looseness=1.] (ouaaar.center)
to [out=-160,in=90, looseness=1.] (ouar.center)
to [out=0,in=-110, looseness=1.] (ouaar.center)
to [out=-40,in=90, looseness=1.] (ouarr.center)
to [out=0,in=-240, looseness=1.] (or.center)
to [out=-120,in=0, looseness=1.] (odarr.center)
to [out=-90,in=40, looseness=1.] (odaar.center)
to [out=-250,in=0, looseness=1.] (odar.center)
to [out=-90,in=-200, looseness=1.] (odaaar.center)
to [out=-130,in=0, looseness=1.] (odaaaar.center)
to [out=-90,in=-330, looseness=1.] (b.center)
to [out=-220,in=-90, looseness=1.] (odaaaal.center)
to [out=-180,in=-50, looseness=1.] (odaaal.center)
to [out=-340,in=-90, looseness=1.] (odal.center)
to [out=180,in=70, looseness=1.] (odaal.center)
to [out=140,in=270, looseness=1.] (odall.center)
to [out=180,in=-60, looseness=1.] (ol.center)
to [out=60,in=180, looseness=1.] (ouall.center)
to [out=90,in=220, looseness=1.] (ouaal.center)
to [out=-70,in=180, looseness=1.] (oual.center)
-- cycle
;
\end{tikzpicture}
\end{frame}
\begin{frame}[t]
\frametitle{Coptic Cross}
\includegraphics[width=6.6cm,keepaspectratio]{./cross_coptic.jpg}
\newsavebox{\s}
\savebox{\s}{
\begin{tikzpicture}[scale=.9, transform shape]
\node [red] at (0,0) (o){}
([shift={(90.:3.4cm)}]o.center) node [red] (t){}
([shift={(90.:.6cm)}]o.center) node [red] (oua){}
([shift={(180.:.6cm)}]oua.center) node [red] (oual){}
([shift={(90.:2.1cm)}]o.center) node [red] (ouaaa){}
([shift={(180.:1.6cm)}]ouaaa.center) node [red] (ouaaal){}
([shift={(90.:2.45cm)}]o.center) node [red] (ouaaaa){}
([shift={(180.:.6cm)}]ouaaaa.center) node [red] (ouaaaal){}
;
\draw[line width=.1cm,red, fill=red!30!white, opacity=.6, rounded corners=.05cm] (oual.center)
to [out=90,in=-20, looseness=1.] (ouaaal.center)
to [out=50,in=180, looseness=1.] (ouaaaal.center)
to [out=90,in=-150, looseness=1.] (t.center)
to [out=-90,in=90, looseness=1.] (o.center)
to [out=180,in=0, looseness=1.] ([shift={(-90:.6)}]oual.center)
-- cycle
;
\end{tikzpicture}
}
\vskip -3.64cm
\hskip 1.56cm
\begin{tikzpicture}
\usebox{\s};
\end{tikzpicture}
\end{frame}
\end{document}

• Where does this figure come from? – Black Mild Dec 7 '19 at 15:32
• google searching – Hany Dec 7 '19 at 16:44

Code from my friend.

% Bui Quy
\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}[line join=round,line cap=round]
\def\edge{
(.5,.5)
to[out=90,in=-150] ++(1,2)
to[out=120,in=0] ++(-1,.5)
to[out=90,in=-30] ++(-.5,1)
to[out=-150,in=90] ++(-.5,-1)
to[out=180,in=60] ++(-1,-.5)
to[out=-30,in=90] ++(1,-2)
}

% Schrodinger's cat suggested this better code
\draw[fill=lime] (.5,.5)
foreach \i in {0,90,180,270} {[rotate=\i]--\edge}
--cycle;
\end{tikzpicture}
\end{document}

• You can simplify it to \draw[fill=lime] (.5,.5) foreach \i in {0,90,180,270}{[rotate=\i] --\edge} -- cycle;, which looks better because it is a continuous path, i.e. the line joins look good. – Schrödinger's cat Dec 7 '19 at 17:32
• @Schrödinger'scat : really better code! thank you! – Black Mild Dec 7 '19 at 17:40
• Thank you all very much – Hany Dec 8 '19 at 7:52

here is my proposition, I modified your drawing and deleted the nodes and replaced by a drawing, it allows to use the mark changes and transformations

\documentclass{article}

\usepackage{verbatim}
\usepackage{tikz}
\begin{document}

\newcommand{\crossq}{

\def\coef{1}
\path[blue,thick,fill=red!30] (0,0) coordinate(O)
-- (180:0.6) coordinate(oual)
to [out=90,in=-10] coordinate[pos=0.23] (a1)++(-1,2.1)coordinate(a2)
to[out=50,in=180] ++(1,0.3)
to[out=90,in=-150] ++ (0.6,1)
-- cycle;

\draw[blue,thick] (a1)
to [out=90,in=-10] (a2)
to[out=50,in=180] ++(1,0.3)
to[out=90,in=-150] ++ (0.6,1);

\path[purple,thick,fill=red!30] (0,0) coordinate(O)
-- (0:0.6) coordinate(oual)
to [out=90,in=190] coordinate[pos=0.23] (b1)++(1,2.1)coordinate(b2)
to[out=130,in=0] ++(-1,0.3)
to[out=90,in=-30] ++ (-0.6,1)
-- cycle
;

\draw[purple,thick,fill=red!30] (b1)
to [out=90,in=190] (b2)
to[out=130,in=0] ++(-1,0.3)
to[out=90,in=-30] ++ (-0.6,1)
;

}

\begin{tikzpicture}
\begin{scope}
\crossq

\end{scope}
\begin{scope}[rotate=90]
\crossq
\end{scope}
\begin{scope}[rotate=-90]
\crossq
\end{scope}
\begin{scope}[rotate=180]
\crossq
\end{scope}

\end{tikzpicture}

\end{document}


• @rpapaThank you very much – Hany Dec 8 '19 at 7:52