<p>I use a variety of tools depending on the particular needs of the moment. I have a bias toward free tools, as I don't have access to things like Illustrator or Mathematica.</p>

<p>For general vector art purposes I use the free <a href="https://inkscape.org/en/" rel="nofollow noreferrer">Inkscape</a>. It operates on .svg files and can also render them out as high-quality .pngs or other bitmap formats. For example, here's a diagram I made in Inkscape <a href="https://gamedev.stackexchange.com/questions/22103/confusion-with-the-texture-coordinate-system-in-xna">to explain UV mapping</a>:</p>

<p><img src="https://i.sstatic.net/t99e7.png" alt=""></p>

<p>For 2D function graphs, I often use the online graphing calculator <a href="https://www.desmos.com/" rel="nofollow noreferrer">Desmos</a>, which has the handy capability of letting you share graphs online so others can view and modify them. You can also create sliders that can be varied to play with curve parameters in real time. For example, here is a <a href="https://www.desmos.com/calculator/id7k8wn7ud" rel="nofollow noreferrer">configurable sharpening function</a>.</p>

<p>For more complex graphing tasks that involve a bit of programming, I use <a href="http://maxima.sourceforge.net/" rel="nofollow noreferrer">Maxima</a>, a free computer algebra system that also has graphing features. I used Maxima to create the graphs in <a href="https://computergraphics.stackexchange.com/a/289/48">this answer about Gaussian blurs</a>:</p>

<p><img src="https://i.sstatic.net/ugYom.png" alt=""></p>

<p>This was a bit too complex for Desmos, since it involved programmatically creating a piecewise approximation of a Gaussian.</p>

<p>For really odd graphing tasks that aren't handled well by anything else, I've used Python with the <a href="https://pypi.python.org/pypi/svgwrite/" rel="nofollow noreferrer">svgwrite</a> package to programmatically generate diagrams into .svg files. These can then be touched up in Inkscape if desired and rendered to bitmaps using Inkscape or ImageMagick. I used that workflow to create the images in <a href="http://www.reedbeta.com/blog/2015/07/03/depth-precision-visualized/" rel="nofollow noreferrer">this blog post on depth precision</a>, like this:</p>

<p><img src="https://i.sstatic.net/MVLUh.png" alt=""></p>

<p>In this case I wanted to not only graph a function, but place tick marks programmatically and nonuniformly along both the axes and the graph, to illustrate discrete depth buffer values.</p>

<p>And finally, if nothing else suffices, I'll use Python with <a href="http://www.numpy.org/" rel="nofollow noreferrer">numpy</a> and <a href="https://python-pillow.github.io/" rel="nofollow noreferrer">pillow</a> to render images pixel-by-pixel. That's how I created the Perlin noise images in <a href="https://computergraphics.stackexchange.com/a/252/48">this answer</a> (with the help of the <a href="https://pypi.python.org/pypi/noise/" rel="nofollow noreferrer">noise</a> package too, in this case).</p>

<p><img src="https://i.sstatic.net/Micts.png" alt=""></p>

CC BY-SA 3.0
2015-09-03T23:03:24.317Z
Nathan you are the one that wrote that about depth precision? Wow cool... i read that thing and it helped a lot! small world :P
Alan Wolfe
CC BY-SA 3.0
2015-09-03T19:04:15.140Z
2015-09-03T20:43:56.083Z
2017-04-13T13:00:43.660Z
Nathan Reed
<p>Personally my choice of poison is Adobe Illustrator. Other apps such as inkscape, Corel Draw, Xara Designer will also do. In a pinch even PowerPoint will work. Though I do not personally recommend PowerPoint due to severe issues with its data model, even tough is possibly worlds most deployed drawing app.</p>

<p>It can also be a good idea to have a graphing application at hand. I personally use Mathematica for this although many other apps would work too. Or if you want you can use Wolfram alpha that's a free online version of mathematica.</p>

<p>Disclaimer: Because examples are mine and shameless self endorsement take with a pinch of salt.</p>

<h2>Illustrator</h2>

<p>The first thing you should do in any vector drawing app is to <em>enable the snapping grid</em>. This reduces the tediousness of accurately placing lines. One of the big reasons i do not like to use Inkscape is the inferior way it implements this snapping. PowerPoint actually comes with grid snapping on by default. </p>

<p>I am not really satisfied by Illustrator as it does not fill all my needs. But no software so far does (Maya used to fill this niche but then autodesk happened).</p>

<p>The second reason i choose Illustrator is that it understands postscript natively. So if i need to program something i can do so quickly and existing documents update as my code matures Image 3 is done this way.</p>

<ul>
<li><a href="https://graphicdesign.stackexchange.com/questions/37998/how-to-create-a-vector-curve-programmatically/38010#38010">Resource</a> showing snap, postscript and java script access to illustrator and links forward.</li>
</ul>

<p>Here are  some examples of drawings that I have done across the network with Illustrator, mostly by power of grid snap:</p>

<p><img src="https://i.sstatic.net/dFHFY.png" alt="Circle march"></p>

