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 ...
69
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{...
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){\...
52
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 ...
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 ...
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}...
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}
\...
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 ...
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}...
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://...
25
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]{...
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,...
20
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{...
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;
...
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....
19
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,...
18
votes
Accepted
Render stl files in asymptote
Actually, an ascii stl file is so simple it's easy to write an Asymptote script to read it directly. Note, however, that the code below is too simple to offer useful feedback in case the stl file has ...
18
votes
Accepted
How to plot Lambert W function with pgfplots
Since the Lambert W function is a multivalued non-elementary function, then PGFplots can't plot it by just typing \addplot {LambertW(x)};.
On the other hand, the inverse function, y e^y is elementary ...
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,...
16
votes
Accepted
Illustrating Stokes theorem with asymptote
In this solution the surface is defined by function
triple f(pair z){
path3 p;
p=shift((0, 0, log(1+z.y / (imax / 2)))) * scale3(sqrt(1-(z.y^2)/imax^2)) * path3D;
return relpoint(p,z.x);
}
...
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.
...
16
votes
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}
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
asymptote × 782tikz-pgf × 211
3d × 130
diagrams × 80
pstricks × 70
pgfplots × 40
graphics × 38
metapost × 33
plot × 19
tikz-3dplot × 19
miktex × 17
pdftex × 13
technical-drawing × 11
texmaker × 10
animations × 10
fonts × 9
luatex × 9
latexmk × 9
pdf × 8
graphs × 8
ghostscript × 8
compiling × 7
installing × 7
texshop × 7
tikz-3d × 7