I'm writing a manual for a class, and I never liked add images as files in my tex, so I'm drawning the logo with this code:

\clip(-4.42,-1.90) rectangle (8.03,4.69);
\draw [color=red,fill=red,fill opacity=1.0] (-0.67,1.06) circle (2.41cm);
\draw [color=white,fill=white,fill opacity=1.0] (-0.66,1.71) circle (1.92cm);
\draw [shift={(-0.05,2.21)},color=red]  plot[domain=2.01:4.03,variable=\t]({1.*1.40*cos(\t r)+0.*1.40*sin(\t r)},{0.*1.40*cos(\t r)+1.*1.40*sin(\t r)});
\draw [shift={(-1.60,0.27)},color=red]  plot[domain=-0.48:0.92,variable=\t]({1.*1.08*cos(\t r)+0.*1.08*sin(\t r)},{0.*1.08*cos(\t r)+1.*1.08*sin(\t r)});
\draw [shift={(-1.26,1.06)},color=red]  plot[domain=-1.12:0.68,variable=\t]({1.*1.43*cos(\t r)+0.*1.43*sin(\t r)},{0.*1.43*cos(\t r)+1.*1.43*sin(\t r)});
\draw [shift={(0.42,3.0)},color=red] plot[domain=2.72:4.22,variable=\t]({1.*1.18*cos(\t r)+0.*1.18*sin(\t r)},{0.*1.18*cos(\t r)+1.*1.18*sin(\t r)});

which gives me this image enter image description here

How can I color red the thing in middle?

  • I'm trying with more coordinates, is there any simple way to get the coordinates? – Luis Felipe Jan 6 '16 at 18:19
  • 2
    Plotting seems an overkill: try with a couple of arc actions! – Bordaigorl Jan 6 '16 at 18:20
  • I'm bad with 'arc' cause I can't find correct angles or this is something like trying until get it? – Luis Felipe Jan 6 '16 at 18:21
  • I would draw the shape on paper and deconstruct it in few geometric shapes (e.g. four arcs here) and try to manually estimate the coordinates/angles (better if with values that make geometric sense). Another option is drawing the arcs with inkscape and then exporting to tikz. – Bordaigorl Jan 6 '16 at 18:32
  • @Bordaigorl I've improved the question, thanks – Luis Felipe Jan 6 '16 at 18:53

I think the part in the middle is easier to draw using the curve to construction than .. controls ... At least, for me, though I have only recently started to have any clue about the latter so it might just be my lack of experience.

Anyway, this is very close although it is not an absolutely perfect match. (But the faint red line tracing the top of the circle is a viewer artefact, I think, and not an imperfection in construction. But the bit in the middle is not an entirely perfect match.)

  \clip (-.67,1.06) circle (24.1mm);
  \path [fill=red, even odd rule] (-.67,1.06) coordinate (c1) circle (24.1mm) ++(.01,.65) coordinate (c2) circle (19.2mm);
  \draw [draw=red, fill=red] (c2) +(.05,-19.2mm) [out=25, in=-45] to (-.15,1.95) [out=150, in=-125] to ($(c1) + (.05,24.1mm)$) coordinate (a) [out=-155, in=90] to (-1.45,2.2) [out=-90, in=135] to ++(.51,-1.05) [out=-45, in=70] to cycle;



Simply changing the sixth line as suggested in Luis Felipe's comment to

  \path [fill=red, even odd rule] (-.67,1.08) coordinate (c1) circle (24.1mm) ++(.01,.65) coordinate (c2) circle (19.2mm);

eliminates the faint trace of red line but at the cost of cutting off the tip of the inner part of the logo:

cut off tip

However, if we set the coordinate used for the inner part before making the adjustment, perhaps we can get the best of both worlds:

  \path [fill=red, even odd rule] (-.67,1.06) coordinate (c1) ++(0,0.02) circle (24.1mm) ++(.01,.65) coordinate (c2) circle (19.2mm);

