1

I have an image (in this case, a colorized predefined one) that I would like to display in a circular fashion about a fixed point and specified radius.

Consider the minimal (nonworking) example which produces the image to be displayed, but not the circular display I would like to produce:

\documentclass{book}
\usepackage{xcolor,graphicx}
\usepackage{transparent}
\usepackage{tikz}

\begin{document}
\begin{center}
\includegraphics[width=4em,height=5em]{example-image}\llap{\texttransparent{0.5}{\color{green}\rule{4em}{5em}}}
\end{center}

\vspace*{35pt}

\begin{center}
\begin{tikzpicture}
\fill[blue!65] rectangle (8,6);
\foreach \k in {0,30,...,360}
{\includegraphics[width=.2em]{example-image-b}{($(4,3)+(\k:2$)}}
\end{tikzpicture}
\end{center}
\end{document}

with the output

enter image description here

The compilation of the code (using pdflatex) does not give an error, but as you can see that the blue image does not contain a circular display of green images.

QUESTION: How may the code be modified in order to generate a circular display of the green images, say, at center (4,3), with radius 2, and with the image reoccurring at 30 degree intervals? (I have specified an image width of .2em, but that may have to be adjusted after viewing the first successful display.)

Thank you.

1 Answer 1

2

I don't know exactly what kind of image you want to display but you may do it by inserting it in a node and place all those nodes with your foreach loop. Don't forget to load the calc library.

circular display

\documentclass{book}
\usepackage{xcolor,graphicx}
\usepackage{transparent}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\begin{center}
\includegraphics[width=4em,height=5em]{example-image}\llap{\texttransparent{0.5}{\color{green}\rule{4em}{5em}}}
\end{center}

\vspace*{35pt}

\begin{center}
\begin{tikzpicture}
\fill[blue!65] rectangle (8,6);
\foreach \k in {0,30,...,360}
    \node at ($(4,3)+(\k:2)$) {\includegraphics[width=.2em]{example-image-b}};
\end{tikzpicture}
\end{center}
\end{document}

Is it what you're looking for?

1
  • Yes. Thank you.
    – DDS
    Commented May 17, 2022 at 12:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .