Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Task

Show off your best scientific illustration !

The main purpose of this question is to share beautiful scientific pictures, preferably with an educational aspect.


Content

Your post must contain a nice picture and the associated code. One can post several pictures, but it must be done in different replies. Of course, it must be done with LaTeX & Friends : the post must start with a short sentence to present the language that you chose (TikZ, Asymptote ...) and the main packages that helped you to make the picture. Don't hesitate to add comments.


Reward

The satisfaction to share without expecting a reward :)

Ok ... 300 points reputation bounty for the best up-voted post until the 15th of Feb.


Related links

I'll contact Texample.net webmaster to see if he is interested to share the best illustrations, with the participant's agreement of course.

Contest: Show Off Your Skillz in TeX & Friends

share|improve this question
11  
that's easy :p dx.doi.org/10.1007/978-3-642-36763-2_46 –  percusse Feb 5 at 8:43
12  
I'll be glad if Till Tantau himself decide to participate, but that would be a bit unfair ... :) –  Thomas Feb 5 at 8:47
3  
What a wonderful question and answers, this is a true feeding frenzy for my inner geek :) –  Kuba Ober Feb 6 at 15:28
6  
I'm surprised this question wasn't closed already by people like this, on the grounds that it's not a question. Or does that apply only to SO, not to tex.SE? –  Dan Dascalescu Feb 7 at 0:06
6  
@DanDascalescu: Here on TeX.SX the mood is much more laazyyy. Think alone the existence of a tag big-list (click on it). –  Speravir Feb 7 at 0:22

48 Answers 48

Maybe not my best, but one I quite like.

The figure has been made for a publication below about increasing the field of view of microtomographic scans and can be found in doi:10.1107/S0909049510019618.

As with pretty much all my figures, it's made with the help of tikz, pgfplots, siunitx, my script to calculate and place scalebars, lots of trial and error and sometimes with help from tex.SE...

The image is a screenshot from my thesis (made with classicthesis), thus the different font. enter image description here

\documentclass{article}

\usepackage[demo]{graphicx}
\usepackage{subfig}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{siunitx}
\usepackage{hyperref}

\newcommand{\imsize}{\linewidth}
\newlength\imagewidth % needed for scalebars
\newlength\imagescale % ditto

\begin{document}

\renewcommand{\imsize}{.47\linewidth}%
\pgfmathsetlength{\imagewidth}{\imsize}% desired display width of image
\pgfmathsetlength{\imagescale}{\imagewidth/1024}% pixel width of image
\begin{figure}[p]%
    \noindent\makebox[\textwidth]{%
        \subfloat[Projections from subscans]{%
            \begin{tikzpicture}[x=\imagescale,y=-\imagescale]%
                \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{img/Haberthuer2010/R108C21Cb_s13358_normalize}};%
                \def\overlap{141}%
                \fill [red, nearly transparent] (1024-\overlap,1) rectangle (1024,1024);%
                \draw (1024-\overlap,1) rectangle (1024,1024);%
            \end{tikzpicture}%
            \begin{tikzpicture}[x=\imagescale,y=-\imagescale]%
                \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{img/Haberthuer2010/R108C21Cb_s23358_normalize}};%
                \def\overlap{141}%
                \fill [green, nearly transparent] (1,1) rectangle (\overlap,1024);%
                \draw (1,1) rectangle (\overlap,1024);%
                \def\overlap{138}%
                \fill [blue, nearly transparent] (1024-\overlap,1) rectangle (1024,1024);%
                \draw (1024-\overlap,1) rectangle (1024,1024);%
            \end{tikzpicture}%
            \begin{tikzpicture}[x=\imagescale,y=-\imagescale]%
                \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{img/Haberthuer2010/R108C21Cb_s33358_normalize}};%
                \def\overlap{138}%
                \fill [yellow, nearly transparent] (1,1) rectangle (\overlap,1024);%
                \draw (1,1) rectangle (\overlap,1024);%
                \def\x{924}% 1024 - 100
                \def\y{922}% 1024 * .9 = 921.6
                \def\bar{338}% 100 px = 148 um
                \draw[|-|,thick, color=white] (\x-\bar,\y) -- (\x,\y) node [midway, above] {\SI{500}{\micro\meter}};%
            \end{tikzpicture}%
            \label{subfig:workflow-projections}%
        }%
    }%
    \\%
    \renewcommand{\imsize}{1.41\linewidth}%
    \pgfmathsetlength{\imagewidth}{\imsize}% desired displayed width of image
    \pgfmathsetlength{\imagescale}{\imagewidth/2793}% pixel width of image
    \noindent\makebox[\textwidth]{%
        \subfloat[Merged and corrected projection]{%
            \begin{tikzpicture}[x=\imagescale,y=-\imagescale]%
                \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{img/Haberthuer2010/R108C21Cb_mrg3333_normalize}};%
                \def\x{2693} % 2793-100
                \def\y{922} % 1024*.9 = 921.6
                \def\bar{338} % 100 px = 148 um
                \draw[|-|,thick, color=white] (\x-\bar,\y) -- (\x,\y) node [midway, above] {\SI{500}{\micro\meter}};
            \end{tikzpicture}%
            \label{subfig:workflow-merge}%
        }%
    }%
    \\%
    \pgfmathsetlength{\imagescale}{\imagewidth/2792}% pixel width of image
    \noindent\makebox[\textwidth]{%
        \subfloat[Reconstruction]{%
            \begin{tikzpicture}[x=\imagescale,y=-\imagescale]%
                \node [anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{img/Haberthuer2010/R108C21Cb_mrg1024rec8bit}};
                \clip (0,0) rectangle (2792,992);               
                \def\x{2692}% 2792-100
                \def\y{893}% 992 * .9 = 892.8
                \def\bar{338}% 100 px = 148 um
                %%%% scalebar
                    \draw[|-|,thick, color=white] (\x-\bar,\y) -- (\x,\y) node [midway, above] {\SI{500}{\micro\meter}};
                %%%% big circle
                    \draw [dashed, ultra thick, color=red] (2792/2,992/2) circle (512);
                    \def\angle{35}
                    \draw [white, thick, <->] (2792/2,992/2) +(\angle:0) -- node (bigto) {} +(\angle:512); 
                    \node [white] (bigfrom) at (349,256){$\frac{1024}{2}$px};
                    \draw [white, ->, thick, densely dotted] (bigfrom) to [bend left=45] (bigto);
                %%%% big circle
                %%%% 141px circle
                \draw [dashed, ultra thick, color=red] (2792/2,992/2) circle (512-141);
                \def\angle{35+90}
                    \draw [white, thick,<->] (2792/2,992/2) +(\angle:0) -- node (smallto) {} +(\angle:512-141);
                    \node [white] (smallfrom) at (349,384) {$\frac{1024}{2}-141$px};
                    \draw [white, ->, thick, densely dotted] (smallfrom) to [bend left=45] (smallto);
                %%%% 141px circle                   
                %%%% center
                \fill [color=red] (2792/2,992/2) circle (5);
                %%%% center
            \end{tikzpicture}%
            \label{subfig:workflow-reconstruction}%
        }%
    }%
    \caption[Workflow of a wide field scan]{Workflow of a wide field scan. The images show a rat lung sample from a Sprague-Dawley rat, obtained 21 days after birth, scanned with the acquisition protocol B (see \autoref{tab:protocols}). %
            \subref{subfig:workflow-projections}: Three corrected and independently acquired projections from subscans $s_1$--$s_3$ are shown. Each one is 1024\(\times\)1024 pixels large and covers a field of view of \SI{1.52}{\milli\meter}. Subscans $s_1$ and $s_2$ overlap by 141 pixels (red and green overlay), subscans $s_2$ and $s_3$ overlap by 138 pixels (blue and yellow overlay). %
            \subref{subfig:workflow-merge}: Merged projection obtained from the three subscans shown in subfigure \subref{subfig:workflow-projections}. Each merged projection has a size of 2792\(\times\)1024 pixels. Due to the overlap required to merge the projections, the width of the merged projections is slightly smaller than three times the width of the subscans. %
            \subref{subfig:workflow-reconstruction}: Cropped slice of the reconstructed tomographic dataset. The dashed red circles mark the start and end of the overlap region.}
    \label{fig:wide-field-scan-results}
\end{figure}%

\end{document}
share|improve this answer

The following figure is one of my favorites. The goal of the image is to explain the definition of the derivative, in the form that "f'(x_0) = m if within sufficiently small neighborhoods of x_0, f can be contained in arbitrarily narrow cones about the line through (x_0,f(x_0)) with slope m." The figure was created in TikZ. If I were to create it now, I would use Asymptote, and it would probably contain fewer arbitrary-seeming numbers.

Note that I created this image for a handout, so it had to be grayscale.

