<?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>Clinton Curry</title>
	<atom:link href="http://www.clintoncurry.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.clintoncurry.net</link>
	<description>Math, Music, and Computers.</description>
	<lastBuildDate>Tue, 16 Feb 2010 08:08:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Facebook Applications and Privacy</title>
		<link>http://www.clintoncurry.net/?p=83</link>
		<comments>http://www.clintoncurry.net/?p=83#comments</comments>
		<pubDate>Tue, 16 Feb 2010 08:08:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.clintoncurry.net/?p=83</guid>
		<description><![CDATA[Facebook applications violate your privacy.  This is not a surprise to many of you who have been around the block a time or two, and I know several people who refuse to enable any Facebook applications because of this concern.  However, there is a point which I do not think has been made [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook applications violate your privacy.  This is not a surprise to many of you who have been around the block a time or two, and I know several people who refuse to enable any Facebook applications because of this concern.  However, there is a point which I do not think has been made enough, and that is the following:</p>
<p><b>You do not have to install a Facebook application for it to learn about you.</b>  In fact, it is a virtual certainty that all of the large applications on Facebook, such as Farmville or Mafia Wars, can almost access anything about you that your friends can access, such as photos, your phone number, your birthday, and your interests.  This is in spite of the fact that you might have restricted all access to items in your profile to friends or friends of friends.  Think about it: <b>If any of your friends has installed a nefarious application (like <a href="http://www.facebook.com/apps/application.php?id=125546448933">Farmville Gifts</a>), that application can access your information by default.</b></p>
<p>Why does this happen?  Facebook&#8217;s security model distinguishes between access by real people and access by applications.  It is obviously handy for Facebook to allow applications to know who a person&#8217;s friends are &#8212; this way, you can easily invite friends to enable the application from within the application itself.  However, by default, a lot of your information is accessible at any time to any application that any of your friends use.  This includes</p>
<ul>
<li>Personal info (activities, interests, etc.)</li>
<li>Status updates</li>
<li>Online presence</li>
<li>Website</li>
<li>Education and work</li>
<li>My videos</li>
<li>My links</li>
<li>My notes</li>
<li>My photos</li>
<li>Photos and videos of me</li>
<li>About me</li>
<li>My birthday</li>
<li>My hometown</li>
</ul>
<p>Consider it:  Anybody (including somebody who knows who you are) can create a fake application and convince ANY of your friends to install it, and your information is available to them.  The recent privacy hoopla about Google Buzz seems minor in comparison.</p>
<p>I encourage you to disable applications&#8217; access to your information through your friends.</p>
<p><a href="http://www.clintoncurry.net/wp-content/uploads/2010/02/menu.png"><img src="http://www.clintoncurry.net/wp-content/uploads/2010/02/menu.png" alt="" title="menu" width="223" height="283" class="alignnone size-full wp-image-88" /></a><br />
<script type="text/javascript"><!--
google_ad_client = "pub-4191364107403376";
/* 468x60, created 2/16/10 */
google_ad_slot = "8160395678";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clintoncurry.net/?feed=rss2&amp;p=83</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Earth Song</title>
		<link>http://www.clintoncurry.net/?p=76</link>
		<comments>http://www.clintoncurry.net/?p=76#comments</comments>
		<pubDate>Fri, 05 Feb 2010 14:04:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[guitar]]></category>

		<guid isPermaLink="false">http://www.clintoncurry.net/?p=76</guid>
		<description><![CDATA[I know it&#8217;s old news, but I thought I&#8217;d put something on here that wasn&#8217;t about math or LaTeX.  Not long after Michael Jackson died, I made the following cover of Earth Song.

I also have an mp3 and TuxGuitar tab available.
]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s old news, but I thought I&#8217;d put something on here that wasn&#8217;t about math or LaTeX.  Not long after Michael Jackson died, I made the following cover of Earth Song.</p>
<p><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/NJGQwBOL-7g&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/NJGQwBOL-7g&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span></p>
<p>I also have <a href="/earthsong/earthsong.mp3">an mp3</a> and <a href="/earthsong/earthsong.tg">TuxGuitar tab</a> available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clintoncurry.net/?feed=rss2&amp;p=76</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The exam class</title>
		<link>http://www.clintoncurry.net/?p=59</link>
		<comments>http://www.clintoncurry.net/?p=59#comments</comments>
		<pubDate>Sat, 29 Aug 2009 20:01:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.clintoncurry.net/?p=59</guid>
		<description><![CDATA[Another pointer to a LaTeX class which which I ran across, called simply &#8220;exam&#8221;.  As you might guess, its entire purpose is to help you typeset exams.  Rather than exhaustively go through all of the features, I would like to point out a few items:

The magic seems to come with the questions environment, [...]]]></description>
			<content:encoded><![CDATA[<p>Another pointer to a LaTeX class which which I ran across, called simply &#8220;exam&#8221;.  As you might guess, its entire purpose is to help you typeset exams.  Rather than exhaustively go through all of the features, I would like to point out a few items:</p>
<ol>
<li>The magic seems to come with the questions environment, similar to the enumerate environment.  Instead of \item, you would use \question.</li>
<li>There is an optional item to \question, which is the point value for the particular question.  There are several options for typesetting point values.</li>
<li>Questions can have parts, which individually can have subparts, which can have subsubparts.  In particular, see the \parts environment and the \parts macro.</li>
<li>There is a solution environment.  If you express the desire (either by using the answers option in the documentclass declaration or by using the \printanswers macro in your preamble) your answers will be typeset with the questions.  Otherwise they are hidden.  The solution environment also takes an option, which is the blank space to be left for students to write their answers when answers are not printed.</li>
<li>There is a coverpages environment, which allows you to typeset material before page 1 of the exam.</li>
<li>There is a gradetable macro.  If you put point values on your questions (and use the \addpoints macro in your preamble), a table is placed in your document which allows you to hand-write the points earned on each question in an appropriate blank, adding up the result in the end to get a score.</li>
</ol>
<p>All-in-all, a pretty basic class.  There are many options which I have not gone over, but the included <a href="http://www.ctan.org/get/macros/latex/contrib/exam/examdoc.pdf">documentation</a> is well-done.  Of course, there are always a couple of things that I would like to see included in the next version.</p>
<ol>
<li>I would like the option to typeset a solution within the space allowed for the student.  In a perfect world, the &#8220;correct&#8221; solution would fit in the space allotted to the student; also, it would be easier to compare the key with the original exam if the two were paginated the same.</li>
<li>A little customization for the short-answer solutions would be nice.  In this class, the short-answer blanks come right after the corresponding question part.  What if it were delayed to when the question itself were finished?</li>
</ol>
<p>I&#8217;m sure there are other ideas people might have for improvements to this class.  I will also mention that the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/exam/">exam</a> class is not the only game in town; there is also the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/examdesign/">examdesign</a> class and the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/exams/">exams</a> class.</p>
<p>Here is an example LaTeX file using the exam class, and the <a href="http://www.clintoncurry.net/wp-content/uploads/2009/08/sample_exam.pdf">compiled output</a>.</p>
<div class="codecolorer-container latex mac-classic" style="overflow:auto;white-space:nowrap;width:600px;height:300px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br /></div></td><td><div class="latex codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="re12">\documentclass</span><span class="sy0">[</span><span class="re2">12pt</span><span class="sy0">]{</span><span class="re9">exam</span><span class="sy0">}</span><br />
<span class="re12">\usepackage</span><span class="sy0">{</span><span class="re9">amsmath</span><span class="sy0">}</span><br />
<span class="re12">\usepackage</span><span class="sy0">{</span><span class="re9">color</span><span class="sy0">}</span><br />
<br />
<span class="co1">%% exam options</span><br />
<span class="re12">\boxedpoints</span><br />
<span class="re12">\addpoints</span><br />
<span class="re12">\printanswers</span><br />
<span class="re12">\setlength</span><span class="re12">\answerlinelength</span><span class="sy0">{</span><span class="re9">3in</span><span class="sy0">}</span> <br />
<span class="re12">\cfoot</span><span class="sy0">{</span><span class="re9">Page <span class="re12">\thepage</span><span class="sy0">\</span> of <span class="re12">\numpages</span></span><span class="sy0">}</span><br />
<br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">document</span></span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">coverpages</span></span><span class="sy0">}</span><br />
&nbsp; <span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">center</span></span><span class="sy0">}</span> <span class="sy0">{</span><span class="re9"><span class="re12">\Huge</span> <span class="re12">\bf</span> MAT305 Exam 1</span><span class="sy0">}</span><br />
<span class="re12">\vskip</span> 0.2in<br />
<span class="re12">\fbox</span><span class="sy0">{</span><span class="re9"><span class="re12">\fbox</span><span class="sy0">{</span><span class="re12">\parbox</span><span class="sy0">{</span>5.5in</span><span class="sy0">}{</span><span class="re9"><span class="re12">\centering</span> Answer the questions in the<br />
&nbsp; &nbsp; &nbsp; spaces provided on the question sheets. If you run out of room<br />
&nbsp; &nbsp; &nbsp; for an answer, continue on the back of the page.<br />
<br />
&nbsp; &nbsp; &nbsp; This exam has <span class="re12">\numquestions</span><span class="sy0">\</span> questions for a total of<br />
&nbsp; &nbsp; &nbsp; <span class="re12">\numpoints</span><span class="sy0">\</span> points.</span><span class="sy0">}}}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">center</span></span><span class="sy0">}</span><br />
<span class="re12">\vspace</span><span class="sy0">{</span><span class="re9">0.1in</span><span class="sy0">}</span> <span class="re12">\hbox</span> to <span class="re12">\textwidth</span><span class="sy0">{</span><span class="re9">Name and<br />
&nbsp; section:<span class="re12">\enspace</span><span class="re12">\hrulefill</span></span><span class="sy0">}</span> <span class="re12">\vspace</span><span class="sy0">{</span><span class="re9">0.2in</span><span class="sy0">}</span> <span class="re12">\hbox</span> to<br />
<span class="re12">\textwidth</span><span class="sy0">{</span><span class="re9">Instructor's name:<span class="re12">\enspace</span><span class="re12">\hrulefill</span></span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">center</span></span><span class="sy0">}</span><br />
&nbsp; <span class="re12">\gradetable</span><span class="sy0">[</span><span class="re2">h</span><span class="sy0">]</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">center</span></span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">coverpages</span></span><span class="sy0">}</span><br />
<span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">questions</span></span><span class="sy0">}</span><br />
&nbsp; <span class="re12">\question</span><span class="sy0">[</span><span class="re2">10</span><span class="sy0">]</span> Solve the separable differential equation <span class="sy0">\[</span><span class="re2"> y' +<br />
&nbsp; t^3y^2= t^3.<span class="sy0">\</span></span><span class="sy0">]</span><br />
&nbsp; <span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">solution</span></span><span class="sy0">}</span><br />
&nbsp; &nbsp; We begin by manipulating:<br />
&nbsp; &nbsp; <span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">align*</span></span><span class="sy0">}</span><br />
&nbsp; &nbsp; &nbsp; y' <span class="sy0">&amp;</span>= t^3(1-y^2)<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; <span class="re12">\intertext</span><span class="sy0">{</span><span class="re9">There are the constant solutions <span class="re3">$y = <span class="re12">\pm</span> 1$</span>.<br />
&nbsp; &nbsp; &nbsp; &nbsp; Discarding the possibility that <span class="re3">$1-y^2 = 0$</span> (on the strength<br />
&nbsp; &nbsp; &nbsp; &nbsp; of the uniqueness theorem for linear DEs), we have</span><span class="sy0">}</span><br />
&nbsp; &nbsp; &nbsp; <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">y'</span><span class="sy0">}{</span><span class="re9">1-y^2</span><span class="sy0">}</span> <span class="sy0">&amp;</span>= t^3<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; <span class="re12">\left</span>(<span class="re12">\frac</span><span class="sy0">{</span><span class="re9">1</span><span class="sy0">}{</span><span class="re9">1-y</span><span class="sy0">}</span> + <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">1</span><span class="sy0">}{</span><span class="re9">1+y</span><span class="sy0">}</span><span class="re12">\right</span>) y' <span class="sy0">&amp;</span>= 2t^3<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">d</span><span class="sy0">}{</span><span class="re9">dt</span><span class="sy0">}</span>(<span class="re12">\ln</span>|1+y| - <span class="re12">\ln</span>|1-y|) <span class="sy0">&amp;</span>= 2t^3<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; <span class="re12">\ln</span> <span class="re12">\left</span>|<span class="re12">\frac</span><span class="sy0">{</span><span class="re9">1+y</span><span class="sy0">}{</span><span class="re9">1-y</span><span class="sy0">}</span><span class="re12">\right</span>| <span class="sy0">&amp;</span>= <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">t^4</span><span class="sy0">}</span>2+C <span class="sy0">&amp;</span> (C<span class="re12">\text</span><span class="sy0">{</span><span class="re9"> arbitrary</span><span class="sy0">}</span>)<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">1+y</span><span class="sy0">}{</span><span class="re9">1-y</span><span class="sy0">}</span> <span class="sy0">&amp;</span>= ce^<span class="sy0">{</span><span class="re9">t^4/2</span><span class="sy0">}</span> <span class="sy0">&amp;</span> (c<span class="re12">\text</span><span class="sy0">{</span><span class="re9"> arbitrary</span><span class="sy0">}</span>)<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; y <span class="sy0">&amp;</span>= <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">ce^{t^4/2</span><span class="sy0">}</span>-1<span class="sy0">}{</span><span class="re9">ce^{t^4/2</span><span class="sy0">}</span>+1<span class="sy0">}</span><br />
&nbsp; &nbsp; <span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">align*</span></span><span class="sy0">}</span><br />
&nbsp; <span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">solution</span></span><span class="sy0">}</span><br />
&nbsp; <span class="re12">\vfill</span> <span class="re12">\hskip</span> 3in Answer: <span class="re12">\hrulefill</span> <br />
&nbsp; <span class="re12">\pagebreak</span> <br />
&nbsp; <span class="re12">\question</span> Solve the differential equation<br />
&nbsp; <span class="sy0">\[</span><span class="re2"> y' + 14y = t\</span><span class="sy0">]</span> using an integration factor, using the following<br />
&nbsp; procedure.<br />
&nbsp; <span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">parts</span></span><span class="sy0">}</span><br />
&nbsp; &nbsp; <span class="re6">\part</span><span class="sy0">[</span><span class="re2">5</span><span class="sy0">]</span> What is the integrating factor <span class="re3">$<span class="re12">\mu</span>(t)$</span>?<span class="re12">\answerline</span><br />
&nbsp; &nbsp; <span class="re6">\part</span><span class="sy0">[</span><span class="re2">5</span><span class="sy0">]</span> What function is <span class="re3">$<span class="re12">\mu</span>(t)y' + 14<span class="re12">\mu</span>(t)y$</span> the derivative<br />
&nbsp; &nbsp; of?<span class="re12">\answerline</span><br />
&nbsp; &nbsp; <span class="re6">\part</span><span class="sy0">[</span><span class="re2">5</span><span class="sy0">]</span> Find the general antiderivative of both sides of<br />
&nbsp; &nbsp; <span class="re3">$<span class="re12">\mu</span>(t)(y'+14y) = <span class="re12">\mu</span>(t) t$</span> and solve for <span class="re3">$y$</span>.<br />
&nbsp; <span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">parts</span></span><span class="sy0">}</span><br />
&nbsp; <span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">solution</span></span><span class="sy0">}</span><br />
&nbsp; &nbsp; The integrating factor <span class="re3">$<span class="re12">\mu</span>(t)$</span> should satisfy <span class="re3">$<span class="re12">\mu</span>'(t) = 14<br />
&nbsp; &nbsp; <span class="re12">\mu</span>(t)$</span>, so we choose<br />
&nbsp; &nbsp; <span class="sy0">\[</span><span class="re2"><span class="re12">\mu</span>(t) = e^<span class="sy0">{</span><span class="re9">14t</span><span class="sy0">}</span>.<span class="sy0">\</span></span><span class="sy0">]</span><br />
&nbsp; &nbsp; This makes the left side the derivative of the expression<br />
&nbsp; &nbsp; <span class="sy0">\[</span><span class="re2"> e^{<span class="re9">14t</span><span class="sy0">}</span>y <span class="sy0">\</span></span><span class="sy0">]</span> according to the product rule. &nbsp;Therefore, by<br />
&nbsp; &nbsp; taking the general antiderivative of the indicated expression, we<br />
&nbsp; &nbsp; have<br />
<br />
&nbsp; &nbsp; <span class="re8">\begin</span><span class="sy0">{</span><span class="re9"><span class="re7">align*</span></span><span class="sy0">}</span><br />
&nbsp; &nbsp; &nbsp; e^<span class="sy0">{</span><span class="re9">14t</span><span class="sy0">}</span>y <span class="sy0">&amp;</span>= <span class="re12">\int</span> te^<span class="sy0">{</span><span class="re9">14t</span><span class="sy0">}</span> <span class="sy0">\</span>, dt<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; <span class="sy0">&amp;</span>= <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">1</span><span class="sy0">}{</span><span class="re9">14</span><span class="sy0">}</span>te^<span class="sy0">{</span><span class="re9">14t</span><span class="sy0">}</span> - <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">1</span><span class="sy0">}{</span><span class="re9">196</span><span class="sy0">}</span> e^<span class="sy0">{</span><span class="re9">14t</span><span class="sy0">}</span> + C <span class="sy0">&amp;</span>(C<span class="re12">\text</span><span class="sy0">{</span><span class="re9"> arbitrary</span><span class="sy0">}</span>)<span class="sy0">\\</span><br />
&nbsp; &nbsp; &nbsp; y <span class="sy0">&amp;</span>= <span class="re12">\frac</span> t <span class="sy0">{</span><span class="re9">14</span><span class="sy0">}</span> - <span class="re12">\frac</span><span class="sy0">{</span><span class="re9">1</span><span class="sy0">}{</span><span class="re9">196</span><span class="sy0">}</span> + Ce^<span class="sy0">{</span><span class="re9">-14t</span><span class="sy0">}</span>.<br />
&nbsp; &nbsp; <span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">align*</span></span><span class="sy0">}</span><br />
&nbsp; <span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">solution</span></span><span class="sy0">}</span><br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">questions</span></span><span class="sy0">}</span><br />
<br />
<span class="re8">\end</span><span class="sy0">{</span><span class="re9"><span class="re7">document</span></span><span class="sy0">}</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.clintoncurry.net/?feed=rss2&amp;p=59</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drawing Poincaré Geodesics in the Unit Disk</title>
		<link>http://www.clintoncurry.net/?p=5</link>
		<comments>http://www.clintoncurry.net/?p=5#comments</comments>
		<pubDate>Fri, 24 Apr 2009 08:25:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mathematical illustration]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.clintoncurry.net/?p=5</guid>
		<description><![CDATA[I find myself reinventing the wheel pretty often when it comes to this, so I thought I would set it down here for the teeming masses of the future.
Sometimes I want a picture comprised of chords in the unit disk.  One can draw them as straight line segments, but this has the disadvantage that short [...]]]></description>
			<content:encoded><![CDATA[<p>I find myself reinventing the wheel pretty often when it comes to this, so I thought I would set it down here for the teeming masses of the future.</p>
<p>Sometimes I want a picture comprised of chords in the unit disk.  One can draw them as straight line segments, but this has the disadvantage that short chords are almost indistinguishable from arcs of the circle.  Hence, it makes more sense to draw Poincaré geodesics joining two points.  As an example, below are two images depicting the same set of chords, once with Euclidean geodesics (straight lines) and once with Poincaré geodesics (arcs of circles).  Notice how much more detailed (and, dare I say, pretty) the second picture appears.</p>

<a href='http://www.clintoncurry.net/?attachment_id=11' title='rabbit_euclidean'><img width="150" height="150" src="http://www.clintoncurry.net/wp-content/uploads/2009/04/rabbit_euclidean.png" class="attachment-thumbnail" alt="" title="rabbit_euclidean" /></a>
<a href='http://www.clintoncurry.net/?attachment_id=12' title='rabbit_poincare'><img width="150" height="150" src="http://www.clintoncurry.net/wp-content/uploads/2009/04/rabbit_poincare.png" class="attachment-thumbnail" alt="" title="rabbit_poincare" /></a>

<p>The <i>Poincaré geodesic</i> joining two points <a href="http://wordpress.org/extend/plugins/easy-latex/" target="_blank" title="a"><img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" style="vertical-align:-20%;" class="tex" alt="a" /></a> and <a href="http://www.Thulasidas.com/latex" target="_blank" title="b"><img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" style="vertical-align:-20%;" class="tex" alt="b" /></a> on the boundary of the unit circle is the unique circular arc that strikes the unit circle perpendicularly at <a ><img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" style="vertical-align:-20%;" class="tex" alt="a" /></a> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />.  It is not difficult to calculate what this geodesic is: the circle <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7f4c3f605551dd79f35a2b26c504b279.png" title="C" style="vertical-align:-20%;" class="tex" alt="C" /> that it lies on has a particular center and radius, and it subtends a particular set of angles from the center of <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7f4c3f605551dd79f35a2b26c504b279.png" title="C" style="vertical-align:-20%;" class="tex" alt="C" />.  I will not bother showing these calculations, but I will explain why this is not a good solution for the problem.</p>
<p>As the size of the geodesic gets smaller and smaller (i.e., as the points it connects gets closer and closer), the radius of the circle tends to zero, and such things are easy to draw.  However, as the two points it&#8217;s connecting get further apart, the geodesic tends to a straight line, meaning that the circle&#8217;s radius gets large and the angles of intersection with the unit circle get really close together.  This means that, when you ask your computer to draw them, you are not likely to get accurate pictures.  Even worse, it will dump core all over you if you try to draw antipodal points.  This course of action is highly recommended if you want strange errors from your postscript files.</p>
<p>The reasonable among you may ask, &#8220;Well, why don&#8217;t you stop drawing arcs of circles when the angle gets too big?  Eventually they look like straight lines, so draw those, doofus.&#8221;  Well, I&#8217;m not satisfied by that solution.  I want to try something more complicated: Bézier curves!</p>
<p>To be more specific:  a <a href="http://en.wikipedia.org/wiki/Bézier_curve">Bézier curve</a> is a parametric curve which, in each coordinate, is a cubic polynomial.  It has a knack for approximating smooth curves.  In fact, it is relatively common to approximate a circle by four splines (see <a  href="http://www.whizkidtech.redprince.net/bezier/circle/kappa/">this page</a> for more info), which is accurate to better than a tenth of a percent.  My hope was that splines are better conditioned for drawing Poincaré geodesics than arcs of circles are.</p>
<p>The happy truth is that they are.  Though I lack the time to go into the details, suppose you wish to draw a Poincaré geodesic between points <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> on the unit circle.  According to the formulas on <a href="http://en.wikipedia.org/wiki/Klein_model">this page</a>, there is a homeomorphism of the unit disk in the complex plane, given by</p>
<p><img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_6652546c5033665106f9d2665b34289a.png" title="\phi(z) = \frac{z}{1+\sqrt{1-|z|^2}}," style="vertical-align:-20%;" class="tex" alt="\phi(z) = \frac{z}{1+\sqrt{1-|z|^2}}," /></p>
<p>which sends Euclidean geodesics to Poincaré geodesics.  In particular, the image of the straight line <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7a108e5b8a3e23a56e4004a537905d57.png" title="\overline{ab}" style="vertical-align:-20%;" class="tex" alt="\overline{ab}" /> under <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7fc8c0e997f25c275cd61a6add8b0517.png" title="\phi" style="vertical-align:-20%;" class="tex" alt="\phi" /> is the Poincaré geodesic joining <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />.  All you must do is find a spline <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_ececd2e1a688b265090936bc5525e1e6.png" title="P(t)" style="vertical-align:-20%;" class="tex" alt="P(t)" /> such that</p>
<ol>
<li><img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_d82833af50125ff3e08af5ecd2b48f8c.png" title="P(0)=a" style="vertical-align:-20%;" class="tex" alt="P(0)=a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_5cdb6c23985fe85b22e207c32f9b83d0.png" title="P(1)=b" style="vertical-align:-20%;" class="tex" alt="P(1)=b" /></li>
<li><img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_be414f640170c3cae7ca5e2e3a0a9fe3.png" title="P'(0)" style="vertical-align:-20%;" class="tex" alt="P'(0)" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_bf0906e7b158df2454f1c060f4633d24.png" title="P'(1)" style="vertical-align:-20%;" class="tex" alt="P'(1)" /> point toward the origin (i.e., are proportional to <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />, respectively),</li>
<li>the spline passes through the image of the midpoint of <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7a108e5b8a3e23a56e4004a537905d57.png" title="\overline{ab}" style="vertical-align:-20%;" class="tex" alt="\overline{ab}" /> under <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7fc8c0e997f25c275cd61a6add8b0517.png" title="\phi" style="vertical-align:-20%;" class="tex" alt="\phi" />, and</li>
<li>the spline is symmetric with respect to the perpendicular bisector of <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7a108e5b8a3e23a56e4004a537905d57.png" title="\overline{ab}" style="vertical-align:-20%;" class="tex" alt="\overline{ab}" />.</li>
</ol>
<p>These conditions give you that the endpoints of the spline are <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />, and the control points are <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_988deabb353a46573634a726ccdb553c.png" title="\kappa a" style="vertical-align:-20%;" class="tex" alt="\kappa a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_e8c45e2da043a7a107ae5c8c71cd96c7.png" title="\kappa b" style="vertical-align:-20%;" class="tex" alt="\kappa b" />, where <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_91d0de18873e931dcbe060224b84f27d.png" title="\kappa" style="vertical-align:-20%;" class="tex" alt="\kappa" /> is a function only of <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_7f423c4a46ff9a290a9856340a3c17a7.png" title="M = \left|\frac{a+b}{2}\right|" style="vertical-align:-20%;" class="tex" alt="M = \left|\frac{a+b}{2}\right|" />.  Specifically, </p>
<p><img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_5e784129f48684387f8174b3a30cd0b8.png" title="\kappa = \frac43\left(\frac{1}{1+\sqrt{1-M^2}}-\frac 1 4\right)" style="vertical-align:-20%;" class="tex" alt="\kappa = \frac43\left(\frac{1}{1+\sqrt{1-M^2}}-\frac 1 4\right)" /></p>
<p>which, miracle of miracles, gracefully approaches <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_2ec8272a5c1f3ef7060f479e3b4ac809.png" title="\frac 1 3" style="vertical-align:-20%;" class="tex" alt="\frac 1 3" /> as <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> approach antipodal points.  </p>
<p>This is now my go-to formula in any setting where Bézier curves are supplied for drawing Poincaré geodesics.  I have not had the occasion to extend this to the approximation of a spline joining points <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://www.clintoncurry.net/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> not on the unit circle, but it seems this would be straightforward.</p>
<p>As an example, here&#8217;s a short <a href="http://www.asymptote.net/">asymptote</a> program which draws the chords specified in a text file in the unit disk.</p>
<div class="codecolorer-container asy mac-classic" style="overflow:auto;white-space:nowrap;width:600px;height:300px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br /></div></td><td><div class="asy codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="coMULTI">/* chords-from-file.asy<br />
&nbsp;* Author: Clinton Curry<br />
&nbsp;* Date: April 24, 2009<br />
&nbsp;*<br />
&nbsp;* Draw the chords whose angles (in full revolutions) are given<br />
&nbsp;* in the input file.<br />
&nbsp;*/</span><br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/size.html"><span class="kw3">size</span></a><span class="br0">&#40;</span><span class="nu0">400</span>,<span class="nu0">400</span><span class="br0">&#41;</span>;<br />
<a href="http://www.opengroup.org/onlinepubs/009695399/functions/draw.html"><span class="kw3">draw</span></a><span class="br0">&#40;</span>unitcircle<span class="br0">&#41;</span>;<br />
<br />
<span class="co2">// Read in a filename and open</span><br />
file fin<span class="sy0">=</span><a href="http://www.opengroup.org/onlinepubs/009695399/functions/input.html"><span class="kw3">input</span></a><span class="br0">&#40;</span><span class="kw2">stdin</span><span class="br0">&#41;</span>;<br />
<br />
<span class="co2">// Draw chords in file</span><br />
<span class="kw4">real</span> a,b;<br />
<span class="kw1">while</span><span class="br0">&#40;</span> <span class="sy0">!</span>eof<span class="br0">&#40;</span>fin<span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; a <span class="sy0">=</span> fin;<br />
&nbsp; b <span class="sy0">=</span> fin;<br />
&nbsp; <span class="kw4">pair</span> z1 <span class="sy0">=</span> <span class="br0">&#40;</span><a href="http://www.opengroup.org/onlinepubs/009695399/functions/cos.html"><span class="kw3">cos</span></a><span class="br0">&#40;</span><span class="nu0">2</span><span class="sy0">*</span>pi<span class="sy0">*</span>a<span class="br0">&#41;</span>, <a href="http://www.opengroup.org/onlinepubs/009695399/functions/sin.html"><span class="kw3">sin</span></a><span class="br0">&#40;</span><span class="nu0">2</span><span class="sy0">*</span>pi<span class="sy0">*</span>a<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw4">pair</span> z2 <span class="sy0">=</span> <span class="br0">&#40;</span><a href="http://www.opengroup.org/onlinepubs/009695399/functions/cos.html"><span class="kw3">cos</span></a><span class="br0">&#40;</span><span class="nu0">2</span><span class="sy0">*</span>pi<span class="sy0">*</span>b<span class="br0">&#41;</span>, <a href="http://www.opengroup.org/onlinepubs/009695399/functions/sin.html"><span class="kw3">sin</span></a><span class="br0">&#40;</span><span class="nu0">2</span><span class="sy0">*</span>pi<span class="sy0">*</span>b<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw4">real</span> M <span class="sy0">=</span> <a href="http://www.opengroup.org/onlinepubs/009695399/functions/length.html"><span class="kw3">length</span></a><span class="br0">&#40;</span><span class="nu0">1</span><span class="sy0">/</span><span class="nu0">2</span> <span class="sy0">*</span> <span class="br0">&#40;</span>z1<span class="sy0">+</span>z2<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw4">real</span> kappa <span class="sy0">=</span> <span class="nu0">4</span><span class="sy0">/</span><span class="nu0">3</span><span class="sy0">*</span> <span class="br0">&#40;</span> <span class="nu0">1</span><span class="sy0">/</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="sy0">+</span><a href="http://www.opengroup.org/onlinepubs/009695399/functions/sqrt.html"><span class="kw3">sqrt</span></a><span class="br0">&#40;</span><span class="nu0">1</span><span class="sy0">-</span>M<span class="sy0">*</span>M<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">-</span> <span class="nu0">1</span><span class="sy0">/</span><span class="nu0">4</span><span class="br0">&#41;</span>;<br />
&nbsp; <a href="http://www.opengroup.org/onlinepubs/009695399/functions/draw.html"><span class="kw3">draw</span></a><span class="br0">&#40;</span>z1..<span class="kw1">controls</span> kappa<span class="sy0">*</span>z1 <span class="kw1">and</span> kappa<span class="sy0">*</span>z2..z2<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.clintoncurry.net/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Todonotes</title>
		<link>http://www.clintoncurry.net/?p=3</link>
		<comments>http://www.clintoncurry.net/?p=3#comments</comments>
		<pubDate>Sat, 21 Mar 2009 01:23:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://www.clintoncurry.net/?p=3</guid>
		<description><![CDATA[Allow me to draw your attention to the todonotes package.
]]></description>
			<content:encoded><![CDATA[<p>Allow me to draw your attention to the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/todonotes">todonotes package</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clintoncurry.net/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
