<?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>Aaron Mavrinac</title>
	<atom:link href="http://blog.mavrinac.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mavrinac.com</link>
	<description>Your reality, sir, is lies and balderdash and I&#039;m delighted to say that I have no grasp of it whatsoever.</description>
	<lastBuildDate>Tue, 24 Jan 2012 16:01:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What The Hare Said To Hector</title>
		<link>http://blog.mavrinac.com/2012/01/what-the-hare-said-to-hector/</link>
		<comments>http://blog.mavrinac.com/2012/01/what-the-hare-said-to-hector/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 16:59:19 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dialogue]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=212</guid>
		<description><![CDATA[Hector: Alright, explain your game to me, Mr. Hare. Hare: First, I will stand somewhere along the race track, but I won&#8217;t tell you where, and this wall hides me from view. Now, do you see this large contraption here? Hector: Indeed. There is a -meter long net suspended from a high cable that extends [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Hector:</strong> Alright, explain your game to me, Mr. Hare.</p>
<p><strong>Hare:</strong> First, I will stand somewhere along the race track, but I won&#8217;t tell you where, and this wall hides me from view. Now, do you see this large contraption here?</p>
<p><strong>Hector:</strong> Indeed. There is a <img src='http://s.wordpress.com/latex.php?latex=l&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='l' title='l' class='latex' />-meter long net suspended from a high cable that extends along the track between two poles. Attached to the pole at this end (behind the wall) is a box with a crank, a lever, an <a href="http://en.wikipedia.org/wiki/Anemometer">anemometer</a>, and a graphing calculator. I surmise that the crank moves the net along the cable, and that the lever releases it.</p>
<p><strong>Hare:</strong> Very astute!</p>
<p><strong>Hector:</strong> And I suppose that my goal is to trap you under the net?</p>
<p><strong>Hare:</strong> Without any information to guide you? No such nonsense. In fact, the game is much more subtle than that. You will indeed crank the net to a position of your choosing &#8212; let&#8217;s name the end closest to you <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> &#8212; and then release it. I will then reveal my position &#8212; call it <img src='http://s.wordpress.com/latex.php?latex=h&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='h' title='h' class='latex' /> &#8212; to you, and you must wager with me on whether I am under the net.</p>
<p><strong>Hector:</strong> Too easy! If <img src='http://s.wordpress.com/latex.php?latex=n%20%5Cleq%20h%20%5Cleq%20n%20%2B%20l&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n \leq h \leq n + l' title='n \leq h \leq n + l' class='latex' />, then I wager that you are under the net; otherwise, that you aren&#8217;t. I can&#8217;t lose!</p>
<p><strong>Hare:</strong> Ah, not so fast. You see, there are random winds along the direction of the race track in these parts, and so the net may be blown considerably off from a straight downward course.</p>
<p><strong>Hector:</strong> Which, of course, I won&#8217;t be able to see, due to the wall.</p>
<p><strong>Hare:</strong> Precisely.</p>
<p><strong>Hector:</strong> So, we could say that the net covers not <img src='http://s.wordpress.com/latex.php?latex=%5Bn%2C%20n%20%2B%20l%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='[n, n + l]' title='[n, n + l]' class='latex' />, but <img src='http://s.wordpress.com/latex.php?latex=%5Bu%2C%20u%20%2B%20l%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='[u, u + l]' title='[u, u + l]' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=u&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='u' title='u' class='latex' /> is a <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' />-mean <a href="http://en.wikipedia.org/wiki/Gaussian_process">Gaussian process</a> with <a href="http://en.wikipedia.org/wiki/Standard_deviation">standard deviation</a> <img src='http://s.wordpress.com/latex.php?latex=%5Csigma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sigma' title='\sigma' class='latex' />.</p>
<p><strong>Hare:</strong> If you like.</p>
<p><strong>Hector:</strong> Hence the anemometer, from which I can estimate <img src='http://s.wordpress.com/latex.php?latex=%5Csigma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sigma' title='\sigma' class='latex' />. I see. Thus, my task is reduced to the following: given <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=l&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='l' title='l' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%5Csigma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sigma' title='\sigma' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=h&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='h' title='h' class='latex' />, compute the probability that <img src='http://s.wordpress.com/latex.php?latex=u%20%5Cleq%20h%20%5Cleq%20u%20%2B%20l&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='u \leq h \leq u + l' title='u \leq h \leq u + l' class='latex' />. From there, I can decide whether the wager has a positive <a href="http://en.wikipedia.org/wiki/Expected_value">expected value</a> for me.</p>
<p><strong>Hare:</strong> Well played, Hector. But there is still one outstanding consideration.</p>
<p><strong>Hector:</strong> And that is?</p>
<p><strong>Hare:</strong> Actually computing the probability you speak of quickly enough to make your wager! I have somewhere to be promptly after this game, and as you know, we leporids hate to be late&#8230;</p>
<p><em>And with that, the Hare races off around the wall and down the track.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2012/01/what-the-hare-said-to-hector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miss Register, I Presume?</title>
		<link>http://blog.mavrinac.com/2011/06/miss-register-i-presume/</link>
		<comments>http://blog.mavrinac.com/2011/06/miss-register-i-presume/#comments</comments>
		<pubDate>Sat, 04 Jun 2011 19:11:25 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[vision]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=198</guid>
		<description><![CDATA[In my AIM 2010 paper, I describe how to obtain a projective transformation from the image plane to the laser plane in a line laser 3D range imaging system. With the laser oriented vertically (i.e. perpendicular to the transport direction of the object being scanned), this allows for mapping of image coordinates directly to 3D [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://mavrinac.com/files/academic/mavrinac10_dualrange.pdf">AIM 2010 paper</a>, I describe how to obtain a <a href="http://en.wikipedia.org/wiki/Homography">projective transformation</a> <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbf%7BH%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\mathbf{H}' title='\mathbf{H}' class='latex' /> from the image plane to the laser plane in a <a href="http://en.wikipedia.org/wiki/Line_laser">line laser</a> 3D range imaging system. With the laser oriented vertically (i.e. perpendicular to the transport direction of the object being scanned), this allows for mapping of image coordinates directly to 3D coordinates.</p>
<p>Specifically, the <img src='http://s.wordpress.com/latex.php?latex=%28u%2C%20v%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(u, v)' title='(u, v)' class='latex' /> coordinates of a point in the image map through <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbf%7BH%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\mathbf{H}' title='\mathbf{H}' class='latex' /> to yield the <img src='http://s.wordpress.com/latex.php?latex=%28x%2C%20z%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x, z)' title='(x, z)' class='latex' /> coordinates in the laser plane. Then, if <img src='http://s.wordpress.com/latex.php?latex=y_%5CDelta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y_\Delta' title='y_\Delta' class='latex' /> is the transport direction offset between profiles, the 3D coordinates of such a point in profile <img src='http://s.wordpress.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' /> are <img src='http://s.wordpress.com/latex.php?latex=%28x%2C%20i%20y_%5CDelta%2C%20z%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x, i y_\Delta, z)' title='(x, i y_\Delta, z)' class='latex' />.</p>
<p>There is an additional step when the angle between the laser and the vertical axis is nonzero, as in the common configuration shown below, where the camera (rather than the laser) is orthogonal to the transport surface.</p>
<p><center><img src="http://www.mavrinac.com/aaron/ordinary.png" alt="Ordinary Configuration" /></center></p>
<p>In this case, knowing the angle <img src='http://s.wordpress.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta' title='\beta' class='latex' /> is the key. Assuming the transport direction is positive away from the laser side and the object runs toward the laser, a point <img src='http://s.wordpress.com/latex.php?latex=%28u%2C%20v%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(u, v)' title='(u, v)' class='latex' /> in the image maps to 3D coordinates <img src='http://s.wordpress.com/latex.php?latex=%28x%2C%20i%20y_%5CDelta%20-%20z%5Csin%5Cbeta%2C%20z%5Ccos%5Cbeta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x, i y_\Delta - z\sin\beta, z\cos\beta)' title='(x, i y_\Delta - z\sin\beta, z\cos\beta)' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z' title='z' class='latex' /> are found as before.</p>
<p>I have a feeling that it is possible to derive <img src='http://s.wordpress.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\beta' title='\beta' class='latex' /> from <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbf%7BH%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\mathbf{H}' title='\mathbf{H}' class='latex' />. More formally, given the <img src='http://s.wordpress.com/latex.php?latex=3%20%5Ctimes%203&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='3 \times 3' title='3 \times 3' class='latex' /> matrix representation <img src='http://s.wordpress.com/latex.php?latex=%5Cmathbf%7BH%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\mathbf{H}' title='\mathbf{H}' class='latex' /> of a projective transformation between two planes <img src='http://s.wordpress.com/latex.php?latex=P_1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P_1' title='P_1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=P_2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P_2' title='P_2' class='latex' />, and supposing <img src='http://s.wordpress.com/latex.php?latex=L&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='L' title='L' class='latex' /> is the line of intersection of <img src='http://s.wordpress.com/latex.php?latex=P_1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P_1' title='P_1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=P_2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P_2' title='P_2' class='latex' />, what is the angle <img src='http://s.wordpress.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\alpha' title='\alpha' class='latex' /> between vectors <img src='http://s.wordpress.com/latex.php?latex=%5Cvec%7Bn%7D_1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\vec{n}_1' title='\vec{n}_1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%5Cvec%7Bn%7D_2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\vec{n}_2' title='\vec{n}_2' class='latex' /> lying, respectively, in <img src='http://s.wordpress.com/latex.php?latex=P_1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P_1' title='P_1' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=P_2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='P_2' title='P_2' class='latex' /> and perpendicular to <img src='http://s.wordpress.com/latex.php?latex=L&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='L' title='L' class='latex' />?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2011/06/miss-register-i-presume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rise of the Quaternions</title>
		<link>http://blog.mavrinac.com/2010/10/rise-of-the-quaternions/</link>
		<comments>http://blog.mavrinac.com/2010/10/rise-of-the-quaternions/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 01:12:50 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=188</guid>
		<description><![CDATA[Adolphus finally quit messing around and started using a quaternion representation for rotations internally! The quaternion class itself is simple, and conversion to and from rotation matrix and axis-angle representations is fairly straightforward. The magic happens in converting from Euler angles &#8212; all twelve valid conventions! By solving the conversion to quaternion for all twelve [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/ezod/adolphus">Adolphus</a> finally quit messing around and started using a <a href="http://en.wikipedia.org/wiki/Quaternion">quaternion</a> representation for rotations internally! The <a href="http://github.com/ezod/adolphus/blob/master/adolphus/geometry.py#L540">quaternion class</a> itself is simple, and conversion to and from <a href="http://en.wikipedia.org/wiki/Rotation_matrix">rotation matrix</a> and <a href="http://en.wikipedia.org/wiki/Axis_angle">axis-angle</a> representations is fairly straightforward. The magic happens in converting from <a href="http://en.wikipedia.org/wiki/Euler_angles">Euler angles</a> &#8212; all twelve valid conventions!</p>
<p>By solving the conversion to quaternion for all twelve possibilities, I managed to squeeze out a pattern that allows me to solve them with a near-minimum of redundant code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">    @<span style="color: #008000;">staticmethod</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> from_euler<span style="color: black;">&#40;</span>convention, angles<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">def</span> qterm<span style="color: black;">&#40;</span>index<span style="color: black;">&#41;</span>:
            bin = <span style="color: #ff7700;font-weight:bold;">lambda</span> x: <span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>x <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">2</span>, <span style="color: black;">&#40;</span>x <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">2</span>, x <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
            <span style="color: #ff7700;font-weight:bold;">return</span> copysign<span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span>, index<span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #008000;">reduce</span><span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">lambda</span> a, b: a <span style="color: #66cc66;">*</span> b,
                <span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>bit <span style="color: #ff7700;font-weight:bold;">and</span> sin <span style="color: #ff7700;font-weight:bold;">or</span> cos<span style="color: black;">&#41;</span><span style="color: black;">&#40;</span>angles<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span> / <span style="color: #ff4500;">2.0</span><span style="color: black;">&#41;</span> \
                <span style="color: #ff7700;font-weight:bold;">for</span> i, bit <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">enumerate</span><span style="color: black;">&#40;</span>bin<span style="color: black;">&#40;</span><span style="color: #008000;">abs</span><span style="color: black;">&#40;</span>index<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;"># TODO: can these be generated from the convention?</span>
        eulerquat = <span style="color: black;">&#123;</span><span style="color: #483d8b;">'xyx'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">3</span>, -<span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'xyz'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">6</span>, <span style="color: #ff4500;">2</span>, -<span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'xzx'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">4</span>, -<span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">6</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">7</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'xzy'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">1</span>, -<span style="color: #ff4500;">6</span>, -<span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">5</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'yxy'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">4</span>, -<span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'yxz'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">1</span>, -<span style="color: #ff4500;">6</span>, -<span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'yzx'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">6</span>, <span style="color: #ff4500;">2</span>, -<span style="color: #ff4500;">5</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'yzy'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">3</span>, -<span style="color: #ff4500;">6</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">7</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'zxy'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">2</span>, -<span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'zxz'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">3</span>, -<span style="color: #ff4500;">6</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'zyx'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">7</span>, -<span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">5</span>, <span style="color: #ff4500;">1</span>, -<span style="color: #ff4500;">6</span><span style="color: black;">&#93;</span>,
                     <span style="color: #483d8b;">'zyz'</span>: <span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>, -<span style="color: #ff4500;">5</span>, -<span style="color: #ff4500;">3</span>, <span style="color: #ff4500;">6</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">7</span>, <span style="color: #ff4500;">1</span>, <span style="color: #ff4500;">4</span><span style="color: black;">&#93;</span><span style="color: black;">&#125;</span>
        a, b, c, d = <span style="color: black;">&#91;</span><span style="color: #008000;">sum</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>qterm<span style="color: black;">&#40;</span>eulerquat<span style="color: black;">&#91;</span>convention<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span>i + j <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> \
                      <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> j <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">4</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> a <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> Quaternion<span style="color: black;">&#40;</span>a, -b, -c, -d<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> Quaternion<span style="color: black;">&#40;</span>-a, b, c, d<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>Now, those hard-coded sequences of numbers? I am sure there is some relationship between the patterns and the conventions that would allow a more concise translation from one to the other. Note that, for a sequence [<i>a</i>, <i>b</i>, <i>c</i>, <i>d</i>, <i>e</i>, <i>f</i>, <i>g</i>, <i>h</i>], any or all of the pairs (<i>a</i>, <i>b</i>), (<i>c</i>, <i>d</i>), (<i>e</i>, <i>f</i>), and (<i>g</i>, <i>h</i>) can be swapped without changing anything (for example, the sequence for <i>zyx</i> could just as easily be [0, 7, 4, -3, 2, 5, -6, 1]). This has the unfortunate effect of making finding a pattern more difficult.</p>
<p>There are a number of tantalizing clues. The first number is always 0. The second is always -5 when two of the rotations are about the same axis, -7 when they are all different and in (rotated) <i>xyz</i> order, and 7 when they are all different and in <i>zyx</i> order. The 1 is always positive and appears in the second pair when the first axis is <i>x</i>, the pair when <i>y</i>, and the fourth when <i>z</i>. And so on.</p>
<p>I wonder if anyone else has figured out something similar? Adolphus wants a 9-line conversion function for its birthday.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/10/rise-of-the-quaternions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rotating Lines</title>
		<link>http://blog.mavrinac.com/2010/06/rotating-lines/</link>
		<comments>http://blog.mavrinac.com/2010/06/rotating-lines/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:28:38 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=183</guid>
		<description><![CDATA[Problem: Given a line of slope m in the Euclidean plane, what is the slope m&#8217; of the line rotated (counterclockwise) by angle &#952;? Solution: Suppose we have an equation for the line of the form y = mx + b. We can ignore b as it is unrelated to the slope (in effect, we [...]]]></description>
			<content:encoded><![CDATA[<p><b>Problem:</b></p>
<p>Given a line of slope <i>m</i> in the Euclidean plane, what is the slope <i>m&#8217;</i> of the line rotated (counterclockwise) by angle <i>&theta;</i>?</p>
<p><b>Solution:</b></p>
<p>Suppose we have an equation for the line of the form <i>y</i> = <i>mx</i> + <i>b</i>. We can ignore <i>b</i> as it is unrelated to the slope (in effect, we are working in an <a href="http://en.wikipedia.org/wiki/Affine_space">affine space</a>).</p>
<p>So, <i>y</i> = <i>mx</i> for our purposes. Every point satisfying this equation is a multiple of</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D1%20%5C%5C%20m%5Cend%7Barray%7D%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left[\begin{array}{c}1 \\ m\end{array}\right]' title='\left[\begin{array}{c}1 \\ m\end{array}\right]' class='latex' />
<p>and, similarly, every point satisfying the equation <i>y</i> = <i>m&#8217;x</i> of the rotated line is a multiple of</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D1%20%5C%5C%20m%27%5Cend%7Barray%7D%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left[\begin{array}{c}1 \\ m&#039;\end{array}\right]' title='\left[\begin{array}{c}1 \\ m&#039;\end{array}\right]' class='latex' />
<p>Since the latter point is the image of the former after rotation by <i>&theta;</i>, the points are related by a <a href="http://en.wikipedia.org/wiki/Rotation_matrix">rotation matrix</a>, like so:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D1%20%5C%5C%20m%27%5Cend%7Barray%7D%5Cright%5D%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bcc%7D%5Ccos%5Ctheta%20%26%20-%5Csin%5Ctheta%20%5C%5C%20%5Csin%5Ctheta%20%26%20%5Ccos%5Ctheta%5Cend%7Barray%7D%5Cright%5D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D1%20%5C%5C%20m%5Cend%7Barray%7D%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\left[\begin{array}{c}1 \\ m&#039;\end{array}\right] = \left[\begin{array}{cc}\cos\theta &amp; -\sin\theta \\ \sin\theta &amp; \cos\theta\end{array}\right] \left[\begin{array}{c}1 \\ m\end{array}\right]' title='\left[\begin{array}{c}1 \\ m&#039;\end{array}\right] = \left[\begin{array}{cc}\cos\theta &amp; -\sin\theta \\ \sin\theta &amp; \cos\theta\end{array}\right] \left[\begin{array}{c}1 \\ m\end{array}\right]' class='latex' />
<p>Solving for <i>m&#8217;</i> then yields</p>
<img src='http://s.wordpress.com/latex.php?latex=m%27%20%3D%20%5Cfrac%7B%5Csin%5Ctheta%20%2B%20m%5Ccos%5Ctheta%7D%7B%5Ccos%5Ctheta%20-%20m%5Csin%5Ctheta%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='m&#039; = \frac{\sin\theta + m\cos\theta}{\cos\theta - m\sin\theta}' title='m&#039; = \frac{\sin\theta + m\cos\theta}{\cos\theta - m\sin\theta}' class='latex' />
<p>which, of course, is our solution in terms of <i>m</i> and <i>&theta;</i>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/06/rotating-lines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So Close, Yet So Far Away</title>
		<link>http://blog.mavrinac.com/2010/06/so-close-yet-so-far-away/</link>
		<comments>http://blog.mavrinac.com/2010/06/so-close-yet-so-far-away/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 20:01:17 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=177</guid>
		<description><![CDATA[I humbly entreat any analytical intellects of greater constitution than my own (of which, to be sure, there is no dearth) to enlighten me in matters mathematical. First of all, if I have a 5-dimensional space which consists of a 3-dimensional Euclidean space plus direction (defined by inclination and azimuth) &#8212; that is, the set [...]]]></description>
			<content:encoded><![CDATA[<p>I humbly entreat any analytical intellects of greater constitution than my own (of which, to be sure, there is no dearth) to enlighten me in matters mathematical.</p>
<p>First of all, if I have a 5-dimensional space which consists of a 3-dimensional Euclidean space plus direction (defined by inclination and azimuth) &#8212; that is, the set of vectors <img src='http://s.wordpress.com/latex.php?latex=%28x%2C%20y%2C%20z%2C%20%5Crho%2C%20%5Ceta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x, y, z, \rho, \eta)' title='(x, y, z, \rho, \eta)' class='latex' /> where <img src='http://s.wordpress.com/latex.php?latex=x%2C%20y%2C%20z%20%5Cin%20%5Cmathbb%7BR%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x, y, z \in \mathbb{R}' title='x, y, z \in \mathbb{R}' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=%5Crho%20%5Cin%20%5B0%2C%20%5Cpi%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\rho \in [0, \pi]' title='\rho \in [0, \pi]' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=%5Ceta%20%5Cin%20%5B0%2C%202%5Cpi%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\eta \in [0, 2\pi)' title='\eta \in [0, 2\pi)' class='latex' /> &#8212; what is that called? Of course, this generalizes to a (2<em>p</em> &#8211; 1)-dimensional space with a <em>p</em>-dimensional Euclidean spatial component. I have been calling fuzzy subsets of this space <em>spatial-directional fuzzy sets</em>, but <em>spatial-directional space</em> sounds patently ridiculous.</p>
<p>Second, is it possible to define a useful distance metric in such a space? <cite title="﻿B.B. Chaudhuri and A. Rosenfeld, 'A Modified Hausdorff Distance Between Fuzzy Sets,' Information Sciences, vol. 118, 1999, pp. 159-171.">Chaudhuri and Rosenfeld</cite> generalize the <a href="http://en.wikipedia.org/wiki/Hausdorff_distance">Hausdorff distance</a> to arbitrary fuzzy subsets of a <a href="http://en.wikipedia.org/wiki/Metric_space">metric space</a>, but this is of little use to me if my universal space is not metric. The natural way to define distance between two directions is to use the angle between the corresponding vectors, or similarly a norm on the surface of a <a href="http://en.wikipedia.org/wiki/Torus">torus</a>. The obvious problem is that the numbers used for space and angle bear no relation to one another, so it seems nonsensical to combine them in a single metric (scaling and other such hackery need not apply). Yet, <a href="http://en.wikipedia.org/wiki/Configuration_space">configuration spaces</a> with similar discord among the units of their dimensions abound in engineering. Surely someone has tried to do something like this before?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/06/so-close-yet-so-far-away/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Road To Here</title>
		<link>http://blog.mavrinac.com/2010/05/the-road-to-here/</link>
		<comments>http://blog.mavrinac.com/2010/05/the-road-to-here/#comments</comments>
		<pubDate>Sun, 23 May 2010 15:15:57 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=155</guid>
		<description><![CDATA[In my M.A.Sc. work on stereo camera network calibration, I made use of a series of graphs to describe the relationships between nodes. Existing work had already produced the vision graph and what I will call the transition graph (after Farrell and Davis&#8216; transition model). In both graphs, each vertex represents a node (camera or [...]]]></description>
			<content:encoded><![CDATA[<p>In my M.A.Sc. work on stereo camera network calibration, I made use of a series of graphs to describe the relationships between nodes. Existing work had already produced the vision graph and what I will call the transition graph (after <cite title="﻿R. Farrell and L.S. Davis, 'Decentralized Discovery of Camera Network Topology,' Proc. 2nd ACM/IEEE Intl. Conf. on Distributed Smart Cameras, 2008.">Farrell and Davis</cite>&#8216; transition model). In both graphs, each vertex represents a node (camera or camera pair, usually) in the multi-camera network.</p>
<p><b>The Vision Graph</b></p>
<p>In a typical sensor network, the sensing modality is simple and omnidirectional, and thus adjacency is a function of proximity. A consequence of this is that the sensing graph is usually a subset of, equal to, or a superset of the communication graph. Therefore, it is usually possible to cheat by initializing the sensing graph model using either physical topology (from, say, GPS) or communication topology.</p>
<p>Camera networks break from this in that their sensing modality is complex and directional, so sensing adjacency has relatively little to do with communication adjacency. <cite title="﻿D. Devarajan and R.J. Radke, 'Distributed Metric Calibration of Large Camera Networks,' Proc. 1st Workshop on Broadband Advanced Sensor Networks, 2004.">Devarajan and Radke</cite> realized this early on, and proposed the vision graph. An edge in the vision graph represents information about shared field of view between the two nodes represented by its vertices; there is an edge wherever there is significant overlap of the observed scene. But what does <i>significant</i> mean? Assuming we&#8217;re referring to a classic, unweighted graph for the moment, in order for it to be useful, <i>significant</i> must mean that there is sufficient overlap that we can &#8211; or at least, that it is reasonable to expect that we could &#8211; achieve whatever task is intended for the shared data.</p>
<p>Since every published use of the vision graph I am aware of is a calibration application, let&#8217;s talk about that. Originally, Devarajan and Radke had to specify the vision graph manually <i>a priori</i> in order to use it for calibration; a follow-up with <cite title="﻿Z. Cheng, D. Devarajan, and R.J. Radke, 'Determining Vision Graphs for Distributed Camera Networks Using Feature Digests,' EURASIP Jrnl. on Advances in Signal Processing, vol. 2007, 2007.">Cheng</cite> proposed a method to build it by propagating digests of <cite title="﻿D.G. Lowe, 'Distinctive Image Features from Scale-Invariant Keypoints,' Intl. Jrnl. of Computer Vision, vol. 60, 2004, pp. 91-110.">SIFT</cite> features from the various images to other nodes. I myself only used it in concept, as a theoretical upper limit for the final calibration graph.</p>
<p>Now, for a digression&#8230;</p>
<p><b>The Transition Graph</b></p>
<p>Meanwhile, folks working on surveillance and tracking applications were also using a graph formalism &#8211; well, in most cases, a reflexive binary relation on the set of nodes that translates trivially into a graph formalism. An edge in the transition graph represents a different, although related, kind of adjacency between the two nodes represented by its vertices: the possibility of a target moving from the field of view of one node to that of the other. This, of course, includes overlapping fields of view, but importantly, it also extends to the non-overlapping case.</p>
<p>It quickly became clear to someone that it was worthwhile to represent not just the possibility, but the <i>probability</i>, of a transition. This may have been an obvious consequence of some of the methods used to actually determine this graph or relation &#8211; for example, <cite title="﻿D. Marinakis, G. Dudek, and D.J. Fleet, 'Learning Sensor Network Topology through Monte Carlo Expectation Maximization,' Proc. IEEE Intl. Conf. on Robotics and Automation, 2005.">Marinakis et al.</cite> used a Monte Carlo expectation-maximization method, and <cite title="﻿R. Farrell and L.S. Davis, 'Decentralized Discovery of Camera Network Topology,' Proc. 2nd ACM/IEEE Intl. Conf. on Distributed Smart Cameras, 2008.">Farrell and Davis</cite> used sequential Bayesian estimation, both probability-oriented. Though intended to properly capture the information presented, it turns out that weighting the graph with these probabilities allows for some good optimization when it comes time to do predictions or camera hand-offs.</p>
<p><b>The Fuzzy Vision Graph</b></p>
<p>Seeing this, we thought, what if we similarly retain the uncertainty in the vision graph (rather than thresholding it out on an task-specific basis, as in all prior work) and put it to work optimizing calibration and other applications? Probability is, in general, ill-suited to the job, because we aren&#8217;t talking about transitions here. So, we considered another representation of uncertainty: <a href="http://en.wikipedia.org/wiki/Fuzzy_set">fuzzy sets</a>. A graph is an ordered pair <img src='http://s.wordpress.com/latex.php?latex=%28V%2C%20E%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(V, E)' title='(V, E)' class='latex' /> of a set of vertices <img src='http://s.wordpress.com/latex.php?latex=V&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V' title='V' class='latex' /> and a set of edged <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' />; a fuzzy graph (in most definitions) is simply a generalization where <img src='http://s.wordpress.com/latex.php?latex=V&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='V' title='V' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=E&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E' title='E' class='latex' /> are fuzzy sets.</p>
<p>One nice thing immediately apparent is that, with the inherent, well, fuzziness of fuzzy graphs, there&#8217;s no longer any need to set task-specific thresholds in advance when constructing the model; instead of summarily judging whether overlap is significant, we simply capture the <i>degree of significance</i>, which if we really want can be thresholded later via task-specific alpha cuts. Beyond this, a number of opportunities for automatically optimizing various tasks in more advanced ways presented themselves as I poked at the idea. (This is the time when <a href="http://code.google.com/p/fuzzpy">FuzzPy</a> was born.)</p>
<p>The major problem, so far, is that there is no real understanding of what the ideal fuzzy vision graph actually represents. We can build them in various ways: using feature digests like Cheng, for example. But in order to decouple the practical optimization research from the practical modeling research, we need some definition of what a perfect vision graph for a camera network actually is.</p>
<p><b>Modeling Camera Network Coverage</b></p>
<p>To approach the problem of modeling the topology of camera coverage overlap, what is really needed is a proper model of camera network coverage. Much of the existing work on this has been developed specifically for optimal camera placement algorithms; it provides some inspiration, but as these models are rather simplistic (discrete, two-dimensional, triangular in shape, etc.) they don&#8217;t provide much in the way of an <i>ideal</i> model. Delving deeper, some decades-old work on task-oriented camera placement by <cite title="﻿C.K. Cowan and P.D. Kovesi, 'Automatic Sensor Placement from Vision Task Requirements,' IEEE Trans. on Pattern Analysis and Machine Intelligence, vol. 10, 1988, pp. 407-416.">Cowan and Kovesi</cite> provides an idea for a more realistic model of camera coverage, if you invert it, but is only for single cameras and uses task-specific thresholds.</p>
<p>Coverage, like overlap in the vision graph, is an imprecise concept when it is not tied to a specific task. Hence, fuzzy sets once again presented themselves as a possible framework for the representation: one can assign a membership degree in the set of covered points to every point in three-dimensional Euclidean space. Like Cowan and Kovesi, I identified visibility, focus, and resolution as the major factors in single-camera coverage (in the absence of <i>a priori</i> scene knowledge), developed &#8220;trapezoidal&#8221; fuzzy sets for each, then combined them via algebraic product fuzzy intersection to get a complete model that, given the intrinsic parameters of a camera and a couple of intuitive application (not necessarily single-task) parameters, would tell me how well any point in its local 3-space is covered. This is called the <i>fuzzy coverage model</i>.</p>
<p>It becomes evident that a fourth factor, direction, is needed when looking at the multi-camera case, where cameras are situated in a common coordinate system based on their extrinsic parameters, and we are interested in part in their field-of-view overlap. If two cameras face the same general volume of space, but from opposite sides, is the volume in common covered by both cameras? If you&#8217;re tempted to think yes, consider a task such as feature matching. Cameras can only see opaque surfaces with normals in the interior half-space defined by a plane tangent to the point in question and perpendicular to the principal axis. Furthermore, a number of studies have shown that, in practice, feature matching performance degrades over rotation of the viewpoint. Thus, if we extend our three-dimensional concept of space to include direction as well, making the fuzzy coverage model 5-dimensional, we consider points at the same location in 3-space but with different direction not the same point at all. Some <a href="http://blog.mavrinac.com/2010/03/pi-day-madness">geometry</a> and a fuzzifying parameter gives us another component fuzzy set for the single-camera model, which we can incorporate by algebraic product intersection.</p>
<p>Another major consideration for the multi-camera case, which various work on camera network topology and placement optimization has attempted to tackle, is occlusion from the static scene. This may be known <i>a priori</i> (e.g. CAD layout of a building) or estimated by the camera network itself. It is possible to do this in continuous space, like ﻿<cite title="K. Tarabanis, R.Y. Tsai, and A. Kaul, 'Computing Occlusion-Free Viewpoints,' IEEE Trans. on Pattern Analysis and Machine Intelligence, vol. 18, 1996, pp. 279-292.">Tarabanis et al.</cite>, and so ideally you&#8217;d have a complete 3D model of the unoccluded field of view for each camera, and all other points have <img src='http://s.wordpress.com/latex.php?latex=%5Cmu%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\mu = 0' title='\mu = 0' class='latex' />. However, the complexity seems prohibitive in practice for large camera networks. If we instead move to a discrete representation of the fuzzy coverage model, we can do what I did: make the scene finite, mark a subset of its voxels opaque, then use the voxel traversal of the line from a given point to the principal point of the camera to determine whether it is occluded (i.e. if the traversal includes any opaque voxels).</p>
<p>The easy part is the total network coverage. For simple multi-camera networks, where one camera covering a point (remember, we account for direction implicitly) is enough, simply combine all the appropriately transformed, discretized, and occlusion-ified single-camera coverage models together via standard fuzzy union. For 3D multi-camera networks, where we want at least two cameras covering a point, first generate a coverage model for each <i>pair</i> of cameras via standard fuzzy intersection on the pair, then combine all these via union.</p>
<p><b>Okay, now what?</b></p>
<p>This is about where I&#8217;m at. There&#8217;s plenty more that could be done with the fuzzy coverage model itself: solving the optimal camera placement problem in new and exciting ways is one really obvious possibility that I talk about in an upcoming paper.</p>
<p>As far as getting back to the graph stuff, I defined an overlap metric involving the scalar cardinality, which could be used to derive the fuzzy vision graph from the discrete fuzzy coverage model; this is significant in that it indicates a direct link from the <img src='http://s.wordpress.com/latex.php?latex=%5Cmu&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\mu' title='\mu' class='latex' /> values of the edges all the way back to the basic parameters of the camera network and the scene (and we know where all the simplifications are). Even better, though, might be something more analytic and general, like using something along the lines of the <a href="http://en.wikipedia.org/wiki/Hausdorff_distance">Hausdorff distance</a> between two cameras&#8217; coverage models, which might not only allow us to find the fuzzy vision graph, but also start unifying it with the non-overlapping concept of the transition graph.</p>
<p>Back to the future&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/05/the-road-to-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axes of Evil</title>
		<link>http://blog.mavrinac.com/2010/03/axes-of-evil/</link>
		<comments>http://blog.mavrinac.com/2010/03/axes-of-evil/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 01:22:46 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wuug]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=147</guid>
		<description><![CDATA[A quick and dirty set of 3D axes for Visual: from visual import arrow, cylinder &#160; def visual_axes&#40; scale &#41;: &#34;&#34;&#34;\ Display a set of 3D axes. &#160; @param scale: The scale of the axis set. @type scale: C{float} &#34;&#34;&#34; for axis in &#91; tuple&#40; &#91; i == j and scale * 5 or 0 [...]]]></description>
			<content:encoded><![CDATA[<p>A quick and dirty set of 3D axes for <a href="http://vpython.org/">Visual</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> visual <span style="color: #ff7700;font-weight:bold;">import</span> arrow, cylinder
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> visual_axes<span style="color: black;">&#40;</span> scale <span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot;<span style="color: #000099; font-weight: bold;">\</span>
    Display a set of 3D axes.
&nbsp;
    @param scale: The scale of the axis set.
    @type scale: C{float}
    &quot;&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> axis <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: black;">&#91;</span> <span style="color: #008000;">tuple</span><span style="color: black;">&#40;</span> <span style="color: black;">&#91;</span> i == j <span style="color: #ff7700;font-weight:bold;">and</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">5</span> <span style="color: #ff7700;font-weight:bold;">or</span> <span style="color: #ff4500;">0</span> <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span> <span style="color: #ff4500;">3</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#93;</span> <span style="color: black;">&#41;</span> \
                  <span style="color: #ff7700;font-weight:bold;">for</span> j <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span> <span style="color: #ff4500;">3</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#93;</span>:
        arrow<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>, axis = axis, shaftwidth = scale / <span style="color: #ff4500;">10.0</span> <span style="color: black;">&#41;</span>
&nbsp;
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">6.0</span> <span style="color: black;">&#41;</span>, -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span>
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">5.5</span>, -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span>
&nbsp;
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">5.5</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span>
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">5.75</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> -<span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">0.17</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">0.17</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span>
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">5.75</span> <span style="color: black;">&#41;</span>, <span style="color: #ff4500;">0</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">0.17</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, -<span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">0.17</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span>
&nbsp;
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">6.0</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0.0</span>, <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span>, -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span>
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">6.0</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0.0</span>, <span style="color: #ff4500;">0.0</span>, -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span>
    cylinder<span style="color: black;">&#40;</span> pos = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0</span>, <span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">4.0</span> <span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span> scale <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">6.0</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              axis = <span style="color: black;">&#40;</span> <span style="color: #ff4500;">0.0</span>, <span style="color: #ff4500;">0.0</span>, -<span style="color: black;">&#40;</span> scale / <span style="color: #ff4500;">2.0</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>,
              radius = scale / <span style="color: #ff4500;">20.0</span> <span style="color: black;">&#41;</span></pre></div></div>

<p>Yep, this is how I&#8217;m validating my geometry module by eye.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/03/axes-of-evil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Topology, To What End?</title>
		<link>http://blog.mavrinac.com/2010/03/topology-to-what-end/</link>
		<comments>http://blog.mavrinac.com/2010/03/topology-to-what-end/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 16:04:12 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=142</guid>
		<description><![CDATA[There have been a number of approaches to build topological models of multi-camera networks. The idea is to represent, in some useful and relatively simple mathematical way, the relationship &#8212; usually meaning the overlap &#8212; between the fields of view of the cameras. To date, it seems as though all such methods fall into two [...]]]></description>
			<content:encoded><![CDATA[<p>There have been a number of approaches to build topological models of multi-camera networks. The idea is to represent, in some useful and relatively simple mathematical way, the relationship &#8212; usually meaning the overlap &#8212; between the fields of view of the cameras. To date, it seems as though all such methods fall into two basic types.</p>
<p>On one hand, we have the motion-based methods, which are typically targeted at <a href="http://en.wikipedia.org/wiki/Video_tracking">tracking</a> applications. <cite title="T.J. Ellis, D. Makris, and J.K. Black, 'Learning a Multi-Camera Topology,' Proc. Joint IEEE Wkshp. on Visual Surveillance and Performance Evaluation of Tracking and Surveillance, 2003, pp. 165-171.">Ellis et al.</cite> temporally correlate objects transiting between adjacent fields of view, after establishing each camera&#8217;s entry and exit zones. Similarly, <cite title="Z. Mandel, I. Shimsoni, and D. Keren, 'Multi-Camera Topology Recovery from Coherent Motion,' Proc. 1st ACM/IEEE Intl. Conf. on Distributed Smart Cameras, 2007, pp. 243-250.">Mandel et al.</cite> correlate simultaneous motion between views to establish overlap. <cite title="H. Detmold, A. Van Den Hengel, A. Dick, A. Cichowski, R. Hill, E. Kocadag, K. Falkner, and D.S. Munro, 'Topology Estimation for Thousand-Camera Surveillance Networks,' Proc. 1st ACM/IEEE Intl. Conf. on Distributed Smart Cameras, 2007, pp. 195-202.">Detmold et al.</cite> propose the <i>exclusion</i> algorithm, which is basically the opposite and potentially more robust: if there is motion in one view, and not in another, then those views cannot overlap (initially all views are assumed to overlap). <cite title="R. Farrell and L.S. Davis, 'Decentralized Discovery of Camera Network Topology,' Proc. 2nd ACM/IEEE Intl. Conf. on Distributed Smart Cameras, 2008.">Farrell and Davis</cite> present a slightly different model, dubbed the <i>transition</i> model, which focuses even more on tracking as it expresses the probability of transitions between views; this is also determined from observations of motion.</p>
<p>On the other hand, we have the feature-based methods, typically used as a precursor to or substitute for multi-camera <a href="http://en.wikipedia.org/wiki/Camera_resectioning">calibration</a>. <cite title="D. Devarajan and R.J. Radke, 'Distributed Metric Calibration of Large Camera Networks,' Proc. 1st Workshop on Broadband Advanced Sensor Networks, 2004.">Devarajan and Radke</cite> first proposed the <i>vision graph</i> without specifying an automated means of obtaining it; they later approached this topic in <cite title="Z. Cheng, D. Devarajan, and R.J. Radke, 'Determining Vision Graphs for Distributed Camera Networks Using Feature Digests,' EURASIP Jrnl. on Advances in Signal Processing, vol. 2007, 2007.">Cheng et al.</cite> using distributed matching of <a href="http://en.wikipedia.org/wiki/Scale-invariant_feature_transform">SIFT</a> features. <cite title="G. Kurillo, Z. Li, and R. Bajcsy, 'Wide-Area External Multi-Camera Calibration using Vision Graphs and Virtual Calibration Object,' Proc. 2nd ACM/IEEE Intl. Conf. on Distributed Smart Cameras, 2008.">Kurillo et al.</cite> also use common features to build their vision graph for calibration. In <cite title="A. Mavrinac, X. Chen, and K. Tepe, 'Feature-Based Calibration of Distributed Smart Stereo Camera Networks,' 2nd ACM/IEEE Intl. Conf. on Distributed Smart Cameras, 2008.">my ICDSC 2008 paper</cite>, the vision graph is a theoretical upper limit for the grouping and calibration graphs, which are built from 3D feature matches via <a href="http://en.wikipedia.org/wiki/Iterative_Closest_Point">registration</a>. <cite title="P. Kulkarni, P. Shenoy, and D. Ganesan, 'Approximate Initialization of Camera Sensor Networks,' Proc. 4th European Conf. on Wireless Sensor Networks, 2007, pp. 67-82.">Kulkarni et al.</cite> use a calibration target to explicitly match spatial points, and build an actual tessellation of 3D space to represent the range and degree of overlap of the cameras&#8217; fields of view. Finally, <cite title="E.J. Lobaton, P. Ahammad, and S.S. Sastry, 'Algebraic Approach for Recovering Topology in Distributed Camera Networks,' Proc. ACM/IEEE Intl. Conf. on Information Processing in Sensor Networks, 2009.">Lobaton et al.</cite> use scene features (in their case, bisecting lines indicating wall delineations) to construct their algebraic topological model, which is proposed as a substitute for full calibration in certain (unspecified) secondary applications.</p>
<p>So is generic topological information about multi-camera networks only useful for tracking and calibration, the two problem areas that appear to have spawned every topological model in the literature? Are there any other applications that simply don&#8217;t have any convenient information of their own for building such models?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/03/topology-to-what-end/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snap To Grid</title>
		<link>http://blog.mavrinac.com/2010/03/snap-to-grid/</link>
		<comments>http://blog.mavrinac.com/2010/03/snap-to-grid/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 15:33:48 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=126</guid>
		<description><![CDATA[I like Gabor Herman&#8216;s definition of discrete Euclidean space. He defines, for any positive real number and any positive integer : This chops N-space up into a square (cubic, etc.) Bravais lattice, with primitive vectors of magnitude . Each point in the discrete space is then associated with a primitive cell (or Voronoi neighbourhood, in [...]]]></description>
			<content:encoded><![CDATA[<p>I like <cite title="G.T. Herman, Geometry of Digital Spaces, Birkhäuser, 1998.">Gabor Herman</cite>&#8216;s definition of discrete Euclidean space. He defines, for any positive real number <img src='http://s.wordpress.com/latex.php?latex=%5Cdelta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\delta' title='\delta' class='latex' /> and any positive integer <img src='http://s.wordpress.com/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' />:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cdelta%20%5Cmathbb%7BZ%7D%5EN%20%3D%20%5C%7B%20%28%20%5Cdelta%20x_1%2C%20%5Cldots%2C%20%5Cdelta%20x_N%20%29%20%7C%20x_n%20%5Cin%20%5Cmathbb%7BZ%7D%20%5Ctext%7B%20for%20%7D%201%20%5Cleq%20n%20%5Cleq%20N%20%5C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\delta \mathbb{Z}^N = \{ ( \delta x_1, \ldots, \delta x_N ) | x_n \in \mathbb{Z} \text{ for } 1 \leq n \leq N \}' title='\delta \mathbb{Z}^N = \{ ( \delta x_1, \ldots, \delta x_N ) | x_n \in \mathbb{Z} \text{ for } 1 \leq n \leq N \}' class='latex' />
<p>This chops N-space up into a square (cubic, etc.) <a href="http://en.wikipedia.org/wiki/Bravais_lattice">Bravais lattice</a>, with primitive vectors of magnitude <img src='http://s.wordpress.com/latex.php?latex=%5Cdelta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\delta' title='\delta' class='latex' />. Each point in the discrete space is then associated with a <a href="http://en.wikipedia.org/wiki/Primitive_cell">primitive cell</a> (or <a href="http://en.wikipedia.org/wiki/Voronoi_diagram">Voronoi</a> neighbourhood, in Herman&#8217;s parlance) consisting of all points in the associated continuous space which are closer to that discrete point than any other discrete point.</p>
<p>This relationship to continuous space makes discretization of otherwise continuous sets &#8212; or regions, as say the <a href="http://en.wikipedia.org/wiki/Geographic_information_system">GIS</a> people &#8212; a snap (pun intended). In the simplest case, it is equivalent to basic <a href="http://en.wikipedia.org/wiki/Sampling_(signal_processing)">sampling</a>.</p>
<p><center><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Voxels.svg/287px-Voxels.svg.png" height="165" alt="Voxels" /></center></p>
<p>In 3-space, these are essentially <a href="http://en.wikipedia.org/wiki/Voxel">voxels</a>, which are intuitive for visual thinkers like me, and allow for neat tricks from the computer graphics literature like <cite title="Y.K. Liu, H.Y. Song, and B. Žalik, 'A General Multi-Step Algorithm for Voxel Traversing Along a Line,' Computer Graphics Forum, vol. 27, 2008, pp. 73-80.">voxel traversals</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/03/snap-to-grid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pi Day Madness</title>
		<link>http://blog.mavrinac.com/2010/03/pi-day-madness/</link>
		<comments>http://blog.mavrinac.com/2010/03/pi-day-madness/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 01:10:35 +0000</pubDate>
		<dc:creator>Aaron Mavrinac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.mavrinac.com/?p=106</guid>
		<description><![CDATA[You have a right-handed Cartesian coordinate basis of a three-dimensional Euclidean space, with axes , , and . You&#8217;re given some spatial-directional vectors of the form , where and are, respectively, the inclination angle (from the positive -axis zenith) and the azimuth angle (measured right-handed from the positive -axis) of an associated direction, which is [...]]]></description>
			<content:encoded><![CDATA[<p>You have a right-handed Cartesian coordinate basis of a three-dimensional Euclidean space, with axes <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=y&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y' title='y' class='latex' />, and <img src='http://s.wordpress.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z' title='z' class='latex' />. You&#8217;re given some <em>spatial-directional vectors</em> of the form <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%2Cz%2C%5Crho%2C%5Ceta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y,z,\rho,\eta)' title='(x,y,z,\rho,\eta)' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=%5Crho&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\rho' title='\rho' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=%5Ceta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\eta' title='\eta' class='latex' /> are, respectively, the inclination angle (from the positive <img src='http://s.wordpress.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z' title='z' class='latex' />-axis zenith) and the azimuth angle (measured right-handed from the positive <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' />-axis) of an associated direction, which is unrelated to the direction of vector <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%2Cz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y,z)' title='(x,y,z)' class='latex' />. How do you tell if the direction <img src='http://s.wordpress.com/latex.php?latex=%28%5Crho%2C%5Ceta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(\rho,\eta)' title='(\rho,\eta)' class='latex' /> of such a vector falls inside the exterior half-space defined by the plane normal to <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%2Cz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y,z)' title='(x,y,z)' class='latex' />?</p>
<p>If it helps, visualize it this way. Travel to a point in space <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%2Cz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y,z)' title='(x,y,z)' class='latex' />. Then, find a point on the unit sphere surrounding <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%2Cz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y,z)' title='(x,y,z)' class='latex' /> defined by <img src='http://s.wordpress.com/latex.php?latex=%28%5Crho%2C%5Ceta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(\rho,\eta)' title='(\rho,\eta)' class='latex' /> (like latitude and longitude). Now, cut all of space in half with a plane passing through <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%2Cz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y,z)' title='(x,y,z)' class='latex' /> and perpendicular to the line between the origin and <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%2Cz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y,z)' title='(x,y,z)' class='latex' />. Is the point on the unit sphere in the same half of space as the origin?</p>
<p>If <img src='http://s.wordpress.com/latex.php?latex=x%20%3D%20y%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x = y = 0' title='x = y = 0' class='latex' />, it&#8217;s dead simple: <img src='http://s.wordpress.com/latex.php?latex=%5Crho%20%5Cgeq%20%5Cpi%2F2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\rho \geq \pi/2' title='\rho \geq \pi/2' class='latex' />. Doesn&#8217;t even matter what <img src='http://s.wordpress.com/latex.php?latex=%5Ceta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\eta' title='\eta' class='latex' /> is.</p>
<p>If <img src='http://s.wordpress.com/latex.php?latex=y%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = 0' title='y = 0' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=x%20%3E%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x &gt; 0' title='x &gt; 0' class='latex' />, there&#8217;s no effect on the azimuth, so it&#8217;s still pretty straightforward: <img src='http://s.wordpress.com/latex.php?latex=%5Crho%20%5Cgeq%20%5Cpi%2F2%20%2B%20%5Csin%5Ceta%5Carctan%28x%2Fz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\rho \geq \pi/2 + \sin\eta\arctan(x/z)' title='\rho \geq \pi/2 + \sin\eta\arctan(x/z)' class='latex' />. The <img src='http://s.wordpress.com/latex.php?latex=%5Carctan%28x%2Fz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\arctan(x/z)' title='\arctan(x/z)' class='latex' /> accounts for the tilt of the plane, and the <img src='http://s.wordpress.com/latex.php?latex=%5Csin%5Ceta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sin\eta' title='\sin\eta' class='latex' /> accounts for the azimuth.</p>
<p>In the general case where <img src='http://s.wordpress.com/latex.php?latex=x%2C%20y%20%5Cnot%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x, y \not= 0' title='x, y \not= 0' class='latex' />, and thus the azimuth angle relative to the plane&#8217;s direction of tilt differs from the absolute azimuth angle, it gets a bit trickier. First, we need the magnitude of <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y)' title='(x,y)' class='latex' /> for the <img src='http://s.wordpress.com/latex.php?latex=%5Carctan&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\arctan' title='\arctan' class='latex' /> bit:</p>
<img src='http://s.wordpress.com/latex.php?latex=r%20%3D%20%5Csqrt%7Bx%5E2%20%2B%20y%5E2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r = \sqrt{x^2 + y^2}' title='r = \sqrt{x^2 + y^2}' class='latex' />
<p>Now, for <img src='http://s.wordpress.com/latex.php?latex=z%20%3E%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z &gt; 0' title='z &gt; 0' class='latex' />, what we want is <img src='http://s.wordpress.com/latex.php?latex=%5Crho%20%5Cgeq%20%5Cpi%2F2%20%2B%20%5Ccos%28%5Ceta%20-%20%5Ctheta%29%5Carctan%28r%2Fz%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\rho \geq \pi/2 + \cos(\eta - \theta)\arctan(r/z)' title='\rho \geq \pi/2 + \cos(\eta - \theta)\arctan(r/z)' class='latex' />, where <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\theta' title='\theta' class='latex' /> is the right-handed angle of <img src='http://s.wordpress.com/latex.php?latex=%28x%2Cy%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(x,y)' title='(x,y)' class='latex' /> from the positive <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' />-axis. Conceptually, subtracting <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\theta' title='\theta' class='latex' /> is like transforming the azimuth angle into a new coordinate system where the plane tilt is back in the <img src='http://s.wordpress.com/latex.php?latex=x&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' />-<img src='http://s.wordpress.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z' title='z' class='latex' /> plane (as if <img src='http://s.wordpress.com/latex.php?latex=y%20%3D%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y = 0' title='y = 0' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=x%20%3D%20r&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x = r' title='x = r' class='latex' />). We could leave it like this, and have the reader calculate <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\theta' title='\theta' class='latex' /> as:</p>
<p><img src="http://upload.wikimedia.org/math/0/b/e/0be75b33e66b958ba98cd9a73ef5ef9a.png" height="110" alt="A Giant Ugly Mess" /></p>
<p>But, with a well-known trigonometric identity we can make it a bit prettier:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Crho%20%5Cgeq%20%5Cfrac%7B%5Cpi%7D%7B2%7D%20%2B%20%5Cleft%28%5Cfrac%7By%7D%7Br%7D%5Csin%5Ceta%20%2B%20%5Cfrac%7Bx%7D%7Br%7D%5Ccos%5Ceta%5Cright%29%20%5Carctan%5Cleft%28%5Cfrac%7Br%7D%7Bz%7D%5Cright%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\rho \geq \frac{\pi}{2} + \left(\frac{y}{r}\sin\eta + \frac{x}{r}\cos\eta\right) \arctan\left(\frac{r}{z}\right)' title='\rho \geq \frac{\pi}{2} + \left(\frac{y}{r}\sin\eta + \frac{x}{r}\cos\eta\right) \arctan\left(\frac{r}{z}\right)' class='latex' />
<p>More than a few scrap half-pages were harmed during the making of this inequality.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mavrinac.com/2010/03/pi-day-madness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