enter image description here

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathreplacing}
\usepackage{mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\renewcommand{\epsilon}{\varepsilon}
\begin{document}
\begin{tikzpicture}[xscale=8,yscale=5]
    \newcommand{\xmin}{-.4} \newcommand{\xmax}{.5}  \newcommand{\deltaX}{.65}
    \begin{scope}
        \draw[black,->] (-.6,-.7) -- (.5,-.7) node[right] {$x$};
        \draw[black,->] (-.5,-.8) -- (-.5,0.5) node[above] {$y$};

%       \useasboundingbox;

    \path[fill=black!30,draw=black!30] (-.33,-.33*1.65) --
        (-.33,-.33*.35) --
        (.33,.33*.35) -- (.33,.33*1.65) -- cycle;
    \draw[thick,densely dotted] (.33,-.72) 
        node[below] (delta3) {$x_0+\delta\strut$} -- (.33,.33*1.65);
    \draw[thick,densely dotted] (-.33,-.72) 
        node[below] (mdelta3) {$x_0-\delta\strut$} -- (-.33,-.33*.35);

    \fill[black!50] (-.25,-.25*3/2) -- (-.25,-.25/2) -- (.25,.25/2) -- 
        (.25,.25*3/2) -- cycle;

    \path[fill=black!70] (-.15,-.15*1.25) -- (-.15,-.15*.75) --
        (.15,.15*.75) -- (.15,.15*1.25) -- cycle;

    \node[circle,draw=black,inner sep=0pt,minimum size=3pt,fill=black] (x0y0) at (0,0) {};
    \draw[black,domain=\xmin:\xmax,samples=2] plot(\x,\x) 
        node[right] {$\Delta y = f'(x_0) \Delta x$};
    \draw[very thick,black,smooth,domain=\xmin:\xmax,samples=30] 
        plot (\x,{1-1/(\x+1)}) node[right] {$y=f(x)$};
    \draw[black,very thin] (x0y0) -- (0,{-.72}) node[below] (x0) {$x_0\strut$};
    \draw[black,very thin] (x0y0) -- (-.52,0) node[left]{$y_0$};

\end{scope}

\draw[decorate,decoration={brace,amplitude=5pt,mirror,raise=1pt}]
    (.33,.33*.35) -- 
    node[right]{\hspace{6pt}$\epsilon \Delta x$} (.33,.33);
\draw[decorate,decoration={brace,amplitude=5pt}] 
    (delta3.south) -- 
    node[below] {$\rule{0pt}{14pt}\abs{\Delta x} < \delta$} 
    (mdelta3.south);

\end{tikzpicture}
\end{document}
share|improve this answer

One that I'm most proud of is a three-dimensional illustration of a signpost with various loads applied, shown here. I used the TikZ package. Commercial fonts have been removed in the code I've posted below. Looking back at the code, I probably could have written it a bit more efficiently (styles for face shading, more relative positioning, etc.), but c'est la vie.

enter image description here

\documentclass{standalone}
\usepackage{tikz}             % TikZ and PGF

% Vector Styles
\tikzstyle{load}   = [ultra thick,-latex]
\tikzstyle{stress} = [-latex]
\tikzstyle{dim}    = [latex-latex]
\tikzstyle{axis}   = [-latex,black!55]

% Drawing Views
\tikzstyle{isometric}=[x={(0.710cm,-0.410cm)},y={(0cm,0.820cm)},z={(-0.710cm,-0.410cm)}]
\tikzstyle{dimetric} =[x={(0.935cm,-0.118cm)},y={(0cm,0.943cm)},z={(-0.354cm,-0.312cm)}]
\tikzstyle{dimetric2}=[x={(0.935cm,-0.118cm)},z={(0cm,0.943cm)},y={(+0.354cm,+0.312cm)}]
\tikzstyle{trimetric}=[x={(0.926cm,-0.207cm)},y={(0cm,0.837cm)},z={(-0.378cm,-0.507cm)}]

\begin{document}
  \begin{tikzpicture}
    \node (origin) at (0,0) {}; % shift relative baseline
    \coordinate (O) at (2,3);
    \draw[fill=gray!10] (O) circle (1);
    \draw[fill=white] (O) circle (0.75) node[below,yshift=-1.125cm] {Signpost Cross Section};
    \draw[dim] (O) ++(-0.75,0) -- ++(1.5,0) node[midway,above] {$d_i$};
    \draw[dim] (O) ++(-1,1.25) -- ++(2,0) node[midway,above] {$d_o$}; 
    \foreach \x in {-1,1} {
      \draw (O) ++(\x,0.25) -- ++(0,1.25);
    }
  \end{tikzpicture}
  \begin{tikzpicture}[dimetric2]
        \coordinate (O) at (0,0,0);
        \draw[axis] (O) -- ++(6,0,0) node[right] {$x$};
        \draw[axis] (O) -- ++(0,6,0) node[above right] {$y$};
        \draw[axis] (O) -- ++(0,0,6) node[above] {$z$};
        \draw[fill=gray!50] (0,0,-0.5) circle (0.5); 
        \fill[fill=gray!50] (-0.46,-0.2,-0.5) -- (0.46,0.2,-0.5) -- (0.46,0.2,0) -- (-0.46,-0.2,0) -- cycle;
        \draw[fill=gray!20] (O) circle (0.5);
    \draw (0.46,0.2,-0.5) -- ++(0,0,0.5) node[below right,pos=0.0] {Fixed Support};
    \draw (-0.46,-0.2,-0.5) -- ++(0,0,0.5);
    \draw[fill=gray!10] (O) circle (0.2);
    \fill[fill=gray!10] (-0.175,-0.1,0) -- (0.175,0.1,0) -- ++(0,0,4) -- (-0.175,-0.1,4) -- cycle;
    \draw (-0.175,-0.1,0) -- ++(0,0,4);
    \draw (0.175,0.1,0) -- ++(0,0,4) node[right,midway] {Steel Post};
    \draw (4,0,3.95) -- ++(0,0,-1);
    \foreach \z in {0.5,0.75,...,5} {
      \draw[-latex] (-2*\z/5-0.2,0,\z) -- (-0.2,0,\z);
    }
    \draw[load] (0,0,4) -- ++(0,0,-1.25) node[right,xshift=0.1cm] {$F_{z1}$};
    \draw[fill=gray!20] (-0.25,-0.25,5) -- (4,-0.25,5) -- (4,+0.25,5) -- (-0.25,+0.25,5) -- cycle; 
    \draw[fill=gray!50] (+4.00,-0.25,4) -- (4,+0.25,4) -- (4,+0.25,5) -- (+4.00,-0.25,5) -- cycle; 
    \draw[fill=gray!10] (-0.25,-0.25,4) -- (4,-0.25,4) -- (4,-0.25,5) -- (-0.25,-0.25,5) -- cycle; 
    \draw (4.05,0,4) -- ++(1,0,0);
    \draw (4.05,0,5) -- ++(1,0,0);
    \draw[dim] (4.5,0,0) -- ++(0,0,4) node[midway,right] {$h_1$};
    \draw[dim] (4.5,0,4) -- ++(0,0,1) node[midway,right] {$h_2$};
    \draw[dim] (0,0,3.4) -- ++(4,0,0) node[midway,below] {$b_2$};
    \coordinate (P) at (2,-0.25,4.5);
    \draw (P) -- ++(0,0,0.25);
    \draw (P) -- ++(0.25,0,0);
    \draw[dim] (2.125,-0.25,4.5) -- ++(0,0,-0.5) node[midway,right] {$z_1$};
    \draw[dim] (2,-0.25,4.625) -- ++(-2,0,0) node[midway,below] {$x_1$};
    \draw[load] (2,-2.45,4.5) -- ++(0,2.2,0) node[pos=0.0,right,xshift=0.08cm] {$F_{y1}$};
    \draw[axis,dashed,-] (O) -- (0,0,5);
    \draw (0,0,5.5) -- ++(4,0,0) node[midway,above] {$w_{z}$};
    \foreach \x in {0,0.25,...,4} {
      \draw[-latex] (\x,0,5.5) -- ++(0,0,-0.5);
    }
    \draw (-0.2,0,0) -- ++(-2,0,5) node[above,xshift=0.5cm] {$w_{x}=\frac{z}{h_1+h_2} w_0$};
  \end{tikzpicture} %
\end{document}
share|improve this answer
3  
Very nice drawing! I added it to the TikZ example gallery. –  Stefan Kottwitz Feb 10 at 20:41

enter image description here

\documentclass[border=0pt,pstricks]{standalone}
\usepackage{pst-coil,pstricks-add}
\usepackage[nomessages]{fp}

\FPset\CoilArm{0.25}
\FPset\CoilWidth{0.3}
\FPeval\CoilTurn{round(50/3:3)}
\FPeval\DeltaY{0.5}
\FPeval\Amp{1.5}
\FPeval\FPS{25}
\FPeval\Vx{2}% propagation speed
\FPeval\Period{1}% second

\psset
{
    coilarm=\CoilArm,
    coilwidth=\CoilWidth,
}


\newcommand\System[4][0]{% #1: frame, #2: x, #3: y, #4: label
    \uput[90](#2,4.25){#4}
    \FPeval\CoilHeight{round((4-(#3)-2*CoilArm)/(CoilWidth*CoilTurn):3)}
    \pszigzag[coilheight=\CoilHeight,linejoin=2](#2,4)(#2,#3)
    \ifnum#1=1
        \bgroup
            \psset{origin={#2,#3}}
            \psframe[dimen=inner,fillstyle=solid,fillcolor=black](-0.5,0)(0.5,-1)
            \psdot[linecolor=yellow](0,-0.5)
        \egroup
    \fi
}

\begin{document}
\FPeval\DeltaTime{round(1/\FPS:2)}
\FPeval\TotalFrame{round(\FPS*\Period:0)}
\multido{\n=0.00+\DeltaTime}{\TotalFrame}{%
\begin{pspicture*}[showgrid=false](-1.5,-2)(3.5,5)
    % Ceiling
    \psframe
    [
        fillstyle=vlines,
        hatchsep=2pt,
        hatchwidth=0.5\pslinewidth,
        hatchcolor=gray,
        hatchangle=45,
        %linestyle=none
    ](0,4)(2,4.25)
    % Spring without box
    \FPeval\Y{round(-DeltaY-Amp*cos(2*pi*\n/Period)+2:3)}
    \System[1]{1}{\Y}{A}
    \psplot[algebraic,linecolor=red,plotpoints=1000]
        {-1.5}{3.5}{-\DeltaY-\Amp*cos((2*\psPi/\Period)*((-\Vx*\n+x-1)/\Vx))+2-0.5}
\end{pspicture*}}

\end{document}
share|improve this answer
2  
I believe my code above can be simplified. It was coded when I was still new to PSTricks. I will do the simplification later. –  Oh my ghost Feb 5 at 16:35
1  
This is cool! :=) –  l19 Feb 6 at 4:28
3  
@l19: Thank you for cooling it. :-) –  Oh my ghost Feb 6 at 6:34
7  
@CodeMocker Thank you for cooding it. :-) –  texenthusiast Feb 6 at 14:43
1  
because you told me you would never answer it –  cmhughes Feb 28 at 17:24

For some reason I am particularly proud of this one. It was an 3D-coloured illustration for a finite-element mesh upon a spheroid (confocal to another, non-represented inner spheroid which parameters are also to be found in this program) designed for an old paper research.

It could have been done with Asymptote, which is my best tool for 3D, but for this time I wanted to stick to my favourite tool, MetaPost, so I produced that after a bit of sweat :-).

It is not particularly impressive, it was certainly crudely done (in particular I could have made use of the transparency features of Metafun, but I wasn't yet aware of them), but I have always found the result pleasant.

If called for example spheroid_mesh.mp, the drawing is to be produced with the command line mpost --mem=metafun spheroid_mesh.mp. Sorry for the old comments in French, I have not enough courage to translate them now.

verbatimtex
    %&latex
    \documentclass[12pt]{scrartcl}
    \begin{document}
etex
%
% Échelle
u := 2cm;

f = 0.1; % Porosité

beginfig(1);

% Paramètres de projection 3D (orientation du repère)
alpha = -45; % rotation de l'axe (Oy)
beta = -25; % inclinaison de l'axe (Oz)

% Sphéroïde intérieure
a1 = 0.5;
b1 = 2.5;
c = b1 +-+ a1; % Distance focale;

% Sphéroïde extérieure
const = ( sqrt(4*(c**6)*(f**2) + 27*(a1**2)*(b1**4) ) /
    (2*(3**(3/2))*f) + (a1*(b1**2))/(2*f) ) ** (1/3);
a2 = const - (c**2)/(3*const);
b2 = sqrt(a2**2 + c**2);

% Nombre de subdivision suivant la colatitude theta
ndiv = 10;

% Repère 3D projeté
pair e[];
e1 = (sind(alpha), cosd(alpha)*sind(beta)) scaled u;
e2 = (cosd(alpha),  -sind(beta)*sind(alpha)) scaled u;
e3 = (0, cosd(beta)) scaled u;

% Fonction générale de projection 3D
vardef projection (expr x, y, z) =
    x*e1 + y*e2 + z*e3
enddef;

% Variables concernant le maillage
z[0][0] = projection(0, 0, a2); % nœud supérieur

% Maillage
for i = 1 upto ndiv:
    theta[i] = i/ndiv*90;
    cote[i] = a2*cosd(theta[i]);
    r[i] = b2*sqrt(1 - (cote[i]**2)/(a2**2));
    for j = 0 upto i:
        z[i][j] =  projection(r[i]*cosd(j/i*90), r[i]*sind(j/i*90), cote[i]);
    endfor;
endfor;

% Triangles
path tr[][];
%
tr[1][1] = z[0][0] -- z[1][0] -- z[1][1] -- cycle;
for i = 2 upto ndiv:
    tr[i][1] = z[i-1][0] -- z[i][0] -- z[i][1] -- cycle;
    for j = 1 upto i-1:
        tr[i][2j] = z[i-1][j-1] -- z[i-1][j] -- z[i][j] -- cycle;
        tr[i][2j+1] = z[i-1][j] -- z[i][j] -- z[i][j+1] -- cycle;
    endfor;
endfor;

% Couleurs des triangles
cst = 0.3;
color mon_bleu, mon_rouge, mon_vert;
mon_rouge = (1, cst, cst);
mon_vert = (cst, 1, cst);
mon_bleu = (cst, cst, 1);
fill tr[1][1] withcolor mon_bleu;
for i = 2 upto ndiv:
    for j = 1 upto 2i-1:
        fill tr[i][j]  
            withcolor -i/ndiv*(j - 2i + 1)/(2i-2) * mon_rouge
                + (j-1)/(2*i-2)*i/ndiv * mon_vert 
                + (1-i/ndiv) * mon_bleu;
    endfor;
endfor;

% tracé des arêtes
for i = 1 upto ndiv:
    for j = 1 upto i:
        draw z[i][j-1] -- z[i][j];
        draw z[i-1][j-1] -- z[i][j-1];
        draw z[i-1][j-1] -- z[i][j];
    endfor; 
endfor;

% Tracé des axes du repère
pair X, Y, Z;
X = 4.75e1;
Y = 4.75e2;
Z = 3.6e3;
drawoptions(dashed evenly);
draw (origin -- projection(b2, 0, 0));
draw origin -- projection(0, b2, 0);
draw origin -- projection(0, 0, a2);
drawoptions();
drawarrow (projection(b2, 0, 0) -- X);
drawarrow (projection(0, b2, 0) -- Y);
drawarrow (projection(0, 0, a2) -- Z);

% Labels du repère
label.lft(btex $x$ etex, X);
label.rt(btex $y$ etex, Y);
label.lft(btex $z$ etex, Z);

% Pour élargissement de la bounding box 
setbounds currentpicture to boundingbox currentpicture enlarged 2bp;

endfig;
end.

enter image description here

share|improve this answer

For those who study radar imaging, the following should be relevant.

enter image description here

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{multido}
\SpecialCoor
\psset{dimen=monkey}

\definecolor{radar}{RGB}{77,255,116}
\newpsstyle{wedge}{linestyle=none,linewidth=0,fillstyle=solid,fillcolor=radar}
\newpsstyle{beam}{linewidth=.5pt,linecolor=radar}
\newpsstyle{axes}{linewidth=.3pt,linecolor=radar!10!black}

\def\wiper#1{\rput{-#1}{\multido{\i=0+2,\r=.400+-.008}{50}{\psline[style=beam](3,0)\pswedge[style=wedge,opacity=\r](0,0){3}{\i}{!\i\space 2 add}}}}
\def\axes{\multido{\r=.5+.5}{6}{\pscircle[style=axes]{\r}}\multido{\i=0+30}{12}{\psline[style=axes](3;\i)}}


\newenvironment{objects}[1]
{\psframe*(-3,-3)(3,3)\psclip{\rput{-#1}{\pswedge[linestyle=none,linewidth=0](0,0){3}{0}{100}}}\ignorespaces}
{\endpsclip\ignorespacesafterend}

\usepackage{graphicx}

\begin{document}
\multido{\ia=0+15}{24}{
\begin{pspicture}(-3,-3)(3,3)
    \begin{objects}{\ia}
        \rput(0,-2.25){\textcolor{radar}{\large PSTricks attack}}
        \rput(1.5;135){\includegraphics[scale=.1]{alien}}
    \end{objects}
    \axes
    \wiper{\ia}%
\end{pspicture}}
\end{document}
share|improve this answer
1  
One down vote detected. Thank you! –  Oh my ghost Feb 5 at 17:27
3  
I like it, +1 ! –  Thomas Feb 5 at 17:38
1  
@McGafter: he gave me permission to use it. –  Oh my ghost Feb 11 at 3:59
up vote 202 down vote
+300

The following image illustrates the blowup of a plane at a point--an important construction in algebraic geometry (compare the cover of this book). The image was produced using Asymptote. (Note: the code and the image have both been refined since they were first posted.)

The vector image may be viewed by following this link.

settings.outformat="pdf";
settings.render=0;
settings.prc=false;

usepackage("lmodern");
usepackage("fontenc","T1");
usepackage("amssymb");  // for the \mathbb command
defaultpen(fontsize(10pt));

import graph3;
size(400,400);
currentprojection=orthographic(5,-10,4);

real R=8;

struct scaler {
    private real factor;

    void operator init(real factor) {
        this.factor = factor;
    }

    real scale(real t) {return factor*atan(tan(t)/factor);}
    real invert(real t) {return tan(atan(t)*factor)/factor;}
}

scaler theScaler = scaler(6);

triple f(pair t) {
    real r = t.x;
    real theta = 2 * atan(t.y*2/pi);
//  real theta = -t.y;
    return (r*cos(theta),r*sin(theta),theScaler.scale(theta));
}

int resolution = 10;
real epsilon = .01;
real vmin = -pi/2;
real vmax = pi/2;
real umin = -R;
real umax = R;
splinetype[] Linear = new splinetype[] {linear, linear, linear};
splinetype[] ZMonotonic = new splinetype[] {notaknot, notaknot, monotonic};
surface sBack=surface(f,(umin,vmin),(0,vmax),nu=resolution, nv=2*resolution,  usplinetype=Linear, vsplinetype = ZMonotonic);
surface sFront = surface(f, (0,vmin), (umax,vmax), nu=resolution, nv=2*resolution, usplinetype=Linear, vsplinetype=ZMonotonic);

pen meshpen = heavygray + linewidth(0.2);

material surfacepen = 
    material(diffusepen=lightgray+opacity(0.5), 
        emissivepen=gray(0.3),
        specularpen=gray(0.2));

draw(sBack, surfacepen=surfacepen, meshpen=meshpen);
draw(f((0,vmin)) -- f((0,vmax)), darkgray+linewidth(1.0));   // the exceptional divisor
draw(sFront, surfacepen=surfacepen, meshpen=meshpen);


pen planePen = black+linewidth(0.3);

triple bottomPoint = f((0,vmin));
triple planeCenter = 2.0*bottomPoint;
draw((bottomPoint-.6Z)--(planeCenter+.6Z), arrow=Arrow3(TeXHead2), p=linewidth(0.9),
     L="$\pi_1$");

real planeZ = planeCenter.z;

triple h(pair t) {
    return (t.x, t.y, planeZ);
}

triple g(pair t) {
    triple projectFrom = f(t);
    return h((projectFrom.x, projectFrom.y));
}
triple g(real tx, real ty) { return g((tx, ty)); }

real planeRadius = R+1;
surface thePlane = surface(h, (-planeRadius,-planeRadius),(planeRadius,planeRadius),
    nu=1);

path3 planeOutline = h((-planeRadius,-planeRadius)) -- h((-planeRadius,planeRadius)) -- h((planeRadius,planeRadius)) -- h((planeRadius,-planeRadius)) -- cycle;

for (real u = 0; u <= R; u += R/resolution)
  draw(circle(planeCenter, u), planePen);
for (real v = vmin; v < vmax; v += (vmax-vmin)/(2*resolution)) {
  draw(g(umin,v) -- g(umax,v), planePen);
}
draw(planeOutline, p=planePen);

//Embed the label "\mathbb P^2" on the plane:
real labelScale = 1.5;  
Label planeLabel = Label(scale(labelScale, labelScale*1.3, 1)*"$\mathbb P^2$", fontsize(10pt));
Label placedPlaneLabel = shift((planeRadius-1.2),(planeRadius-1.5),planeCenter.z)*planeLabel;

label(planeLabel, position = (planeRadius-1.2, planeRadius-1.5, planeCenter.z));
share|improve this answer
19  
It would not be an exaggeration to say that I learned Asymptote in order to produce this image. –  Charles Staats Feb 5 at 18:37
4  
Info to Reproduce image: save code as blowup.asy and run at commandline/terminal asy blowup.asy –  texenthusiast Feb 6 at 14:59
2  
Nice. Would it make more sense to colour/style the lines so that the radial directions and the "circular" directions are distinguished upstairs? –  Willie Wong Feb 7 at 11:42

Inspired by @Paul Gessler, the following is a statics problem from a class I taught. The problem was to find the maximum weight the crane could carry as a function of distance before it would tip over (the supports at D and E aren't bolted to the ground). It uses the drawing and plotting capabilities of TiKZ to draw the crane and the solution. Looking back, it seems like there must be an easier way to draw the superstructure...

Crane Solution

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[scale=0.5]
\draw (-4,0) -- (40,0);
\draw[double] (0,0) -- ++(1.5,0.5)--++(3,0)--++(1.5,-0.5);
\draw[double] (0,0) -- ++(1.5,1.5) ++(3,0)--++(1.5,-1.5);
\draw[double] (1.5,0.5) -- ++(0,10)--++(3,0)--++(0,-10);
\draw[double,join=bevel] (1.5,0.5) -- ++(18.43:3.16) -- ++(161.57:3.16) -- ++(18.43:3.16) -- ++(161.57:3.16) -- ++(18.43:3.16) -- ++(161.57:3.16) -- ++(18.43:3.16) -- ++(161.57:3.16) -- ++(18.43:3.16) -- ++(161.57:3.16);
\draw[double] (1.5,0.5) -- +(135:0.707);
\draw[double] (4.5,0.5) -- +(45:0.707);
\draw[fill=lightgray] (-1,8.5) rectangle (-3,14) node at +(1,-2.75) {$A$};
\draw[double] (-1,10.5) -- ++(40,0) -- ++(0,1.732) -- ++(-40,0);
\draw[double,join=bevel] (-1,10.5+1.732) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) -- ++(-60:2) -- ++(60:2) node at +(0.75,-1.723/2) {$B$};
\draw[fill=lightgray] (4.6,10.5) rectangle (39.1,9.5);
\draw[double] (0,10.5) -- ++(0,-1.5) -- +(1.5,0);
\draw[double] (0,9) -- +(45:2.121);
\draw[fill=gray] (-0.6,13) rectangle (0.6,10.5+1.732);
\draw[fill=lightgray, even odd rule] (18.5,5) circle (0.25) circle (0.125);
\draw[double distance=0.4] (-0.5,13) -- ++(0,-4) ++(0.5,-0.5) -- ++(18,0) ++(0.5,-0.5) -- ++(0,-3);
\draw (18,8.55) arc (90:0:0.55);
\draw[fill=white] (18,8) circle (0.5);
\draw[color=white] (4.6,9.75) -- (39.1,9.75);
\draw[fill=white] (18.625,10.125) circle (0.375) +(-1.25,0) circle (0.375);
\draw[rounded corners, fill=lightgray] (18,7.5) -- (19,10.375) -- ++(-2,0) -- cycle;
\draw (18,8) circle (0.07);
\draw (18.625,10.125) circle (0.07) +(-1.25,0) circle (0.07);
\draw (-0.55,9) arc (180:270:0.55);
\draw[fill=gray] (0,9) circle (0.5) circle (0.07) node at +(0,-1.25) {$C$};
\draw[fill=gray] (0,13) circle (0.6) circle (0.07) node at +(1.25,0) {$M$};
\draw[double] (18.5,5) -- +(3,-1) (18.5,5) -- +(-3,-1);
\draw[fill=gray] (15.5,4.05) rectangle (21.5,3.755);
\draw[fill=red] (17,4.06) rectangle +(0.5,0.3);
\draw[fill=red] (17.5,4.06) rectangle +(0.5,0.3);
\draw[fill=red] (18,4.06) rectangle +(0.5,0.3);
\draw[fill=red] (18.5,4.06) rectangle +(0.5,0.3);
\draw[fill=red] (19,4.06) rectangle +(0.5,0.3);
\draw[fill=red] (19.5,4.06) rectangle +(0.5,0.3);
\draw[fill=red] (17.5,4.37) rectangle +(0.5,0.3);
\draw[fill=red] (18,4.37) rectangle +(0.5,0.3);
\draw[fill=red] (18.5,4.37) rectangle +(0.5,0.3);
\draw[fill=red] (19,4.37) rectangle +(0.5,0.3);
%Dimensions
\draw[semithick] (0,-0.25) -- +(0,-1) node at +(0,1.25) {$D$} ++(3,-3) -- +(0,3.25+10.5+1.723) ++(3,3) -- +(0,-1) node at +(0,1.25) {$E$} ++(33,-3) -- +(0,12.25);
\draw[semithick] (3,10.75+1.732) -- (3,13.6+0.25+1+1.5) ++(-3,-1.5) -- +(0,-1);
\draw[semithick] (-2,14.25) -- (-2,13.6+0.25+1+1.5);
\draw[semithick] (9,6)--++(0,2.25) ++(0,0.5)--(9,9.95);
\draw[semithick] (18.5,2) -- +(0,1);
\fill (9,10.5) -- ++(0.3,0) arc (0:-90:0.3) -- ++(0,0.6) arc (90:180:0.3);
\fill[white] (9,10.5) -- ++(0.3,0) arc (0:90:0.3) -- ++(0,-0.6) arc (270:180:0.3);
\draw[very thin] (9,10.5) circle (0.3) node at +(0,2.5) {$G$};
\draw[semithick, to-to] (0, -0.75) -- +(3,0) node[font=\footnotesize] at +(1.5,-0.5) {3 m};
\draw[semithick, to-to] (3, -0.75) -- +(3,0) node[font=\footnotesize] at +(1.5,-0.5) {3 m};
\draw[semithick, to-to] (3, -2.5) -- +(36,0) node[fill=white, font=\footnotesize] at +(18,0) {36 m};
\draw[semithick, to-to] (3,13.6+0.25+0.5) -- +(-3,0) node[font=\footnotesize] at +(-1.5,0.5) {3 m};
\draw[semithick, to-to] (3,13.6+0.25+2) -- +(-5,0) node[font=\footnotesize] at +(-2.5,0.5) {5 m};
\draw[semithick,to-to] (3,6.5) -- +(6,0) node[fill=white, font=\footnotesize] at +(3,0) {6 m};
\draw[semithick,to-to] (3,2.5) -- +(15.5,0) node[fill=white,font=\footnotesize] at +(7.75,0) {$x$};
\end{tikzpicture}
\begin{tikzpicture}[domain=0:36,x=100, y=20, scale=0.1]
    \draw[very thin,color=gray] (0,0) grid[xstep=5,ystep=20] (36,140);
    \foreach \x in {0,5,...,35}
        \draw (\x,1) -- (\x,-1)
            node[anchor=north] {\x};
\foreach \y in {0,20,...,140}
        \draw (0.5,\y) -- (-0.5,\y)
            node[anchor=east] {\y};
    \draw[->] (0,0) -- (36,0) node at +(-18,-12) {$x$ (m)}; 
    \draw[->] (0,0) -- (0,140) node[rotate=90] at +(-3,-70) {Weight (kN)};
    \draw[color=red,domain=4.5:36, smooth, semithick] plot (\x,{209/(\x-3)}) node[right] {$W_{max}$};
\end{tikzpicture}
\end{document}
share|improve this answer
up vote 102 down vote
+250

This very same image was not used in a publication. I copied the idea from a journal article and remade it using PSTricks and pst-optexp:

enter image description here

\documentclass{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(-0.2,0)(12.3,8.8)
\newpsobject{laser}{optbox}{position=start, innerlabel}
\psset[optexp]{lens=2, phwidth=0.07, outerheight=0.6}
\pnode(1,7){L}\pnode([offset=-6]L){PSLM}
\pnode([Xnodesep=2,offset=1]L){ASLM}\pnode([offset=-0.5,Xnodesep=9]L){MRef}
\pnode([offset=-7]ASLM){ML}\pnode([Xnodesep=8.5]ML){Cam}
\begin{optexp}
  \laser[optboxsize=1.6 0.6](L)(PSLM){Nd:YAG}
  \beamsplitter[bssize=0.4, labelangle=-90](L)(L|MRef)(MRef){BS}
  \lens[abspos=1.2, lens=0.5 0.5 0.4, n=2.5, labelangle=-10](L)(PSLM){MO}
  \pinhole[abspos=1.4, labelangle=10](L)(PSLM){PH}
  \lens[abspos=2.3](L)(PSLM){L}
  \opttripole[label=0.5](L)(PSLM)(ASLM){\psframe[dimen=outer](-0.5,0)(0.5,0.1)}{PSLM}
  \lens[label=0.6 -40](PSLM)(ASLM){L}
  \opttripole[label=0.5](PSLM)(ASLM)(ML){\psframe[dimen=outer](-0.5,0)(0.5,0.1)}{ASLM}
  \lens[position=0.45, labelangle=180](ASLM)(ML){L}
  \optretplate[labelangle=180, position=0.55](ASLM)(ML){$\lambda/2$}
  \optplate[labelangle=180, position=0.62](ASLM)(ML){P}
  \mirror[labeloffset=0.4](ASLM)(ML)(Cam){M}
  \newpsstyle{Beam}{fillcolor=green!80!black, opacity=0.5, fillstyle=solid, linestyle=none, beaminside=false}
  \drawwidebeam[beamwidth=0.1, stopinside]{1-5}
  \psset{loadbeampoints}
  \drawwidebeam[stopinside, savebeampoints=2]{5-7}
  \drawwidebeam[loadbeampoints=2, beamdiv=-8.5]{7-8}
  \drawwidebeam[loadbeampoints=2, beamdiv=-8.5, beamangle=-4]{7-8}
  \drawwidebeam[beamdiv=-8.5, beamangle=-4.5]{8-9}
  \drawwidebeam[loadbeampoints=2, beamdiv=-8.5, beamangle=4]{7-8}
  \drawwidebeam[beamdiv=-8.5, beamangle=4.5]{8-9}
  \lens[abspos=2](ML)(Cam){L}
  \lens[abspos=4](ML)(Cam){L}
  \crystal[abspos=6, voltage, crystalsize=1 0.6, fillcolor=yellow!90!black, fillstyle=solid](ML)(Cam){SBN}
  \beamsplitter[bssize=0.6](MRef)(MRef|Cam)(Cam){BS}
  \lens[n=2.4](MRef|Cam)(Cam){L}
  \optbox[optboxsize=0.8 0.6, position=end](ML)(Cam){Cam}
  \drawwidebeam[savebeampoints=2, stopinside]{9-13}
  \drawwidebeam[loadbeampoints=2, beamdiv=-16, beamangle=5, stopinside]{13-14}
  \drawwidebeam[beamangle=-5]{14-18}
  \drawwidebeam[loadbeampoints=2, beamdiv=-16, beamangle=-5, stopinside]{13-14}
  \drawwidebeam[beamangle=5]{14-18}
  \lens[lens=0.5 0.5 0.4, n=2](L|MRef)(MRef){MO}
  \pinhole[position=0.53, labelangle=180](L|MRef)(MRef){PH}
  \lens[position=0.65](L|MRef)(MRef){L}
  \optplate[position=0.7](L|MRef)(MRef){S}
  \mirror[labeloffset=0.4](L|MRef)(MRef)(MRef|Cam){M}
  \addtopsstyle{Beam}{fillcolor=red!70}
  \drawwidebeam[loadbeampoints=false, beamwidth=0.1, savebeampoints]{2}{19-21}
  \drawwidebeam{21-23}{16-18}
\end{optexp}
\end{pspicture}
\end{document}
share|improve this answer
1  
@StevenLu An SLM is a Spatial Light Modulator, the ASLM for Amplitude and the PSLM for Phase modulation. SBN is a strontium barium niobate crystal. –  Christoph Feb 7 at 8:41

A cylindrical volume charge distribution and its electric field strength on the point (0,0,b).

\documentclass{standalone}
\usepackage{tikz} 
\usetikzlibrary{calc}    
\tikzset{
  dim above/.style={to path={\pgfextra{
        \pgfinterruptpath
        \draw[>=latex,|<->|] let
        \p1=($(\tikztostart)!2mm!90:(\tikztotarget)$),
        \p2=($(\tikztotarget)!2mm!-90:(\tikztostart)$)
        in(\p1) -- (\p2) node[pos=.5,sloped,above]{#1};
        \endpgfinterruptpath
      }(\tikztostart) -- (\tikztotarget) \tikztonodes
    }
  },
  dim below/.style={to path={\pgfextra{
        \pgfinterruptpath
        \draw[>=latex,|<->|] let 
        \p1=($(\tikztostart)!2mm!90:(\tikztotarget)$),
        \p2=($(\tikztotarget)!2mm!-90:(\tikztostart)$)
        in (\p1) -- (\p2) node[pos=.5,sloped,below]{#1};
        \endpgfinterruptpath
      }(\tikztostart) -- (\tikztotarget) \tikztonodes
    }
  },
}

\begin{document}
  \begin{tikzpicture}

\draw[thick,-latex] (0,0,0) -- (4,0,0) node[anchor=north east]{$y$};
\draw[thick,-latex] (0,0,0) -- (0,7.5,0) node[anchor=north west]{$z$};
\draw[thick,-latex] (0,0,0) -- (0,0,5) node[anchor=south]{$x$};
\filldraw (0,6,0) circle (1.75pt) node[left,font=\small]{$P(0,0,b)$};

\fill[top color=gray!50!black,bottom color=blue!10,middle color=gray,shading=axis,opacity=0.25] (0,0) circle (2cm and 0.5cm);
\fill[left color=gray!50!black,right color=blue!50!black,middle color=gray!50,shading=axis,opacity=0.25] (2,0) -- (2,4) arc (360:180:2cm and 0.5cm) -- (-2,0) arc (180:360:2cm and 0.5cm);
\fill[top color=blue!90!,bottom color=blue!2,middle color=blue!30,shading=axis,opacity=0.25] (0,4) circle (2cm and 0.5cm);
\draw (-2,4) -- (-2,0) arc (180:360:2cm and 0.5cm) -- (2,4) ++ (-2,0) circle (2cm and 0.5cm);
\draw[densely dashed] (-2,0) arc (180:0:2cm and 0.5cm);

\draw[densely dashed] (-2,2.8) arc (180:0:2cm and 0.5cm);
\draw[densely dashed] (-2,2.6) arc (180:0:2cm and 0.5cm);
\draw[thick] (-2,2.8) arc (180:360:2cm and 0.5cm);
\draw[thick] (-2,2.6) arc (180:360:2cm and 0.5cm);
\draw[thick, orange] (2,2.6) -- (3,2.6);
\draw[thick, orange] (2,2.8) -- (3,2.8);
\draw[thick,-latex] (2.8,4) -- (2.8,2.8);
\draw[thick,-latex] (2.8,1.6) -- (2.8,2.6);
\draw[thick,latex-] (2.8,0) -- (2.8,1.2) node[above] {$z$};
\draw [dashed] (0,6)--(3,6);
\draw[thick,latex-] (2.8,6) -- (2.8,4.5)node[below]{$b-z$};
\node at (3.5,2.7) [anchor=east]{$dz$};
\node at (2,1.5) [anchor=east]{$\rho_v\ (C/m^3)$};
\draw (-2,0) to[dim above=$L$,color=orange] (-2,4) ;

\coordinate (vec1) at (30:1);
\draw[-latex,thick] (0,0) -- (vec1)node[midway,sloped, above, inner sep=1] {$a$};
\draw[ultra thick,-latex,blue] (0,6,0) -- (0,7,0) node[right] {$\mathbf{E}$};
     \end{tikzpicture}  
\end{document}

enter image description here

share|improve this answer
10  
You should load siunitx and then use \si{\coulomb\per\cubic\m} for the unit. –  Svend Tveskæg Feb 5 at 23:27

Transformer

\documentclass{article}

\usepackage[
  hmargin = 2.4cm,
  vmargin = 3cm
]{geometry}
\usepackage[
  figureposition = bottom
]{caption}
\usepackage{pst-solides3d}

% Upright text as subscript in math mode.
\makeatletter
 \begingroup
  \catcode`\_=\active
  \protected\gdef_{\@ifnextchar|\subtextup\sb}
 \endgroup
\def\subtextup|#1|{\sb{\textup{#1}}}
\AtBeginDocument{\catcode`\_=12 \mathcode`\_=32768}
\makeatother

% Setup of caption.
\DeclareCaptionLabelSeparator{adjustment}{:\quad}
\captionsetup{
  font = small,
  labelfont = sc,
  labelsep = adjustment,
  width = 0.7\textwidth
}

%% Parameters
% Windings
\def\lWind{40}
\def\rWind{80}
% Radii
\def\rHelix{1.13}
\def\rWire{0.004}

% Constants
\def\factor{160} % \factor > \lWind,\rWind
\pstVerb{%
  /left 2 \lWind\space mul \factor\space div def
  /right 2 \rWind\space mul \factor\space div def
}

%% Colours
\colorlet{wireColor}{red!60}
\colorlet{coreColor}{cyan!50}
%% Wire
\newpsobject{wire}{psSolid}{%
  object = courbe,
  ngrid = 4365 left mul cvi 5,
  r = \rWire,
  fillcolor = wireColor,
  incolor = wireColor
}

\pagestyle{empty}

\begin{document}

\begin{figure}[htbp]
 \centering
  \begin{pspicture}(-6.6,-4.4)(6.6,4.2)
   \psset{%
     algebraic,
     solidmemory,
     viewpoint = 20 5 10 rtp2xyz,
     lightsrc = 20 60 60 rtp2xyz,
     Decran = 30,
     grid = false,
     action = none
   }
   %%--------- Core ----------
   \psSolid[
     object = anneau,
     h = 1.0,
     R = 4,
     r = 2.5,
     ngrid = 4,
     RotX = 90,
     RotY = 45,
     RotZ = 90,
     fillcolor = coreColor,
     name = core
   ]
   %%--------- Wire ----------
   % Left
   \defFunction{heliceA}(t){\rHelix*cos(\factor*t)}{\rHelix*sin(\factor*t)}{t/left}
   \wire[
     function = heliceA,
     range = 0 Pi left mul,
     name = wireA
   ](0,-2.25,-1.5)
   % Right
   \defFunction{heliceB}(t){\rHelix*cos(\factor*t)}{-\rHelix*sin(\factor*t)}{t/right}
   \wire[
     function = heliceB,
     range = 0 Pi right mul,
     name = wireB
   ](0,2.25,-1.5)
   %%------- Assembly --------
   \psSolid[
     object = fusion,
     base = core wireA wireB,
     action = draw**
   ]
   %%---- Connecting wire ----
   % Left
   \psline[
     linewidth = 1.5pt
   ](-6.8,2.71)(-3.705,2.71)(-3.705,2.31)
   \psline[
     linewidth = 1.5pt
   ](-6.8,-2.845)(-3.65,-2.845)(-3.65,-2.545)
   \pcline[
     linewidth = 0.5pt
   ]{<->}(-6,2.71)(-6,-2.845)
   \ncput*{\small $U_|p|$}
   \uput[315](-6,2.71){\small $+$}
   \uput[40](-6,-2.845){\small $-$}
   \psline{->}(-6.8,3.01)(-5.5,3.01)
   \uput[0](-5.5,3.01){\small $I_|p|$}
   \rput(-1.3,0){\small $N_|p|$}
   % Right
   \psline[
     linewidth = 1.5pt
   ](6.8,2.65)(3.48,2.65)(3.48,2.25)
   \psline[
     linewidth = 1.5pt
   ](6.8,-3.0)(3.41,-3)(3.41,-2.7)
   \pcline[
     linewidth = 0.5pt
   ]{<->}(6,2.65)(6,-3)
   \ncput*{\small $U_|s|$}
   \uput[225](6,2.65){\small $+$}
   \uput[140](6,-3){\small $-$}
   \psline{->}(5.5,2.95)(6.8,2.95)
   \uput[180](5.5,2.95){\small $I_|s|$}
   \rput(1.3,0){\small $N_|s|$}
  \end{pspicture}
 \caption{Transformer with $\lWind$~windings on the primary side and $\rWind$~windings on the secondary side.}
 \label{fig:transformer}
\end{figure}

\end{document}

output

share|improve this answer
4  
Reference source(s): exa050.tex, as part of the PSTricks 3D Gallery; Drawing 3D Transformer with TikZ or PSTricks –  Werner Feb 6 at 0:44
15  
I was expecting Optimus Prime, but i'm not disappointed –  Thomas Feb 6 at 6:41

One of my favorites; this one's not so involved but I enjoy the simplicity of the code and the quality of the result. It uses pgfplots to display streamline data for vortex shedding from a square block at Re=100. The streamline data were computed by a Fortran code I wrote to model the flow.

enter image description here

The code:

\documentclass{standalone}
\usepackage{pgfplots}    % plot stuff
\pgfplotsset{compat=1.6} % avoid warnings

\begin{document}
\begin{tikzpicture}
\begin{axis}[
  axis equal image,
  xmin=13,xmax=35,
  ymin=0,ymax=3,
  width=7in,
  xlabel={$x/D$ (-)},
  ylabel={$y/D$ (-)},
]
  \foreach \num in {1,2,...,18} {
    \addplot[black] file {time43.39stream\num.dat};                          
  }
  \draw[fill=black] (axis cs:15,1) rectangle (axis cs:16,2);
\end{axis}
\end{tikzpicture}
\end{document}

The data files are quite large; they are available here for anyone wishing to reproduce my result. The full paper is available for download here. It includes many similar figures showing different times during the vortex shedding process.

share|improve this answer
4  
Really beautiful rendering! :) –  Zanathel Feb 6 at 10:24
12  
Very nice. And thanks a lot for making all figures vector graphics. Sometimes when reading papers I feel like I'm alone in hating (and avoiding) raster graphics (especially low-resolution ones) in papers. –  Joey Feb 7 at 9:02
1  
@AlexG, thanks for your comments! You are correct; the code does not directly output the streamline data. I used a separate program to compute these contours and generate the files time43.39stream?.dat for plotting. I have a link to the files in my answer above if you'd like to reproduce the figure. :) –  Paul Gessler Feb 7 at 17:22

The following is a TikZ version of a three-tier data center architecture (the reference was Figure 3-8 Three-Tier Model with 8-Way ECMP of Cisco Data Center Infrastructure 2.5 Design Guide). The code is ugly, unreadable so take it as it is. Though, it is highly inspired by Q/A of the site: some of you may recognize your own piece of code somewhere.

enter image description here

The code:

\documentclass[tikz,border=5pt,png]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\usetikzlibrary{backgrounds,calc,shadings,shapes.arrows,shapes.symbols,shadows}
\definecolor{switch}{HTML}{006996}

% argument #1: any options
\newenvironment{customlegend}[1][]{%
    \begingroup
    % inits/clears the lists (which might be populated from previous
    % axes):
    \csname pgfplots@init@cleared@structures\endcsname
    \pgfplotsset{#1}%
}{%
    % draws the legend:
    \csname pgfplots@createlegend\endcsname
    \endgroup
}%

% makes \addlegendimage available (typically only available within an
% axis environment):
\def\addlegendimage{\csname pgfplots@addlegendimage\endcsname}

\makeatletter
\pgfkeys{/pgf/.cd,
  parallelepiped offset x/.initial=2mm,
  parallelepiped offset y/.initial=2mm
}
\pgfdeclareshape{parallelepiped}
{
  \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
  \inheritanchorborder[from=rectangle]
  \inheritanchor[from=rectangle]{north}
  \inheritanchor[from=rectangle]{north west}
  \inheritanchor[from=rectangle]{north east}
  \inheritanchor[from=rectangle]{center}
  \inheritanchor[from=rectangle]{west}
  \inheritanchor[from=rectangle]{east}
  \inheritanchor[from=rectangle]{mid}
  \inheritanchor[from=rectangle]{mid west}
  \inheritanchor[from=rectangle]{mid east}
  \inheritanchor[from=rectangle]{base}
  \inheritanchor[from=rectangle]{base west}
  \inheritanchor[from=rectangle]{base east}
  \inheritanchor[from=rectangle]{south}
  \inheritanchor[from=rectangle]{south west}
  \inheritanchor[from=rectangle]{south east}
  \backgroundpath{
    % store lower right in xa/ya and upper right in xb/yb
    \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
    \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
    \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/parallelepiped offset x}}
    \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/parallelepiped offset y}}
    \def\ppd@offset{\pgfpoint{\pgfutil@tempdima}{\pgfutil@tempdimb}}
    \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}
    \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
    \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
    \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}
    \pgfpathclose
    \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
    \pgfpathlineto{\pgfpointadd{\pgfpoint{\pgf@xb}{\pgf@ya}}{\ppd@offset}}
    \pgfpathlineto{\pgfpointadd{\pgfpoint{\pgf@xb}{\pgf@yb}}{\ppd@offset}}
    \pgfpathlineto{\pgfpointadd{\pgfpoint{\pgf@xa}{\pgf@yb}}{\ppd@offset}}
    \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}
    \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
    \pgfpathlineto{\pgfpointadd{\pgfpoint{\pgf@xb}{\pgf@yb}}{\ppd@offset}}
  }
}
\makeatother

\tikzset{l3 switch/.style={
    parallelepiped,fill=switch, draw=white,
    minimum width=0.75cm,
    minimum height=0.75cm,
    parallelepiped offset x=1.75mm,
    parallelepiped offset y=1.25mm,
    path picture={
      \node[fill=white,
        circle,
        minimum size=6pt,
        inner sep=0pt,
        append after command={
          \pgfextra{
            \foreach \angle in {0,45,...,360}
            \draw[-latex,fill=white] (\tikzlastnode.\angle)--++(\angle:2.25mm);
          }
        }
      ] 
       at ([xshift=-0.75mm,yshift=-0.5mm]path picture bounding box.center){};
    }
  },
  ports/.style={
    line width=0.3pt,
    top color=gray!20,
    bottom color=gray!80
  },
  rack switch/.style={
    parallelepiped,fill=white, draw,
    minimum width=1.25cm,
    minimum height=0.25cm,
    parallelepiped offset x=2mm,
    parallelepiped offset y=1.25mm,
    xscale=-1,
    path picture={
      \draw[top color=gray!5,bottom color=gray!40]
      (path picture bounding box.south west) rectangle 
      (path picture bounding box.north east);
      \coordinate (A-west) at ([xshift=-0.2cm]path picture bounding box.west);
      \coordinate (A-center) at ($(path picture bounding box.center)!0!(path picture bounding box.south)$);
      \foreach \x in {0.275,0.525,0.775}{
        \draw[ports]([yshift=-0.05cm]$(A-west)!\x!(A-center)$) rectangle +(0.1,0.05);
        \draw[ports]([yshift=-0.125cm]$(A-west)!\x!(A-center)$) rectangle +(0.1,0.05);
       } 
      \coordinate (A-east) at (path picture bounding box.east);
      \foreach \x in {0.085,0.21,0.335,0.455,0.635,0.755,0.875,1}{
        \draw[ports]([yshift=-0.1125cm]$(A-east)!\x!(A-center)$) rectangle +(0.05,0.1);       
      }
    }
  },
  server/.style={
    parallelepiped,
    fill=white, draw,
    minimum width=0.35cm,
    minimum height=0.75cm,
    parallelepiped offset x=3mm,
    parallelepiped offset y=2mm,
    xscale=-1,
    path picture={
      \draw[top color=gray!5,bottom color=gray!40]
      (path picture bounding box.south west) rectangle 
      (path picture bounding box.north east);
      \coordinate (A-center) at ($(path picture bounding box.center)!0!(path picture bounding box.south)$);
      \coordinate (A-west) at ([xshift=-0.575cm]path picture bounding box.west);
      \draw[ports]([yshift=0.1cm]$(A-west)!0!(A-center)$) rectangle +(0.2,0.065);
      \draw[ports]([yshift=0.01cm]$(A-west)!0.085!(A-center)$) rectangle +(0.15,0.05);
      \fill[black]([yshift=-0.35cm]$(A-west)!-0.1!(A-center)$) rectangle +(0.235,0.0175);
      \fill[black]([yshift=-0.385cm]$(A-west)!-0.1!(A-center)$) rectangle +(0.235,0.0175);
      \fill[black]([yshift=-0.42cm]$(A-west)!-0.1!(A-center)$) rectangle +(0.235,0.0175);
    }  
  },
}

\usetikzlibrary{calc, shadings, shadows, shapes.arrows}

% Styles for interfaces and edge labels
\tikzset{%
  interface/.style={draw, rectangle, rounded corners, font=\LARGE\sffamily},
  ethernet/.style={interface, fill=yellow!50},% ethernet interface
  serial/.style={interface, fill=green!70},% serial interface
  speed/.style={sloped, anchor=south, font=\large\sffamily},% line speed at edge
  route/.style={draw, shape=single arrow, single arrow head extend=4mm,
    minimum height=1.7cm, minimum width=3mm, white, fill=switch!20,
    drop shadow={opacity=.8, fill=switch}, font=\tiny}% inroute / outroute arrows
}
\newcommand*{\shift}{1.3cm}% For placing the arrows later

% The router icon
\newcommand*{\router}[1]{
\begin{tikzpicture}    
  \coordinate (ll) at (-3,0.5);
  \coordinate (lr) at (3,0.5);
  \coordinate (ul) at (-3,2);
  \coordinate (ur) at (3,2);
  \shade [shading angle=90, left color=switch, right color=white] (ll)
    arc (-180:-60:3cm and .75cm) -- +(0,1.5) arc (-60:-180:3cm and .75cm)
    -- cycle;
  \shade [shading angle=270, right color=switch, left color=white!50] (lr)
    arc (0:-60:3cm and .75cm) -- +(0,1.5) arc (-60:0:3cm and .75cm) -- cycle;
  \draw [thick] (ll) arc (-180:0:3cm and .75cm) -- (ur) arc (0:-180:3cm and .75cm)
    -- cycle;
  \draw [thick, shade, upper left=switch, lower left=switch,
    upper right=switch, lower right=white] (ul)
    arc (-180:180:3cm and .75cm);
  \node at (0,0.5){\color{blue!60!black}\Huge #1};% The name of the router
  % The four arrows, symbols for incoming and outgoing routes:
  \begin{scope}[yshift=2cm, yscale=0.28, transform shape]
    \node[route, rotate=45, xshift=\shift] {\strut};
    \node[route, rotate=-45, xshift=-\shift] {\strut};
    \node[route, rotate=-135, xshift=\shift] {\strut};
    \node[route, rotate=135, xshift=-\shift] {\strut};
  \end{scope}
\end{tikzpicture}}

\makeatletter
\pgfdeclareradialshading[tikz@ball]{cloud}{\pgfpoint{-0.275cm}{0.4cm}}{%
  color(0cm)=(tikz@ball!75!white);
  color(0.1cm)=(tikz@ball!85!white); 
  color(0.2cm)=(tikz@ball!95!white); 
  color(0.7cm)=(tikz@ball!89!black); 
  color(1cm)=(tikz@ball!75!black)
}
\tikzoption{cloud color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{cloud}\tikz@addmode{\tikz@mode@shadetrue}}
\makeatother

\tikzset{my cloud/.style={
     cloud, draw, aspect=2,
     cloud color={gray!5!white}
  }
}

\begin{document}

\begin{tikzpicture}

\node[server](server 1){};
\node[server, right of= server 1](server 2){};
\node[server, right of= server 2](server 3){};

\node[rack switch, above of=server 2,xshift=0.1cm,yshift=0.3cm](rack switch 1){};

\draw[thick,darkgray!10!gray] (server 1.north)--(rack switch 1);
\draw[thick,darkgray!10!gray] (server 2.north)--(rack switch 1);
\draw[thick,darkgray!10!gray] (server 3.north)--(rack switch 1);

\begin{scope}[xshift=3.5cm]
\node[server](server 4){};
\node[server, right of= server 4](server 5){};
\node[server, right of= server 5](server 6){};

\node[rack switch, above of=server 5,xshift=0.1cm,yshift=0.3cm](rack switch 2){};

\draw[thick,darkgray!10!gray] (server 4.north)--(rack switch 2);
\draw[thick,darkgray!10!gray] (server 5.north)--(rack switch 2);
\draw[thick,darkgray!10!gray] (server 6.north)--(rack switch 2);
\end{scope}

\begin{scope}[xshift=8cm]
\node[server](server 7){};
\node[server, right of= server 7](server 8){};
\node[server, right of= server 8](server 9){};

\node[rack switch, above of=server 8,xshift=0.1cm,yshift=0.3cm](rack switch 3){};

\draw[thick,darkgray!10!gray] (server 7.north)--(rack switch 3);
\draw[thick,darkgray!10!gray] (server 8.north)--(rack switch 3);
\draw[thick,darkgray!10!gray] (server 9.north)--(rack switch 3);
\end{scope}


\node[l3 switch, above of =rack switch 1, xshift=1.5cm,yshift=0.5cm](l3 switch 1){};
\node[l3 switch, above of =rack switch 2, xshift=2cm,yshift=0.5cm](l3 switch 2){};

\begin{scope}[very thick,darkgray!10!gray]
\draw ($(rack switch 1.north)!0.5!(rack switch 1.north west)$)--
 ($(l3 switch 2.south)!0.5!(l3 switch 2.south west)$);
\draw ($(rack switch 1.north)!0.5!(rack switch 1.north east)$)--
 ($(l3 switch 1.south)!0.5!(l3 switch 1.south west)$);

\draw ($(rack switch 2.north)!0.5!(rack switch 2.north west)$)--
 ($(l3 switch 2.south)!0!(l3 switch 2.south west)$);
\draw ($(rack switch 2.north)!0.5!(rack switch 2.north east)$)--
 ($(l3 switch 1.south)!0!(l3 switch 1.south west)$);  

\draw ($(rack switch 3.north)!0.5!(rack switch 3.north west)$)--
 ($(l3 switch 2.south)!0.5!(l3 switch 2.south east)$);
\draw ($(rack switch 3.north)!0.5!(rack switch 3.north east)$)--
 ($(l3 switch 1.south)!0.5!(l3 switch 1.south east)$); 

\draw ($(l3 switch 2.north west)!0.25!(l3 switch 2.south west)$)--
($(l3 switch 1.north east)!0.25!(l3 switch 1.south east)$)
;
\draw ($(l3 switch 2.north west)!0.75!(l3 switch 2.south west)$)--
($(l3 switch 1.north east)!0.75!(l3 switch 1.south east)$)
;

\end{scope} 

\node[l3 switch, above of =l3 switch 1, xshift=2cm,yshift=0.75cm](border 1){}; 

% = = = = = = = = = = = = = = = =
% Labels
% = = = = = = = = = = = = = = = =


\node[xshift=-1.05cm,yshift=0.2cm,left of = server 3,align=left] (lev1) {Computing Servers};

\node[xshift=0.9cm,yshift=0.3cm,above of = lev1,align=left](lev2) {Access Layer};

\node[xshift=1.6cm,yshift=0.4cm,above of = lev2,align=left](lev3) {Aggregation Layer};
\node[xshift=2.55cm,yshift=0.75cm,above of = lev3,align=right](lev4) {Core Layer};
\node[xshift=5.7cm,yshift=1.2cm,above of = lev4,align=right](lev5) {Gateway Router};

% = = = = = = = = = = = = = = = =
% Shifted part
% = = = = = = = = = = = = = = = =

\begin{scope}[xshift=12cm]
\node[server](server 1-a){};
\node[server, right of= server 1-a](server 2-a){};
\node[server, right of= server 2-a](server 3-a){};

\node[rack switch, above of=server 2-a,xshift=0.1cm,yshift=0.3cm](rack switch 1-a){};

\draw[thick,darkgray!10!gray] (server 1-a.north)--(rack switch 1-a);
\draw[thick,darkgray!10!gray] (server 2-a.north)--(rack switch 1-a);
\draw[thick,darkgray!10!gray] (server 3-a.north)--(rack switch 1-a);

\begin{scope}[xshift=3.5cm]
\node[server](server 4-a){};
\node[server, right of= server 4-a](server 5-a){};
\node[server, right of= server 5-a](server 6-a){};

\node[rack switch, above of=server 5-a,xshift=0.1cm,yshift=0.3cm](rack switch 2-a){};

\draw[thick,darkgray!10!gray] (server 4-a.north)--(rack switch 2-a);
\draw[thick,darkgray!10!gray] (server 5-a.north)--(rack switch 2-a);
\draw[thick,darkgray!10!gray] (server 6-a.north)--(rack switch 2-a);
\end{scope}

\begin{scope}[xshift=8cm]
\node[server](server 7-a){};
\node[server, right of= server 7-a](server 8-a){};
\node[server, right of= server 8-a](server 9-a){};

\node[rack switch, above of=server 8-a,xshift=0.1cm,yshift=0.3cm](rack switch 3-a){};

\draw[thick,darkgray!10!gray] (server 7-a.north)--(rack switch 3-a);
\draw[thick,darkgray!10!gray] (server 8-a.north)--(rack switch 3-a);
\draw[thick,darkgray!10!gray] (server 9-a.north)--(rack switch 3-a);
\end{scope}


\node[l3 switch, above of =rack switch 1-a, xshift=1.5cm,yshift=0.5cm](l3 switch 1-a){};
\node[l3 switch, above of =rack switch 2-a, xshift=2cm,yshift=0.5cm](l3 switch 2-a){};

\begin{scope}[very thick,darkgray!10!gray]
\draw ($(rack switch 1-a.north)!0.5!(rack switch 1-a.north west)$)--
 ($(l3 switch 2-a.south)!0.5!(l3 switch 2-a.south west)$);
\draw ($(rack switch 1-a.north)!0.5!(rack switch 1-a.north east)$)--
 ($(l3 switch 1-a.south)!0.5!(l3 switch 1-a.south west)$);

\draw ($(rack switch 2-a.north)!0.5!(rack switch 2-a.north west)$)--
 ($(l3 switch 2-a.south)!0!(l3 switch 2-a.south west)$);
\draw ($(rack switch 2-a.north)!0.5!(rack switch 2-a.north east)$)--
 ($(l3 switch 1-a.south)!0!(l3 switch 1-a.south west)$);  

\draw ($(rack switch 3-a.north)!0.5!(rack switch 3-a.north west)$)--
 ($(l3 switch 2-a.south)!0.5!(l3 switch 2-a.south east)$);
\draw ($(rack switch 3-a.north)!0.5!(rack switch 3-a.north east)$)--
 ($(l3 switch 1-a.south)!0.5!(l3 switch 1-a.south east)$); 

\draw ($(l3 switch 2-a.north west)!0.25!(l3 switch 2-a.south west)$)--
($(l3 switch 1-a.north east)!0.25!(l3 switch 1-a.south east)$)
;
\draw ($(l3 switch 2-a.north west)!0.75!(l3 switch 2-a.south west)$)--
($(l3 switch 1-a.north east)!0.75!(l3 switch 1-a.south east)$)
;

\end{scope} 

\node[l3 switch, above of =l3 switch 1-a, xshift=2cm,yshift=0.75cm](border 1-a){}; 

\begin{scope}[very thick,darkgray!10!gray]
\draw ($(border 1-a.south)!0.5!(border 1-a.south west)$)--
 (l3 switch 1-a.north);

\draw[thick] (border 1-a.south)--
 ([xshift=0.1cm]l3 switch 1.north);

\draw ($(border 1-a.south)!-0.5!(border 1-a.south west)$)--
 (l3 switch 2-a.north);

\draw[thick] (border 1-a.south)--
 ([xshift=0.05cm]l3 switch 2.north); 
\end{scope}
\end{scope}


% = = = = = = = = = = = = = = = =
% Background rectangle - removed
% = = = = = = = = = = = = = = = =

\path ($(server 3.south west)!0.9!(lev1.south east)-(0,0.4cm)$) coordinate (A)--
([yshift=0.86cm]A |- lev4.north east)coordinate (B)--
($(B)+(11.2cm,0)$)coordinate (C);

% = = = = = = = = = = = = = = = =
% Border Router and Internet
% = = = = = = = = = = = = = = = =

% interconnections of border 1
\begin{scope}[very thick,darkgray!10!gray]
\draw ($(border 1.south)!0.5!(border 1.south west)$)--
 (l3 switch 1.north);

\draw[thick] (border 1.south)--
 ([xshift=-0.05cm]l3 switch 1-a.north);

\draw ($(border 1.south)!-0.5!(border 1.south west)$)--
 (l3 switch 2.north);

\draw[thick] (border 1.south)--
 ([xshift=-0.1cm]l3 switch 2-a.north);
\end{scope}

\begin{scope}
\node[yshift=1cm,scale=0.2] (brouter) at (C) {\router{}}
edge[very thick,darkgray!10!gray] ([xshift=0.1cm,yshift=0.5cm]border 1);

\node[yshift=0.65cm,my cloud, minimum width=1.25cm, minimum height=1.55cm, above of=brouter,font=\large] (it)  {Internet} edge[very thick,darkgray!30!gray] (brouter);
\draw[very thick,darkgray!30!gray](brouter)--([xshift=0.1cm,yshift=0.125cm]border 1-a.north);
\end{scope}

% = = = = = = = = = = = = = = = =
% paths
% = = = = = = = = = = = = = = = =

% legend
\begin{customlegend}[
legend entries={
North-South path,
East-West path
},
legend cell align=left,
legend style={at={([xshift=10.375cm,yshift=0.75cm]it.east)},font=\small}]
\addlegendimage{stealth-stealth,very thick,red!80!black}
\addlegendimage{stealth-stealth,very thick,green!70!black}
\end{customlegend}

% paths: north-south
\draw[stealth-stealth,very thick, red!80!black,shorten <=0.025cm, shorten >=0.56cm]([yshift=-0.25cm]brouter.west)--([xshift=0.05cm]border 1.north);

\draw[stealth-stealth,very thick, red!80!black,shorten <=0.05cm, shorten >=0.125cm](border 1.south)--([yshift=0.075cm,xshift=0.4cm]l3 switch 1.north);

\draw[stealth-stealth,very thick, red!80!black,shorten <=0.1cm, shorten >=0.2cm]([xshift=-0.15cm]l3 switch 1.south)--([yshift=0.075cm,xshift=-0.65cm]rack switch 2.north);

\draw[stealth-stealth,very thick, red!80!black,shorten <=0.1cm, shorten >=0.1cm]([xshift=-0.25cm]rack switch 2.south)--([yshift=0.075cm,xshift=-0.06cm]server 6.north);

% paths: east-west
\draw[stealth-stealth,very thick, green!70!black,shorten <=0.1cm, shorten >=0.1cm]([xshift=-0.25cm]rack switch 1-a.south)--([yshift=0.075cm,xshift=-0.06cm]server 3-a.north);

\draw[stealth-stealth,very thick, green!70!black,shorten <=0.025cm, shorten >=0.2cm]([xshift=-0.4cm]l3 switch 1-a.south)--([yshift=0.075cm,xshift=-0.4cm]rack switch 1-a.north);

\draw[stealth-stealth, very thick, green!70!black,shorten <=0.1cm, shorten >=0.2cm]([xshift=-0.15cm]l3 switch 1-a.south)--([yshift=0.075cm,xshift=-0.65cm]rack switch 2-a.north);

\draw[stealth-stealth,very thick, green!70!black,shorten <=0.1cm, shorten >=0.15cm]([xshift=-0.1cm]rack switch 2-a.south)--([yshift=0.075cm,xshift=-0.12cm]server 5-a.north);

\end{tikzpicture}

\end{document}
share|improve this answer

Language used - Asymptote

A quarter sessile drop

import three;
import solids;

unitsize(1cm);

currentprojection = orthographic(5,4,2);

path3 x = (-1,0,0)--(4.5,0,0);
draw(x,EndArrow3);
label("$x$",(4.7,0,0));

path3 y = (0,-1,0)--(0,4.5,0);
draw(y,EndArrow3);
label("$y$",(0,4.7,0));

path3 z = (0,0,-1)--(0,0,4.5);
draw(z,EndArrow3);
label("$z$",(0,0,4.7));

label("$O$",(0,-0.3,-0.5));

path3 a = arc(O,3,0,0,90,0);
draw(a);
revolution s = revolution(O,a,Z,0,90);
draw(surface(s),opacity(0.5)+cyan,light(0));

path3[] b = box(O,(2.2,2.2,3));
draw(b,dashed);


path3 c = O--(3*dir(30,0));
draw(c,EndArrow3);
path3 d = (3*dir(30,0))--(4.5*dir(30,0));
draw(d);
path3 e = (4.5*dir(30,0))--(4.5*dir(30,0)+(1,0,0));
draw("$R$",e);

path3 f = (3,0,0)--(3,0,1);
draw(f);
path3 g = (2.8,0,0)..(2.8,0,0.2)..(3,0,0.2);
draw("$\theta$",g);

enter image description here

Moving contact line

    unitsize(1cm);

path a = (1,2.4)--(4,0.6)..(4.5,1)..(4.1,1.9)..(3.9,2)..cycle;
draw(a);
fill(a,cyan);

path b = (0,3)--(5,0);
draw(b,linewidth(2));

path c = shift(4,0.6)*scale(0.6)*unitcircle;
draw(c,red+dashed);


path d = (5,1.2)--(6,1.8);
draw(d,EndArrow);


path e = shift(8,3)*scale(2)*unitcircle;
draw(e,red+dashed);


path f = (9.4,1.6)--(6.1,3.58);
draw(f,linewidth(2));

path g = (8,2.44)..(8.8,3.2)..(8.6,3.8)..(8.4,4.1);
draw(g,dashed);
dot(g,red);
label("$a_0,a_1$",(8,2.44),SW);
label("$b_0$",(8.8,3.2),W);
label("$c_0$",(8.6,3.8),W);
label("$d_0$",(8.4,4.1),NW);

path h = (8,2.44)--(8.8,1.96)..(9.1,2.9)..(9.0,3.5);
draw(h);
dot(h,red);
label("$b_1$",(8.8,1.96),SW);
label("$c_1$",(9.1,2.9),NE);
label("$d_1$",(9.0,3.5),NE);

enter image description here

share|improve this answer

The scientific viewpoint of an egg on the frying pan.

enter image description here

\documentclass[pstricks]{standalone}
\usepackage{pst-node,pst-plot}
\pstVerb{realtime srand}

\begin{document}
\psLoop{25}{%
\begin{pspicture}(-2,-2)(2,2)
    \pscircle*[linecolor=orange]{0.75}
    \curvepnodes[plotpoints=73]{0}{360}{Rand 10 div 1.50 add t PtoC}{P}
    \psnccurve(0,\numexpr\Pnodecount-1){P}
\end{pspicture}}
\end{document}
share|improve this answer
15  
This is a really awesome picture, especially for such simple code, but ... "scientific"? –  Charles Staats Feb 6 at 14:29
7  
For the record: I did not downvote this answer. –  Charles Staats Feb 6 at 15:03
2  
Enkelt och genialt, as the Swedes say :) –  Kuba Ober Feb 6 at 15:32
2  
@CodeMocker Next time, try to do this. –  Vÿska Feb 8 at 14:50
1  
-1: Bacon is missing. :-D –  Henri Menke Mar 6 at 7:40

Not very scientific and clearly not that awesome as the rest from here, but it was a big deal for me since a knew nothing about TikZ (I still know nothing, though :P). It's the ATDD cycle.

enter image description here

The code it's not pretty.

\documentclass{standalone}

\usepackage[spanish,es-noquoting]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tikz}
\usetikzlibrary{shadows}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{positioning}
\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}
\tikzset{normalstyle/.style={draw, drop shadow, fill=white, rectangle, inner sep=5pt, font=\bfseries, align=center}}
\tikzset{bubble/.style={draw, circle, fill=white, minimum width=5em}}
\def \radius {0.30\textwidth}

\def \offset{-5} % para que la linea que une rojo con verde sea diagonal

    \draw[dotted, thick] ({90 + \offset - 1}:\radius*1.4) -- ({-90 + \offset -1 }:\radius*1.4);

    \path[name path=circulo] (0, 0) circle (\radius);



    % ELEGIR US
    \node(elegir_us)[normalstyle, name path=path_elegir_us] at ({-173 + \offset}:\radius) {Elegir\\ User Story};

    % START
    \node (start) [node distance=0mm and 8mm, left=of elegir_us, circle, fill=black, minimum width=1pt]{};

    % ESCRIBIR PRUEBAS
    \node(escribir_pruebas)[normalstyle,name path=path_escribir_pruebas] at ({164 + \offset}:\radius) {Escribir pruebas\\ de aceptacion\\ para la Story};

    % IMPLEMENTAR PRUEBA
    \node(implementar_prueba)[normalstyle, name path=path_implementar_prueba] at ({132 + \offset}:\radius) {Implementar\\ prueba de\\    aceptacion};

    % PRUEBA FALLANDO
    \node(prueba_fallando)[name path=path_prueba_fallando,draw, drop shadow, fill=red, rectangle, inner sep=5pt, font=\bfseries, align=center] at ({90 + \offset}:\radius) {Prueba de\\ aceptacion\\ fallando};

    % PRIMER TRIBUBBLE
    \node(prueba1)[bubble,name path=path_prueba1] at ({52 + \offset}:\radius){Prueba};
    \node(codigo1) [bubble, above right = 1mm and 5mm of prueba1.center] {Código};
    \node(refactor1) [bubble,name path=path_refactor1, below right = 1mm and 5mm of prueba1.center] {Refactor};

    % SEGUNDO TRIBUBBLE
    \node(prueba2)[bubble,name path=path_prueba2] at ({0 + \offset}:\radius){Prueba};
    \node(codigo2) [bubble, above right = 1mm and 5mm of prueba2.center] {Código};
    \node(refactor2) [bubble, below right = 1mm and 5mm of prueba2.center] {Refactor};    

    % TERCER TRIBUBBLE
    \node(prueba3)[bubble,name path=path_prueba3] at ({-52 + \offset}:\radius){Prueba};
    \node(codigo3) [bubble,,name path=path_codigo3, above right = 1mm and 5mm of prueba3.center] {Código};
    \node(refactor3) [bubble, below right = 1mm and 5mm of prueba3.center] {Refactor};    

    % PRUEBA PASANDO    
    \node(prueba_pasando)[name path=path_prueba_pasando, draw, drop shadow, fill=green, rectangle, inner sep=5pt, font=\bfseries, align=center] at ({-90 + \offset}:\radius) {Prueba de\\ aceptacion\\ pasando};

    % REFACTOR
    \node(refactor)[normalstyle, name path=path_refactorizar] at ({-128 + \offset}:\radius) {Refactorizar};

    % ACEPTACION CLIENTE
    \node(aceptacion_cliente)[normalstyle, name path=path_aceptacion_cliente] at ({-149 + \offset}:\radius) {Aceptacion\\ Cliente};


    % INTERSECCIONES

    % INTERSECCIÓN ELEGIR USER STORY
    \path [name intersections={of=circulo and path_elegir_us,name=intELEGIRUS}];
\def \ELEGIRUSUP{intELEGIRUS-1}
\def \ELEGIRUSDOWN {intELEGIRUS-2}

    % INTERSECCIÓN ESCRIBIR PRUEBAS
    \path [name intersections={of=circulo and path_escribir_pruebas,name=intESCRIBIRPRUEBAS}];
\def \ESCRIBIRPRUEBASUP {intESCRIBIRPRUEBAS-1}
\def \ESCRIBIRPRUEBASDOWN {intESCRIBIRPRUEBAS-2}

    % INTERSECCIÓN IMPLEMENTAR PRUEBA
    \path [name intersections={of=circulo and path_implementar_prueba,name=intIMPLEMENTARPRUEBA}];
\def \IMPLEMENTARPRUEBAUP {intIMPLEMENTARPRUEBA-1}
\def \IMPLEMENTARPRUEBADOWN {intIMPLEMENTARPRUEBA-2}

    % INTERSECCIÓN PRUEBA FALLANDO
    \path [name intersections={of=circulo and path_prueba_fallando,name=intPRUEBAFALLANDO}];
\def  \PRUEBAFALLANDORIGHT {intPRUEBAFALLANDO-1}
\def \PRUEBAFALLANDOLEFT{intPRUEBAFALLANDO-2}

    % INTERSECCIÓN TRIBUBBLE 1
    \path [name intersections={of=circulo and path_prueba1,name=intPRUEBAUNO}];
\def \TRIBUBBLEUNOUP {intPRUEBAUNO-1}

    \path [name intersections={of=circulo and path_refactor1,name=intREFACTORUNO}];
\def \TRIBUBBLEUNODOWN {intREFACTORUNO-2}

    % INTERSECCIÓN TRIBUBBLE 2
    \path [name intersections={of=circulo and path_prueba2,name=intPRUEBADOS}];
\def \TRIBUBBLEDOSUP {intPRUEBADOS-1}
\def \TRIBUBBLEDOSDOWN {intPRUEBADOS-2}

    % INTERSECCIÓN TRIBUBBLE 3
    \path [name intersections={of=circulo and path_codigo3,name=intCODIGOTRES}];
\def \TRIBUBBLETRESUP {intCODIGOTRES-1}

    \path [name intersections={of=circulo and path_prueba3,name=intPRUEBA3}];
\def \TRIBUBBLETRESDOWN {intPRUEBA3-2}

    % INTERSECCIÓN PRUEBA PASANDO
    \path [name intersections={of=circulo and path_prueba_pasando,name=intPRUEBAPASANDO}];
\def \PRUEBAPASANDOLEFT {intPRUEBAPASANDO-1}
\def \PRUEBAPASANDORIGHT {intPRUEBAPASANDO-2}

    % INTERSECCIÓN REFACTORIZAR
    \path [name intersections={of=circulo and path_refactorizar,name=intREFACTORIZAR}];
\def \REFACTORIZARUP {intREFACTORIZAR-1}
\def \REFACTORIZARDOWN{intREFACTORIZAR-2}

    % INTERSECCIÓN ACEPTACION CLIENTE
    \path [name intersections={of=circulo and path_aceptacion_cliente,name=intACEPTACIONCLIENTE}];
\def \ACEPTACIONCLIENTEUP{intACEPTACIONCLIENTE-1}
\def \ACEPTACIONCLIENTEDOWN{intACEPTACIONCLIENTE-2}



    % LAS FLECHAS EMPEZANDO POR START Y SIGUE EL CAMINO
    \draw [->,bend left=15] (node cs:name=start, anchor=east) to (node cs:name=elegir_us, anchor=west);
    \draw [->,bend left=15] (\ELEGIRUSUP) to (\ESCRIBIRPRUEBASDOWN);
    \draw [->,bend left=15] (\ESCRIBIRPRUEBASUP) to (\IMPLEMENTARPRUEBADOWN);
    \draw [->,bend left=15] (\IMPLEMENTARPRUEBAUP) to (\PRUEBAFALLANDOLEFT);
    \draw [->,bend left=15] (\PRUEBAFALLANDORIGHT) to (\TRIBUBBLEUNOUP);
    \draw [->,bend left=15] (\TRIBUBBLEUNODOWN) to (\TRIBUBBLEDOSUP);
    \draw [->,bend left=15] (\TRIBUBBLEDOSDOWN) to (\TRIBUBBLETRESUP);
    \draw [->,bend left=15] (\TRIBUBBLETRESDOWN) to (\PRUEBAPASANDORIGHT);
    \draw [->,bend left=15] (\PRUEBAPASANDOLEFT) to (\REFACTORIZARDOWN);
    \draw [->,bend left=15] (\REFACTORIZARUP) to (\ACEPTACIONCLIENTEDOWN);
    \draw [->,bend left=15] (\ACEPTACIONCLIENTEUP) to (\ELEGIRUSDOWN);



    % TDD Y ATDD
    \node [above left = 10mm and 10mm of prueba_fallando.center, font=\Large\bfseries] {ATDD};
    \node [above right = 10mm and 10mm of prueba_fallando.center, font=\Large\bfseries] {TDD};
\end{tikzpicture}



\end{document}
share|improve this answer

This is one I like from my thesis. It illustrates the predicted boundaries for boundary layer transition mechanisms on a cylindrical afterbody at incidence: (1) free shear-layer instability, (2) attachment-line instability, (3) cross-flow instability, (4) streamwise-flow instability.

enter image description here

\documentclass{standalone}
\usepackage{calc,pgfplots}
      \pgfplotsset{compat=1.7}

\begin{document}

%% free shear-layer instability (fsli)
\pgfmathdeclarefunction{fsli}{1}{%
  \pgfmathparse{ tan(#1)/( cos(#1)*( 1 + 3.3*((tan(#1))^2) ) ) }%
}%
%
%% attachment-line instability (ali)
\pgfmathdeclarefunction{ali}{1}{%
  \pgfmathparse{ 1.1*tan(#1)*(1/cos(#1)) }%
}%
%
%% cross-flow instability (csi)
\pgfmathdeclarefunction{csi}{1}{%
  \pgfmathparse{ 0.145*( ( 1 + 3.3*(tan(#1))^2 ) / sin(#1) ) }%
}%
%
%% streamwise-flow instability (sfi)
\pgfmathdeclarefunction{sfi}{1}{%
  \pgfmathparse{ 4 }%
}%
%
%% piecewise function (combining ali, csi and sfi)
\pgfmathdeclarefunction{alicsisfi}{1}{%
  \pgfmathparse{%
    (and( #1>=1    , #1<=25.78) * ( ali(x) ) +%
    (and( #1>25.78 , #1<=70.00) * ( csi(x) ) +%
                (and( #1>70.00 , #1<=89.99) * ( sfi(x) )  %
   }%
}%



\begin{tikzpicture}

% set style options for annotations with pins (see bottom of tikzpicture)
\tikzset{%
   every pin/.style={draw=none,
                     fill=none,
                     %rectangle,rounded corners=0pt,
                     font=\scriptsize}
                 }

\begin{semilogyaxis}[%
%
view={0}{90},
width=0.50\linewidth,height=0.75\linewidth,
%
scale only axis,
axis on top=false,
axis lines*=box,
%
xmin=0, xmax=90,
xtick={0,10,20,30,40,50,60,70,80,90},
xlabel={\raisebox{0pt}[\height][\depth]{$\alpha$ (deg)}},
%
ymin=0.1, ymax=10,
ytick={0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,2,3,4,5,6,7,8,9,10},
yticklabels={0.1,0.2,{},0.4,{},0.6,{},0.8,{},1.0,2,{},4,{},6,{},8,{},10},
ylabel={\raisebox{0pt}[\height][\depth]{$R_D \times 10^{6}$}},
]



%% fsli (start stacking)
\addplot[
domain=1:89.99,samples=225,
draw=none,fill=none,mark=none,
stack plots=y]
{ fsli(x) };
%
%% stack difference between alicsisfi (upper) and fsli (lower) curves on top of fsli and fill area
\addplot[
domain=1:89.99,samples=225,
draw=none,
fill=black!10,
stack plots=y]
{ max( alicsisfi(x) - fsli(x) , 0 ) } % area above fsli and below alicsisfi
\closedcycle;



%% fsli, alpha = [1 , 89.99]
\addplot[
domain=1:89.99,samples=225,
solid,line width=0.8pt,draw=black,mark=none]
{ fsli(x) };



%% ali (1), alpha = [1 , 25.78]
\addplot[
domain=1:25.78,samples=62,
solid,line width=0.8pt,draw=black,mark=none]
{ ali(x) };
%
%% ali (2), alpha = [25.78 , 89.99]
\addplot[
domain=25.78:89.99,samples=163,
dashed,draw=black,mark=none]
{ ali(x) };



%% csi (1), alpha = [1 , 25.78]
\addplot[
domain=1:89.99,samples=62,
dashed,draw=black,mark=none]
{ csi(x) };
%
%% csi (2), alpha = [25.78 , 70]
\addplot[
domain=25.78:70,samples=112,
solid,line width=0.8pt,draw=black,mark=none]
{ csi(x) };
%
%% csi (3), alpha = [70 , 89.99]
\addplot[
domain=70:89.99,samples=174,
dashed,draw=black,mark=none]
{ csi(x) };



%% sfi (1), alpha = [1 , 70]
\addplot[
domain=1:70,samples=350,
dashed,draw=black,mark=none]
{ sfi(x) };
%
%% sfi (2), alpha = [70 , 89.99]
\addplot[
domain=70:89.99,samples=51,
solid,line width=0.8pt,draw=black,mark=none]
{ sfi(x) };


%% annotations (see style options for pins set with \tikzset above)
\node[coordinate,pin=-95:{1}] at (axis cs:50,0.326) {};
\node[coordinate,pin=-30:{2}] at (axis cs:23.3,0.5158) {};
\node[coordinate,pin=below right:{3}] at (axis cs:52.3,1.196) {};
\node[coordinate,pin=80:{4}] at (axis cs:77.5,4) {};
%
\node[draw=black,fill=white] at (axis cs:47,0.16) {\emph{laminar regime}};
\node[draw=black,fill=white] at (axis cs:60,0.52) {\emph{short bubble regime}};
\node[draw=black,fill=white] at (axis cs:30,3.95) {\emph{turbulent regime}};

\end{semilogyaxis}

\end{tikzpicture}

\end{document}
share|improve this answer

Electric field due to 3 charges. The black one is a negative charge orbiting the other two positive charges.

enter image description here

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-electricfield}

\begin{document}
\multido{\i=0+15}{24}{%
\begin{pspicture*}(-4,-4)(4,4)
    \psElectricfield[Q={[-1 3 \i\space PtoC][1 1 1][1 -1 -1]},linecolor=red]
\end{pspicture*}}
\end{document}
share|improve this answer
3  
@Jake: The art ifacts might not be caused by the linejoin. I think it is related to singularity. I will let PSTricks maintainers know this issue soon. –  Oh my ghost Feb 6 at 15:06
6  
Somewhere I have to add this: When this is to be used in a scientific publication, an animation is very, very hard to print on paper. ;-) –  Speravir Feb 6 at 16:03
19  
@Speravir: Scientific publication in the digital era should be paperless to save the forest. :-) –  Oh my ghost Feb 6 at 16:24
14  
nobody reads any paper but only writes them so no trees are harmed in science. –  percusse Feb 7 at 22:54

Radioactive dacay

Note: There is a screenshot of only the first half life of a nucleus but there are five half lifes for each version (but it can very easily be changed).

First version

\documentclass[
  dvipsnames
]{article}

\usepackage{lmodern}
\usepackage[
  hmargin = 2.4cm,
  vmargin = 3cm
]{geometry}
\usepackage{fancyhdr}
\usepackage{pst-plot}
\usepackage[
  locale = DE
]{siunitx}
\usepackage{xfrac}
\usepackage{totcount}

%%% Constants %%%

\ExplSyntaxOn
  \cs_new_eq:NN \calc \fp_eval:n
\ExplSyntaxOff

\def\HalveringerA{\calc{\Halveringer-1}}
\def\HalveringerB{\calc{\Halveringer+1}}
\def\konstA{\calc{10*2^(-\iA)}}
\def\konstI{\num{\calc{10*\konstA}}}
\def\konstB{\calc{2^(-\Halveringer)}}
\def\konstC{\calc{16*2^(-\iA)}}
\def\konstD{\calc{16-\konstC}}
\def\konstE{\calc{2*\Halveringer+0.25}}
\def\konstF{\calc{\konstE+0.25}}
\def\konstG{\calc{\konstE-0.25}}
\def\konstH{\calc{\konstE+0.55}}

%%% Definitions %%%

\def\radioaktivt{%
  \pscircle[
    fillstyle = solid,
    fillcolor = yellow,
    linestyle = none
  ](0,0){0.125}
  \pswedge*(0,0){0.125}{0}{60}
  \pswedge*(0,0){0.125}{120}{180}
  \pswedge*(0,0){0.125}{240}{300}
  \pscircle*[
    linecolor = yellow
  ](0,0){0.0375}
  \pscircle*(0,0){0.025}
}
\def\ikkeradioaktivt{%
  \pscircle*[
    linecolor = SeaGreen
  ](0,0){0.125}
}

\newcommand*\halveringer[1]{%
 \def\Halveringer{#1}
  \begin{pspicture}(-1.75,-0.7)(\konstH,11.05)
    \multido{\iA = 0+1, \rC = 0.25+2}{\Halveringer}{%
      \multido{\rA = \rC+0.5}{4}{%
        \multido{\rB = 0.27+0.635}{\konstC}{%
          \rput(\rA,\rB){\radioaktivt}%
        }%
      }%
    }
    \multido{\iA = 0+1, \rC = 0.25+2}{\Halveringer}{%
      \multido{\rA = \rC+0.5}{4}{%
        \multido{\rB = 9.795+-0.635}{\konstD}{%
          \rput(\rA,\rB){\ikkeradioaktivt}%
        }%
      }%
    }
    \multido{\iA = 0+1}{\Halveringer}{%
      \psline(!2   \iA\space mul     \konstA)%
             (!2 1 \iA\space add mul \konstA)%
             (!2 2 \iA\space mul add \konstA\space 2 div)%
    }
    \psline(!2 \Halveringer\space mul 10 \konstB\space mul)%
           (!2 \Halveringer\space mul 0)
    \psaxes[
      ticks = none,
      labels = none,
      arrowinset = 0.05,
      arrowscale = 1.6,
      arrowlength = 1.8
    ]{->}(0,0)(-0.3,-0.3)(\konstF,10.5)[$t$,0][Radioactive nuclei~(\si{\percent}),90]
    \psplot[
      algebraic,
      linecolor = red,
      linewidth = 1.5pt
    ]{0}{\konstG}{10*0.5^(0.5*x)}
    \psxTick(2){T_{\sfrac{1}{2}}}
    \multido{\iA = 4+2, \iB = 2+1}{\HalveringerA}{%
      \psxTick(\iA){\iB \cdot T_{\sfrac{1}{2}}}%
    }
    \multido{\iA = 0+1}{\HalveringerB}{%
      \psyTick(\konstA){\konstI}%
    }%
  \end{pspicture}%
}

\pagestyle{fancy}
\renewcommand*\headrulewidth{0pt}
\setlength\headheight{14.5pt}
\lhead{}
\rhead{}
\regtotcounter{page}
\cfoot{
  \ifnum \totvalue{page} > 1 \relax
    \thepage
  \else
%
  \fi
}

\begin{document}

%\begin{figure}[htbp]
% \centering
%  \begin{pspicture}(-2.4,-1.4)(2.4,2.9)
%    \pspolygon[
%      fillstyle = solid,
%      fillcolor = yellow,
%      linewidth = 5\pslinewidth
%    ](2.875;-30)(2.875;90)(2.875;210)
%    \pswedge*(0,0){1.25}{0}{60}
%    \pswedge*(0,0){1.25}{120}{180}
%    \pswedge*(0,0){1.25}{240}{300}
%    \pscircle*[
%      linecolor = yellow
%    ](0,0){0.375}
%    \pscircle*(0,0){0.25}
%  \end{pspicture}
%\end{figure}
%
%\begin{figure}[htbp]
% \centering
%  \begin{pspicture}(-1.8,-1.9)(1.8,1.9)
%    \psframe[
%      fillstyle = solid,
%      fillcolor = yellow,
%      linecolor = gray
%    ](-2,-2)(2,2)
%    \pswedge*(0,0){1.75}{0}{60}
%    \pswedge*(0,0){1.75}{120}{180}
%    \pswedge*(0,0){1.75}{240}{300}
%    \pscircle*[
%      linecolor = yellow
%    ](0,0){0.5}
%    \pscircle*(0,0){0.35}
%  \end{pspicture}
%\end{figure}
%\newpage

\multido{\iK = 1+1}{5}{%
  \begin{center}
    \halveringer{\iK}
  \end{center}
}

\end{document}

output1

Second version

\documentclass[
  dvipsnames
]{article}

\usepackage{lmodern}
\usepackage[
  hmargin = 2.4cm,
  vmargin = 3cm
]{geometry}
\usepackage{fancyhdr}
\usepackage{
  pst-grad,
  pst-plot
}
\usepackage[
  locale = DE
]{siunitx}
\usepackage{xfrac}
\usepackage{totcount}

%%% Constants %%%

\ExplSyntaxOn
  \cs_new_eq:NN \calc \fp_eval:n
\ExplSyntaxOff

\def\maerkerX{\calc{1.5*\i+0.75}}
\def\maerkerYa{\calc{10*2^(-\i)}}
\def\maerkerYb{\num{\calc{100*2^(-\i)}}}

\def\halveringerB{\calc{\Halveringer-1}}
\def\halveringerC{\calc{\Halveringer+1}}
\def\konstA{\calc{1.5*\i+0.25}\space}
\def\konstB{\calc{32*2^(-\i)}}
\def\konstC{\calc{32-\konstB}}
\def\konstD{\calc{1.5*\halveringerC+0.75}}
\def\konstE{\calc{\konstD-0.75}}
\def\konstF{\calc{\konstD+0.3}}

%%% Definitions %%%

\def\radioaktivt{%
  \psscalebox{0.0125}{%
    \pscircle[
      fillstyle = solid,
      fillcolor = yellow,
      linestyle = none
    ](0,0){5}
    \pswedge*(0,0){5}{0}{60}
    \pswedge*(0,0){5}{120}{180}
    \pswedge*(0,0){5}{240}{300}
    \pscircle*[
      linecolor = yellow
    ](0,0){1.5}
    \pscircle*(0,0){1}
  }
}

\def\ikkeradioaktivt{%
  \pscircle*[
    linecolor = SeaGreen
  ](0,0){0.0625}
}

\def\henfald{rand 301 mod 50 div round 50 div }
\def\simpel#1{!#1 \henfald add \henfald \i\space 5 mul 16 div add 0.121 add }

\newcommand*\halveringer[1]{%
 \def\Halveringer{#1}
  \begin{pspicture}(-1.75,-0.65)(\konstF,11.3)
    \psframe[
      linestyle = none,
      fillstyle = gradient,
      gradangle = 45,
      gradmidpoint = 1,
      gradbegin = gray!80,
      gradend = gray!30
    ](0,0)(\konstE,10.25)
    \multido{\i = 0+1}{\halveringerC}{%
      \psframe[
        dimen = middel,
        linecolor = NavyBlue,
        linewidth = 1pt,
        fillstyle = gradient,
        gradangle = 90,
        gradmidpoint = 1,
        gradbegin = NavyBlue!50,
        gradend = white
      ](\konstA,0)(!\konstA 1 add \maerkerYa)%
    }
    \multido{\i=0+1}{\halveringerC}{%
      \psframe[
        dimen = middel,
        linecolor = NavyBlue,
        linewidth = 1pt,
        fillstyle = gradient,
        gradangle = 90,
        gradmidpoint = 0,
        gradbegin = SeaGreen!30,
        gradend = white
      ](\konstA,10)(!\konstA 1 add \maerkerYa)%
    }
    \multido{\i = 0+1}{\halveringerC}{%
      \rput(\konstA,0){%
        \multido{\i = 0+1}{\konstB}{%
          \rput{!\henfald 777 mul}(\simpel{0.125}){\radioaktivt}
          \rput{!\henfald 777 mul}(\simpel{0.375}){\radioaktivt}
          \rput{!\henfald 777 mul}(\simpel{0.625}){\radioaktivt}
          \rput{!\henfald 777 mul}(\simpel{0.875}){\radioaktivt}%
        }%
      }
      \rput(\konstA,\maerkerYa){%
        \multido{\i = 0+1}{\konstC}{%
          \rput(\simpel{0.125}){\ikkeradioaktivt}
          \rput(\simpel{0.375}){\ikkeradioaktivt}
          \rput(\simpel{0.625}){\ikkeradioaktivt}
          \rput(\simpel{0.875}){\ikkeradioaktivt}%
        }%
      }%
    }
    \psaxes[
       ticks = none,
       labels = none,
       arrowinset = 0.05,
       arrowscale = 1.6,
       arrowlength = 1.8
    ]{->}(0,0)(-0.3,-0.3)(\konstD,10.75)[$t$,0][Radioactive nuclei~(\si{\percent}),90]
    \psplot[
      algebraic,
      linecolor = red,
      linewidth = 1.5pt
    ]{0.75}{\konstE}{10*0.5^(2*(x-0.75)/3)}
    \psxTick(0.75){\text{start}}
    \ifnum\Halveringer>0\relax
      \psxTick(2.25){T_{\sfrac{1}{2}}}
      \multido{\i = 2+1}{\halveringerB}{%
        \psxTick(\maerkerX){\i \cdot T_{\sfrac{1}{2}}}%
      }
      \multido{\i = 0+1}{\halveringerC}{%
        \psyTick(\maerkerYa){\maerkerYb}%
      }%
    \fi%
  \end{pspicture}%
}

\pagestyle{fancy}
\renewcommand*\headrulewidth{0pt}
\setlength\headheight{14.5pt}
\lhead{}
\rhead{}
\regtotcounter{page}
\cfoot{
  \ifnum \totvalue{page} > 1 \relax
    \thepage
  \else
%
  \fi
}

\begin{document}

\multido{\iK = 0+1}{6}{%
  \begin{center}
    \halveringer{\iK}
  \end{center}
}

\end{document}

output2

P.S. The macro names are is Danish but I hope it is understandable none the less.

share|improve this answer

This was one was my first tikz drawn picture (from a presentation about entropic depletion forces, https://www.dropbox.com/s/s2y238u8s1yx0ck/Main.pdf ). It shows a line optical tweezer.

line optical tweezer

The code is pretty ugly, but my:

\documentclass{standalone}

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows, decorations.markings, calc, fadings, decorations.pathreplacing, patterns, decorations.pathmorphing, positioning,snakes,backgrounds,shapes,intersections}
\usepgflibrary{decorations.pathmorphing}
\tikzfading[name=fade out, inner color=transparent!0, outer color=transparent!100]

\begin{document}

\begin{tikzpicture}[xscale=0.28,yscale=0.28]

\node(left_knobble_microscope_down) at (-0.5,0.925) {} ;
\node(left_knobble_microscope_up) at (0,2.075) {} ;
\node(right_knobble) at (2.5,1.5) {} ;

\draw[line width=2] (0,0) -- (14,0) -- (14,6) -- (11,6) -- (11,3) -- (5,3) -- (3,5.5) -- (3,8) -- (0,8) -- (0,-0.115);
\draw[line width=2] (8.25,4.35) -- (8.25,3);
\draw[line width=2] (7,3.65) -- (7,3);
\draw[line width=2] (7.5,4.5) -- (7.5,6.25);
\draw[line width=2] (8,4.7) -- (8,6.25);

\node[circle,fill=black,minimum size=3.5](knobble_right) at (right_knobble) {};
\path[draw] (right_knobble) circle (0.75) node [right=0.05em of right_knobble] {\parbox{10em}{Inverses Mikroskop}};

\node(tableau) at (7,6.5) {}    ;

\node[rectangle, fill=black, minimum width=7em] at (tableau) {};
\draw[fill=black] (left_knobble_microscope_down) rectangle (left_knobble_microscope_up);

\node(ccd_cable_down) at (1,8) {} ;
\node(ccd_cable_up) at (2,10) {} ;
\draw[fill=none,line width=2] (ccd_cable_down) rectangle (ccd_cable_up);

\node(ccd_down) at (0.5,10) {} ;
\node(ccd_up) at (2.5,14) {} ;
\draw[fill=black,line width=2] (ccd_down) rectangle (ccd_up) node [above=0.1ex of ccd_up] {\parbox{3em}{CCD-Kamera}};

\node(right1_down) at (12,6) {} ;
\node(right1_up) at (14,13) {} ;
\draw[fill=none,line width=2] (right1_down) rectangle (right1_up);

\node(right2_down) at (9,13) {} ;
\node(right2_up) at (15,16) {} ;
\draw[fill=none,line width=2] (right2_down) rectangle (right2_up);

\fill[fill=black,line width=2] (9,15.5) -- (8.5,15.5) -- (6.5,14) -- (6.5,13.5) -- (9,13.5);

\draw[line width=2] (7,13.5) -- (7,8.5) -- (8.5,8.5) -- (8.5,13.5);

\fill[fill=black,line width=2] (7,8.5) -- (7.25,8) -- (8.25,8) -- (8.5,8.5);

\node[line width=1,ellipse,draw,gray,name path=focus](focus) at (7.75,6.5) {\phantom{...}};
\node[line width=1,ellipse,draw,gray,name path=focus_big](focus_big) at (24,13) {\phantom{\parbox{3cm}{bla\\bla\\bla\\bla\\}}};
\draw[line width=1,gray,draw=none,name path=focus_bla] (focus.east) -- (focus_big.east);
\draw[line width=1,gray,draw=none,name path=focus_blo] (focus.west) -- (focus_big.west);
\path[name intersections={of=focus_bla and focus_big},draw,line width=1, gray](intersection-1)--(focus.east);
\path[name intersections={of=focus_blo and focus},draw,line width=1, gray](intersection-1)--(focus_big.west);


\draw[shift={(8.5,4.5)},rotate=-60,line width=2,black](0, 0) arc (87.5:272.5:0.5 and 0.9);
\draw[rotate around={30:(8.5,4.5)},fill=black,draw,line width=2](8.75,4.5) rectangle (6.45,4.5) {};
\node[rectangle,draw,line width=2] at (20,3.625) {Teleskop};
\draw[fill=black, name path=objektiv] (14,3.075) rectangle (14.5,4.225);
\draw[rotate around={45:(28,1)},fill=black,draw,line width=2] (27,1) rectangle (29,1) node [below left=2.5ex and 0.15em] {\parbox{3em}{Galvanome\-terspiegel}};
\draw[rotate around={-45:(28.375,4)},fill=black,draw,line width=2] (27.375,3.5) rectangle (29.375,3.5);
\fill[red,fill opacity=0.5] (24.2,0.9) -- (27.735,0.9) -- (27.935,1.1) -- (24.2,1.1);
\fill[red,fill opacity=0.5] (27.935,1.1) -- (28.25,3.25) -- (27.5,4) -- (27.735,0.9);
\fill[red,fill opacity=0.5] (27.5,4) -- (22.85,4.25) -- (22.85,3) -- (28.25,3.25);

\fill[red,fill opacity=0.5] (17.15,4.25) -- (14.525,4.125) -- (14.525,3.2) -- (17.15,3);
\fill[red,fill opacity=0.5] (10.885,3.965) -- (8.37,3.85) -- (8.37,3.65) -- (10.885,3.4675);
 \node[rectangle,draw,line width=2] at (20,1) {Nd:YLF-Laser};
\node at (24,9.5) {Deckglas};
\draw[<->,line width=2] (20,11) to (28,11);

    \draw[line width=1] (20,12.25) node[ellipse, minimum height=0.1,minimum width=42.5,draw](down_left) {};
    \draw[line width=1] (20,15.75) node[ellipse, minimum height=0.1,minimum width=42.5,draw](top_left) {};
    \draw[line width=1] (28,12.25) node[ellipse, minimum height=0.1,minimum width=42.5,draw](down_right) {};
    \draw[line width=1] (28,15.75) node[ellipse, minimum height=0.1,minimum width=42.5,draw](top_right) {};
    \draw[line width=1] ($(down_left.10)+(0,-0.05)$)..controls (20,13.75) and (20,14.25)..($(top_left.-10)+(0,0.05)$);
    \draw[line width=1] ($(down_right.10)+(0,-0.05)$)..controls (28,13.75) and (28,14.25)..($(top_right.-10)+(0,0.05)$);
    \draw[line width=1] ($(down_right.170)+(0,-0.05)$)..controls (28,13.75) and (28,14.25)..($(top_right.-170)+(0,0.05)$);
    \draw[line width=1] ($(down_left.170)+(0,-0.05)$)..controls (20,13.75) and (20,14.25)..($(top_left.-170)+(0,0.05)$);

    \node[shade,shading=ball,circle,ball color=blue,minimum size=1.25em] at (23,14)  {};
    \node[shade,shading=ball,circle,ball color=blue,minimum size=1.25em] at (25,14)  {};

\begin{pgfonlayer}{background}
\begin{scope}
\clip ([yshift=1.75pt]down_left.south) -- ([yshift=1.75pt]down_right.south) -- (down_right.-85) -- (down_right.-80) -- (down_right.-75) -- (down_right.-70) -- (down_right.-65) -- (down_right.-60) -- (down_right.-55) -- (down_right.-50) -- (down_right.-45) -- (down_right.-40) -- (down_right.-35) -- (down_right.-30) -- (down_right.-25) -- (down_right.-20) -- (down_right.-15) -- (down_right.-10) -- (down_right.-5) -- (down_right.east) -- (down_right.5) -- (down_right.10) -- ($(down_right.10)+(0,-0.05)$)..controls (28,13.75) and (28,14.25)..($(top_right.-10)+(0,0.05)$) -- (top_right.-10) -- (top_right.-5) -- (top_right.east) -- (top_right.5) -- (top_right.10) -- (top_right.15) -- (top_right.20) -- (top_right.25) -- (top_right.30) -- (top_right.35) -- (top_right.40) -- (top_right.45) -- (top_right.50) -- (top_right.55) -- (top_right.60) -- (top_right.65) -- (top_right.70) -- (top_right.75) -- (top_right.80) -- (top_right.85) -- (top_right.90) -- ([yshift=-1.75pt]top_right.north) -- ([yshift=-1.75pt]top_left.north) -- (top_left.-210) -- (top_left.-205) -- (top_left.-200) -- (top_left.-195) -- (top_left.-190) -- (top_left.-185) -- (top_left.-180) -- (top_left.-175) -- (top_left.west) -- ($(top_left.-170)+(0,0.05)$)..controls (20,14.25) and (20,13.75)..($(down_left.170)+(0,-0.05)$) -- (down_left.-210) -- (down_left.-205) -- (down_left.-200) -- (down_left.-195) -- (down_left.-190) -- (down_left.-185) -- (down_left.-180) -- (down_left.-175) -- (down_left.-170) -- (down_left.-165) -- (down_left.-160) -- (down_left.-155) -- ([yshift=1.75pt]down_left.south);
\draw[draw=none] [postaction={path fading=north,fill=red,opacity=0.8}] (16,14) rectangle (32,17);
\draw[draw=none] [postaction={path fading=south,fill=red,opacity=0.8}] (16,14) rectangle (32,11);
\end{scope}

\fill[blue!50!white,fill opacity=0.5] (focus_big.-20) -- (focus_big.-40) -- (focus_big.-140) -- (focus_big.-160);
\draw[line width=1,gray!75!black] ([yshift=1.75pt]down_left.south) to ([yshift=1.75pt]down_right.south);
\draw[line width=1,gray!75!black] ([yshift=1.75pt]top_left.south) to ([yshift=1.75pt]top_right.south);
\draw[line width=1,gray!75!black] ([yshift=-1.75pt]down_left.north) to ([yshift=-1.75pt]down_right.north);
\draw[line width=1,gray!75!black] ([yshift=-1.75pt]top_left.north) to ([yshift=-1.75pt]top_right.north);
\end{pgfonlayer}

\end{tikzpicture}

\end{document}
share|improve this answer
2  
The beamer presentation that you linked is awesome –  Thomas Feb 6 at 16:02

Probably most people don't remember what π is. The following animation will scientifically show that when a wheel rolls one lap without slipping, it travels a distance of 3++ times of its diameter.

enter image description here

\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-plot}
\psset{unit=2cm,dimen=m}
\newdimen\Width\Width=3.64159265\psxunit

\begin{document}
\multido{\i=0+10}{19}{%
\begin{pspicture}(-.5,-.2)(\Width,1)
    \psaxes[yAxis=false](0,0)(-.5,0)(\Width,0)
    \multips(.5,.5)(1,0){3}{\pscircle[linecolor=cyan!20]{.5}}
    \pstVerb{/length {\i\space DegtoRad} def /angle {\i\space .5 div 90 add neg} def}
    \rput(!length .5){\psline{->}(!.5 angle PtoC)}
    \ifnum\i=180\color{red}\psxTick[labelsep=1pt](3.14159265){\pi}\fi
    \psset{linewidth=2pt}
    \pscircle(!length .5){.5}
    \psline[linecolor=red](!length 0)
    \psarcn[linecolor=red](!length .5){.5}{-90}{!angle}
\end{pspicture}}
\end{document}
share|improve this answer
1  
@CodeMocker: in these days you're progressing a lot with your on going bounty delivery ;) –  Claudio Fiandrino Feb 6 at 19:07
3  
Might I suggest you omit the word "scientifically"? In my mind, this is clearly a scientific diagram; adding the word "scientifically" makes it sound like you think a reader might need convincing. –  Charles Staats Feb 6 at 19:40
5  
So, who was first, you or commons.wikimedia.org/wiki/File:Pi-unrolled.gif (or was it independent?) –  Martijn Feb 6 at 23:03
1  
@Martijn: They were independently invented by different persons. –  Oh my ghost Feb 6 at 23:51
4  
I actually never learned what π was. I enjoyed the visual lesson! –  Sverre Feb 7 at 15:39

Manuel Luque's Syracuse website has a number of neat technical examples that includes some animations (forgive the loading; images/animations are linked to the source):

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

share|improve this answer
1  
Also see An explanation of how radians work. –  Werner Apr 28 at 22:39

A graphical representation of probabilistic PCA using Sketch, a 3D language that compiles to TikZ :) Made for scribe notes a couple years ago.

pca

def O (0,0,0) % origin
def ax (1,0,0)
def ay (0,1,0)
def az (0,0,1)

def circles {
    def n_circle 50
    repeat { 5, scale(0.7) } 
        sweep[cull=false] 
            {n_circle, rotate(360 / n_circle, (0,0,0), [0,0,1]) }
            (0.25,0,0)
}

def redcircles {
    def n_circle 50
    repeat { 5, scale(0.7) } 
        sweep[cull=false,draw=red] 
            {n_circle, rotate(360 / n_circle, (0,0,0), [0,0,1]) }
            (0.25,0,0)
}

def redsphere {
    def n_circle 20 def n_sphere 20
    sweep[draw=red,fill=none,draw opacity=0.10]
        {n_sphere, rotate(-360/n_sphere, (O), [0,1,0])}
        sweep {n_circle, rotate(180/n_circle, (O), [0,0,1])}
            (0,1,0)
}

def redspheres {
    repeat { 5, scale(0.7) } {redsphere}
}

def pspace_plane {
    %plane
    polygon[style=dashed,fill=none](0,0,1)(1,0,1)(1,0,0)(0,0,0)
    %special |\path #1 node[right] {$\leftarrow \Lambda$};|(1,.5,.5)

    put { scale(2) then rotate(90, (O), [1,0,0]) 
        then translate([0.5,0,0.5]) } {circles}
    special |\path #1 node[above] {$\Lambda Z$};|(.5,.1,.5)

    dots[style=ultra thick](.75,0,.75)
    special |\path #1 node[below] {$\Lambda Z_n$};
        |(.75,-.05,.75)

    put { scale(0.25) then translate([0.75,0,0.75]) } {redspheres}

    dots[fill=red,draw=red,style=ultra thick](.8,.15,.8)
    special |\path #1 node[right,red] {$X_n$};|(.8,.15,.8)
}

def pspace {
    %axes
    line[arrows=<->] (ax)(O)(ay)
    line[arrows=->] (O)(az)

    put { rotate(5, (O), [1,0,1]) then translate([0,0.5,0]) } {pspace_plane}

    special |\node at #1 {$p$-space};| (0.5,-0.25,0)
}

put { scale(1.5) then view((5,5,30)) then perspective(100) } {pspace}

global { language tikz }
share|improve this answer
1  
First time I hear about this language, thanks ! –  Thomas Feb 7 at 6:54

When I was [for]playing with theory of envelopes, I made several drawings with lualatex anad tikz. Lualatex solely because I'm not comfortable with programming in tikz. Here is one of my favorites, Lemniscate envelope:

\documentclass{article}
\usepackage[margin=0cm,a4paper,landscape]{geometry}
\usepackage{luacode}
\usepackage{pgfplots}
\usepackage{float}

\begin{document}
    \input{lua_functions}
    \input{tikz_plot}
\end{document}

and two tex files used:

% functions.tex
\begin{luacode*}
function getCenterRadius(t)
    a = 1;
    b = 1;
    h = 0;
    k = 0;
    cX = a*(1/math.cos(t)) + h;
    cY = b*math.tan(t) + k;
    R = math.sqrt((cX-h)^2 + (cY-k)^2) -- Classic
    return cX, cY, R
end

function printHyperbola()
    for t=-1.56,1.56,0.02555 do
        xL,yL,RL = getCenterRadius(t)
        xR,yR,RR = getCenterRadius(3.1415+t)
        tex.sprint("\\draw[very thin] (axis cs:"..(xL)..","..(yL)..") circle("..(RL*10)..");")
        tex.sprint("\\draw[very thin] (axis cs:"..(xR)..","..(yR)..") circle("..(RR*10)..");")
    end
end
\end{luacode*}

and

% tikz_plot.tex
\begin{figure}
\centering
    \pgfplotsset{width=1\paperwidth, height=1\paperheight}
    \resizebox{\paperwidth}{!}
    {
        \begin{tikzpicture}
            \begin{axis}[xmin=-14.85, xmax=14.85, ymin=-10.5, ymax=10.5,
                % ticks=none,
                hide axis,
            ]
                \directlua{printHyperbola()}
            \end{axis}
        \end{tikzpicture}
    }
\end{figure}

Finally the aforementioned envelope:

enter image description here

This envelope is generated by sweeping a circle has its center on a hyperbola. To read more, check here.

share|improve this answer

It appears that I got the wrong end of the stick with this thread, as my images weren't created in LaTeX (I didn't realise that you could do this).

I've tried to rectify this by seeing if I could convert one of my original images to a LaTeX format from the original .eps files using Latexdraw; however, it turns out that my code is quite long (>0.5 M characters). So far I've only tried this for the nuclide map figure. Unfortunately, Latexdraw doesn't seem to be able to handle the original text very well, and I haven't figured out how to do it myself yet.

Anyway, here's a link to the code for the nuclide map if people want to play around with it. If someone does manage to put the text back, I'd be interested to know how you did it and with what software. For the time being I think I'll stick with SerifDraw and Inkscape to draw and convert my images from .svg to .eps, whilst I'm writing up my thesis, but may look to this for future work.

enter image description here

share|improve this answer
3  
I really like both images, but the cool thing would be to make them in LaTeX (and Friends). –  Manuel Feb 7 at 12:26
8  
This is not a proper answer to the question because the illustrations themselves were not created with LaTeX/PGF/TikZ/Asymptote/Metapost/PSTricks. –  marczellm Feb 7 at 12:45

Nothing too spectacular, but here's one from a presentation I did recently, showing the meaning of parton distribution functions.

parton distributions

and a better view of the "floor":

proton structure diagram

and the TikZ source:

\documentclass[landscape]{article}

\usepackage{siunitx}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{drawproton}

\usetikzlibrary{calc}
\usetikzlibrary{fadings}
\usetikzlibrary{shadings}
\usetikzlibrary{shadows}
\usepgfplotslibrary{units}
\pgfplotsset{compat=newest,filter discard warning=false,tick scale binop=\times}

\tikzset{
 xq2shading/.style={
  rounded corners=5pt,
  drop shadow,
  preaction={
   fill=white,
   draw=black,
   line width=0.2pt
  },
  opacity=0.15,
  top color=red!70!magenta,
  bottom color=cyan,
  middle color=red!70!magenta!50!cyan!30!white,
  shading angle=45
 }
}
% pdfdata.csv: MSTW 2008 NLO PDFs at Q^2 = 10 GeV, in 7 columns
% x Q^2 gluon up down upbar downbar
% written by Mathematica
\pgfplotstableread{datafiles/pdfdataQ210.csv}\pdfdatatableA
% pdfdata2.csv: MSTW 2008 NLO PDFs at Q^2 = 100 GeV, in 7 columns
% x Q^2 gluon up down upbar downbar
% written by Mathematica
\pgfplotstableread{datafiles/pdfdataQ2100.csv}\pdfdatatableB

\pagestyle{empty}

\begin{document}
 \begin{tikzpicture}
  \path[xq2shading] (-1.0,7.5) rectangle (10.5,-1.0);
  \draw[->,every node/.append style={above,red!70!black,rotate=90,font={\small}}] (0,-0.5) -- (0,7) node[at={(0,0)},above right] {$x=1$} node[pos=0.5] {$\ln\frac{1}{x}$} node[pos=0.9] {small $x$};
  \draw[->,every node/.append style={below,cyan!70!black,font={\small}}] (-0.5,0) -- (10,0) node[at={(0,0)},below right] {small $Q$} node[pos=0.5] {$\ln\frac{Q^2}{Q_0^2}$} node[pos=0.9] {large $Q$};

  \begin{scope}[scale=0.8,xshift=50pt,yshift=30pt]
   % the parton evolution in Q^2
   \foreach \iprotonx in {0,...,3} {
    % the parton evolution in x
    \foreach \iprotonq in {0,...,3} {
     \begin{scope}[xshift={90*\iprotonq *1pt},yshift={60*\iprotonx *1pt}]
      \pgfmathsetmacro{\partonlevel}{\iprotonx}
      \pgfmathsetmacro{\protonradius}{15 * (1 + 0.3 * sqrt(\iprotonx + 4*\iprotonq/3))}
      \drawproton[background=white,parton size decay rate={0},initial parton size={6-1.5*\iprotonq}]{\protonradius}{\partonlevel}{\partonlevel}
     \end{scope}
    }
   }
  \end{scope}
 \end{tikzpicture}

 \pagebreak

 \begin{tikzpicture}
  \begin{scope}[yscale=0.4,xslant=0.6,every node/.append style={transform shape}]
   \path[xq2shading] (-1.0,7.5) rectangle (10.5,-1.0);
   \draw[->,every node/.append style={above,red!70!black,rotate=90,font={\small}}] (0,-0.5) -- (0,7) node[at={(0,0)},above right] {$x=1$} node[pos=0.5] {$\ln\frac{1}{x}$} node[pos=0.9] {small $x$};
   \draw[->,every node/.append style={below,cyan!70!black,font={\small}}] (-0.5,0) -- (10,0) node[at={(0,0)},below right] {small $Q$} node[pos=0.5] {$\ln\frac{Q^2}{Q_0^2}$} node[pos=0.9] {large $Q$};
   \node[red!70!black] at (5,7) {high energy collisions};
   \node[cyan!70!black,rotate=-90] at (10,3.5) {high momentum transfer};

   \begin{scope}[scale=0.8,xshift=50pt,yshift=30pt]
    % the parton evolution in Q^2
    \foreach \iprotonx in {0,...,3} {
     % the parton evolution in x
     \foreach \iprotonq in {0,...,3} {
      \begin{scope}[xshift={90*\iprotonq *1pt},yshift={60*\iprotonx *1pt}]
       \pgfmathsetmacro{\partonlevel}{\iprotonx}
       \pgfmathsetmacro{\protonradius}{15 * (1 + 0.3 * sqrt(\iprotonx + 4*\iprotonq/3))}
       \drawproton[background=white,parton size decay rate={0},initial parton size={6-1.5*\iprotonq}]{\protonradius}{\partonlevel}{\partonlevel}
       \coordinate (proton\iprotonx\iprotonq) at (0,0);
      \end{scope}
     }
    }
   \end{scope}
  \end{scope}
  % final width of 108pt comes from x coordinate of (proton31)-(proton01) after transform:
  % (proton01) is at (90pt,0pt), transformed by yscale=0.4,xslant=0.6 to (90pt,0pt)
  % (proton31) is at (90pt,180pt), transformed by yscale=0.4,xslant=0.6 to (198pt,72pt)
  % 198pt-90pt = 108pt
  %
  % then yslant is chosen to map lower right coordinate of plot, (90pt+108pt,0pt),
  % to (198pt,72pt), the location of (proton31)
  % note that yslant must come before scale here
  \begin{scope}[
   yslant=0.66666666,scale=0.8,
   every axis/.append style={
    scale only axis=true,width=108pt,height=108pt,
    xmode=log,xmax=1,xmin=1e-4,ymin=1e-3,ymax=5,
    clip=false,
    axis background/.style={fill=white,fill opacity=0.7},
    x tick label style={opacity=0.5},
    x dir=reverse
   },
   overlay]
   \begin{axis}[legend to name={leg:pdflegend},legend columns=1,legend style={cells={anchor=mid west}},at={(proton01)}]
    \addplot[black,thick] table[x index=0,y index=2] {\pdfdatatableA}; % gluons
    \addplot[blue] table[x index=0,y index=3] {\pdfdatatableA}; % up
    \addplot[red] table[x index=0,y index=4] {\pdfdatatableA}; % down
    \addplot[orange] table[x index=0,y index=5] {\pdfdatatableA}; % upbar
    \addplot[green!50!black] table[x index=0,y index=6] {\pdfdatatableA}; % downbar

    \node[below left] at (rel axis cs:0.95,0.95) {\small$Q^2 = \SI{10}{GeV^2}$};
    \addlegendentry{gluon}
    \addlegendentry{up}
    \addlegendentry{down}
    \addlegendentry{antiup}
    \addlegendentry{antidown}
   \end{axis}
   \begin{axis}[at={(proton02)}]
    \addplot[black,thick,overlay] table[x index=0,y index=2] {\pdfdatatableB}; % gluons
    \addplot[blue] table[x index=0,y index=3] {\pdfdatatableB}; % up
    \addplot[red] table[x index=0,y index=4] {\pdfdatatableB}; % down
    \addplot[orange] table[x index=0,y index=5] {\pdfdatatableB}; % upbar
    \addplot[green!50!black] table[x index=0,y index=6] {\pdfdatatableB}; % downbar

    \node[below left] at (rel axis cs:0.95,0.95) {\small$Q^2 = \SI{100}{GeV^2}$};
   \end{axis}
  \end{scope}
  \path[scale=0.8] (proton01) +(0,108pt) node[above left,transform shape] {$xf(x,Q^2)$};
 \end{tikzpicture}
\end{document}
share|improve this answer

Here is a picture intended to explain the disk method for computing the volume of a solid of revolution. I originally created it for my calculus class; I later redrew it to use as the central example in my still-unfinished Asymptote tutorial. Consequently, the code is fairly mature.

It is, of course, drawn using Asymptote.

The source code:

//Function to return a brace path
real innerangle = radians(60);
real outerangle = radians(70);
real midangle = radians(0);
path brace(pair a, pair b, real amplitude = .14*length(b-a)) {
  transform t = identity();
  real length = length(b-a);
  real sign = 1;
  if (amplitude < 0) {
    //    amplitude *= -1;
    sign = -1;
  }
  path brace = (0,0){expi(sign*outerangle)} :: {expi(sign*midangle)}(length/4, amplitude/2)
          :: {expi(sign*innerangle)} (length/2, amplitude) {expi(-sign*innerangle)}
  :: {expi(-sign*midangle)}(3*length/4, amplitude/2) :: {expi(-sign*outerangle)} (length,0);
  real angle = degrees(atan2((b-a).y, (b-a).x));
  t = rotate(angle)*t;
  t = shift(a) * t;
  return t * brace;
}

//Define the command drawshifted, to be used later
void drawshifted(path g, pair trueshift, picture pic = currentpicture, Label label="", pen pen=currentpen, arrowbar arrow=None, arrowbar bar=None, margin margin=NoMargin, marker marker=nomarker)
{
  picture opic;
  draw(opic, L=label, g, p=pen, arrow=arrow, bar=bar, margin=margin, marker=marker);

  pic.add(new void(frame f, transform t) {
      add(f,opic.fit(shift(trueshift)*t));
    });
  pic.addBox(min(opic), max(opic), trueshift, trueshift);
}

usepackage("amsmath");

real yellowPart = 0.2;
real unit = 2cm;
real truecm = cm / unit;
unitsize(unit);
pen backgroundpen = yellowPart*yellow + (1-yellowPart)*white;
frame finish() {
  currentlight.background = backgroundpen;
  frame toreturn = bbox(backgroundpen, Fill);
  currentpicture = new picture;
  unitsize(unit);
  return toreturn;
}

/*------------------------------*/

//Basic settings
settings.outformat="pdf";
defaultpen(fontsize(10pt));
import graph;

//Save some important numbers.
real xmin = -0.1;
real xmax = 2;
real ymin = -0.1;
real ymax = 2;

//Draw the graph and fill the area under it.
real f(real x) { return sqrt(x); }
path s = graph(f, 0, 2, operator..);
path fillregion = s -- (xmax,0) -- cycle;
pen fillpen = mediumgray;
fill(fillregion, fillpen);
draw(s, L=Label("$y=f(x)$", position=EndPoint));

//Fill the strip of width dx
real x = 1.4;
real dx = .05;
real t0 = times(s,x)[0];
real t1 = times(s,x+dx)[0];
path striptop = subpath(s,t0,t1);
filldraw((x,0) -- striptop -- (x+dx,0) --  cycle, black);

//Draw the bars labeling the width dx
real barheight = f(x+dx);
pair barshifty = (0, 0.2cm);
Label dxlabel = Label("$dx$", position=MidPoint, align=2N);
drawshifted((x,barheight) -- (x+dx, barheight), trueshift=barshifty, label=dxlabel, bar=Bars);

//Draw the arrows pointing inward toward the dx label
real myarrowlength = 0.3cm;
margin arrowmargin = DotMargin;
path leftarrow = shift(barshifty) * ((-myarrowlength, 0) -- (0,0));
path rightarrow = shift(barshifty) * ((myarrowlength, 0) -- (0,0));
draw((x, barheight), leftarrow, arrow=Arrow(), margin=arrowmargin);
draw((x+dx, barheight), rightarrow, arrow=Arrow(), margin=arrowmargin);

//Draw the bar labeling the height f(x)
real barx = x + dx;
pair barshiftx = (0.42cm, 0);
Label fxlabel = Label("$f(x)$", align=(0,0), position=MidPoint, filltype=Fill(fillpen));
drawshifted((barx,0) -- (barx, f(x)), trueshift=barshiftx, label=fxlabel, arrow=Arrows(), bar=Bars); 

//Draw the axes on top of everything that has gone before
arrowbar axisarrow = Arrow(TeXHead);
Label xlabel = Label("$x$", position=EndPoint);
draw((xmin,0) -- (xmax,0), arrow=axisarrow, L=xlabel);
Label ylabel = Label("$y$", position=EndPoint);
draw((0,ymin) -- (0,ymax), arrow = axisarrow, L=ylabel);

//Draw the tick mark on the x-axis
path tick = (0,0) -- (0,-0.15cm);
Label ticklabel = Label("$x$", position=EndPoint);
draw((x,0), tick, L=ticklabel);

frame pic2dFrame = finish();

/* ----------------------------------------------------- */

settings.prc = false;
settings.render=8;
import three;

currentprojection = orthographic(5,0,10, up=Y);
//currentprojection=oblique;
//currentprojection=perspective(6,0,10,up=Y);

pen color = white;
material surfacepen = material(diffusepen=color+opacity(1.0), emissivepen=0.2*color);
material planepen = material(diffusepen=opacity(0.6), emissivepen=0.8*color);
pen diskpen = black+opacity(1.0);

path3 p3 = path3(s);
draw(p3);

surface FilledRegion = surface(fillregion);
draw(FilledRegion, surfacepen = gray(0.6) + opacity(0.8));

surface solidsurface = surface(p3, c=O, axis=X);
draw(solidsurface, surfacepen=surfacepen);

/*
int n = length(p3);
for (real i = 0; i <= n; i += n/10) {
  if (i >= n) i -= .01;
  draw(solidsurface.vequals(i), gray(0.3));
}
*/
draw(solidsurface.vequals(length(p3) - .001), gray(0.3));

real extra = 0.4 truecm;
path planeboundary = (xmin,ymin) -- (xmax+extra,ymin) -- (xmax+extra,ymax+extra) -- (xmin,ymax+extra) -- cycle;
path planeoutside = planeboundary -- fillregion -- cycle;
draw(surface(planeoutside), surfacepen=planepen);

transform pushoutside = shift(0,.001);
striptop = pushoutside*striptop;
path3 dVtop = path3(striptop);
path3 openStrip = (x,0,0) -- dVtop -- (x+dx,0,0);
surface disk = surface(openStrip, c=O, axis=X);
draw(disk, diskpen);

triple cameraDirection(triple pt, projection P = currentprojection) {
  if (P.infinity) {
    return unit(P.camera);
  } else {
    return unit(P.camera - pt);
  }
}

triple towardCamera(triple pt, real dist = 1 truecm, projection P = currentprojection) {
  return pt + dist*cameraDirection(pt, P);
}

draw(xmin*X -- xmax*X, arrow=Arrow3(TeXHead2(normal=Z)));
draw(ymin*Y -- ymax*Y, arrow=Arrow3(TeXHead2(normal=Z)));
label("$x$", position=towardCamera(xmax*X), align = E);
label("$y$", position=towardCamera(ymax*Y), align=N);

frame pic3dFrame = finish();

/* ----------------------------------------------------------------- */

currentprojection=orthographic((3,0,10), up=Y);

diskpen = mediumgray;
draw(disk, diskpen);

transform3 T = rotate(10, X);
path3 brace = T*path3(brace((x+dx,barheight), (x+dx,0)));
draw(brace--cycle);
label("$r=f(x)$", position=midpoint(brace), align=E);

//Draw the bars labeling the width dx
path3 dxlabelpath = T * ((x, barheight, 0) -- (x+dx, barheight, 0));
draw(dxlabelpath, L=dxlabel, Bars3);

arrow(relpoint(dxlabelpath,0), dir=W, length=myarrowlength, margin=DotMargin3, arrow=Arrow3(emissive(black)));
arrow(relpoint(dxlabelpath,1), dir=E, length=myarrowlength, margin=DotMargin3, arrow=Arrow3(emissive(black)));

draw(xmin*X -- xmax*X, arrow=Arrow3(TeXHead2(normal=Z)));
draw(ymin*Y -- ymax*Y, arrow=Arrow3(TeXHead2(normal=Z)));
label("$x$", position=towardCamera(xmax*X), align = E);
label("$y$", position=towardCamera(ymax*Y), align=N);

frame oneSlice = finish();
/* ----------------------------------------------------------------- */

label(minipage("\raggedright Dimensions of infinitesimally thin sheet: 
\begin{description}
\item[Area:] $\pi r^2 = \pi [f(x)]^2$
\item[Thickness:] $dx$
\item[Volume:] $dV = \text{Area}\cdot\text{thickness} = \pi [f(x)]^2\;dx$
\end{description}"
,6cm));

frame labelFrame = finish();

/* ----------------------------------------------------------------- */

unit = 1;
unitsize(unit);
add(pic3dFrame);
add(labelFrame, position=(max(pic3dFrame).x, min(pic3dFrame).y - 1cm), align=SW);
pic3dFrame = finish();

/* ----------------------------------------------------------------- */

//unitsize(1);    // Set the usual (postscript) coordinates.
add(pic2dFrame);
add(pic3dFrame, position=max(pic2dFrame), align=SE);
add(oneSlice, position=min(pic2dFrame)+(0,-1cm), align=SE);

// Scale up by 4 in order to increase resolution.
shipout(scale(4)*finish());
share|improve this answer
2  
Very nice tutorial. I hope you'll find the time to finish it. –  Philipp Feb 11 at 20:01

I couldn't bear to let this go without at least one example of a picture produced by mfpic. It is not very flashy, but it illustrates that mfpic has built-in commands to produce figures in the hyperbolic geometry of a disk (for those of us who study function theory in the unit disk.):

\documentclass{article}
\usepackage[metapost,mplabels]{mfpic}
\opengraphsfile{mypics}
\begin{document}
Hyperbolic metric disks:

\begin{mfpic}[72]{-1}{1}{-1}{1}
  \setmfpair{Z}{(dir 45)/3}
  \setmfpair{W}{Moebius (Z)(.5*dir -45)}
  \draw\gfill[gray(.94)]\circle{(0,0),1}
  \draw\gfill[gray(.87)]\pshcircle{Z,4/5}
  \gfill[gray(.80)]\pshcircle{Z,1/2}
  \draw\gfill[gray(.73)]\pshcircle{W,1/2}
  \draw\pshcircle{Z,1/2}
  \tlpointsep{3bp}
  \point{Z,W,(0,0)}
  \tlabel[br]{Z}{$z$}
  \tlabel[tl]{W}{$w$}
  \tlabel[tr]{(0,0)}{$0$}
\end{mfpic}

Hyperbolic geodesics:

\begin{mfpic}[72]{-1}{1}{-1}{1}
  \circle{(0,0),1}
  \draw\gfill[gray(.88)]
    \lclosed
    \connect
      \hypergeodesic{.999*dir 0, .999*dir 120}
      \hypergeodesic{.999*dir 120, .999*dir 240}
      \hypergeodesic{.999*dir 240, .999*dir 0}
    \endconnect
  \mfpfor{K=6,12,24,48}
    \mfpfor{J=0 upto K-1}
      \rotatepath{(0,0),J*(360/K)}\hypergeodesic{.999*dir 0, .999*dir (360/K)}
    \endmfpfor
  \endmfpfor
\end{mfpic}

\closegraphsfile
\end{document}

Some hyperbolic disks

Hyperbolic geodesics

share|improve this answer

If you throw a ball at a certain angle between 0 and 90 degrees relative to the horizontal line, the trajectory of the ball is a parabolic curve. The vertical component of its velocity is changing while the horizontal one remains unchanged.

The following code has not been optimized yet.

enter image description here

\documentclass[pstricks,border={12pt 32pt 26pt 12pt}]{standalone}
\usepackage{pstricks-add}
\makeatletter
\def\psLine{\pst@object{psLine}}% a special Line 
\def\psLine@i{\pst@getarrows{\begin@OpenObj \pst@getcoors[\psLine@ii}}
\def\psLine@ii{%
    \addto@pscode{
      \ifPst@noCurrentPoint\else\pst@cp\fi% current point?
      4 copy Pyth2 \psk@arrowlength ge 
        { \psline@iii \tx@Line }% arc and lineto type
        { pop pop pop pop } ifelse }%
  \end@OpenObj}
\makeatother

\usepackage[nomessages]{fp}
\newcommand\const[3][3]{%
    \expandafter\FPeval\csname#2\endcsname{round(#3:#1)}%
    \pstVerb{/#2 \csname#2\endcsname\space def}%
}
\newcommand\Const[3][3]{\begingroup\edef\temp{\endgroup\noexpand\const[#1]{#2}{#3}}\temp}

\Const{Tpeak}{1}
\Const{Theta}{80/180*pi}
\Const{Gravity}{10}
\Const{SpeedFactor}{0.2}
\Const{FPS}{25}

\def\X#1{Vinit*cos(Theta)*#1}
\def\Y#1{Vinit*sin(Theta)*#1-Gravity*pow(2,#1)/2}

\Const{Vinit}{Tpeak*Gravity/sin(Theta)}
\Const{Xpeak}{\X{Tpeak}}
\Const{Ypeak}{\Y{Tpeak}}

\def\point#1{%
    \pnode(!Vinit Theta RadToDeg 2 copy cos mul #1 mul 3 1 roll sin mul #1 mul Gravity #1 2 exp mul 2 div sub){P}
    \pscircle[linecolor=red,fillstyle=solid,fillcolor=yellow](P){3pt}
    \pnode[!Vinit Theta RadToDeg cos mul SpeedFactor mul 0](P){PX}
    \pnode[!0 Vinit Theta RadToDeg sin mul Gravity #1 mul sub SpeedFactor mul](P){PY}
    %
    \psLine[linecolor=blue]{->}(P)(PX)
    \psLine[linecolor=magenta]{->}(P)(PX|PY)
    \psLine[linecolor=blue]{->}(P)(PY)
    %
    \uput{1.5pt}[0](PX){\tiny$V_x$}
    \FPifgt{#1}{\Tpeak}
        \uput{1.5pt}[-90](PY){\tiny$V_y$}
    \fi
    \FPiflt{#1}{\Tpeak}
        \uput[90](PY){\tiny$V_y$}
    \fi
}


\Const{DeltaTime}{1/\FPS}
\Const[0]{TotalFrames}{\FPS*2*Tpeak}
\Const[0]{TotalFrames}{TotalFrames+1}

\begin{document}
\multido{\nt=0.000+\DeltaTime}{\TotalFrames}{%
\begin{pspicture}[showgrid=false](0,-35pt)(2\dimexpr\Xpeak\psxunit\relax,\dimexpr\Ypeak\psyunit+7pt\relax)
    \parabola[linewidth=0.5\pslinewidth,linestyle=dashed](0,0)(\Xpeak,\Ypeak)
    \point{\nt}
\end{pspicture}}
\end{document}
share|improve this answer
2  
Could you make the framerate higher so it looks like it is smoothly moving? –  Max Feb 10 at 15:25
1  
@Max: Yes. Done! Thanks for upvoting! –  Oh my ghost Feb 11 at 4:03

A picture from my first research project.

This is a graph obtained by studying how a certain monodromy action act on the coefficients of a polynomial potential (of degree 4) of a Schrödinger-type equation.

Each vertex is itself an infinite graph, but it is essentially a tree. The different superscripts determine the type of tree, and the substripts the lengths of the edges in the tree.

The edges represents monodromy actions.

ActionGRaph

\documentclass[a4paper,11pt,dvips]{paper}
\usepackage[all]{xy}
\xyoption{ps}
\xyoption{dvips}

\newcommand{\tta}{\Lambda^A}
\newcommand{\ttr}{\Lambda^R}
\newcommand{\ttl}{\Lambda^L}
\newcommand{\ttm}{\Lambda^M}
\newcommand{\ttc}{\Lambda^C}
\newcommand{\actA}{A}
\newcommand{\actB}{B}
\newcommand{\actE}{E}
\newcommand{\actR}{R}

\begin{document}
\pagestyle{empty}
%1 = ->
%3 = -->
%5 = ..>
\xymatrix @-1pc {
&\ttl_{2,3,2}\ar@/^/@{->}[dr]&&\ttl_{3,2,1}\ar@/^/@{->}[dr]&&\ttl_{4,1,0}\ar@/^/@{->}[dr]&&&&&&&&&&&&&&&&&\\
%
\ttl_{1,3,3}\ar@/^/@{->}[dr]&&\ttl_{2,2,2}\ar@/^/@{->}[dr]\ar@/^/@{..>}[ul]&&\ttl_{3,1,1}\ar@/^/@{->}[dr]\ar@/^/@{..>}[ul] &&\ttl_{4,0,0}\ar@{->}[dd]\ar@/^/@{..>}[ul] \ar@/^/@{-->}[rr] &&\ttc_{4,1,0} \ar@/^/@{..>}[ll]\ar@/^/@{-->}[rr]&& \ttc_{4,2,1}\ar@/^/@{..>}[ll]&&&&&&&&&&\\
%
&\ttl_{1,2,3}\ar@/^/@{->}[dr]\ar@/^/@{..>}[ul]&&\ttl_{2,1,2}\ar@/^/@{->}[dr]\ar@/^/@{..>}[ul] && \ttl_{3,0,1}\ar@{-->}[ur]\ar@{->}[dd]\ar@/^/@{..>}[ul] && &&&&&&&\\
%
\tta_{-2,4}\ar@/^/@{->}[rd]&&\ttl_{1,1,3}\ar@/^/@{->}[dr]\ar@/^/@{..>}[ul] && \ttl_{2,0,2}\ar@{-->}[ur]\ar@{->}[dd]\ar@/^/@{..>}[ul] && \ttm_{3,0,1}\ar@/^/@{-->}[rr]\ar@{..>}[ul]\ar@{->}[dd] &&\ttc_{3,1,1}\ar@/^/@{..>}[ll]\ar@/^/@{-->}[rr]&& \ttc_{3,2,1}\ar@/^/@{..>}[ll]&&&\\
%
& \tta_{-1,4}\ar@/^/@{->}[rd]\ar@/^/@{..>}[ul] && \ttl_{1,0,3}\ar@{-->}[ur]\ar@{->}[dd] \ar@/^/@{..>}[ul] && \ttm_{2,1,1}\ar@{-->}[ur]\ar@{..>}[ul]\ar@{->}[dd] &&&&&&&\\
%Center Below
&&\tta_{0,4}\ar@/^/@{..>}[ul] \ar@{-->}[ur]\ar@/^/@{->}[dl] && \ttm_{1,2,1}\ar@{..>}[ul]\ar@{-->}[ur]\ar@{->}[dd] && \ttm_{2,0,2}\ar@/^/@{-->}[rr]\ar@{..>}[ul]\ar@{->}[dd] &&\ttc_{2,1,2}\ar@/^/@{..>}[ll]\ar@/^/@{-->}[rr]&&\ttc_{2,2,2}\ar@/^/@{..>}[ll]&&&\\
%
&\tta_{1,4}\ar@/^/@{-->}[ur]\ar@/^/@{->}[dl]&&\ttr_{1,0,3}\ar@{..>}[ul]\ar@{-->}[ur] \ar@/^/@{->}[dl]&& \ttm_{1,1,2}\ar@{-->}[ur]\ar@{..>}[ul]\ar@{->}[dd] &&&&&&&&\\
%
\tta_{2,4}\ar@/^/@{-->}[ur]&&\ttr_{1,1,3}\ar@/^/@{-->}[ur]\ar@/^/@{->}[dl]&& \ttr_{2,0,2}\ar@{..>}[ul]\ar@{-->}[ur]\ar@/^/@{->}[dl]&&  \ttm_{1,0,3}\ar@/^/@{-->}[rr]\ar@{..>}[ul]\ar@{->}[dd] &&\ttc_{1,1,3}\ar@/^/@{..>}[ll]\ar@/^/@{-->}[rr] &&\ttc_{1,2,3}\ar@/^/@{..>}[ll]&&&&&&&&\\
%
&\ttr_{1,2,3}\ar@/^/@{-->}[ur]\ar@/^/@{->}[dl] &&\ttr_{2,1,2}\ar@/^/@{-->}[ur]\ar@/^/@{->}[dl]&& \ttr_{3,0,1}\ar@{..>}[ul]\ar@{-->}[ur]\ar@/^/@{->}[dl]&&  &&&&&&&&&&&&\\
%
\ttr_{1,3,3}\ar@/^/@{-->}[ur]&&\ttr_{2,2,2}\ar@/^/@{-->}[ur]\ar@/^/@{->}[dl] &&\ttr_{3,1,1}\ar@/^/@{-->}[ur]\ar@/^/@{->}[dl]&&\ttr_{4,0,0}\ar@{..>}[ul] \ar@/^/@{->}[dl] \ar@/^/@{-->}[rr] &&\ttc_{0,1,4}\ar@/^/@{..>}[ll]\ar@/^/@{-->}[rr]&& \ttc_{0,2,4}\ar@/^/@{..>}[ll]&&&&&&&&&&\\
%
&\ttr_{2,3,2}\ar@/^/@{-->}[ur]&&\ttr_{3,2,1}\ar@/^/@{-->}[ur]&&\ttr_{4,2,0}\ar@/^/@{-->}[ur]&& \\
\actA_1^2: \ar@{->}[r]&&\actA_3^2:\ar@{-->}[r]&&\actA_5^2: \ar@{..>}[r]&&&&&&&&&&&&&&
}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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