<p><strong>Image 1</strong>: One of many images i drew in illustrator on this site. Note: I am a quite experienced Illustrator (sometimes commercial) and this is extremely simple by my standards.</p>

<p>The Circle march image in is fairly simple to do. Just draw a random shape by clicking around. After this disable snap and let the smart guides do your work for you. Draw lines to closest point on the line, make circles to the line and (i deleted the guide lines after i was done). Rinse and repeat. It took me about 3-5 minutes to draw the image once i got my workspace started.</p>

<p><img src="https://i.sstatic.net/Wg2jD.png" alt="Continuation wave"></p>

<p><strong>Image 2</strong>: GD.SE <a href="https://graphicdesign.stackexchange.com/questions/45929/what-is-this-design-pattern-called-continuation-wave/45936#45936">Continuation wave</a>.</p>

<p>While this image seems quite more elaborate, its not much more work than the first image. It is more technical so in addition to grid snap I and now using the shift key to constrain lines to 45 degree angles. Hatch fills are easily just assigned to regions with the shape builder tool of illustrator. (example of <a href="https://graphicdesign.stackexchange.com/a/57267/18306">shape builder in use</a>, screen capture)</p>

<p><img src="https://i.sstatic.net/xUdRz.png" alt="tetra image"></p>

<p><strong>Image 3</strong>: Sometimes its easier to start from scratch in postscript. Image added to post on <a href="https://engineering.stackexchange.com/questions/2949/minimum-number-of-tetra-elements-required-to-represent-a-cube">ENG.SE</a>.</p>

<p>Finally a image that really is easier to do by typing the values in postscript. It is relatively easy to do in postscript. Ive still done the typography in illustrator. While drawing this by hand is not a big deal i prefer not to, but i will do it if i must do judgement call by eye.</p>

<h2>Mathematica</h2>

<p>Mathematica is wonderful if you want to explore things a bit more. The only drawback to Mathematica is that it is NOT cheap. But it can do nearly anything quickly. Ive used Mathematica for some of my pictures on of <a href="https://computergraphics.stackexchange.com/questions/358/nurbs-knot-multiplicity">nurbs basis</a>. </p>

<p>One of Mathematicas core competencies s that its easy to develop even fairly complex pictures without much hassle. It can also easily animate your simple picture <em>within you editor</em>.</p>

<pre><code>Graphics[{
    orig = {
        Table[
            GeometricTransformation[
                Line[{{0, 0}, {50, 0}}],
            RotationTransform[ang]],
            {ang, 0, 3 Pi/2, Pi/2}
        ],
        Line[{{20, 0}, {30, 20}, {40, 0}}]
    },
    Red,
    GeometricTransformation[
        orig,
        RotationTransform[Pi/6]
    ]
}]
</code></pre>

<p>Results in same picture as others have. Wrapping it inside a table <a href="https://stackoverflow.com/questions/6109786/how-to-generate-animated-gif-of-a-manipulate-8-0-1">as per</a> results in:</p>

<p><img src="https://i.sstatic.net/5lcbX.gif" alt="enter image description here"></p>

<p><strong>Image 4</strong>: Animation is simple to do inside the code editor using Mathematica.</p>

CC BY-SA 4.0
2020-05-08T23:10:01.893Z
For the PS image, is that an isomorphic projection? Did you calculate the values by hand or do you have a function to do projections?
luser droog
CC BY-SA 4.0
2020-05-09T09:28:39.713Z
@luserdroog i have a function that takes a 3D coorinate and projects it yes. Basizally its a isometrix matrix plus a offset move for z. Why? You need something like that?
joojaa
CC BY-SA 4.0
2020-05-09T16:00:07.470Z
I was re-reading the answers here because I needed to make some diagrams and flowcharts. Nah, I guess I don't really need a function like that, I was just curious about it. Thanks
luser droog
CC BY-SA 4.0
2020-05-09T16:04:36.080Z
@luserdroog i dont think you would have had problems doing this. Anyway you dont happen to know some simple graph layout algo for the flowcharts.
joojaa
CC BY-SA 4.0
2020-05-09T16:34:14.630Z
I don't know about any algorithms, but I think there were quite a few papers from Bell Labs about `pic` that might be worthwhile. For my task I tried Inkscape but it seemed like I wasn't going to be able to get what I want quickly. I'm now using https://app.diagrams.net which seems pretty good.
luser droog
CC BY-SA 4.0
2020-05-09T18:04:36.587Z
@luserdroog yEd might e worth a try... thats what i use if i need to influence the result
joojaa
CC BY-SA 3.0
2015-09-03T09:18:23.187Z
2018-03-20T15:55:51.140Z
2018-03-20T15:55:51.140Z
joojaa
<h1>PostScript+ps2eps+mogrify</h1>

