<?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>John D. Cook</description>
	<lastBuildDate>Thu, 23 May 2013 16:23:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Pretty squiggles</title>
		<link>http://www.johndcook.com/blog/2013/02/09/pretty-squiggles/</link>
		<comments>http://www.johndcook.com/blog/2013/02/09/pretty-squiggles/#comments</comments>
		<pubDate>Sat, 09 Feb 2013 16:42:15 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=12850</guid>
		<description><![CDATA[Here&#8217;s an image that came out of something I was working on this morning. I thought it might make an interesting border somewhere. The blue line is sin(x), the green line 0.7 sin(φ x), and the red line is their<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2013/02/09/pretty-squiggles/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s an image that came out of something I was working on this morning. I thought it might make an interesting border somewhere.</p>
<p style="text-align:center"><img class="alignnone" src="http://www.johndcook.com/out_of_phase.png" alt="" width="450" height="180" /></p>
<p>The blue line is sin(x), the green line 0.7 sin(φ x), and the red line is their sum. Here φ is the golden ratio (1 + √5)/2. Even though the blue and green curves are both periodic, their sum is not because the ratio of their frequencies is irrational. So you could make this image as long as you&#8217;d like and the red curve would never exactly repeat.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2013/02/09/pretty-squiggles/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>R without Hadley Wickham</title>
		<link>http://www.johndcook.com/blog/2012/11/07/r-without-hadley-wickham/</link>
		<comments>http://www.johndcook.com/blog/2012/11/07/r-without-hadley-wickham/#comments</comments>
		<pubDate>Wed, 07 Nov 2012 22:45:53 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Rstats]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=12399</guid>
		<description><![CDATA[Tim Hopper asked on Twitter today: #rstats programming without @hadleywickham’s libraries is like ________ without _________. Some of the replies were: (skydiving, a parachute) (gouging your own eyes out, NULL) (dentistry, anesthesia) (shaving, a razor) (internet shopping, credit card) Clearly<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2012/11/07/r-without-hadley-wickham/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p><a href="https://twitter.com/tdhopper">Tim Hopper</a> asked on Twitter today:</p>
<p style="padding-left: 30px;">#rstats programming without @hadleywickham’s libraries is like ________ without _________.</p>
<p>Some of the replies were:</p>
<ul>
<li>(skydiving, a parachute)</li>
<li>(gouging your own eyes out, NULL)</li>
<li>(dentistry, anesthesia)</li>
<li>(shaving, a razor)</li>
<li>(internet shopping, credit card)</li>
</ul>
<p>Clearly there&#8217;s a lot of love out there for <a href="http://had.co.nz/">Hadley Wickham&#8217;s R packages</a>. I&#8217;m familiar with his <a href="http://ggplot2.org/">ggplot2</a> graphics package, and it&#8217;s quite impressive. I need to look at his other packages as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2012/11/07/r-without-hadley-wickham/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Interview with Michael Hammel, author of The Artist&#039;s Guide to GIMP</title>
		<link>http://www.johndcook.com/blog/2012/07/30/interview-michael-hammel/</link>
		<comments>http://www.johndcook.com/blog/2012/07/30/interview-michael-hammel/#comments</comments>
		<pubDate>Mon, 30 Jul 2012 11:36:54 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Interview]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=11829</guid>
		<description><![CDATA[Michael J. Hammel is the author of The Artist&#8217;s Guide to GIMP, a book I reviewed three weeks ago. The following interview is based on my correspondence with Michael. JC: The bio on your book says that you are an<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2012/07/30/interview-michael-hammel/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.graphics-muse.org/">Michael J. Hammel</a> is the author of <a href="http://www.amazon.com/gp/product/1593274149/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1593274149&amp;linkCode=as2&amp;tag=theende-20">The Artist&#8217;s Guide to GIMP</a>, a book I <a href="http://www.johndcook.com/blog/2012/07/07/the-artists-guide-to-gimp/">reviewed</a> three weeks ago. The following interview is based on my correspondence with Michael.</p>
<p><a href="http://www.amazon.com/gp/product/1593274149/ref=as_li_ss_il?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1593274149&amp;linkCode=as2&amp;tag=theende-20"><img src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;ASIN=1593274149&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=theende-20" border="0" alt="" /></a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=theende-20&amp;l=as2&amp;o=1&amp;a=1593274149" border="0" alt="" width="1" height="1" /></p>
<p><strong><span id="more-11829"></span>JC</strong>: The bio on your book says that you are an embedded software developer. Is GIMP something you use for fun or is it related to your work? Was it related to your work before?</p>
<p><strong>MH</strong>: I use it once in awhile at work but not often. GIMP started as something related to what I worked on when it first came out (graphics software for Unix systems). But I&#8217;ve never been paid to be an artist. At one point I looked at trying to use what I knew about it to leverage my way into Pixar or Dreamworks. But that never panned out and my interest in that kind of animation has peeked and ebbed, mostly because I decided I didn&#8217;t want to live in California (too expensive).</p>
<p><strong>JC</strong>: How did you become involved in the development of GIMP?</p>
<p><strong>MH</strong>: When GIMP was born, back around 1995 or so, I was working for a company that provided commercial X servers for Unix systems (Xi Graphics, started by Thomas Roell who wrote the original reference implementation of an X server for 386 systems, aka X386, which begot XFree86 which begot X.org). I packaged Motif as part of my work. A guy I worked with noticed GIMP&#8217;s Motif version and pointed me at it. I wrote a plugin for John Beale&#8217;s sparkle code (the original Sparkle plugin). I&#8217;ve been working with GIMP ever since.</p>
<p><strong>JC</strong>: Are you still a developer for GIMP or primarily a user?</p>
<p><strong>MH</strong>: A user. I haven&#8217;t provided any useful code development to the project in quite sometime.</p>
<p><strong>JC</strong>: What&#8217;s it like to be a developer on GIMP?</p>
<p><strong>MH</strong>: Take this with a grain of salt. It&#8217;s a follower&#8217;s view from the outside, without being involved with the developers directly.</p>
<p>GIMP&#8217;s developer community is somewhat different than other open source communities that I&#8217;ve been involved with. GIMP&#8217;s leadership is de facto, but not necessarily structured. Many other projects have defined leaders with defined tasks. GIMP&#8217;s development is a little more oriented towards scratching your own itch: pick something that that you want to improve and start working on it. The only tough part (at least for some) is understanding and adhering to the main developers coding styles and rules, which are not (to my knowledge) written down.</p>
<p>My only complaint with this style is it tends to allow long term development cycles. End users can&#8217;t rely on when new features might be available. While the developers want do things &#8220;the right way&#8221;, that means that users have been waiting a very long time, for example, for deep paint support. There is a tradeoff for how you do development. Remember that the developers are volunteers, so there is no valid reason for complaining if you, as a user, aren&#8217;t getting what you want when you want it. If it bothers you, step in and help out. Otherwise, do as I do: be content with their development process.</p>
<p><strong>JC</strong>: What advice would you give people who want to learn image editing?</p>
<p><strong>MH</strong>: I learned how to use GIMP by reading Photoshop texts. Image editing is a common set of processes. Think about what you want to do if you weren&#8217;t using software. You&#8217;re house needs a new color? You mask off the window boarders and roof line and start painting. Same thing in image editing. Only difference: it&#8217;s easier to try different colors. Image editing is all about selections and masks. I&#8217;m not talking about creating the next Marvel comic, I mean editing existing images. Once you identify what needs to be changed using a selection and mask, you can do all kinds of things: copy and distort, recolor, refocus, etc.</p>
<p>Making comics or custom drawings requires real artistic talent to create a rough design on paper, then import (via scanner or digital camera) into GIMP for cleanup and coloring.</p>
<p>Personally, I prefer taking photos and mixing them together to create a scene that otherwise wouldn&#8217;t exist. There is a small example of this in the book. A photo of a city skyline as it exists and a munged version I created to make the city look decayed and falling apart. Beats me what people think of that image, but the creative process that went into it was very relaxing.</p>
<p><strong>JC</strong>: What advice would you give people who want to learn GIMP in particular?</p>
<p><strong>MH</strong>: Buy <a href="http://www.amazon.com/gp/product/1593274149/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1593274149&amp;linkCode=as2&amp;tag=theende-20">my book</a>. Seriously. You learn both at the same time: what is image editing and how do you do it with GIMP. GIMP is just like any other desktop software. You learn where the menus are and what the various windows provide. The rest of your time is learning process — creating a workflow to produce a specific image type or style.</p>
<p><strong>JC</strong>: What other software do you use/recommend for creating graphics?</p>
<p><strong>MH</strong>: I use simple viewers like Geeqie for browsing images, but if you&#8217;re into photography you&#8217;ll nee something like f-spot. Photographers, who are nuts about image quality, should learn ufraw. Those interested in 3D or animation should take a look at Blender.</p>
<p><strong>JC</strong>: Do you want to say anything about your work with embedded development?</p>
<p><strong>MH</strong>: It&#8217;s my primary focus in life these days. I&#8217;m working on creating a custom media-focused Linux distribution (which I call BeagleBox) for the BeagleBoard C4 (and later the xm). I&#8217;d like to get my hands on the Raspberry Pi but wasn&#8217;t able to place an order when they first went on sale.</p>
<p>Embedded work is the future for Linux. The desktop for non-techies might change to tablets or such, but Linux will be in <em>everything</em>: your fridge, your TV, your car, your electrical system, your water and sewage systems, your phone, you&#8217;re neighbors who are flying robotic UAVs to peek in your windows. Everything.</p>
<p>My day job is building a radar system for UAVs (the big ones) that use embedded Linux to run out of flash. But the direction of interest is smaller devices, little boards with processors and memory in one, like the Pi or BeagleBoard, that can sense the environment and communicate to the rest of the household, with one of those devices used to display all the info on a big wall, removing the need for specialized devices just for the purpose of display.</p>
<p>Anyway, I&#8217;m really into making my own custom distribution based on Crosstool-NG (for cross compiling), u-boot (bootloader), Buildroot/Busybox (for root filesystems) and of course Linux.</p>
<p><strong>Related posts</strong>:</p>
<p>See <a href="http://www.johndcook.com/blog/2011/06/24/fifteen-interviews/">this post</a> for links to other interviews here and a couple people who have interviewed me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2012/07/30/interview-michael-hammel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Artist&#039;s Guide to GIMP</title>
		<link>http://www.johndcook.com/blog/2012/07/07/the-artists-guide-to-gimp/</link>
		<comments>http://www.johndcook.com/blog/2012/07/07/the-artists-guide-to-gimp/#comments</comments>
		<pubDate>Sun, 08 Jul 2012 01:37:13 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=11662</guid>
		<description><![CDATA[Learning how to edit images has been on my to-do list for a long time. I do some very basic editing with Paint.NET, but I keep meaning to learn to use GIMP. I heard years ago that GIMP is terribly<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2012/07/07/the-artists-guide-to-gimp/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>Learning how to edit images has been on my to-do list for a long time. I do some very basic editing with <a href="http://www.getpaint.net/index.html">Paint.NET</a>, but I keep meaning to learn to use GIMP.</p>
<p>I heard years ago that GIMP is terribly complicated and that I should learn Photoshop instead. I tried Photoshop — not extensively, but I spent some time with it — and I tried GIMP. My conclusion was that <em>image editing</em> is complicated. Image editing software is complicated, but not unnecessarily so. If you expect image processing to be as easy as word processing, as I suppose I implicitly did, your expectations are unrealistic.</p>
<p>The only way I&#8217;m going to learn image editing is by doing it. But a book can help, and I expect <a href="http://www.amazon.com/gp/product/1593274149/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1593274149&amp;linkCode=as2&amp;tag=theende-20">The Artist&#8217;s Guide to GIMP</a> will help more than other GIMP resources I&#8217;ve read. That&#8217;s because this book puts a little more emphasis on problem solving strategies and techniques and a little less emphasis on software features. As Michael Hammel says in the introduction,</p>
<blockquote><p>This is a book about process, not buttons or menu paths. &#8230; Don&#8217;t get bogged down in the mechanics of the tool. Focus on the task at hand. I&#8217;ll point you to the GIMP components necessary to finish the job.</p></blockquote>
<p>The first chapter is about tools more than process, but I suppose some of that is inevitable at first. The rest of the book really is more about process. And there&#8217;s plenty of information about buttons and menu paths, but the book is organized by task and process comes before tool details. This is what I want from a book. I can read online documentation, but that documentation won&#8217;t tell me what I ought to be looking up. I look to books to get me started in the right direction.</p>
<p><a href="http://www.amazon.com/gp/product/1593274149/ref=as_li_ss_il?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1593274149&amp;linkCode=as2&amp;tag=theende-20"><img src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;ASIN=1593274149&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=theende-20" border="0" alt="" /></a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=theende-20&amp;l=as2&amp;o=1&amp;a=1593274149" border="0" alt="" width="1" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2012/07/07/the-artists-guide-to-gimp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Book of Inkscape</title>
		<link>http://www.johndcook.com/blog/2012/05/23/the-book-of-inkscape/</link>
		<comments>http://www.johndcook.com/blog/2012/05/23/the-book-of-inkscape/#comments</comments>
		<pubDate>Wed, 23 May 2012 23:57:40 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Inkscape]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=11420</guid>
		<description><![CDATA[When I first started using Inkscape, I read Inkscape: Guide to a Vector Drawing Program by Tavmjong Bah, 3rd edition. It&#8217;s now in its 4th edition, which I have not seen. I received a copy of The Book of Inkscape<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2012/05/23/the-book-of-inkscape/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>When I first started using Inkscape, I read <a href="http://www.amazon.com/gp/product/0132764148/ref=as_li_ss_tl?ie=UTF8&amp;tag=theende-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0132764148">Inkscape: Guide to a Vector Drawing Program</a> by Tavmjong Bah, 3rd edition. It&#8217;s now in its 4th edition, which I have not seen.</p>
<p>I received a copy of <a href="http://www.amazon.com/gp/product/1593271816/ref=as_li_ss_tl?ie=UTF8&amp;tag=theende-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1593271816">The Book of Inkscape</a> by Dmitry Kirsanov recently, and it looks like the book I would have preferred to start with. Both books are fine introductions, but Kirsanov&#8217;s book is more my style.</p>
<p>Bah&#8217;s book is more inductive. It teaches you the elements of Inkscape by first taking you through a series of projects. Kirsanov&#8217;s book is organized more like a textbook or a reference. Some people would prefer Bah&#8217;s book, especially if it were their intention to work through all the exercises. I prefer Kirsanov&#8217;s book, organized more by topic than by project. It&#8217;s easier to dip in and out of as needed.</p>
<p>I&#8217;d like to learn Inkscape well. I could imagine going through a book slowly, carefully working all the examples, exploring side roads, etc. But that&#8217;s not realistic for me any time soon. For now, I expect I&#8217;ll learn more about Inkscape <a href="http://www.johndcook.com/blog/2010/03/03/just-in-case-versus-just-in-time/">just-in-time</a> as I need to make illustrations. And Kirsanov&#8217;s book is better suited for that.</p>
<p><a href="http://www.amazon.com/gp/product/1593271816/ref=as_li_ss_il?ie=UTF8&amp;tag=theende-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1593271816"><img src="http://ws.assoc-amazon.com/widgets/q?_encoding=UTF8&amp;Format=_SL160_&amp;ASIN=1593271816&amp;MarketPlace=US&amp;ID=AsinImage&amp;WS=1&amp;tag=theende-20&amp;ServiceVersion=20070822" border="0" alt="" /></a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=theende-20&amp;l=as2&amp;o=1&amp;a=1593271816" border="0" alt="" width="1" height="1" /></p>
<p><strong>Related posts</strong>:</p>
<p><a href="http://www.johndcook.com/blog/2009/12/22/including-latex-in-inkscape/">Including LaTeX in an Inkscape drawing</a><br />
<a href="http://www.johndcook.com/blog/2009/12/22/including-inkscape-in-latex/">Including an Inkscape drawing in LaTeX</a><br />
<a href="http://www.johndcook.com/blog/2009/12/21/function-plots-inkscape/">Plotting functions in Inkscape</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2012/05/23/the-book-of-inkscape/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thoughts on the new Windows logo</title>
		<link>http://www.johndcook.com/blog/2012/02/17/windows-8-logo/</link>
		<comments>http://www.johndcook.com/blog/2012/02/17/windows-8-logo/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 01:09:57 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Graphics]]></category>

		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=10786</guid>
		<description><![CDATA[I appreciate spare design, but the new Windows logo is just boring. Here&#8217;s the rationale for the new logo according to The Windows Blog: But if you look back to the origins of the logo you see that it really<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2012/02/17/windows-8-logo/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>I appreciate spare design, but the new Windows logo is just boring.</p>
<p style="text-align:center"><img src="http://www.johndcook.com/windows8logo.jpg" alt="" width="329" height="85" /></p>
<p>Here&#8217;s the rationale for the new logo according to <a href="http://windowsteamblog.com/windows/b/bloggingwindows/archive/2012/02/17/redesigning-the-windows-logo.aspx">The Windows Blog</a>:</p>
<blockquote><p>But if you look back to the origins of the logo you see that it really was meant to be a window. &#8220;Windows&#8221; really is a beautiful metaphor for computing and with the new logo we wanted to celebrate the idea of a window, in perspective. Microsoft and Windows are all about putting technology in people&#8217;s hands to empower them to find their own perspectives. And that is what the new logo was meant to be. We did less of a re-design and more to return it to its original meaning and bringing Windows back to its roots – reimagining the Windows logo as just that – a window.</p></blockquote>
<p><a href="https://twitter.com/#!/ghewgill/status/170658735885266944">Greg Hewgill</a> had a different perspective:</p>
<blockquote><p>If you think about it, the new logo sort of looks like deck chairs on the Titanic when it stern was up in the air&#8230;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.johndcook.com/blog/2012/02/17/windows-8-logo/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2010/01/03/2010-nomogram-calendar/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>5</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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/12/22/including-latex-in-inkscape/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>4</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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/12/22/including-inkscape-in-latex/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>1</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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/12/21/function-plots-inkscape/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>12</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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/12/21/bezier-basics/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>6</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,<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/08/24/more-on-colors-and-grayscale/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>2</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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>13</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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/06/24/optical-illusion/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/01/21/programming-for-artists/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2009/01/08/png-vs-jpeg/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2008/12/18/picking-a-color-scheme/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2008/11/21/what-it-takes-to-make-paintnet-easy-to-install/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2008/10/11/watch-what-you-name-graphics-files-in-latex/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>12</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,<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2008/07/24/including-images-in-latex-files/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://www.johndcook.com/blog/2008/02/19/free-bitmap-to-vector-format-software/">Read more &#8250;</a></div><!-- end of .read-more -->]]></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>4</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>
