298

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"; ...


252

Electric field due to 3 charges. The black one is a negative charge orbiting the other two positive charges. \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*}} \...


244

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 ...


237

\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, } \...


224

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. The code: \documentclass{standalone} \usepackage{pgfplots} % ...


180

Plan B as per tohecz: I'm a security engineer at Facebook and this is my fault. Properties of water and steam (IAPWS-SF95 formulation), enthalpy-entropy diagram, actually used by our students (and colleagues, from time to time). Compiled with lualatex for memory reasons. I'll not post the code here, as it is quite a lot and wouldn't work on other computers ...


146

Nothing too spectacular, but here's one from a presentation I did recently, showing the meaning of parton distribution functions. and a better view of the "floor": and the TikZ source: \documentclass[landscape]{article} \usepackage{siunitx} \usepackage{tikz} \usepackage{pgfplots} \usepackage{drawproton} \usetikzlibrary{calc} \usetikzlibrary{fadings} \...


141

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, ...


140

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: \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(...


140

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. \documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-plot} \psset{unit=2cm,dimen=m} \newdimen\Width\Width=3.64159265\psxunit \begin{document} ...


131

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):


121

The scientific viewpoint of an egg on the frying pan. \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){...


118

For those who study radar imaging, the following should be relevant. \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}{...


111

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. \documentclass{standalone} \usepackage{calc,pgfplots} \pgfplotsset{...


96

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 ...


85

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}}}...


79

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. The code:...


79

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 ...


78

It was suggested in chat http://chat.stackexchange.com/transcript/message/9482087#9482087 That picture mode would be the ideal tool for the job here: \documentclass{article} \begin{document} \begin{picture}(200,100) \put(30,40){\line(1,0){150}} \put(30,40){\line(0,1){60}} \put(30,100){\line(1,0){20}} \put(50,100){\line(1,-4){10}} \put(60,60){\line(1,0){...


77

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} \...


77

Visualisation of the Poincaré disk model: \documentclass[a4paper,fleqn,papersize]{jsarticle} \usepackage{graphicx} \usepackage{MePoTeX} \usepackage{amsmath,amssymb} \usepackage{mtcastle} \usepackage{ascmac} \usepackage{eclarith,qbgraph} \setlength{\columnseprule}{0.2pt} \setlength{\textwidth}{190truemm} \setlength{\textheight}{257truemm} \setlength{\...


74

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 ...


74

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. \documentclass[pstricks,border={12pt 32pt 26pt 12pt}]{standalone} \...


73

You can use the coil decoration for the effect. With segment length you can mimic the compression amount. \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,patterns} \begin{document} \begin{tikzpicture} \node[circle,fill=blue,inner sep=2.5mm] (a) at (0,0) {}; \node[circle,fill=blue,inner sep=2.5mm] (b) at (2,2) {}; \draw[...


73

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 ...


71

Thanks to this question y was able to do something I wanted to do a long time ago: the shape of pi with the digits of pi. The only "hard" thing is the shape, but looking at the question I said it's pretty simple. \documentclass[10pt]{article} \usepackage{graphicx} \usepackage{shapepar} \usepackage{microtype} \def\pipar#1{\shapepar{\pishape}#1\par} \...


71

I don't know the name of this illusion but the important thing is that it is about simple harmonic motion of equally-spaced points with equally-spaced phase difference. Enjoy! The same code was posted here. \documentclass[preview,border=12pt,multi]{standalone} \usepackage{pstricks} \psset{unit=.3} % static point % #1 : half of the number of points % #2 : ...


61

Only for PSTricks' fans: \documentclass{article} \usepackage{pst-coil} \usepackage[active,tightpage]{preview} \PreviewEnvironment{pspicture} \PreviewBorder=12pt \psset { coilarm=0.25, coilwidth=0.3 } \begin{document} \begin{pspicture}[showgrid](-1,-2)(9,5) % Ceiling \psframe [ fillstyle=vlines, hatchsep=2pt, ...


57

LaTeX diagrams can be directly inserted in your LaTeX document, while you need to export them from other programs, which needs to be repeated every time you change the diagram. A big benefit of drawing your diagrams in LaTeX is also that you can use the same fonts as in the rest of your document and also ensure that the text is properly scaled. In addition ...


55

Power plant Fossil-fuel power station (original code: http://pstricks.blogspot.com/2012/01/centrale-thermique-flammes-schematisee_07.html) \documentclass[ landscape ]{article} \usepackage[utf8]{inputenc} \usepackage[ hmargin=2cm, vmargin=2.5cm ]{geometry} \usepackage{ pst-grad, pst-coil, pstricks-add } \psset{ unit=1.5 } %------------------...


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