1

Can a tikzpicture be distorted to look like it's a picture from a book in an easy way (not exporting to pdf, printing, taking picture and using said picture)?

something like:

\tikz[distorted=jpg] \draw (0,0) --(1,1);

Edit:

So

\documentclass{memoir}
\usepackage{tikz}
\begin{document}
\tikz \draw (0,0) -- (1,1);
\end{document}

creates a very beautifull line, that looks like it's in vector graphics format (which is hard to see on a screenshot):

enter image description here

What i then want is an easy way to distort the tikzdrawing so it looks like a picture taking with a real bad camera more so than vector graphics? Why would one want to uglyfi ones buatiful tikz figures? For fun! (the distorded=jpg in the original post was a pseudo way of telling tikz to make the drawing look as ugly as a jpg picture, full of loss).

Sebastiano
  • 54,118
  • Please, can you post a complete MWE? – Sebastiano Jun 09 '17 at 09:22
  • @Sebastiano Tried to do this, hope it makes sense, it's not for any real purpose, mostly a fun/challange thing like the coffee package – Thorbjørn E. K. Christensen Jun 09 '17 at 09:39
  • Not sure to understand it, but perhaps these questions and answers are related: https://tex.stackexchange.com/q/36552/1952, https://tex.stackexchange.com/q/39296/1952, https://tex.stackexchange.com/q/334341/1952 – Ignasi Jun 09 '17 at 09:46
  • 1
    try the random steps path decoration, section 24 of the pgf manual, so something like decorate, decoration={random steps,segment length=3pt,amplitude=1pt}; Don't forget to load the appropriate library decorations.pathmorphing. For a real jpg distortion, you would have to cut the pictures into cells and distort those separately; Try looking at the solution here: https://tex.stackexchange.com/questions/319172/gimp-like-perspective-transform-in-tikz?noredirect=1&lq=1 – Huang_d Jun 09 '17 at 09:47
  • Related, insofar as distorting a font, rather than a tikzpicture: https://tex.stackexchange.com/questions/122970/simulate-printing-imperfections-and-defects-with-tex – Steven B. Segletes Jun 09 '17 at 09:53
  • Thanks for all the comments, it's really cool. Is there also a way to add a blurry lens effect, so it looks like it's a picture taken with an old camera? – Thorbjørn E. K. Christensen Jun 09 '17 at 10:08
  • You are probably better off creating in standalone image and editing it with a graphics editor. They have many more effects than LaTeX. See https://tex.stackexchange.com/questions/312238/how-to-create-a-tikz-picture-with-a-non-infinite-distance-viewpoint/312959?s=1|0.1241#312959 – John Kormylo Jun 09 '17 at 16:56
  • @JohnKormylo You're right, but it seems like a fun thing to do in LaTeX XD – Thorbjørn E. K. Christensen Jun 09 '17 at 17:02

0 Answers0