best of both?

  \clip (-.67,1.06) circle (24.1mm);
  % tweak based on Luis Felipe's comment: ref: https://tex.stackexchange.com/questions/286335/problem-giving-color-to-a-logo/286392?noredirect=1#comment692032_286392
  \path [fill=red, even odd rule] (-.67,1.06) coordinate (c1) ++(0,0.02) circle (24.1mm) ++(.01,.65) coordinate (c2) circle (19.2mm);
  \draw [draw=red, fill=red] (c2) +(.05,-19.2mm) [out=25, in=-45] to (-.15,1.95) [out=150, in=-125] to ($(c1) + (.05,24.1mm)$) coordinate (a) [out=-155, in=90] to (-1.45,2.2) [out=-90, in=135] to ++(.51,-1.05) [out=-45, in=70] to cycle;
| improve this answer | |
  • it is solved with \path [fill=red, even odd rule] (-.67,1.08) coordinate (c1) circle (24.1mm) ++(.01,.65) coordinate (c2) circle (19.2mm); in the sixth line – Luis Felipe Jan 7 '16 at 1:12
  • I don't think that quite works but you're right that it eliminates the trace of red. Please see edit above for a further modification which avoids cutting off the tip of the inner part as well. – cfr Jan 7 '16 at 1:55
  • you're right, now is better – Luis Felipe Jan 7 '16 at 2:00

Here is a simple solution. You may adjust the parameters (\anglei, \angleii, \angleiii, and \len) to change the flame.

\begin{tikzpicture}[line width=0,draw=blue]
  \fill[red] (0,0) circle (2.41);
    \fill[white] (0,.65) circle (1.92);
  (0,.65) ++(0,-1.92)
  arc[start angle=\anglei,end angle=\angleii,radius=\len]
  arc[start angle=\angleii+180,end angle=\angleiii,radius=\len]
  arc[start angle=\anglei+180,end angle=\angleii+180,radius=\len]
  arc[start angle=\angleii+360,end angle=\angleiii+180,radius=\len]

enter image description here

| improve this answer | |
  • setting \len as 1.3 looks nice. Thanks – Luis Felipe Jan 7 '16 at 2:06

run with xelatex. The origin is the center of the big circle. \pscustom builds a closed path which can be filled.


  \psarc(0.65,1.15){1.4}{!2.01 RadtoDeg}{!4.0 RadtoDeg}
  \psarcn(-0.91,-0.79){1.08}{!0.93 RadtoDeg}{!-0.48 RadtoDeg}
  \psarc(-0.58,0){1.43}{!-1.12 RadtoDeg}{!0.68 RadtoDeg}
  \psarcn(1.1,1.94){1.18}{!4.2 RadtoDeg}{!2.72 RadtoDeg}


enter image description here

If you want to use pdflatex:


and run pdflatex --shell-escape file.tex

| improve this answer | |
  • I need to run this in Latex because i'm going to use this image in the header of every page. Is possible run it in latex? – Luis Felipe Jan 6 '16 at 19:40
  • What do you mean with latex? The old program latex or pdflatex? If you mean pdflatex then you can switch to xelatex and will have additionally the advantage of using OpenType or TrueType fonts. It is also possible to run pdflatex but then you have to load package auto-pst-pdf – user2478 Jan 6 '16 at 19:43
  • I want to run it with pdflatex in a \documentstyle{book} document. What command must I add for doing it? because it works changing pdflatex for xelatex in compile options but I always work with pdflatex – Luis Felipe Jan 6 '16 at 19:54
  • see my edited answer. You need only the optional argument --shell-escape when running with pdflatex. Which Editor are you using? – user2478 Jan 6 '16 at 19:58
  • I'm using TexStudio as editor. what to do here? I need open the console for every compilation? – Luis Felipe Jan 6 '16 at 20:00

Not quite right, but anyway...

\tikz[line join=round]\filldraw [red] (0,0) 
  arc (270:180-30:cos 45 / cos 30) arc (180-45:360+45:1)
  arc (30:-90:cos 45 / cos 30) -- cycle
  .. controls ++(30:1) and ++(210:3/2) .. (0,1.5)
  .. controls ++(210:1) and ++(30:3/2) .. cycle;

enter image description here

| improve this answer | |
  • the middle thing is too hard without a lot of points for control curve – Luis Felipe Jan 6 '16 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.