24

I am trying to make this picture in TikZ.camera lens angles

I wondered if anyone had already needed a silhouette of a human face, and therefore maybe had some code for a plot or something.

Just in case anyone had something :)

5
  • 3
    Why do you want to make it in TikZ particularly?
    – cfr
    Commented May 21, 2017 at 17:57
  • 1
    I think you're better off with some other tools to create this image; perhaps the right part could be done in TikZ but then you have to assemble it with the left part so I would feel that TikZ is not necessarily the right tool for it
    – Moriambar
    Commented May 21, 2017 at 18:10
  • 1
    Just because these are roughly related and someone might need them: tex.stackexchange.com/questions/198378/… and ctan.org/pkg/tikzpeople. Commented May 21, 2017 at 19:50
  • 1
    @cfr Why would I not want to make it in Tikz ;) #TikzIsLoveTikzIsLife
    – mriisa
    Commented May 22, 2017 at 11:02
  • 1
    @mriisa Better things to do than reproduce copies of pictures you already have? TikZ is one tool.
    – cfr
    Commented May 22, 2017 at 11:04

5 Answers 5

36

Based on Mark Wibrow's answer, but I took your image and traced it in Inkscape, then used the coordinates from the SVG file (opening it in a text editor and finding the list of coordinates of the only path in the file).

\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{svg.path}
\begin{document}
\begin{tikzpicture}[line width=1pt,scale=0.5]
\fill svg {m 182.9096,88.444477 c -2.34429,1.69819 -10.69606,9.25471 -18.55947,16.792243 -7.86342,7.53754 -16.72662,15.1454 -19.69601,16.90634 -7.33508,4.34996 -14.02508,6.06658 -17.91723,4.59746 -2.00784,-0.75788 -2.98165,-0.78599 -2.98165,-0.0861 0,0.57166 2.33047,5.34959 5.17882,10.61764 2.84835,5.26804 5.75892,12.07374 6.46793,15.12377 1.28283,5.51846 1.27227,5.57377 -2.16451,11.34315 -4.64576,7.79891 -7.006,16.47149 -9.04463,33.23394 -1.61026,13.24024 -1.60989,14.3682 0.007,20 2.48668,8.66344 5.58653,13.38376 13.7567,20.94808 11.40993,10.56384 21.06008,14.49507 35.73057,14.55575 5.40602,0.0224 9.49121,0.55022 11.0685,1.43021 1.75239,0.97768 4.33986,1.22561 8.65248,0.82907 4.58387,-0.42148 7.45696,-0.0966 11.26901,1.27416 4.84354,1.74171 5.27047,1.74894 8.00181,0.1355 1.58691,-0.93741 4.16585,-1.71257 5.73099,-1.72258 3.48723,-0.0223 9.95739,-4.30336 17.60297,-11.6472 l 5.76308,-5.53566 -2.04932,-2.64947 c -1.12713,-1.4572 -3.13387,-4.22446 -4.45942,-6.14946 l -2.4101,-3.5 1.85934,-10.5 c 1.02264,-5.775 2.52292,-12.61144 3.33396,-15.1921 1.29344,-4.11561 1.29523,-4.9482 0.0146,-6.77656 -1.36003,-1.94171 -0.97548,-2.76311 5.6153,-11.99444 9.14064,-12.80275 9.17529,-14.61145 0.32531,-16.97766 -4.03704,-1.07938 -4.24923,-1.3223 -4.23469,-4.84777 0.008,-2.0413 0.43566,-4.37618 0.94941,-5.18862 0.63908,-1.01062 0.42737,-2.03709 -0.6703,-3.25 -1.47463,-1.62945 -1.46541,-1.92642 0.11404,-3.67169 1.6304,-1.80157 1.61488,-1.9714 -0.30292,-3.31467 -1.91958,-1.34453 -1.94795,-1.65973 -0.56345,-6.26008 2.05729,-6.83587 1.88174,-7.9346 -1.91017,-11.9552 -3.18261,-3.37455 -3.7217,-3.5712 -9.7899,-3.5712 -3.532,0 -9.10387,0.72919 -12.38192,1.62043 -10.41466,2.83154 -9.82692,2.90075 -12.88895,-1.51776 -1.74758,-2.52176 -3.00238,-5.86359 -3.31549,-8.82999 -0.27709,-2.62497 -1.29173,-5.67268 -2.25476,-6.77268 -3.06651,-3.50263 -4.17031,-6.546563 -4.84401,-13.358233 -0.5603,-5.66516 -0.95709,-6.68474 -2.69853,-6.93402 -1.1229,-0.16073 -3.9597,1.09719 -6.30399,2.79539 z};

