I have been trying to trying to replicate this logo for my team (not to mention in LaTeX
ofcourse:-)):
So where I am now:
\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}
which gives me:
Having said that, with respect to the original figure, the challenges that I face are three-fold:
1. I am not able to match the blue color between the gears and the first white circle. [worked as per Phelype Oleinik suggestion]
I am not able to replicate the barrel shape in the teeth region of my figure (compared to original).
Finally, ofcourse, I used a lot of helps from other answers that are linked to this question (especially, @Gonzalo's Bézier trick). But still I am not able to get the smooth finishing of my Falcon.
All helps and suggestions are appreciated. Nevertheless, any optimisations of my code is more than welcome.
#253F83
:)\darkercolor
command. Try\definecolor{MyColorOneDark}{HTML}{253F83}
without the\darkercolor
thingy. To get the color I usedgpick
, but are lots of other colour pickers as well.