我想为一些幻灯片创建一个小图像,以表彰团队的贡献。我希望一组图像围绕一个圆形路径排列,并且每个图像也显示为圆形。我该如何实现这样的效果?
粗略地说,我正在寻找这样的东西:
感觉 TikZ 可以以某种方式用于此,但我不知道从哪里开始。
答案1
其他答案中有很多笑脸图画,但如果需要团队成员的外部图像,那么可以使用/改编以下内容:
\documentclass[tikz,border=5]{standalone}
\tikzset{%
image 1/.initial=example-image,
image 2/.initial=example-image-a,
image 3/.initial=example-image-b,
image 4/.initial=example-image-c,
image 5/.initial=example-image-golden,
image 6/.initial=example-grid-100x100pt,
path image/.style={path picture={%
\edef\imagename{\pgfkeysvalueof{/tikz/image #1}}%
\node at (path picture bounding box.center)
{\includegraphics[height=1cm]{\imagename}};
}}
}
\begin{document}
\tikz\foreach \i in {1,...,6}
\draw [path image=\i] (\i*60+30:2) circle [radius=0.5cm];
\end{document}
答案2
使用 TikZ 可以轻松完成此操作pic
:
代码:
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\definecolor{myblue}{RGB}{24,97,170}
\newlength\Radius
\begin{document}
\begin{tikzpicture}[
hface/.pic={
\fill[myblue]
(0,0) circle [radius=\Radius];
\fill[white]
(0,0) circle [radius=0.85\Radius];
\fill[myblue]
(0,0) circle [radius=0.75\Radius];
\fill[white]
(-0.3\Radius,0.3\Radius) circle [radius=0.125\Radius];
\fill[white]
(0.3\Radius,0.3\Radius) circle [radius=0.125\Radius];
\draw[white,line width=0.125\Radius]
(-0.35\Radius,-0.3\Radius) arc [start angle=210,end angle=330,radius=0.4\Radius];
}
]
\setlength\Radius{1cm}
\foreach \Angle in {30,90,150,210,270,330}
\pic at (\Angle:4cm) {hface};
\end{tikzpicture}
\end{document}
使用极坐标系在圆上进行放置:
\foreach \Angle in {30,90,150,210,270,330}
\pic at (\Angle:4cm) {hface};
其中沿着 给出的方向(\Angle:4cm)
远离。4cm
\Angle
答案3
\documentclass[pstricks,margin=1cm]{standalone}
\usepackage{multido}
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\multido{\i=0+60}{6}{%
\rput(!3.5 \i\space 30 add PtoC){%
\pscircle*[linecolor=blue]{1.5}%
\psset{linecolor=white,linewidth=4pt}%
\pscircle{1.3}%
\pscircle*(.7;60){4pt}%
\pscircle*(.7;120){4pt}%
\psarc(0,0){.7}{220}{320}%
}}
\end{pspicture}
\end{document}
答案4
\documentclass{article}
\usepackage{stackengine,wasysym}
\def\usestackanchor{T}%
\usepackage{ifthen}
\usepackage{fp}
\usepackage{graphicx}
\newcounter{index}
\def\startangle{30}
\def\dtheta{60}% degrees per symbol
\def\dR{3.5}% radius of circle in ex's
\def\dotsize{1}% size of dots relative to \mygraphic
\def\charwidth{3}% overall characterwidth in circle radii
\def\mygraphic{\smiley}
\newlength\dRlen
\setlength\dRlen{\dR ex}
\newcommand\dotcircle{%
\def\basechar{\strut%
\rule[\dimexpr.5\ht\strutbox-.5\dimexpr\charwidth\dRlen]{0pt}%
{\charwidth\dRlen}\rule{\charwidth\dRlen}{0pt}}%
\savestack{\dotcirclegr}{\basechar}%
\setcounter{index}{\startangle}%
\whiledo{\theindex<360}{%
\FPdiv\thetaRad{\theindex}{57.29578}%
\FPcos\dx{\thetaRad}%
\FPmul\dx{\dR}{\dx}%
\FPsin\dy{\thetaRad}%
\FPmul\dy{\dR}{\dy}%
\savestack{\dotcirclegr}{\stackinset{c}{}{c}{\dy ex}{%
\kern\dx ex\kern\dx ex\scalebox{\dotsize}{\mygraphic}}{\dotcirclegr}}%
\addtocounter{index}{\dtheta}%
}\dotcirclegr}
\begin{document}
X\dotcircle Y
\def\startangle{0}%
\def\dtheta{30}% degrees per symbol
\def\dR{6.5}% radius of circle in ex's
\def\dotsize{1.4}% size of dots relative to \mygraphic
\def\charwidth{4.5}% overall characterwidth in circle radii
\def\mygraphic{\smiley}%
\dotcircle
\end{document}