Skip to main content
120 votes

Drawing Super Mario Bros.....in LaTeX

As everyone knows, the game was released in 1985, and at that time LaTeX was just making it out into the world and there was no such thing as pdfTeX, let alone TikZ and other fancy systems, so what ...
Phelype Oleinik's user avatar
71 votes
Accepted

Welcoming 2019 Lunar New Year: How to draw a (lovely) pig?

The very first appearance of the tikzpig: \documentclass{standalone} \usepackage{tikz} \definecolor{piglight}{RGB}{246,208,198} \definecolor{pigdark}{RGB}{241,164,142} \begin{document} \begin{...
samcarter_is_at_topanswers.xyz's user avatar
68 votes

Welcoming 2019 Lunar New Year: How to draw a (lovely) pig?

You really don't need any packages for this \documentclass{article} \begin{document} \begin{picture}(100,100) \put(43,56){\circle{6}} \put(43,56){\circle*{1}} \put(57,56){\circle{6}} \put(57,56){\...
David Carlisle's user avatar
54 votes

Drawing on an image with TikZ

In meantime there is a new package callouts In the annotate-environment you define the image width and an annotation scale. If you scale both with the same factor, then you can change the size of the ...
knut's user avatar
  • 8,858
51 votes
Accepted

a+b whole cubed in Latex

Welcome to TeX.SE!!! Here is a possibility. For this you'll need TikZ package an its libraries 3d and perspective. What I'm proposing is to create two macros. The first one, simplecube draws a ...
Juan Castaño's user avatar
45 votes

Welcoming 2019 Lunar New Year: How to draw a (lovely) pig?

For the sake of completeness, let's go for a Unicode pig! % arara: xelatex \documentclass{standalone} \usepackage{fontspec} \usepackage{graphicx} \setmainfont{Symbola} \begin{document} \scalebox{10}...
Paulo Cereda's user avatar
  • 44.4k
43 votes
Accepted

Drawing Super Mario Bros.....in LaTeX

What if Mario and Luigi are going to a party? Somebody said that they love ducks!! From The TikZducks package MWE \documentclass[border=2mm]{standalone} \usepackage{xcolor} \usepackage{tikzducks} \...
Sigur's user avatar
  • 37.5k
26 votes

How to draw $y^4 - y^2 = x$?

Here is a PGF solution. Responding to your request for plotting multiple functions of the form y^4 - y^2 = x - n, I've added a \foreach loop. Updated with axis labels \documentclass[border=0.5cm]{...
Milo's user avatar
  • 9,490
26 votes

How can I draw the trefoil knot in 3D co-ordinates in Latex using these parametric equations?

I think that the key here is to put more samples. This is your code, with 100 samples. I changed the domain too, from 0 to 2pi, because yours draws everything twice. I also added a view more alike to ...
Juan Castaño's user avatar
25 votes
Accepted

How to create a Langton's ant in latex?

Here's a simple approach in Metapost wrapped up in the luamplib library - compile with lualatex. \RequirePackage{luatex85} \documentclass[border=5mm]{standalone} \usepackage{luamplib} \begin{document}...
Thruston's user avatar
  • 42.8k
25 votes
Accepted

Plot complete Fermi-Dirac integral in Lualatex

This answer has been published as an article in H. Menke, “Tutorial: Using external C libraries with the LuaTeX FFI”, TUGboat, 39 (1), 37–40 (2018) The PDF is available here: https://...
Henri Menke's user avatar
25 votes

How can I draw the trefoil knot in 3D co-ordinates in Latex using these parametric equations?

This is basic Asymptote code: // // trefoil.asy // // to get trefoil.png, run // asy -f png -render=4 trefoil.asy // // to view it in internal Asymptote 3d-viewer, run // asy -V trefoil.asy // // or,...
g.kov's user avatar
  • 21.9k
21 votes

Drawing on an image with TikZ

For simple tasks, such a heavy weapon like tikz is not always necessary. If only simple shapes or text should be added a picture environment is more then enough: \documentclass{article} \usepackage{...
samcarter_is_at_topanswers.xyz's user avatar
20 votes

Vertical spiral: from old fashioned to tikz

While waiting for a Tikz's answer, see a bit with Asymptote. Compile on http://asymptote.ualberta.ca/ I don't know what \alpha and \gamma mean! settings.render=8; import solids; import graph3; ...
Nguyen Van Chi's user avatar
20 votes

How to draw an eagle?

\documentclass[12pt]{article} \usepackage{tikz} \usepackage{tikzducks} \begin{document} \begin{figure} \centering \begin{tikzpicture}[scale=2.5] \clip(0,0) .. controls (.15,.35) and (2,-.1).. (2,...
Ian Thompson's user avatar
19 votes

How to draw $y^4 - y^2 = x$?

This answer can be a possible solution for to draw $y^4 - y^2 = x$. \documentclass[10pt]{article} \usepackage{pstricks-add} \usepackage{pst-func} \begin{document} \psset{xunit=1....
Sebastiano's user avatar
  • 56.7k
18 votes

Drawing on an image with TikZ

Since 2019, we have the tikz-imagelabels package. I think it has been bundled in TeX Live 2019 onwards. This package does what the question asks entirely using the standard tikz macros. Example (taken ...
prash's user avatar
  • 291
17 votes

Flexure of a Grid

If all you need on the belt is the grid, there is an easy way by combining postactions (for lines parallel to the path) and dash patterns (for lines perpendicular to the path) \documentclass[border=9,...
Symbol 1's user avatar
  • 37k
16 votes

How to create a Langton's ant in latex?

Here is a LaTeX solution that uses tikz to draw the world. The rules of Langton's ant according to Wikipedia: At a white square, turn 90° right, flip the color of the square, move forward one unit. ...
gernot's user avatar
  • 50k
16 votes
Accepted

pgfplots: problem with convergence of addplot on (sin(x) - x cos(x)) / x^3

If you want to go all the way to 0, then I would suggest using the first terms of the Taylor expansion near 0 \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
Andrew Swann's user avatar
  • 96.3k
16 votes
Accepted

Drawing six hemispheres

Welcome to TeX.SE!! This is another approach, using an isometric view (from perspective TikZ library) and a \foreach loop. This way you only need tho draw two hemispheres and rotate them. For example: ...
Juan Castaño's user avatar
15 votes
Accepted

Drawing diffraction gratings

You could do something like the following isometric view, with tikz and the 3d library. I made a \newcommand macro for the "Red" and "Pantalla", because there are the same figure ...
Juan Castaño's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible