1

To produce the following drawing,

enter image description here

I used the following code from the answer to this question

\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{rounded corners solution 1}
\vskip -3.cm
\includegraphics[width=14.cm,keepaspectratio]{./rotat45.png}
\vskip -11.cm
\begin{tikzpicture}
\begin{scope}[transparency group,opacity=.4, scale=2]
\hskip 2.96cm
\draw[line width=.1cm,blue, fill=blue!40!white, looseness=1] 
(0,0) node {x} (0,-2) foreach \X in {0,90,180,270}
{[rotate=\X] -- (0,-2) to [out=0,in=-120] ++ (0.2,0.1) to [out=60,in=-150] ++ (1.7,1.7) to [out=30,in=-90] ++ (0.1,0.2)} -- cycle;
\end{scope}  
\end{tikzpicture}
\end{frame}
\end{document}

How can I produce a rotated drawing to get the following one. I would like also to rotate it several times, say 30 and 60 degrees.

enter image description here

Hany
  • 4,709

1 Answers1

2

If you repeat a drawing several times, it is advantageous to make it a pic. Then it suffices to say

\path pic {fcross} pic[rotate=30] {fcross} pic[rotate=60] {fcross};

or

\path foreach \Y in {0,30,60} {pic[rotate=\Y] {fcross}};

If you wanted to rotate the x node, too, you'd have to add transform shape.

\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{tikz}
\begin{document}
\begin{frame}[t]
\frametitle{rounded corners solution 1}
\begin{tikzpicture}[pics/fcross/.style={code={
\begin{scope}[transparency group,opacity=.4, scale=2]
\draw[line width=.1cm,blue, fill=blue!40!white, looseness=1] 
(0,0) node {x} (0,-2) foreach \X in {0,90,180,270}
{[rotate=\X] -- (0,-2) to [out=0,in=-120] ++ (0.2,0.1) to [out=60,in=-150] ++ (1.7,1.7) to [out=30,in=-90] ++ (0.1,0.2)} -- cycle;
\end{scope}  
}}]
 \path pic {fcross} pic[rotate=30] {fcross} pic[rotate=60] {fcross};
\end{tikzpicture}
\end{frame}
\end{document}

enter image description here