创建猎鹰徽标

创建猎鹰徽标

我一直在尝试为我的团队复制这个标志(当然更不用说了LaTeX:-)):

在此处输入图片描述

我现在的情况是:

\documentclass[11pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}% loads also tikz
\pgfplotsset{compat=newest}% to avoid the pgfplots warning
\usetikzlibrary{intersections, pgfplots.fillbetween}
%https://tex.stackexchange.com/questions/58702/creating-gears-in-tikz
% #1 number of teeths
% #2 radius intern
% #3 radius extern
% #4 angle from start to end of the first arc
% #5 angle to decale the second arc from the first 

\newcommand{\gear}[5]{%
    \foreach \i in {1,...,#1} {%
        [rotate=(\i-1)*360/#1]  (0:#2)  arc (0:#4:#2) {
            -- (#4+#5:#3)  arc (#4+#5:360/#1-#5:#3)} --  (360/#1:#2)
}}  
%https://tex.stackexchange.com/questions/48662/tikz-or-xcolor-lighten-color
\colorlet{MyColorOne}{blue!60}

\newcommand{\lightercolor}[3]{% Reference Color, Percentage, New Color Name
    \colorlet{#3}{#1!#2!white}
}

\newcommand{\darkercolor}[3]{% Reference Color, Percentage, New Color Name
    \colorlet{#3}{#1!#2!black}
}


\lightercolor{MyColorOne}{50}{MyColorOneLight}
\darkercolor{MyColorOne}{50}{MyColorOneDark}
%https://tex.stackexchange.com/questions/255234/how-does-one-pick-control-points-to-control-b%C3%A9zier-curves-in-tikz
\newcommand\DrawControl[3]{
    node[#2,circle,fill=#2,inner sep=2pt,label={above:$#1$},label={[black]below:{\footnotesize#3}}] at #1 {}
}
%https://tex.stackexchange.com/questions/66490/drawing-a-tikz-arc-specifying-the-center/218814
\tikzset{
    pics/carc/.style args={#1:#2:#3}{
        code={
            \draw[pic actions] (#1:#3) arc(#1:#2:#3);
        }
    }
}
\begin{document}
    \begin{tikzpicture}
    %\draw[help lines, step=.1] (-3,-3) grid (3,3);
    \draw[help lines] (-3,-3) grid (3,3);
    \draw[name path = a,thick] \gear{9}{2}{2.8}{15}{6};
    \draw[name path = b, black,fill=black] (0,0) circle (1.65cm);
    \draw[name path = c, white] (0,0) circle (1.7cm);
    \tikzfillbetween[of=a and c]{MyColorOneDark};
    \tikzfillbetween[of=b and c]{white};
    \draw[black,fill=black] (0,0) circle (1.65cm);
    \draw[white] (0,0) circle (1.7cm);
    \draw[ultra thick,white] 
    (1,-1.34) 
    .. controls (1,-0.65) and (-1.4,0.4) .. 
    %to
    (-1,-0.6);
    \draw[ultra thick,white] 
    (-1,-0.6) 
    .. controls (-1.3,0.3) .. 
    (0.75,0.75);% \DrawControl{(4,2)}{blue}{}; %\DrawControl{(3,2)}{blue}{1}\DrawControl{(5,2)}{blue}{2};   
    \draw[ultra thick,white] 
    (0,0.58) 
    .. controls (0.3,1) .. 
    (1.3,1.05);
    \draw[ultra thick, white] (0.535,0.66) pic{carc=20:-150:0.2};
    \end{tikzpicture}  
\end{document}

这给了我:

在此处输入图片描述

话虽如此,相对于原始数据,我面临的挑战有三方面:

1. 我无法将齿轮和第一个白色圆圈之间的蓝色匹配起来。 [按照 Phelype Oleinik 的建议进行]

  1. 我无法在我的人物牙齿区域复制桶形(与原件相比)。

  2. 最后,当然,我使用了很多与此问题相关的其他答案的帮助(尤其是@Gonzalo 的贝塞尔技巧)。但我仍然无法顺利完成我的 Falcon。

非常感谢大家的帮助和建议。不过,我非常欢迎大家对我的代码进行任何优化。

答案1

我总是被猎鹰吓到。它们会追捕我们!(to[in=...,out=...]一只猎鹰可以做很多事情,如果一只in猎鹰和另一只猎鹰out相差 180 度,那就没有问题了。)

\documentclass[11pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}% loads also tikz
\pgfplotsset{compat=newest}% to avoid the pgfplots warning
\usetikzlibrary{intersections, pgfplots.fillbetween}
%https://tex.stackexchange.com/questions/58702/creating-gears-in-tikz
% #1 number of teeths
% #2 radius intern
% #3 radius extern
% #4 angle from start to end of the first arc
% #5 angle to decale the second arc from the first 

% Max' comment
\newcommand{\gear}[5]{ \foreach \i in {1,...,#1} { [rotate=(\i-1)*360/#1] (0:#2) arc (0:#4:#2) .. controls (#4:1.1*#2) and (#4+#5/2:0.95*#3) .. (#4+#5:#3) arc (#4+#5:360/#1-#5:#3) .. controls (360/#1-#5/2:0.95*#3) and (360/#1:1.1*#2) .. (360/#1:#2) }}

\colorlet{MyColorOne}{blue!60}

\newcommand{\lightercolor}[3]{% Reference Color, Percentage, New Color Name
    \colorlet{#3}{#1!#2!white}
}

\newcommand{\darkercolor}[3]{% Reference Color, Percentage, New Color Name
    \colorlet{#3}{#1!#2!black}
}


\lightercolor{MyColorOne}{50}{MyColorOneLight}
\darkercolor{MyColorOne}{50}{MyColorOneDark}
%https://tex.stackexchange.com/questions/255234/how-does-one-pick-control-points-to-control-b%C3%A9zier-curves-in-tikz
\newcommand\DrawControl[3]{
    node[#2,circle,fill=#2,inner sep=2pt,label={above:$#1$},label={[black]below:{\footnotesize#3}}] at #1 {}
}
%https://tex.stackexchange.com/questions/66490/drawing-a-tikz-arc-specifying-the-center/218814
\tikzset{
    pics/carc/.style args={#1:#2:#3}{
        code={
            \draw[pic actions] (#1:#3) arc(#1:#2:#3);
        }
    }
}
\begin{document}
    \begin{tikzpicture}
    %\draw[help lines, step=.1] (-3,-3) grid (3,3);
    \draw[help lines] (-3,-3) grid (3,3);
    \draw[name path = a,thick] \gear{10}{2}{2.8}{15}{6};
    \draw[name path = b, black,fill=black] (0,0) circle (1.65cm);
    \draw[name path = c, white] (0,0) circle (1.7cm);
    \tikzfillbetween[of=a and c]{MyColorOneDark};
    \tikzfillbetween[of=b and c]{white};
    \draw[black,fill=black] (0,0) circle (1.65cm);
    \draw[white] (0,0) circle (1.7cm);
    \draw[ultra thick,white,line join=bevel] 
        (-52:1.67) to[out=100,in=-10]  (0,-0.5)
        to[out=170,in=20] (-0.7,-0.55)
        to[out=200,in=80,looseness=0.8] (-0.8,-0.85)
        to[out=120,in=-160,looseness=1.2] (-0.2,0.5)
        to[out=20,in=-170,looseness=1.2] (0.75,0.7)
        to[out=-70,in=-60,looseness=1.3] (0.3,0.4);
    \draw[ultra thick,white] 
    (-0.2,0.5) to[out=45,in=180] (0.5,1) to[out=0,in=170] (32:1.68);
    \end{tikzpicture}  
\end{document}

在此处输入图片描述

更新:实施了 Max 对齿轮齿的建议,并改变了猎鹰的齿。(那些想反对猎鹰没有牙齿的人:这里有一个反例。;-)

附录:原始喙,并去除了不使用的东西。

\documentclass[11pt]{standalone}
\usepackage{pgfplots}% loads also tikz
\pgfplotsset{compat=newest}% to avoid the pgfplots warning
\usetikzlibrary{pgfplots.fillbetween}
%https://tex.stackexchange.com/questions/58702/creating-gears-in-tikz
% #1 number of teeths
% #2 radius intern
% #3 radius extern
% #4 angle from start to end of the first arc
% #5 angle to decale the second arc from the first 

% Max' comment
\newcommand{\gear}[5]{ \foreach \i in {1,...,#1} { [rotate=(\i-1)*360/#1] (0:#2) arc (0:#4:#2) .. controls (#4:1.1*#2) and (#4+#5/2:0.95*#3) .. (#4+#5:#3) arc (#4+#5:360/#1-#5:#3) .. controls (360/#1-#5/2:0.95*#3) and (360/#1:1.1*#2) .. (360/#1:#2) }}

\colorlet{MyColorOne}{blue!60}

\newcommand{\lightercolor}[3]{% Reference Color, Percentage, New Color Name
    \colorlet{#3}{#1!#2!white}
}

\newcommand{\darkercolor}[3]{% Reference Color, Percentage, New Color Name
    \colorlet{#3}{#1!#2!black}
}


%\lightercolor{MyColorOne}{50}{MyColorOneLight}
\darkercolor{MyColorOne}{50}{MyColorOneDark}
%https://tex.stackexchange.com/questions/255234/how-does-one-pick-control-points-to-control-b%C3%A9zier-curves-in-tikz
\begin{document}
    \begin{tikzpicture}
    %\draw[help lines, step=.1] (-3,-3) grid (3,3);
    \draw[help lines] (-3,-3) grid (3,3);
    \draw[name path = a,thick] \gear{10}{2}{2.8}{15}{6};
    \draw[name path = b, black,fill=black] (0,0) circle (1.65cm);
    \draw[name path = c, white] (0,0) circle (1.7cm);
    \tikzfillbetween[of=a and c]{MyColorOneDark};
    \tikzfillbetween[of=b and c]{white};
    \draw[black,fill=black] (0,0) circle (1.65cm);
    \draw[white] (0,0) circle (1.7cm);
    \draw[ultra thick,white] 
        (-52:1.7) to[out=100,in=-10]  (0,-0.5)
        to[out=170,in=10] (-0.7,-0.55)
        to[out=170,in=80] (-0.8,-0.85)
        to[out=120,in=-160,looseness=1.2] (-0.2,0.5)
        to[out=20,in=-170,looseness=1.2] (0.75,0.7)
        to[out=-70,in=-60,looseness=1.3] (0.3,0.4);
%     \draw[ultra thick,white,line join=bevel] 
%         (-52:1.67) to[out=100,in=-10]  (0,-0.5)
%         to[out=170,in=20] (-0.7,-0.55)
%         to[out=200,in=80,looseness=0.8] (-0.8,-0.85)
%         to[out=120,in=-160,looseness=1.2] (-0.2,0.5)
%         to[out=20,in=-170,looseness=1.2] (0.75,0.7)
%         to[out=-70,in=-60,looseness=1.3] (0.3,0.4);
    \draw[ultra thick,white] 
    (-0.2,0.5) to[out=45,in=180] (0.5,1) to[out=0,in=170] (32:1.68);
    \end{tikzpicture}  
\end{document}

在此处输入图片描述

相关内容