# How to create this diagram with Tikz? [duplicate]

This question already has an answer here:

I'm fairly familiar with using Tikz. I've used it to make simple logos before. Now, I'd like to create this diagram, which is a little more complicated:

Does anyone have any advice on what the best way to do this would be?

I'm aware that it's very easy to use the image file in my output (\includegraphics). However, I'd like to make it in Tikz if possible, for infinite scalability.

BTW, the blue is #080f6a.

## marked as duplicate by Phelype Oleinik, Marcel Krüger, J Leon V., Andrew, Alan MunnAug 23 '18 at 13:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• When you really want that to have in TikZ you can actually let e.g inkscape to redraw the logo and produce a TikZ output. – current_user Aug 21 '18 at 12:03
• In addition to current_user's comment, you would get the same scalability with any vector graphics format/software. – BambOo Aug 21 '18 at 12:10
• In addition to the methods described above, since this picture has just two colors you may convert it to the pnm format, from there with potrace to eps, which will make it a vector graphics, i.e. scalable, and then to pdf. I just tried that out and this also gives a very smooth and of course scalable picture. – marmot Aug 21 '18 at 15:26
• @Sebastiano Somehow I don't feel that that is a good duplicate. The question you link is about turning pictures of math formulae into TeX code. This question on the other hand asks to convert a bitmap image to TikZ (or at least a vector format). – moewe Aug 22 '18 at 4:25
• Welcome to TeX.SX! The short answer is that, yes, this is possible but I have to warn you that questions of the form "Please draw this for me" that show no effort on the part of OP, often don't get answered. You will get more help if you post some code showing what you have tried and give a minimal working example. A quick search on TeX.SX for drawing functions (with tikz or pstricks) will give you an idea of where to start from. – Andrew Aug 22 '18 at 11:57

## 1 Answer

My attempt using TikzEdt, a very useful tool for copy a figure.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\definecolor{figBlue}{HTML}{080f6a}
\begin{document}
\begin{tikzpicture}[scale=0.4]
%frame
\filldraw [draw=figBlue,line width=9pt,fill=white](-12.5,-9.9) .. controls (-1.1,-14.3)
and (0,-14.3) .. (0,-15.3) [rounded corners] .. controls (0,-14.3)
and (1.1,-14.3) .. (12.5,-9.9)[sharp corners]-- (12.5,15.2) -- (-12.5,15.2)[rounded corners]  -- cycle;
\path[tips,-{Computer Modern Rightarrow[figBlue,length=6ex,line width=1.5ex,sharp]}](0,0) to (0,-16.4);
%blue background circle
\fill[figBlue]  (0,1.7) circle (9.6);
%sun
\fill[white]  (0,7.4) circle (1.2);
%moon
\fill[white] (3.3,7.4) circle (1.3);
\fill [figBlue](3.7,8) circle (1.3);
%tail
\draw[white,line width=4.4pt,line cap=round]
(5.3,2.5)                  .. controls (5.6,2.7)
and (5.9,3)   .. (6,3.4)   .. controls (6,3.9)
and (5.8,4.1) .. (5.4,4.3) .. controls (5.1,4.4)
and (4.6,4.4) .. (4.1,4.3) .. controls (3.6,4.2)
and (3,4)     .. (2.5,3.9) .. controls (1.9,3.8)
and (1.4,3.8) .. (0.9,3.8) .. controls (0.6,3.8)
and (0.4,3.9) .. (0.1,4);
%body
\fill[white,thick]
(-5,-4.7) --  (-4.6,-4.3)
--  (-3.4,-0.1) .. controls (-3,2)
and (-3.9,3.6) .. (-4.3,4.8) .. controls (-4.4,5.4)
and (-4.9,5.2) .. (-5.1,5.1) .. controls (-5.2,5.1)
and (-5.3,5.1) .. (-5.4,5.2) .. controls (-5.4,5.3)
and (-5.3,5.3) .. (-5.2,5.4) .. controls (-5.2,5.4)
and (-5.1,5.5) .. (-5.2,5.5) .. controls (-5.3,5.5)
and (-5.6,5.6) .. (-5.7,5.6) .. controls (-5.8,5.7)
and (-5.6,5.8) .. (-5.5,5.9) .. controls (-5.4,6)
and (-4.7,6.2) .. (-4.5,6.3) .. controls (-4.4,6.5)
and (-4.6,6.6) .. (-4.7,6.8) .. controls (-4.7,7.3)
and (-4.3,7.7) .. (-4.2,7.9) .. controls (-4.2,7.5)
and (-4.3,7.1) .. (-4.2,6.6) .. controls (-4.1,6.5)
and (-3.9,6.5) .. (-3.7,6.5) .. controls (-3.4,7)
and (-3.6,7.4) .. (-3.6,7.6) .. controls (-3.6,7.8)
and (-3.5,7.9) .. (-3.3,7.6) .. controls (-3.2,7.4)
and (-3,7.1) ..   (-3.1,6.6) .. controls (-3.3,6.4)
and (-3,6.7) ..   (-3.4,6.3) .. controls (-3.5,6.2)
and (-3.4,6) ..   (-3.1,4.9) .. controls (-3,4.5)
and (-2.6,2.9) .. (-1.9,2.5) .. controls (-1.3,2.2)
and (-0.7,2.4) .. (0.5,2.6)  .. controls (1.4,2.8)
and (2.8,3) ..    (3.6,3)    .. controls (4.2,3)
and (5.3,3) ..    (5.5,2.3)  .. controls (5.7,1.6)
and (5.5,1.3) ..  (5,0.8)    .. controls (4.8,0.7)
and (4.8,0.5) ..  (4.8,0.2)
-- (5.3,-4.1) --  (5.4,-4.4)
-- (4.7,-4.4) --  (5,-4.1)
-- (4.2,-0.3) --  (2.9,-4.1)
-- (2.9,-4.4) --  (2.2,-4.4)
-- (2.5,-4.1) --  (3.5,-0.4) .. controls (3.6,-0.1)
and (3.6,0.1) ..  (3.6,0.5)  .. controls (3.6,1.3)
and (2.5,0.9) ..  (2,0.8)    .. controls (1,0.5)
and (-0.2,-0.1) ..(-2,0.2)
-- (-1.2,-4.7) -- (-1.5,-4.7)
-- (-1.9,-4.7) -- (-1.6,-4.4)
-- (-2.7,-0.2) -- (-4.3,-4.3)
-- (-4.3,-4.7) -- cycle;
\end{tikzpicture}
\end{document}


How I do this? I have import the figure in TikzEdt using \node {\includegraphics{figure}}; and then I have copy the figure using the tools of TikzEdt. Obviously you should know pgf/TikZ for adjust the figure for the final result. For example in this figure I have added an arrow tip at the bottom of the frame.

• Can you explain how you used TikzEdt to make this copy? – AndréC Aug 23 '18 at 13:33
• @AndréC You must import the figure in TikzEdt using \node {\includegraphics{figure}}; and then copy the figure using the tools of TikzEdt. Obviously you should know pgf/TikZ for adjust the figure for the final result. For example in this figure I have add an arrow tip at the bottom of the frame. – vi pa Aug 23 '18 at 13:47
• Thank you. Can you update your answer with these explanations? – AndréC Aug 23 '18 at 14:05