0

From the answer to this question, I used the following code to draw a quadrant of a cross:

\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{verbatim}
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{}
\includegraphics[width=6.6cm,keepaspectratio]{./cross_coptic.jpg}
\vskip -6.5cm
\hskip .04cm
\begin{tikzpicture}[scale=.9, transform shape]
\node [red] at (0,0) (o){\bf .}%do not insert empty lines inbetween
([shift={(90.:3.4cm)}]o.center) node [red] (t){\bf .}%topmost
([shift={(180.:3.38cm)}]o.center) node [red] (ol){\bf .}
([shift={(90.:.6cm)}]o.center) node [red] (oua){\bf .}%up 1 level
([shift={(180.:.6cm)}]oua.center) node [red] (oual){\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={(90.:2.45cm)}]o.center) node [red] (ouaaaa){\bf .}%up 4 levels
([shift={(180.:.6cm)}]ouaaaa.center) node [red] (ouaaaal){\bf .}
;
\draw[line width=.1cm,red, fill=red!20!white] (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}
\end{frame}
\end{document}

enter image description here

enter image description here

Is it possible to omit drawing the outline present inside the cross (connecting nodes t -- o -- shift={(-90:.6)}]oual -- oual), keeping filling the quadrant?

Anderson
  • 317
Hany
  • 4,709
  • You got so much shorter codes in the answers to your previous question. What prevents you from using one of those? Then the answer will also very likely be short, elegant and concise. Having said this, you can always omit something by using \clip. –  Dec 08 '19 at 17:09
  • @ Schrödinger's cat I appreciate very much and use your answer to my previous question. I just would like to know how to omit drawing a part of the outline, and I am using this drawing as an example. Can you tell me how to use \clip. Thank you. – Hany Dec 09 '19 at 04:22
  • 2
    You can use \path[fill=red!20!white] (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; \draw[line width=.1cm,red] (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) ; –  Dec 09 '19 at 04:31
  • 1
    I think that one reason why your question has not yet gotten a lot of attention (and votes) is that many users may not be able to compile it because they do not have the figure needed for \includegraphics[width=6.6cm,keepaspectratio]{./cross_coptic.jpg}. Another reason may be that users may wonder why you are not using any of the answers of you previous question, and do not see the purpose of all these nodes with content \bf ..Why don't you just use coordinates for those? –  Dec 09 '19 at 04:39
  • @Schrödinger's cat Thank you for your clipping method to answer my question. I use the nodes (with content \bf .) for aligning reasons during the trials of my drawing. I did not use includegraphic in this question because it is irrelevant for its purpose. What do you mean by using coordinate s? Again thank you very much for your time and efforts answering both of my questions – Hany Dec 09 '19 at 07:14
  • @Schrödinger's cat I added a link to your modification of Black Mild`s answer to my previous question, just in case someone wondered about the points you raised. – Hany Dec 09 '19 at 07:20
  • What I meant is to use ([shift={(90.:3.4cm)}]o.center) coordinate (t) instead of ([shift={(90.:3.4cm)}]o.center) node [red] (t){\bf .}. And I suggest to remove \includegraphics[width=6.6cm,keepaspectratio]{./cross_coptic.jpg} \vskip -6.5cm \hskip .04cm from your code. –  Dec 09 '19 at 13:47
  • @Schrödinger's cat Thank you very much for your time and effort. – Hany Dec 09 '19 at 15:24
  • You can not expect people to kno what "(connecting nodes t -- o -- shift={(-90:.6)}]oual -- oual)" means. I am suggesting to delete this old question as it is seemingly dead and filled with confusion. – hpekristiansen Jan 18 '24 at 12:36
  • @hpekristiansen I think the question is clear and answerable - it has a compilable MWE and screenshots of the current output and the desired output. Voting to leave open. – Marijn Jan 18 '24 at 12:55
  • @Marijn: Picture of the desired output!? You are probably right. – hpekristiansen Jan 18 '24 at 13:42

2 Answers2

1
\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{spath3}
\begin{document}
\begin{tikzpicture}
\path[spath/save=apath] (-1,1) -- (-1,2) to[out=100, in=-20] (-2.6,3.4) to[out=45, in=180] (-1,4.2) to[out=90, in=210] (0,5.6);
\draw[line width=6pt] 
[spath/use={apath}]
[spath/use={apath, move, weld, transform={xscale=-1, rotate=0}, reverse}]
[spath/use={apath, move, weld, transform={scale=-1, rotate=90}}]
[spath/use={apath, move, weld, transform={xscale=-1, rotate=90}, reverse}]
[spath/use={apath, move, weld, transform={scale=-1, rotate=0}}]
[spath/use={apath, move, weld, transform={yscale=-1, rotate=0}, reverse}]
[spath/use={apath, move, weld, transform={scale=-1, rotate=-90}}]
[spath/use={apath, move, weld, transform={xscale=-1, rotate=-90}, reverse}]
-- cycle;
\fill[red!20] (0,0) -- (-1,0) [spath/use={apath, weld}] --cycle;
\draw[red, line width=6pt] [spath/use={apath}];
\end{tikzpicture}
\end{document}

Cross symbol with a quarter filled pink

0

Note sure of what you want to do exactly, but you can remove the line drawn while keeping the background fill by replacing \draw by \fill, as below:

\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{verbatim}
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{}
%\includegraphics[width=6.6cm,keepaspectratio]{./cross_coptic.jpg}
%\vskip -6.5cm
%\hskip .04cm
\begin{tikzpicture}[scale=.9, transform shape]
\node at (0,0) (o){}%do not insert empty lines inbetween
([shift={(90.:3.4cm)}]o.center) node (t){}%topmost
([shift={(180.:3.38cm)}]o.center) node (ol){}
([shift={(90.:.6cm)}]o.center) node (oua){}%up 1 level
([shift={(180.:.6cm)}]oua.center) node  (oual){}
([shift={(90.:2.1cm)}]o.center) node (ouaaa){}%up 3 levels
([shift={(180.:1.6cm)}]ouaaa.center) node (ouaaal){}
([shift={(90.:2.45cm)}]o.center) node (ouaaaa){}%up 4 levels
([shift={(180.:.6cm)}]ouaaaa.center) node (ouaaaal){}
;
\fill[red!20!white] (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}
\end{frame}
\end{document}

Notice that I commented out the included figure since I don't have cross_coptic.jpg. You can uncomment lines 8 to 10.

jchd
  • 533
  • Thank you for your suggestion; but as I mentioned, I would like to omit only the lines (connecting nodes t -- o -- shift={(-90:.6)}]oual -- oual) keeping the other lines (connecting oual -- ouaaal -- ouaaaal -- t) visible. – Hany Dec 08 '19 at 16:19