<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Endeavour &#187; Graphics</title>
	<atom:link href="http://www.johndcook.com/blog/category/graphics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog</link>
	<description>The blog of John D. Cook</description>
	<lastBuildDate>Fri, 10 Feb 2012 23:03:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>2010 calendar of lost mathematical art</title>
		<link>http://www.johndcook.com/blog/2010/01/03/2010-nomogram-calendar/</link>
		<comments>http://www.johndcook.com/blog/2010/01/03/2010-nomogram-calendar/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 15:20:18 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=4106</guid>
		<description><![CDATA[Rod Carvalho wrote a post this morning announcing a beautiful 2010 calendar created by Ron Doerfler. Doerfler&#8217;s blog is entitled Dead Reckonings: Lost Art in the Mathematical Sciences. The calendar is an example of such lost art. It is illustrated with nomograms, ingenious ways of computing with graphs before electronic calculators were common. The illustrations [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://stochastix.wordpress.com/about/">Rod Carvalho</a> wrote a post this morning announcing a beautiful <a href="http://stochastix.wordpress.com/2010/01/03/the-age-of-graphical-computing/">2010 calendar</a> created by <a href="http://myreckonings.com/wordpress/about/">Ron Doerfler</a>. Doerfler&#8217;s blog is entitled <a href="http://myreckonings.com/wordpress/">Dead Reckonings: Lost Art in the Mathematical Sciences</a>. The calendar is an example of such lost art. It is illustrated with <a href="http://en.wikipedia.org/wiki/Nomogram">nomograms</a>, ingenious ways of computing with graphs before electronic calculators were common. The illustrations are pleasant to look at even if you have no idea what they mean.</p>
<p style="text-align: center;"><a href="http://myreckonings.com/wordpress/2009/12/31/a-2010-graphical-computing-calendar/"><img src="http://www.johndcook.com/calendar2010frontback.png" alt="" width="294" height="451" /></a></p>
<p>Image via Ron Doerfler.</p>
<p><strong>Related posts</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2009/03/06/spherical-trigonometry/">Spherical trig</a> is a lost art. <a href="http://www.johndcook.com/blog/2009/09/07/why-spherical-trigonometry/">Why care about spherical trig</a>?</p>
<p>The <a href="http://www.johndcook.com/blog/2009/09/21/gudermannian/">Gudeermannian function</a> gd(x) is another interesting relic of an early time. It is closely related to the <a href="http://www.johndcook.com/blog/2009/09/15/mercator-projection/">Mercator projection</a> and shows how to relate ordinary and hyperbolic trig functions without using complex numbers.</p>
<p>The image above shows solutions to the equation u + v + w = uvw. Here&#8217;s a <a href="http://www.johndcook.com/blog/2008/11/30/tangent-identity/">post</a> explaining the significance of that equation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2010/01/03/2010-nomogram-calendar/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Including LaTeX in an Inkscape drawing</title>
		<link>http://www.johndcook.com/blog/2009/12/22/including-latex-in-inkscape/</link>
		<comments>http://www.johndcook.com/blog/2009/12/22/including-latex-in-inkscape/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 12:10:20 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Inkscape]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=4006</guid>
		<description><![CDATA[My previous post described how to include an Inkscape drawing in a LaTeX document. This post describes how to use LaTeX in an Inkscape drawing, which is probably more useful. The LaTeX output is included not as bitmap but as a vector drawing that can then be manipulated with all the features of Inkscape.

The Inkscape [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.johndcook.com/blog/2009/12/22/including-inkscape-in-latex/">previous post</a> described how to include an Inkscape drawing in a LaTeX document. This post describes how to use LaTeX in an Inkscape drawing, which is probably more useful. The LaTeX output is included not as bitmap but as a vector drawing that can then be manipulated with all the features of Inkscape.</p>
<p style="text-align: center;"><img src="http://www.johndcook.com/pythagorean.png" alt="labeled triangle" width="324" height="218" /></p>
<p>The <a href="http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.php">Inkscape book</a> describes the <a href="http://www.kono.cis.iwate-u.ac.jp/~arakit/inkscape/inklatex.html">InkLaTeX</a> extension, but the web site for <code>InkLaTeX</code> recommends a newer extension <a href="http://www.elisanet.fi/ptvirtan/software/textext/">textext</a>. Once <code>textext</code> is installed, you can insert LaTeX into an Inkscape drawing by going to the Extensions menu and selecting &#8220;TeX Text&#8221;. This launches a window in which to type your LaTeX source.</p>
<p>Before I could install <code>textext</code>, I had to install <a href="http://www.pstoedit.net/pstoedit"><code>pstoedit</code></a>. The <code>textext</code> extension also requires LaTeX and Ghostscript, but these were already on my computer. <code>pstoedit</code> has several installation options; I chose the default basic option and that worked. Also, <code>pstoedit</code> says that it requires two Visual C++ runtime DLLs: <code>msvcr70.dll</code> and <code>msvcp70.dll</code>. I already had these, but the <code>pstoedit</code> site gives a link to where you can find these DLLs if you need them.</p>
<p>I had Inkscape running when installed <code>textext</code> and I had to restart Inkscape to see the &#8220;TeX Text&#8221; menu.</p>
<p><strong>Related post</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2009/12/22/including-inkscape-in-latex/">Including an Inkscape drawing in LaTeX</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/12/22/including-latex-in-inkscape/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Including an Inkscape drawing in LaTeX</title>
		<link>http://www.johndcook.com/blog/2009/12/22/including-inkscape-in-latex/</link>
		<comments>http://www.johndcook.com/blog/2009/12/22/including-inkscape-in-latex/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 12:00:21 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Inkscape]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=4003</guid>
		<description><![CDATA[The Inkscape drawing package can export to a large variety of vector drawing formats, including LaTeX. If you save your drawing to a file foo.tex, you can include the file in a LaTeX document as follows.
\documentclass{article}
\usepackage{pstricks}
\begin{document}
Testing Inkscape \LaTeX\ output.

\input{foo.tex}

\end{document}
Of course you could always export the drawing to an image format and include that image the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.inkscape.org/">Inkscape</a> drawing package can export to a large variety of vector drawing formats, including LaTeX. If you save your drawing to a file <code>foo.tex</code>, you can include the file in a LaTeX document as follows.</p>
<pre>\documentclass{article}
\usepackage{pstricks}
\begin{document}
Testing Inkscape \LaTeX\ output.

\input{foo.tex}

\end{document}</pre>
<p>Of course you could always export the drawing to an image format and include that image the way you&#8217;d <a href="http://www.johndcook.com/blog/2008/07/24/including-images-in-latex-files/">include any other image</a>. But you also have the option of directly including the content Inkscape output in your LaTeX file rather than referencing it as an external file using the <code>\input</code> statement. This makes your LaTeX file self-contained and is something you could not do, for example, with a PNG file.</p>
<p>Two notes:</p>
<ol>
<li>You must use the <code>pstricks</code> package.</li>
<li>You must compile the file with <code>latex</code> and not <code>pdflatex</code>. To create a PDF file, you must first compile to PostScript.</li>
</ol>
<p>The next post is a sort of opposite of this one. It explains <a href="http://www.johndcook.com/blog/2009/12/22/including-latex-in-inkscape/">how to use LaTeX inside an Inkscape drawing</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/12/22/including-inkscape-in-latex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Function plots in Inkscape</title>
		<link>http://www.johndcook.com/blog/2009/12/21/function-plots-inkscape/</link>
		<comments>http://www.johndcook.com/blog/2009/12/21/function-plots-inkscape/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 20:43:37 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Inkscape]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=4014</guid>
		<description><![CDATA[Why would you want to plot a mathematical function using a drawing package like Inkscape rather than a mathematical package like Mathematica or R? One reason is that you may want plot for its visual properties. For example, you might want to include a sine wave in a drawing.
Another reason is that you may want [...]]]></description>
			<content:encoded><![CDATA[<p>Why would you want to plot a mathematical function using a drawing package like <a href="http://inkscape.org/">Inkscape</a> rather than a mathematical package like Mathematica or R? One reason is that you may want plot for its visual properties. For example, you might want to include a sine wave in a drawing.</p>
<p>Another reason is that you may want to have more control (or at least easier control) over your plot. Mathematical packages make it easy to produce a basic plot with default options. But I&#8217;ve found it difficult to change the aesthetics of a plot in every mathematical package I&#8217;ve used. The things I want to do are often possible but require arcane options that I have trouble remembering. In a drawing program, it&#8217;s obvious how to manipulate a plot as an image.</p>
<p style="text-align: center;"><img src="http://www.johndcook.com/butterfly.png" alt="butterfly curve" width="288" height="226" /></p>
<p>Inkscape provides a couple extensions to include function plots in a drawing. One is &#8220;Function Plotter&#8221; and the other is &#8220;Parametric Curves.&#8221; Both are found under Extensions -&gt; Render. The following dialog shows the settings used to produce the graph above.</p>
<p style="text-align: center;"><img src="http://www.johndcook.com/butterfly_dialog.png" alt="" width="369" height="498" /></p>
<p>The first time I tried using these extensions nothing happened. Then I discovered you have to select a rectangle to contain the plot before creating a plot; the plotting tools do not create their own rectangles.</p>
<p>The Function Plotter supports rectangular and polar coordinates. You&#8217;re in for quite a surprise if you expect rectangular coordinates when the polar coordinates box is checked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/12/21/function-plots-inkscape/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Bezier basics</title>
		<link>http://www.johndcook.com/blog/2009/12/21/bezier-basics/</link>
		<comments>http://www.johndcook.com/blog/2009/12/21/bezier-basics/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 16:13:12 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=3995</guid>
		<description><![CDATA[Bézier curves are very common in computer graphics. They also interesting mathematical properties. This post will give a quick introduction to Bézier curves, describing them first in visual terms and then in mathematical terms.
There are different degrees of Bézier curves: linear, quadratic, cubic, etc. Linear Bézier curves are just straight lines. The most common kind [...]]]></description>
			<content:encoded><![CDATA[<p>Bézier curves are very common in computer graphics. They also interesting mathematical properties. This post will give a quick introduction to Bézier curves, describing them first in visual terms and then in mathematical terms.</p>
<p>There are different degrees of Bézier curves: linear, quadratic, cubic, etc. Linear Bézier curves are just straight lines. The most common kind of Bézier curve in drawing programs is the cubic and that&#8217;s the one I&#8217;ll describe below.</p>
<p style="text-align:center"><img src="http://www.johndcook.com/beziercurve.png" alt="Bezier curve" width="288" height="172" /></p>
<p>A cubic Bézier curve is determined by four points: two points determine where the curve begins and ends, and two more points determine the shape. Say the points are labeled P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub>, and P<sub>3</sub>. The curve begins at P<sub>0</sub> and initially goes in the direction of P<sub>1</sub>. It ends at P<sub>3</sub> going in the direction of a line connecting P<sub>2</sub> and P<sub>3</sub>. If you move P<sub>1</sub> further away from P<sub>0</sub>, the curve flattens, going further in the direction of P<sub>1</sub> before turning. Similar remarks hold for moving P<sub>2</sub> away from P<sub>3</sub>.</p>
<p>Now for equations. The cubic Bézier curve is given by</p>
<p style="padding-left: 30px;">B(t) = (1-t)<sup>3</sup> P<sub>0</sub> + 3(1-t)<sup>2</sup>t P<sub>1</sub> + 3(1-t)t<sup>2</sup> P<sub>2</sub> + t<sup>3</sup> P<sub>3</sub></p>
<p>for t running between 0 and 1. It&#8217;s clear from the equation that B(0) = P<sub>0</sub> and B(1) = P<sub>3</sub>. A little calculation shows that the derivatives satisfy</p>
<p style="padding-left: 30px;">B&#8217;(0) = 3(P<sub>0</sub> &#8211; P<sub>1</sub>)</p>
<p>and</p>
<p style="padding-left: 30px;">B&#8217;(1) = 3(P<sub>3</sub> &#8211; P<sub>2</sub>).</p>
<p>Moving the points P<sub>1</sub> and P<sub>2</sub> further out increases the derivatives and thus makes the curve go further in the direction of these points before bending.</p>
<p><strong>Related post</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2009/02/06/the-smoothest-curve-through-a-set-of-points/">The smoothest line through a set of points</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/12/21/bezier-basics/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Same color illusion</title>
		<link>http://www.johndcook.com/blog/2009/12/14/same-color-illusion/</link>
		<comments>http://www.johndcook.com/blog/2009/12/14/same-color-illusion/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 17:00:52 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Illusion]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=3873</guid>
		<description><![CDATA[Are squares A and B are the same color?

I found this illusion on John Baez&#8217;s site. It was created by Edward Adelson in 1995 and is the subject of a Wikipedia article.
Related post:
Optical illusion, mathematical illusion
]]></description>
			<content:encoded><![CDATA[<p>Are squares A and B are the same color?</p>
<p style="text-align:center"><img src="http://www.johndcook.com/same_color_illusion.png" alt="same color illusion" width="324" height="252" /></p>
<p>I found this illusion on <a href="http://math.ucr.edu/home/baez/">John Baez&#8217;s site</a>. It was created by Edward Adelson in 1995 and is the subject of a <a href="http://en.wikipedia.org/wiki/Same_color_illusion">Wikipedia article</a>.</p>
<p><strong>Related post</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2009/06/24/optical-illusion/">Optical illusion, mathematical illusion</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/12/14/same-color-illusion/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>More on colors and grayscale</title>
		<link>http://www.johndcook.com/blog/2009/08/24/more-on-colors-and-grayscale/</link>
		<comments>http://www.johndcook.com/blog/2009/08/24/more-on-colors-and-grayscale/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 22:14:11 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=2947</guid>
		<description><![CDATA[My previous post gave three algorithms for converting color to grayscale. This post gives more examples and details.
The image below is a screenshot from an Excel spreadsheet illustrating color values and how the convert to grayscale. The R, G, and B columns are the red, green, and blue component values of the color sample in [...]]]></description>
			<content:encoded><![CDATA[<p>My previous post gave <a href="http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/">three algorithms for converting color to grayscale</a>. This post gives more examples and details.</p>
<p>The image below is a screenshot from an Excel spreadsheet illustrating color values and how the convert to grayscale. The R, G, and B columns are the red, green, and blue component values of the color sample in the leftmost column. The columns labeled &#8220;Li&#8221;, &#8220;Lu&#8221;, and &#8220;Avg&#8221; are the grayscale values of the color using the lightness, luminosity, and average algorithms from the <a href="http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/">previous post</a>.</p>
<p style="text-align:center"><img src="http://www.johndcook.com/excel.png" alt="" width="443" height="220" /></p>
<p>The grayscale color samples were created by asking Excel to set the background color to (X, X, X) where X is the grayscale value. For example, the background color for the &#8220;Lu&#8221; column of the first row is (54, 54, 54) since 54 is the luminosity value for pure red.</p>
<p>To verify the algorithms, I converted the screen shot above to a grayscale image using GIMP. The gray cells remain unchanged because all three algorithms leave gray alone; when all three RBG values are equal, it&#8217;s clear from the formulas that the grayscale value becomes the common value. The color cells in the first column become the shade of gray predicted and hence match the column of gray cells for that algorithm.</p>
<p>Using lightness:</p>
<p style="text-align:center"><img src="http://www.johndcook.com/excel_lightness.jpeg" alt="image converted using the lightness algorithm" width="443" height="220" /></p>
<p>Using luminosity:</p>
<p style="text-align:center"><img src="http://www.johndcook.com/excel_luminosity.jpeg" alt="image converted using the luminosity algorithm" width="443" height="220" /></p>
<p>Using average:</p>
<p style="text-align:center"><img src="http://www.johndcook.com/excel_average.jpeg" alt="image converted using the average algorithm" width="443" height="220" /></p>
<p><strong>Related post</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/">Three algorithms for converting color to grayscale</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/08/24/more-on-colors-and-grayscale/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Three algorithms for converting color to grayscale</title>
		<link>http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/</link>
		<comments>http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 14:50:39 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=2916</guid>
		<description><![CDATA[How do you convert a color image to grayscale? If each color pixel is described by a triple (R, G, B) of intensities for red, green, and blue, how do you map that to a single number giving a grayscale value? The GIMP image software has three algorithms.
The lightness method averages the most prominent and [...]]]></description>
			<content:encoded><![CDATA[<p>How do you convert a color image to grayscale? If each color pixel is described by a triple (R, G, B) of intensities for red, green, and blue, how do you map that to a single number giving a grayscale value? The <a href="http://www.gimp.org/">GIMP</a> image software has three algorithms.</p>
<p>The <strong>lightness</strong> method averages the most prominent and least prominent colors: (max(R, G, B) + min(R, G, B)) / 2.</p>
<p>The <strong>average</strong> method simply averages the values: (R + G + B) / 3.</p>
<p>The <strong>luminosity</strong> method is a more sophisticated version of the average method. It also averages the values, but it forms a weighted average to account for human perception. We&#8217;re more sensitive to green than other colors, so green is weighted most heavily. The formula for luminosity is 0.21 R + 0.71 G + 0.07 B.</p>
<p>The example sunflower images below come from the <a href="http://docs.gimp.org/2.6/en/gimp-tool-desaturate.html">GIMP documentation</a>.</p>
<table border="0" cellspacing="8">
<tbody>
<tr>
<td>Original image</td>
<td><img src="http://www.johndcook.com/sunflower.png" alt="color photo of sunflower" /></td>
</tr>
<tr>
<td>Lightness</td>
<td><img src="http://www.johndcook.com/sunflower_lightness.png" alt="sunflower converted to grayscale using lightness algorithm" /></td>
</tr>
<tr>
<td>Average</td>
<td><img src="http://www.johndcook.com/sunflower_average.png" alt="sunflower converted to grayscale using average algorithm" /></td>
</tr>
<tr>
<td>Luminosity</td>
<td><img src="http://www.johndcook.com/sunflower_luminosity.png" alt="sunflower converted to grayscale using luminosity algorithm" /></td>
</tr>
</tbody>
</table>
<p>The lightness method tends to reduce contrast. The luminosity method works best overall and is the default method used if you ask GIMP to change an image from RGB to grayscale from the Image -&gt; Mode menu. However, some images look better using one of the other algorithms. And sometimes the three methods produce very similar results.</p>
<p><strong>Update</strong>: See <a href="http://www.johndcook.com/blog/2009/08/24/more-on-colors-and-grayscale/">More on colors and grayscale</a> for more details and more examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Back to school</title>
		<link>http://www.johndcook.com/blog/2009/08/24/back-to-school/</link>
		<comments>http://www.johndcook.com/blog/2009/08/24/back-to-school/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 13:34:18 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=2942</guid>
		<description><![CDATA[Here&#8217;s today&#8217;s image from The Retro Press, a back-to-school ad from the September 9, 1957 issue of LIFE.

The Retro Press blog highlights advertisements from the Gallery of Graphic Design.
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s today&#8217;s image from <a href="http://tjs-labs.com/blog/">The Retro Press</a>, a back-to-school ad from the September 9, 1957 issue of LIFE.</p>
<p style="text-align:center"><a href="http://tjs-labs.com/blog/2009/08/24/cellophane-tape-of-the-day-august-24-2009/"><img src="http://www.johndcook.com/backtoschool.jpg" alt="" width="288" height="367" /></a></p>
<p>The Retro Press blog highlights advertisements from the <a href="http://graphic-design.tjs-labs.com/index">Gallery of Graphic Design</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/08/24/back-to-school/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optical illusion, mathematical illusion</title>
		<link>http://www.johndcook.com/blog/2009/06/24/optical-illusion/</link>
		<comments>http://www.johndcook.com/blog/2009/06/24/optical-illusion/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 19:44:16 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Illusion]]></category>
		<category><![CDATA[Integration]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=2541</guid>
		<description><![CDATA[Someone sent me a link to an optical illusion while I was working on a math problem. The two things turned out to be related.
In the image below, what look like blues spiral and green spirals are actually exactly the same color. The spiral that looks blue is actually green inside, but the magenta stripes [...]]]></description>
			<content:encoded><![CDATA[<p>Someone sent me a link to an optical illusion while I was working on a math problem. The two things turned out to be related.</p>
<p>In the image below, what look like blues spiral and green spirals are actually exactly the same color. The spiral that looks blue is actually green inside, but the magenta stripes across it make the green look blue. I know you don&#8217;t believe me; I didn&#8217;t believe it either. See this <a href="http://blogs.discovermagazine.com/badastronomy/2009/06/24/the-blue-and-the-green/">blog post</a> for an explanation, including a magnified close-up of the image. Or open it in an image editor and use a color selector to see for yourself.</p>
<p style="text-align:center"><img src="http://www.johndcook.com/spiralillusion.gif" alt="" width="344" height="351" /></p>
<p>My math problem was also a case of two things that look different even though they are not. Maybe you can think back to a time as a student when you knew your answer was correct even though it didn&#8217;t match the answer in the back of the book. The two answers were equivalent but written differently. In an algebra class you might answer 5 / √ 3 when the book has 5 √ 3 / 3. In trig class you might answer 1 &#8211; cos<sup>2</sup>x when the book has sin<sup>2</sup>x. In a differential equations class, equivalent answers may look very different since arbitrary constants can obfuscate differences.</p>
<p>In my particular problem, I was looking at weights for Gauss-Hermite integration. I was trying to reconcile two different expressions for the weights, one in some software I&#8217;d written years ago and one given in <a href="http://www.amazon.com/gp/product/0486612724?ie=UTF8&amp;tag=theende-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0486612724">A&amp;S</a>. I thought I&#8217;d found a bug, at least in my comments if not in my software. My confusion was analogous to not recognizing a trig identity.  I wish I could say that the optical illusion link made me think that the two expressions may be the same and they just look different because of a mathematical illusion. That would make a good story. Instead, I discovered the equivalence of the two expressions by brute force, having Mathematica print out the values so I could compare them. Only later did I see the analogy between my problem and the optical illusion.</p>
<p>In case you&#8217;re interested in the details, my problem boiled down to the equivalence between H<sub>n+1</sub>(x<sub>i</sub>)<sup>2</sup> and 4n<sup>2</sup>H<sub>n-1</sub>(x<sub>i</sub>)<sup>2</sup> where H<sub>n</sub>(x) is the <em>n</em>th <a href="http://en.wikipedia.org/wiki/Hermite_polynomial">Hermite polynomial</a> and x<sub>i</sub> is the <em>i</em>th root of H<sub>n</sub>. Here&#8217;s why these are the same. The Hermite polynomials satisfy a recurrence relation H<sub>n+1</sub>(x) = 2x H<sub>n</sub>(x) &#8211; 2n H<sub>n-1</sub>(x) for all x. Since H<sub>n</sub>(x<sub>i</sub>) = 0, H<sub>n+1</sub>(x<sub>i</sub>) = -2nH<sub>n-1</sub>(x<sub>i</sub>). Now square both sides.</p>
<p><strong>Related post</strong>: <a href="http://www.johndcook.com/blog/2008/02/16/orthogonal-polynomials/">Orthogonal polynomials</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/06/24/optical-illusion/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Programming for artists</title>
		<link>http://www.johndcook.com/blog/2009/01/21/programming-for-artists/</link>
		<comments>http://www.johndcook.com/blog/2009/01/21/programming-for-artists/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 12:57:52 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1326</guid>
		<description><![CDATA[Last night I listened to the latest FLOSS Weekly podcast, an interview with the creators of Processing. I&#8217;d heard of the Processing language before, but I thought it was some sort of ETL (extract, transform, and load) tool for data processing. Instead, it&#8217;s a Java-like language for artists. Here&#8217;s the description from the processing.org site.
Processing [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I listened to the latest FLOSS Weekly podcast, an interview with the creators of Processing. I&#8217;d heard of the Processing language before, but I thought it was some sort of ETL (extract, transform, and load) tool for data processing. Instead, it&#8217;s a Java-like language for artists. Here&#8217;s the description from the <a href="http://processing.org/">processing.org</a> site.</p>
<blockquote><p>Processing is an open source programming language and environment for          people who want to program images, animation, and interactions. It is used by          students, artists, designers, researchers, and hobbyists for          learning, prototyping, and production. It is created to teach fundamentals          of computer programming within a visual context and to serve as a software          sketchbook and professional production tool.</p></blockquote>
<p><a href="http://www.twit.tv/floss52">Show notes</a> | <a href="http://www.podtrac.com/pts/redirect.mp3/twit.cachefly.net/FLOSS-052.mp3">audio</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/01/21/programming-for-artists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.podtrac.com/pts/redirect.mp3/twit.cachefly.net/FLOSS-052.mp3" length="20934323" type="audio/mpeg" />
		</item>
		<item>
		<title>PNG vs JPEG</title>
		<link>http://www.johndcook.com/blog/2009/01/08/png-vs-jpeg/</link>
		<comments>http://www.johndcook.com/blog/2009/01/08/png-vs-jpeg/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 17:31:01 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1227</guid>
		<description><![CDATA[Bill the Lizard answered an image compression question on StackOverflow by pointing out the image below that shows the difference between PNG and JPEG compression when applied to line drawings.
The image comes from lbrandy.com. The left side of the image uses PNG compression, a lossless compression format. The right side uses JPEG, a lossy format [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.billthelizard.com/">Bill the Lizard</a> answered an <a href="http://stackoverflow.com/questions/422902/image-compression-for-webcomics">image compression question</a> on StackOverflow by pointing out the image below that shows the difference between PNG and JPEG compression when applied to line drawings.</p>
<p><img class="aligncenter" src="http://lbrandy.com/blog/wp-content/uploads/2008/10/jpg_vs_png2.png" alt="" width="420" height="450" />The image comes from <a href="http://lbrandy.com/blog/2008/10/my-first-and-last-webcomic/">lbrandy.com</a>. The left side of the image uses PNG compression, a lossless compression format. The right side uses JPEG, a lossy format that computes a Fourier transform and discards the highest frequency components. JPEG can produce smaller files for natural photographic images. But for line drawings, the artifacts of the JPEG compression are noticeable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2009/01/08/png-vs-jpeg/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Picking a color scheme</title>
		<link>http://www.johndcook.com/blog/2008/12/18/picking-a-color-scheme/</link>
		<comments>http://www.johndcook.com/blog/2008/12/18/picking-a-color-scheme/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 15:17:28 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1117</guid>
		<description><![CDATA[The other day Nils gave an interesting answer to a question on StackOverflow regarding color theory. 
NEVER ever use pure colors. &#8230; If you have no idea what color to start with, get a classic masterpiece of painting from the net. Blur it a bit and then pick some nice colors from it. If you use [...]]]></description>
			<content:encoded><![CDATA[<p>The other day <a href="http://stackoverflow.com/users/15955/nils">Nils</a> gave an interesting <a href="http://stackoverflow.com/questions/374749/understanding-colors">answer</a> to a question on StackOverflow regarding color theory. <a href="http://stackoverflow.com/users/15955/nils"></a></p>
<blockquote><p><em>NEVER</em> ever use pure colors. &#8230; If you have no idea what color to start with, get a classic masterpiece of painting from the net. Blur it a bit and then pick some nice colors from it. If you use some common sense it&#8217;s hard not to end with pleasant colors this way.</p></blockquote>
<p>He gave the example of extracting this color scheme</p>
<p style="text-align:center"><img src="http://www.johndcook.com/colors.png" alt="" width="197" height="124" /></p>
<p>from this painting.</p>
<p style="text-align:center"><img src="http://johndcook.com/Monet.jpg" alt="Monet painting lily pads" width="318" height="205" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2008/12/18/picking-a-color-scheme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What it takes to make Paint.NET easy to install</title>
		<link>http://www.johndcook.com/blog/2008/11/21/what-it-takes-to-make-paintnet-easy-to-install/</link>
		<comments>http://www.johndcook.com/blog/2008/11/21/what-it-takes-to-make-paintnet-easy-to-install/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 20:08:30 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=939</guid>
		<description><![CDATA[Writing good installation programs is hard. It takes experience and forethought to imagine all the things that might happen on the client&#8217;s computer. Top notch programmers know that installers are critical to a user&#8217;s experience and put a lot of time into making them high quality. Not so top notch programmers think a project is [...]]]></description>
			<content:encoded><![CDATA[<p>Writing good installation programs is hard. It takes experience and forethought to imagine all the things that might happen on the client&#8217;s computer. Top notch programmers know that installers are critical to a user&#8217;s experience and put a lot of time into making them high quality. Not so top notch programmers think a project is done when they can get it to work on their computer.</p>
<p>Scott Hanselman has an <a href="http://hanselminutes.com/default.aspx?showID=156">interview</a> with Paint.NET creator Rick Brewster. The main topic of the interview was the things Rick did to make Paint.NET easy to install.</p>
<p><a href="http://www.getpaint.net/">Paint.NET</a> is an image editing product written using Microsoft&#8217;s .NET framework. In a sense Paint.NET is the geometric mean between the Paint program that ships with Windows and Adope Photoshop: it does about 20x more than Paint and about 20x less than Photoshop. It does most of the things I need, but it&#8217;s small enough that I can do a brute force search of the features if I have to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2008/11/21/what-it-takes-to-make-paintnet-easy-to-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watch what you name graphics files in LaTeX</title>
		<link>http://www.johndcook.com/blog/2008/10/11/watch-what-you-name-graphics-files-in-latex/</link>
		<comments>http://www.johndcook.com/blog/2008/10/11/watch-what-you-name-graphics-files-in-latex/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 12:18:39 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=523</guid>
		<description><![CDATA[A while back I was trying to paste a figures into a LaTeX document this evening with names like foo_27.png and foo_32.2.png, putting a parameter value into the name of the plot. The former worked but the latter didn&#8217;t.
It turns out the \includegraphics command parses the file extension in a naive way to determine the file [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I was trying to paste a figures into a LaTeX document this evening with names like <code>foo_27.png</code> and <code>foo_32.2.png</code>, putting a parameter value into the name of the plot. The former worked but the latter didn&#8217;t.</p>
<p>It turns out the <code>\includegraphics</code> command parses the file extension in a naive way to determine the file type. When it sees <code>foo_27.png</code>, it says &#8220;OK, a <code>.png</code> file&#8221;. But when it sees <code>foo_32.2.png</code>, it says &#8220;<code>.2.png</code>? I&#8217;ve never heard of that file type.&#8221;</p>
<p><strong>Related post</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2008/07/24/including-images-in-latex-files/">Including graphics in LaTeX documents</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2008/10/11/watch-what-you-name-graphics-files-in-latex/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Including images in LaTeX files</title>
		<link>http://www.johndcook.com/blog/2008/07/24/including-images-in-latex-files/</link>
		<comments>http://www.johndcook.com/blog/2008/07/24/including-images-in-latex-files/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 05:29:49 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/2008/07/24/including-images-in-latex-files/</guid>
		<description><![CDATA[Here are the rules for including images in LaTeX files as far as I can tell.
Near the top of your document, use \usepackage{graphicx} to load the graphicx package. Then at the point where you want to include your image, use \includeimage{...} where &#8230; is the path to your file.
If you want to create a PDF [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the rules for including images in LaTeX files as far as I can tell.</p>
<p>Near the top of your document, use <code>\usepackage{graphicx}</code> to load the <code>graphicx</code> package. Then at the point where you want to include your image, use <code>\includeimage{...}</code> where &#8230; is the path to your file.</p>
<p>If you want to create a PDF file with <code>pdflatex</code>, your image must be in PDF, PNG, or JPEG format.</p>
<p>If you want to create a DVI file with <code>latex</code> or a PS file with <code>dvips</code>, your image must be in PS or EPS format.</p>
<p>There&#8217;s no way to include a GIF file without first converting it to another file format.</p>
<p>If you use <code>\usepackage{pgf}</code> rather than  <code>\usepackage{graphics}</code> at the top of the file, nothing changes except that you must chop the file extensions off image file names.</p>
<p><strong>Related post</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2008/10/11/watch-what-you-name-graphics-files-in-latex/">Watch what you name graphics files in LaTeX</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2008/07/24/including-images-in-latex-files/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Free bitmap to vector format software</title>
		<link>http://www.johndcook.com/blog/2008/02/19/free-bitmap-to-vector-format-software/</link>
		<comments>http://www.johndcook.com/blog/2008/02/19/free-bitmap-to-vector-format-software/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 13:20:05 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/2008/02/19/free-bitmap-to-vector-format-software/</guid>
		<description><![CDATA[VectorMagic is a free online tool from the Standford University AI lab for converting bitmap images to vector formats. The image below shows an example of what you might use this tool for.

I just heard about the software and tried it out with a fairly complex image, a sample of Japanese calligraphy, and it did a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://vectormagic.com/">VectorMagic</a> is a free online tool from the Standford University AI lab for converting bitmap images to vector formats. The image below shows an example of what you might use this tool for.</p>
<p style="text-align: center"><img src="http://vectormagic.com/images/vectorization_horizontal_narrow.png" alt="bitmap to vector conversion" /></p>
<p>I just heard about the software and tried it out with a fairly complex image, a sample of Japanese calligraphy, and it did a beautiful job converting the image from bitmap to EPS (Encapsulated PostScript).</p>
<p>The software supports JPEG, GIF, PNG, BMP, and TIFF input. It supports EPS, SVG, and PNG output.</p>
<p>(In case you&#8217;re not familiar with graphic formats, a bitmap image is a matrix of dots. The format records what color each dot is. That works fine when an image is displayed at its original resolution. But if you make the image bigger, you just get bigger dots and things look grainy. A vector format stores the formulas for the curves that make up the image, not the dots, and computes the dots when it&#8217;s time to display the image. If you make an image larger, it computes new dots according to the formulas. Software for making bitmaps <em>smaller</em> is common. Software that does a good job of making bitmaps <em>larger</em> is rare.)</p>
<p><strong>Update</strong>: VectorMagic has moved to a new domain. I&#8217;ve corrected the link above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2008/02/19/free-bitmap-to-vector-format-software/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quick TeX to graphic utility</title>
		<link>http://www.johndcook.com/blog/2008/01/17/quick-tex-to-graphic-utility/</link>
		<comments>http://www.johndcook.com/blog/2008/01/17/quick-tex-to-graphic-utility/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 23:15:43 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/2008/01/17/quick-tex-to-graphic-utility/</guid>
		<description><![CDATA[Here&#8217;s a web site where you can type in some TeX code, click a button, and get back a GIF with a transparent background. Handy for pasting equations into HTML.
http://www.artofproblemsolving.com/LaTeX/AoPS_L_TeXer.php
For example:

]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a web site where you can type in some TeX code, click a button, and get back a GIF with a transparent background. Handy for pasting equations into HTML.</p>
<p><a href="http://www.artofproblemsolving.com/LaTeX/AoPS_L_TeXer.php">http://www.artofproblemsolving.com/LaTeX/AoPS_L_TeXer.php</a></p>
<p>For example:</p>
<p><img width="136" src="http://www.johndcook.com/integral.gif" alt="gaussian integral" height="39" style="width: 136px; height: 39px" title="gaussian integral" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2008/01/17/quick-tex-to-graphic-utility/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.177 seconds -->