<p>For the <a href="https://computergraphics.stackexchange.com/questions/391/what-are-affine-transformations/392#392">Affine Transformations answer</a>, I wrote a very small postscript program and then saved several copies under different names and edited each one to do each different task: scale, translate, rotate. For example, here's the basic one, <code>ident.ps</code> which does nothing to change the coordinates between the red drawing and the black drawing. I made the red lines a little larger and always draw it first, so the two show up nicely superposed and visible (IMO). I previewed with ghostscript with the vi (ex) command <code>:!gs %</code>. (<a href="https://groups.google.com/d/topic/comp.lang.postscript/m2QqV4QFFaM/discussion" rel="nofollow noreferrer">all source files</a>)</p>

<pre><code>%!
/axis {
    currentpoint 4 { 
        2 copy moveto
            50 0 lineto
            90 rotate
    } repeat pop pop 
} def 
/shape {
    20 0 moveto
    30 20 lineto
    40 0 lineto
    closepath
} def 

100 100 translate

gsave
% do transform here
currentlinewidth 1.5 mul setlinewidth
1 0 0 setrgbcolor
0 0 moveto axis shape stroke
grestore

0 0 moveto axis shape stroke

showpage
</code></pre>

<p>I then used the <code>ps2eps</code> command from <code>psutils</code> to calculate bounding-boxes automatically</p>

<pre><code>$ ps2eps -f *.ps
Input files: ident.ps rotate.ps scale.ps skewx.ps skewy.ps translate.ps
Processing: ident.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 50 150 150
Creating output file ident.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: rotate.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 50 150 150
Creating output file rotate.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: scale.ps
Calculating Bounding Box...ready. %%BoundingBox: 25 25 175 175
Creating output file scale.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: skewx.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 49 150 151
Creating output file skewx.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: skewy.ps
Calculating Bounding Box...ready. %%BoundingBox: 49 50 151 150
Creating output file skewy.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: translate.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 50 165 165
Creating output file translate.eps ... ** Warning **: Weird heading line -- %! -- ready.
</code></pre>

<p>And finally used imagemagick's <code>convert</code> command to produce cropped png images. (I didn't think of a quick way to automate this part. <em>Edit:</em> as commented, this can be done with <code>mogrify -format png *.eps</code>. Thanks, joojaa!)</p>

<pre><code>$ convert ident.eps ident.png

josh@cadabra ~/affine
$ convert scale.eps scale.png

josh@cadabra ~/affine
$ convert rotate.eps rotate.png

josh@cadabra ~/affine
$ convert skewx.eps skewx.png

josh@cadabra ~/affine
$ convert translate.eps translate.png

josh@cadabra ~/affine
$ convert skewy.eps skewy.png
</code></pre>

<p>Which produces PNGs, ready to upload.</p>

<pre><code>$ ls -l *.png
-rw-r--r-- 1 josh None  587 Sep  1 21:16 ident.png
-rw-r--r-- 1 josh None 1431 Sep  1 21:21 rotate.png
-rw-r--r-- 1 josh None  798 Sep  1 21:19 scale.png
-rw-r--r-- 1 josh None 1133 Sep  1 21:22 skewx.png
-rw-r--r-- 1 josh None 1197 Sep  1 21:23 skewy.png
-rw-r--r-- 1 josh None  756 Sep  1 21:23 translate.png
</code></pre>

<p><img src="https://i.sstatic.net/gyZCZ.png" alt=""></p>

CC BY-SA 3.0
2015-09-02T09:43:01.093Z
I dont really see the point of generating the encapsulation with ps2eps cant you just type the eps header in your template. It makes the instruction cleaner (and user needs less dependenies). Instead of converting each file separately do `mogrify -format png *.eps`
joojaa
CC BY-SA 3.0
2015-09-02T20:48:28.243Z
Cool. I didn't know about `mogrify`. For the `ps2eps` part, it automatically calculates (and adds) the bounding-box info. Omitting that part, `convert` will produce full-page-sized images
luser droog
CC BY-SA 3.0
2015-09-02T03:23:51.497Z
2015-09-02T21:26:53.980Z
2017-04-13T13:00:43.660Z
luser droog
<p>Not the definitive toolbox you might be looking for, but just an extra tool I use myself: for 3d graphics, Blender might come in handy. Especially if you use the Export_SVG plugin (available from <a href="http://dl.dropbox.com/u/16486113/Blender/archivos/temp/SVG/export_svg.py" rel="nofollow noreferrer">http://dl.dropbox.com/u/16486113/Blender/archivos/temp/SVG/export_svg.py</a> and <a href="http://blenderartists.org/forum/showthread.php?282824-SVG-output-script" rel="nofollow noreferrer">http://blenderartists.org/forum/showthread.php?282824-SVG-output-script</a> )</p>

<p>This allows you to get Blenders 3d objects as vector graphics in Illustrator or Inkscape. I find it gives me a nice quick start for creating <strong>simple</strong> 3d illustrations.</p>

<p>Allow  me to paste an example. (In this example I use a lot of colors, but ofcourse, it can be all made black-and-red-on-white instead)</p>

<p><a href="https://i.sstatic.net/dIyo9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dIyo9.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2015-09-16T08:10:30.780Z
surely you mean illustrator and inkscape (instead of illustrator and illustrator)
joojaa
CC BY-SA 3.0
2015-09-16T06:48:47.123Z
2015-09-16T08:30:31.280Z
2015-09-16T08:30:31.280Z
Ideogram
<p>I just use Powerpoint to make such diagrams and it works great as soon as you're comfortable with its basic primitives. It supports all simple operations like rotation, translation, etc. and recent revisions also have shear and 3D transforms. Examples:</p>

<p><a href="https://i.sstatic.net/Hzmcd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Hzmcd.png" alt="enter image description here"></a></p>

<p><a href="https://i.sstatic.net/ESDaY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ESDaY.png" alt="enter image description here"></a></p>

<p>Here is an <a href="https://computergraphics.stackexchange.com/a/1487/14">example of a Powerpoint diagram</a> I made for an answer.</p>

<p>For more complicated diagrams, especially in 3D, I sometimes use Blender with shadeless materials. I can elaborate and show examples if it is relevant to your question.</p>

<p>Looks like <a href="https://computergraphics.stackexchange.com/questions/324/is-this-smaller-grid-for-poisson-disc-sampling-still-correct">jsfiddle</a> is also popular around here.</p>

CC BY-SA 3.0
2015-09-08T19:04:01.790Z
I agree---my answer is likely not valid any more because I haven't used diagrams in any answers so far. But I expect that to happen soon. So if it's OK for this answer to hang around for a few days, I am sure I will be able to find an answer.
ap_
CC BY-SA 3.0
2015-09-13T18:24:50.363Z
Done! My answer should be valid now.
ap_
CC BY-SA 3.0
2015-09-13T19:44:01.363Z
Excellent. Deleting my earlier comments.
luser droog
CC BY-SA 3.0
2015-09-02T21:57:49.120Z
2015-09-13T17:20:53.280Z
2017-04-13T13:00:43.660Z
ap_
<p>I use Powerpoint and various (expensive) CAD packages. I wrote Powerpoint macros (VBA code) to do some special things like draw the control polygons of Bezier curves. Then I use the standard Windows Snipping Tool to grab screen shots. Here are some examples:</p>

<p><a href="https://i.sstatic.net/BdBcH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BdBcH.png" alt="enter image description here"></a></p>

<p><a href="https://i.sstatic.net/wQaEx.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wQaEx.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.sstatic.net/bpywg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bpywg.png" alt="enter image description here"></a></p>

<p><a href="https://i.sstatic.net/EUeLW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/EUeLW.png" alt="enter image description here"></a></p>

<p>And some further examples from Math.SE</p>

<p><a href="https://math.stackexchange.com/questions/2230316/ellipse-tangent-to-two-circles">One</a><br>
<a href="https://math.stackexchange.com/questions/2200952/intersection-of-cones-tangent-to-a-common-sphere">Two</a><br>
<a href="https://math.stackexchange.com/questions/482063/parabolas-through-three-points">Three</a><br>
<a href="https://math.stackexchange.com/questions/1601158/how-can-we-find-geodesics-on-a-one-sheet-hyperboloid/1606820#1606820">Four</a><br>
<a href="https://math.stackexchange.com/questions/465782/control-points-of-offset-bezier-curve/467038#467038">Five</a>     </p>

CC BY-SA 3.0
2017-11-01T05:38:45.533Z
Powerpoint is actually quite expensive considering things. Its ok, after all drawing skill comes from you. But atleast tikz, inkscape, blrnder and postscript are way cheaper than powerpoint.
joojaa
CC BY-SA 3.0
2017-11-01T12:47:00.937Z
I'm old, so time is more important to me than money. Inkscape is good, but there's no way I'd spend time writing tikz or Postscript code to produce pictures.
bubba
CC BY-SA 4.0
2020-08-28T18:29:40.827Z
You don't need to take a screenshot, you can export the result to pdf (or EMF) formats, and then open it in something like inkscape to export it to a PNG with the resolution of your choice.
s.ouchene
CC BY-SA 3.0
2017-10-31T12:52:50.163Z
2017-10-31T13:21:42.220Z
2017-10-31T13:21:42.220Z
bubba
<p>In my answer about <a href="https://computergraphics.stackexchange.com/questions/391/what-are-affine-transformations/392#392">Affine Transformations</a> I made some little illustrations to help the explanation.</p>

<p><img src="https://i.sstatic.net/Ltr0w.png" alt=""></p>

<p>How do you make an upload-able PNG quickly which expresses a geometrical or mathematical idea?</p>

<p><em>This question was contrived to support my postscript answer but is intended to solicit other solutions that may benefit the SE network more generally. But for credibility, an answer must link to a post where this technique has in fact been used, as well as a sufficient "howto" portion if it involves more than something obvious like "Select export from menu".</em></p>

<p><em>There are two meta questions <a href="https://computergraphics.meta.stackexchange.com/questions/147/simple-2d-illustrations-question-main-or-meta">here</a> and <a href="https://computergraphics.meta.stackexchange.com/questions/150/2d-illustrations-question-help-crafting-the-question">here</a> concerning how to scope this question in light of the precedences it may set for our site.</em></p>

CC BY-SA 3.0
2015-09-02T07:45:08.153Z
I personally see this question more on PostScript than it is on computer graphics.
cifz
CC BY-SA 3.0
2015-09-02T19:12:16.817Z
@cifz right this would fit [GD.SE](http://graphicdesign.stackexchange.com/) better. But thats not a reason why it can not be here.
joojaa
CC BY-SA 3.0
2015-09-02T21:20:08.617Z
@citz I think I see what you mean. What if I take it out of the question, and open it up for tikz and asymptote and whatnot.
luser droog
CC BY-SA 3.0
2015-09-03T10:15:48.103Z
I am answering here to show that this is a bit opinionated as a question, and answers definitely will be. Maybe this entire thread should live in our Meta, like this does on [GD.SE](http://meta.graphicdesign.stackexchange.com/questions/790/how-to-embed-screen-capture-videos-as-animated-gifs-in-answers). Any thoughts, @cifz
joojaa
CC BY-SA 3.0
2015-09-03T22:09:35.070Z
[Meta question concerning this question.](http://meta.computergraphics.stackexchange.com/questions/147/simple-2d-illustrations-question-main-or-meta)
luser droog
CC BY-SA 3.0
2015-09-03T23:04:05.170Z
I wish we could use latex figures like we can latex math markup :P
Alan Wolfe
CC BY-SA 3.0
2015-09-04T08:49:10.267Z
@AlanWolfe that sounds like a Meta Question tagged `[feature-request]` to me, if you want to post one...
trichoplax is on Codidact now
CC BY-SA 3.0
2015-09-06T15:58:21.757Z
[Another Meta question about this question.](http://meta.computergraphics.stackexchange.com/questions/150/2d-illustrations-question-help-crafting-the-question)
luser droog
<2d>
How to produce simple 2D illustrations to accompany geometry answers?
luser droog
# How to produce simple 2D illustrations to accompany geometry answers?

(Asked by: username_0 on 2015-09-02)

In my answer about [Affine Transformations](https://computergraphics.stackexchange.com/questions/391/what-are-affine-transformations/392#392) I made some little illustrations to help the explanation.

![](https://i.sstatic.net/Ltr0w.png)

How do you make an upload-able PNG quickly which expresses a geometrical or mathematical idea?

*This question was contrived to support my postscript answer but is intended to solicit other solutions that may benefit the SE network more generally. But for credibility, an answer must link to a post where this technique has in fact been used, as well as a sufficient "howto" portion if it involves more than something obvious like "Select export from menu".*

*There are two meta questions [here](https://computergraphics.meta.stackexchange.com/questions/147/simple-2d-illustrations-question-main-or-meta) and [here](https://computergraphics.meta.stackexchange.com/questions/150/2d-illustrations-question-help-crafting-the-question) concerning how to scope this question in light of the precedences it may set for our site.*

**Tags:** 2d

> **Comments:**
> **username_1**: I personally see this question more on PostScript than it is on computer graphics.  
> **username_2**: @username_1 right this would fit [GD.SE](http://graphicdesign.stackexchange.com/) better. But thats not a reason why it can not be here.  
> **username_0**: @citz I think I see what you mean. What if I take it out of the question, and open it up for tikz and asymptote and whatnot.  
> **username_2**: I am answering here to show that this is a bit opinionated as a question, and answers definitely will be. Maybe this entire thread should live in our Meta, like this does on [GD.SE](http://meta.graphicdesign.stackexchange.com/questions/790/how-to-embed-screen-capture-videos-as-animated-gifs-in-answers). Any thoughts, @username_1  
> **username_0**: [Meta question concerning this question.](http://meta.computergraphics.stackexchange.com/questions/147/simple-2d-illustrations-question-main-or-meta)  
> **username_3**: I wish we could use latex figures like we can latex math markup :P  
> **username_4**: @username_3 that sounds like a Meta Question tagged `[feature-request]` to me, if you want to post one...  
> **username_0**: [Another Meta question about this question.](http://meta.computergraphics.stackexchange.com/questions/150/2d-illustrations-question-help-crafting-the-question)  

---

## 6 answers

### Answer by username_5 on 2015-09-03. Score: 13

I use a variety of tools depending on the particular needs of the moment. I have a bias toward free tools, as I don't have access to things like Illustrator or Mathematica.

For general vector art purposes I use the free [Inkscape](https://inkscape.org/en/). It operates on .svg files and can also render them out as high-quality .pngs or other bitmap formats. For example, here's a diagram I made in Inkscape [to explain UV mapping](https://gamedev.stackexchange.com/questions/22103/confusion-with-the-texture-coordinate-system-in-xna):

![](https://i.sstatic.net/t99e7.png)

For 2D function graphs, I often use the online graphing calculator [Desmos](https://www.desmos.com/), which has the handy capability of letting you share graphs online so others can view and modify them. You can also create sliders that can be varied to play with curve parameters in real time. For example, here is a [configurable sharpening function](https://www.desmos.com/calculator/id7k8wn7ud).

For more complex graphing tasks that involve a bit of programming, I use [Maxima](http://maxima.sourceforge.net/), a free computer algebra system that also has graphing features. I used Maxima to create the graphs in [this answer about Gaussian blurs](https://computergraphics.stackexchange.com/a/289/48):

![](https://i.sstatic.net/ugYom.png)

This was a bit too complex for Desmos, since it involved programmatically creating a piecewise approximation of a Gaussian.

For really odd graphing tasks that aren't handled well by anything else, I've used Python with the [svgwrite](https://pypi.python.org/pypi/svgwrite/) package to programmatically generate diagrams into .svg files. These can then be touched up in Inkscape if desired and rendered to bitmaps using Inkscape or ImageMagick. I used that workflow to create the images in [this blog post on depth precision](http://www.reedbeta.com/blog/2015/07/03/depth-precision-visualized/), like this:

![](https://i.sstatic.net/MVLUh.png)

In this case I wanted to not only graph a function, but place tick marks programmatically and nonuniformly along both the axes and the graph, to illustrate discrete depth buffer values.

And finally, if nothing else suffices, I'll use Python with [numpy](http://www.numpy.org/) and [pillow](https://python-pillow.github.io/) to render images pixel-by-pixel. That's how I created the Perlin noise images in [this answer](https://computergraphics.stackexchange.com/a/252/48) (with the help of the [noise](https://pypi.python.org/pypi/noise/) package too, in this case).

![](https://i.sstatic.net/Micts.png)

> **Comments:**
> **username_3**: username_5 you are the one that wrote that about depth precision? Wow cool... i read that thing and it helped a lot! small world :P  

---

### Answer by username_2 on 2015-09-03. Score: 12

Personally my choice of poison is Adobe Illustrator. Other apps such as inkscape, Corel Draw, Xara Designer will also do. In a pinch even PowerPoint will work. Though I do not personally recommend PowerPoint due to severe issues with its data model, even tough is possibly worlds most deployed drawing app.

It can also be a good idea to have a graphing application at hand. I personally use Mathematica for this although many other apps would work too. Or if you want you can use Wolfram alpha that's a free online version of mathematica.

Disclaimer: Because examples are mine and shameless self endorsement take with a pinch of salt.

## Illustrator

The first thing you should do in any vector drawing app is to *enable the snapping grid*. This reduces the tediousness of accurately placing lines. One of the big reasons i do not like to use Inkscape is the inferior way it implements this snapping. PowerPoint actually comes with grid snapping on by default.

I am not really satisfied by Illustrator as it does not fill all my needs. But no software so far does (Maya used to fill this niche but then autodesk happened).

The second reason i choose Illustrator is that it understands postscript natively. So if i need to program something i can do so quickly and existing documents update as my code matures Image 3 is done this way.

* [Resource](https://graphicdesign.stackexchange.com/questions/37998/how-to-create-a-vector-curve-programmatically/38010#38010) showing snap, postscript and java script access to illustrator and links forward.

Here are some examples of drawings that I have done across the network with Illustrator, mostly by power of grid snap:

![Circle march](https://i.sstatic.net/dFHFY.png)

**Image 1**: One of many images i drew in illustrator on this site. Note: I am a quite experienced Illustrator (sometimes commercial) and this is extremely simple by my standards.

The Circle march image in is fairly simple to do. Just draw a random shape by clicking around. After this disable snap and let the smart guides do your work for you. Draw lines to closest point on the line, make circles to the line and (i deleted the guide lines after i was done). Rinse and repeat. It took me about 3-5 minutes to draw the image once i got my workspace started.

![Continuation wave](https://i.sstatic.net/Wg2jD.png)

**Image 2**: GD.SE [Continuation wave](https://graphicdesign.stackexchange.com/questions/45929/what-is-this-design-pattern-called-continuation-wave/45936#45936).

While this image seems quite more elaborate, its not much more work than the first image. It is more technical so in addition to grid snap I and now using the shift key to constrain lines to 45 degree angles. Hatch fills are easily just assigned to regions with the shape builder tool of illustrator. (example of [shape builder in use](https://graphicdesign.stackexchange.com/a/57267/18306), screen capture)

![tetra image](https://i.sstatic.net/xUdRz.png)

**Image 3**: Sometimes its easier to start from scratch in postscript. Image added to post on [ENG.SE](https://engineering.stackexchange.com/questions/2949/minimum-number-of-tetra-elements-required-to-represent-a-cube).

Finally a image that really is easier to do by typing the values in postscript. It is relatively easy to do in postscript. Ive still done the typography in illustrator. While drawing this by hand is not a big deal i prefer not to, but i will do it if i must do judgement call by eye.

## Mathematica

Mathematica is wonderful if you want to explore things a bit more. The only drawback to Mathematica is that it is NOT cheap. But it can do nearly anything quickly. Ive used Mathematica for some of my pictures on of [nurbs basis](https://computergraphics.stackexchange.com/questions/358/nurbs-knot-multiplicity).

One of Mathematicas core competencies s that its easy to develop even fairly complex pictures without much hassle. It can also easily animate your simple picture *within you editor*.

```
Graphics[{
    orig = {
        Table[
            GeometricTransformation[
                Line[{{0, 0}, {50, 0}}],
            RotationTransform[ang]],
            {ang, 0, 3 Pi/2, Pi/2}
        ],
        Line[{{20, 0}, {30, 20}, {40, 0}}]
    },
    Red,
    GeometricTransformation[
        orig,
        RotationTransform[Pi/6]
    ]
}]

```

Results in same picture as others have. Wrapping it inside a table [as per](https://stackoverflow.com/questions/6109786/how-to-generate-animated-gif-of-a-manipulate-8-0-1) results in:

![enter image description here](https://i.sstatic.net/5lcbX.gif)

**Image 4**: Animation is simple to do inside the code editor using Mathematica.

> **Comments:**
> **username_0**: For the PS image, is that an isomorphic projection? Did you calculate the values by hand or do you have a function to do projections?  
> **username_2**: @username_0 i have a function that takes a 3D coorinate and projects it yes. Basizally its a isometrix matrix plus a offset move for z. Why? You need something like that?  
> **username_0**: I was re-reading the answers here because I needed to make some diagrams and flowcharts. Nah, I guess I don't really need a function like that, I was just curious about it. Thanks  
> **username_2**: @username_0 i dont think you would have had problems doing this. Anyway you dont happen to know some simple graph layout algo for the flowcharts.  
> **username_0**: I don't know about any algorithms, but I think there were quite a few papers from Bell Labs about `pic` that might be worthwhile. For my task I tried Inkscape but it seemed like I wasn't going to be able to get what I want quickly. I'm now using https://app.diagrams.net which seems pretty good.  
> **username_2**: @username_0 yEd might e worth a try... thats what i use if i need to influence the result  

---

### Answer by username_0 on 2015-09-02. Score: 4

# PostScript+ps2eps+mogrify

For the [Affine Transformations answer](https://computergraphics.stackexchange.com/questions/391/what-are-affine-transformations/392#392), I wrote a very small postscript program and then saved several copies under different names and edited each one to do each different task: scale, translate, rotate. For example, here's the basic one, `ident.ps` which does nothing to change the coordinates between the red drawing and the black drawing. I made the red lines a little larger and always draw it first, so the two show up nicely superposed and visible (IMO). I previewed with ghostscript with the vi (ex) command `:!gs %`. ([all source files](https://groups.google.com/d/topic/comp.lang.postscript/m2QqV4QFFaM/discussion))

```
%!
/axis {
    currentpoint 4 { 
        2 copy moveto
            50 0 lineto
            90 rotate
    } repeat pop pop 
} def 
/shape {
    20 0 moveto
    30 20 lineto
    40 0 lineto
    closepath
} def 

100 100 translate

gsave
% do transform here
currentlinewidth 1.5 mul setlinewidth
1 0 0 setrgbcolor
0 0 moveto axis shape stroke
grestore

0 0 moveto axis shape stroke

showpage

```

I then used the `ps2eps` command from `psutils` to calculate bounding-boxes automatically

```
$ ps2eps -f *.ps
Input files: ident.ps rotate.ps scale.ps skewx.ps skewy.ps translate.ps
Processing: ident.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 50 150 150
Creating output file ident.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: rotate.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 50 150 150
Creating output file rotate.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: scale.ps
Calculating Bounding Box...ready. %%BoundingBox: 25 25 175 175
Creating output file scale.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: skewx.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 49 150 151
Creating output file skewx.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: skewy.ps
Calculating Bounding Box...ready. %%BoundingBox: 49 50 151 150
Creating output file skewy.eps ... ** Warning **: Weird heading line -- %! -- ready.
Processing: translate.ps
Calculating Bounding Box...ready. %%BoundingBox: 50 50 165 165
Creating output file translate.eps ... ** Warning **: Weird heading line -- %! -- ready.

```

And finally used imagemagick's `convert` command to produce cropped png images. (I didn't think of a quick way to automate this part. *Edit:* as commented, this can be done with `mogrify -format png *.eps`. Thanks, username_2!)

```
$ convert ident.eps ident.png

josh@cadabra ~/affine
$ convert scale.eps scale.png

josh@cadabra ~/affine
$ convert rotate.eps rotate.png

josh@cadabra ~/affine
$ convert skewx.eps skewx.png

josh@cadabra ~/affine
$ convert translate.eps translate.png

josh@cadabra ~/affine
$ convert skewy.eps skewy.png

```

Which produces PNGs, ready to upload.

```
$ ls -l *.png
-rw-r--r-- 1 josh None  587 Sep  1 21:16 ident.png
-rw-r--r-- 1 josh None 1431 Sep  1 21:21 rotate.png
-rw-r--r-- 1 josh None  798 Sep  1 21:19 scale.png
-rw-r--r-- 1 josh None 1133 Sep  1 21:22 skewx.png
-rw-r--r-- 1 josh None 1197 Sep  1 21:23 skewy.png
-rw-r--r-- 1 josh None  756 Sep  1 21:23 translate.png

```

![](https://i.sstatic.net/gyZCZ.png)

> **Comments:**
> **username_2**: I dont really see the point of generating the encapsulation with ps2eps cant you just type the eps header in your template. It makes the instruction cleaner (and user needs less dependenies). Instead of converting each file separately do `mogrify -format png *.eps`  
> **username_0**: Cool. I didn't know about `mogrify`. For the `ps2eps` part, it automatically calculates (and adds) the bounding-box info. Omitting that part, `convert` will produce full-page-sized images  

---

### Answer by username_6 on 2015-09-16. Score: 4

Not the definitive toolbox you might be looking for, but just an extra tool I use myself: for 3d graphics, Blender might come in handy. Especially if you use the Export\_SVG plugin (available from <http://dl.dropbox.com/u/16486113/Blender/archivos/temp/SVG/export_svg.py> and <http://blenderartists.org/forum/showthread.php?282824-SVG-output-script> )

This allows you to get Blenders 3d objects as vector graphics in Illustrator or Inkscape. I find it gives me a nice quick start for creating **simple** 3d illustrations.

Allow me to paste an example. (In this example I use a lot of colors, but ofcourse, it can be all made black-and-red-on-white instead)

[![enter image description here](https://i.sstatic.net/dIyo9.png)](https://i.sstatic.net/dIyo9.png)

> **Comments:**
> **username_2**: surely you mean illustrator and inkscape (instead of illustrator and illustrator)  

---

### Answer by username_7 on 2015-09-02. Score: 4

I just use Powerpoint to make such diagrams and it works great as soon as you're comfortable with its basic primitives. It supports all simple operations like rotation, translation, etc. and recent revisions also have shear and 3D transforms. Examples:

[![enter image description here](https://i.sstatic.net/Hzmcd.png)](https://i.sstatic.net/Hzmcd.png)

[![enter image description here](https://i.sstatic.net/ESDaY.png)](https://i.sstatic.net/ESDaY.png)

Here is an [example of a Powerpoint diagram](https://computergraphics.stackexchange.com/a/1487/14) I made for an answer.

For more complicated diagrams, especially in 3D, I sometimes use Blender with shadeless materials. I can elaborate and show examples if it is relevant to your question.

Looks like [jsfiddle](https://computergraphics.stackexchange.com/questions/324/is-this-smaller-grid-for-poisson-disc-sampling-still-correct) is also popular around here.

> **Comments:**
> **username_7**: I agree---my answer is likely not valid any more because I haven't used diagrams in any answers so far. But I expect that to happen soon. So if it's OK for this answer to hang around for a few days, I am sure I will be able to find an answer.  
> **username_7**: Done! My answer should be valid now.  
> **username_0**: Excellent. Deleting my earlier comments.  

---

### Answer by username_8 on 2017-10-31. Score: 1

I use Powerpoint and various (expensive) CAD packages. I wrote Powerpoint macros (VBA code) to do some special things like draw the control polygons of Bezier curves. Then I use the standard Windows Snipping Tool to grab screen shots. Here are some examples:

[![enter image description here](https://i.sstatic.net/BdBcH.png)](https://i.sstatic.net/BdBcH.png)

[![enter image description here](https://i.sstatic.net/wQaEx.jpg)](https://i.sstatic.net/wQaEx.jpg)

[![enter image description here](https://i.sstatic.net/bpywg.png)](https://i.sstatic.net/bpywg.png)

[![enter image description here](https://i.sstatic.net/EUeLW.png)](https://i.sstatic.net/EUeLW.png)

And some further examples from Math.SE

[One](https://math.stackexchange.com/questions/2230316/ellipse-tangent-to-two-circles)  
[Two](https://math.stackexchange.com/questions/2200952/intersection-of-cones-tangent-to-a-common-sphere)  
[Three](https://math.stackexchange.com/questions/482063/parabolas-through-three-points)  
[Four](https://math.stackexchange.com/questions/1601158/how-can-we-find-geodesics-on-a-one-sheet-hyperboloid/1606820#1606820)  
[Five](https://math.stackexchange.com/questions/465782/control-points-of-offset-bezier-curve/467038#467038)

> **Comments:**
> **username_2**: Powerpoint is actually quite expensive considering things. Its ok, after all drawing skill comes from you. But atleast tikz, inkscape, blrnder and postscript are way cheaper than powerpoint.  
> **username_8**: I'm old, so time is more important to me than money. Inkscape is good, but there's no way I'd spend time writing tikz or Postscript code to produce pictures.  
> **username_9**: You don't need to take a screenshot, you can export the result to pdf (or EMF) formats, and then open it in something like inkscape to export it to a PNG with the resolution of your choice.  

---