\draw[dashed] (8.5,6.6) --++ (1.5,0);
\end{tikzpicture}

\end{document}

screenshot

By the way, in the image you want to recreate, the camera viewfinder seems to be positioned too high (pointing to his eyebrows). I fixed it in my example.

4
12

Not quite as detailed as the required picture but created using Inkscape and copying the path from the xml editor into a TikZ path using the svg.path library:

\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{svg.path}
\begin{document}
\tikz\fill svg {M 29,64 
  C 23,64 17,63 13,61 C  9,59  4,52  2,47 C  0,42  3,28  8,22 
  C 13,16 10,14  8, 8 C 10, 5 26, 6 29, 0 C 30, 2 34, 5 36, 6 
  C 38, 7 41, 8 43, 7 C 45, 6 50, 5 52, 7 C 54, 9 53,11 53,12 
  C 53,13 55,16 55,17 C 55,18 53,19 53,20 C 53,21 56,22 56,23 
  C 56,24 54,25 54,28 C 54,31 62,31 62,33 C 62,35 54,41 53,43 
  C 52,45 50,51 49,54 C 48,57 53,60 51,61 C 49,62 35,64 29,64 Z};
\end{document}

enter image description here

11
  • 1
    A search on openclipart.org for silhouette head provides a rich source of more detailed profiles (along with some less detailed ones and some not-really-silhouette ones).
    – cfr
    Commented May 21, 2017 at 18:58
  • Could you say what you mean by 'the xml editor'? Is this part of Inkscape? I've exported to TikZ code from there, but the result is usually much, much, much less elegant than your path. (But that could be for other reasons.)
    – cfr
    Commented May 21, 2017 at 19:00
  • 2
    @cfr isn't it just from the normal svg file for the drawing? Thanks s just XML data and the data Mark is using is presumably listed verbatim in the svg file. That what I've used the times where I've copied svg data to tikz.
    – daleif
    Commented May 21, 2017 at 19:09
  • 1
    @daleif Thanks. I didn't realise that SVG was just XML, so I thought I must need some special editing thing to access the XML in the SVG, if you see what I mean. Now it makes more sense :-).
    – cfr
    Commented May 21, 2017 at 19:21
  • 1
    @cfr ctrl-shift-X in Inkscape produces the XML editor Commented May 22, 2017 at 6:17
4

with a free image from https://cdn.pixabay.com/photo/2012/04/13/18/23/man-33153_960_720.png

\documentclass{article}
\usepackage{graphicx}
\begin{document}

\includegraphics[width=2cm]{/tmp/man}
\reflectbox{\includegraphics[width=2cm]{/tmp/man}}

\end{document}

enter image description here

0
3

Not directly from the side, but the marvosym package also contains a human face:

\documentclass{article}

\usepackage{tikz}
\usepackage{marvosym}

\begin{document}

\begin{tikzpicture}
\node[scale=10] {\MartinVogel};
\end{tikzpicture}

\end{document}

enter image description here

And not directly a human, but seen from the side:

\documentclass{article}

\usepackage{tikz}
\usepackage{simpsons}

\begin{document}

\begin{tikzpicture}
\node {\Burns};
\end{tikzpicture}

\end{document}

enter image description here

1

From the pgfornament package:

\documentclass[margin=10mm]{standalone}

\usepackage{pgfornament}

\begin{document}

\begin{tikzpicture}
\pgfornament{164}
\end{tikzpicture}


\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .