<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-95516589223740181</id><updated>2024-09-14T23:28:30.415-07:00</updated><category term="4-D coordinates"/><category term="Apache"/><category term="Do something"/><category term="Get skills"/><category term="Java"/><category term="LAMP"/><category term="Linux"/><category term="Plugin Architecture"/><category term="Python"/><category term="Website"/><category term="debt"/><category term="graphics"/><category term="investing"/><category term="linear algebra"/><category term="personal finance"/><title type='text'>Solarmist&#39;s Den</title><subtitle type='html'>This blog is for random thoughts that might be useful to others.&#xa;&#xa;Mainly it&#39;s about self-development, careers, and coding.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://solarmist.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://solarmist.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Solarmist</name><uri>http://www.blogger.com/profile/07341019384557152705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-95516589223740181.post-542745114540692755</id><published>2013-12-12T22:54:00.000-08:00</published><updated>2013-12-12T22:54:04.461-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debt"/><category scheme="http://www.blogger.com/atom/ns#" term="investing"/><category scheme="http://www.blogger.com/atom/ns#" term="personal finance"/><title type='text'>Part 1: From nothing middle-class chump (Worth by 2003: &lt; -$13,000)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;http://openclipart.org/people/rfvectors.com/1381593179.svg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://openclipart.org/people/rfvectors.com/1381593179.svg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;I am going to be a millionaire and I&#39;m going to tell you how I&#39;m doing that even though my current net worth is -$115,443.00.&lt;/h4&gt;
&lt;div&gt;
TL;DR I learned horrible money management as a kid, blew all my advantages as a young adult, except getting my degree in Computer Science, and until recently was a typical hyper consumer that racked up more than $100,000 in debt.&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Why I became a in-debt middle-class chump (Net worth: $200)&lt;/h2&gt;
I grew up poor in Minneota; the son of a single father. &amp;nbsp;That pretty much summarizes my entire relationship with money (at least mentally) up until I joined the Army in 2001. &amp;nbsp;To elaborate a bit that means that I would go with my dad once a week on a bus from downtown Minneapolis to some grocery store miles away to buy food with food-stamps then make the 1+ hour journey back home. &amp;nbsp;Free lunches at school. Occasional trips to the food shelter.&lt;br /&gt;
&lt;br /&gt;
We were poor for mainly one reason my father was a non-functioning alcoholic and would relapse almost like clockwork ever six months. And when my dad had a job he would promise me very nice allowances (I remember at one time being promised a $20/week allowance), but then only receiving the two installments. &amp;nbsp;This also allowed us to get very nice tax rebates every year. &amp;nbsp;This tainted my relationship with money horribly. &amp;nbsp;Money came in then you spent it as fast as you could on the things you needed/wanted then you barely scraped by the rest of the time.&lt;br /&gt;
&lt;br /&gt;
What&#39;s sad is looking back I seemed to have the traits of a saver. &amp;nbsp;I opened a savings account with $10.00 when I was in kindergarten because I liked the idea (my teacher or my father may have put the idea there). Then a few years later my uncle asked to borrow money from me and I gauged that he was high risk (seriously, I thought about it and decided there was a good chance he wouldn&#39;t pay me back and raised the interest rate on him) and I&#39;d just learned about interest, so I charge him 10% interest per week (I picked a number I could actually calculate easily) on the $10 or $20 I had and loaned to him. These events were few and far between, especially as I got older. My more common modus operandi was to ask/beg for some money once or twice a month then immediately go spend it at the damaged goods warehouse store down the street or go to a movie. I very rarely had money; usually I was out and just demanded a toy and that was how I got stuff (I was a brat; mainly because it worked). &lt;br /&gt;
&lt;br /&gt;
The biggest thing I had going for me after this childhood was that I&#39;ve always been a planner and I knew money management was important (Thank you high school economics!) . When I was 12 and 13 I saved my money up and bought myself a refurbished TI-85 calculator and a copy Borland Turbo C++ even though I had never programmed anything more complicated than a text adventure game in BASIC at the time, because I knew without a doubt I was going to be a &quot;programmer&quot; and I was going to learn a lot of math even though I was on the fast track to becoming a high school drop out with my 1.9 GPA (my only A&#39;s were in electronics and wood-shop) my freshman year of high school, due to issues at home. I can think 1, 2, 5 years out and know where I want to be then decide all the steps that I need to take to get there (even if my plans were derailed by being a spendthrift or unfocused). &amp;nbsp;Eventually I decided to leave my dad a move in with my mom, who had just moved to England from Japan at the time. I spent the rest of high school being an geek and learning how to play the game of school.&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
The makings of a winner? (Net worth: $2,500)&lt;/h2&gt;
When I graduated from high school I had earned probably less than $1,000 in my life and most of that in the last few months leading up to graduation by working at a grocery store. However while I worked at that Kroger in Duluth, Georgia I was excited because I put part of my wages into the employee stock program. &amp;nbsp;I loved looking at my pay-stubs and seeing that small number of stocks increase...however slowly (I knew stocks were the way to make money because you buy them for one price and they go up to another and that was about it, high school economics didn&#39;t go very deep into the material, but I loved the idea of compounding). But the number grew very slowly with such a low paying job and the stock price was just as slow, so I quickly got frustrated because I just resigned myself to accept it.&lt;br /&gt;
&lt;br /&gt;
After graduation my next move was back to Minnesota to work in a plastic factory for a year. I had an uncle and some other relatives that worked at Juno, so I got a job there making decent money, I think at the time it was $10.00 an hour for entry level work. &amp;nbsp;I took the weekend shift and worked three 12-hour days Friday, Saturday, and Sunday and was paid for 40-hours; plus, I got four days off a week and two weeks of vacation a year. It was a very good job to me at the time and living with my grandma I had regular spending money for the first time. I even managed to save around $2,500 in that year for college, but that was as far as my money management went. Pay yourself first (I think I was around 10%, because isn&#39;t that what you&#39;re &#39;supposed to&#39; save as an adult?) , then spend everything else. I was happy and thought I was doing well. And thinking back it was the last year I was debt free.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;My first big mistake (Net worth: &amp;lt; -$10,000 student&amp;nbsp;loans and &amp;lt; -$3,000 credit card debt)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
That was the last time I was so care-free. The following fall I started college at the University of Minnesota. I followed all the instructions and filed my FAFSA, I qualified as an independent student and immediately got loans for as much as I could. Plus, I received around $10,000 from my mom and step-dad for tuition. I lived in the dorms and got a single-room ate in the cafeteria and enjoyed some spending cash on my dining card every semester. I lived and studied then at some point during my first year I started feeling a pressure from being in debt. My mom started talking about how expensive college was and that when I graduated I&#39;d better be prepared to pay it all back and help my half-sister through college. &quot;What? Really?&quot;, I thought to myself, &quot;You expect me to pay you back and on top of that &#39;help&#39; pay for Nicole&#39;s school?&quot; That just didn&#39;t sit right with me. I had also gotten a couple of credit cards during the year and bought a 19&quot; lcd monitor, one of the really early ones in 2001 for around $2,000. By the end of the year I&#39;d gotten a new job on the systems team in the computer science department, but that was barely more than minimum wage,&lt;br /&gt;
&lt;br /&gt;
I started looking into the Army Reserves as a linguist since I was triple majoring in Computer Science, Math and Japanese and ended the year by enlisting in the Air Force two days before 9/11. That summer I also borrow around $500 from an exchange student friend of mine to cover my credit card bills (I think &amp;nbsp;and never paid him back (That&#39;s the only debt I&#39;ve ever skipped out on. I kept a record of it for the next five years, but eventually it was lost. I knew he wasn&#39;t hurting for money at all, but I still feel bad about it to this day.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://solarmist.blogspot.com/feeds/542745114540692755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://solarmist.blogspot.com/2013/12/part-1-from-nothing-middle-class-chump.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/542745114540692755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/542745114540692755'/><link rel='alternate' type='text/html' href='http://solarmist.blogspot.com/2013/12/part-1-from-nothing-middle-class-chump.html' title='Part 1: From nothing middle-class chump (Worth by 2003: &lt; -$13,000)'/><author><name>Solarmist</name><uri>http://www.blogger.com/profile/07341019384557152705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-95516589223740181.post-2784486164636128343</id><published>2011-04-28T00:45:00.000-07:00</published><updated>2011-04-28T00:45:22.253-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Plugin Architecture"/><title type='text'>Creating a plugin interface in Java in only 16 lines of code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I have been working on refactoring a java graphics package for the graphics program at EWU and noticed that it was adding tabs to a JPanel, so I figured that it could put all the tabs in a package then scan the directory for appropriate classes and load them dynamically. Voila instant plugin architecture.&lt;br /&gt;
&lt;br /&gt;
It turned out to be pretty simple using Java&#39;s ClassLoader interface. The only complication was that my tabs had parameters in their initialization functions, so I needed to create a super class(MasterPanel) that held that functionality and call that instead of casting the class as a JPanel, since I don&#39;t know what the panel names might be in the future. &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;//Get the path of the package relative to the project directory&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;String packageName = &quot;package.name.here&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ClassLoader classLoader = Thread.currentThread().getContextClassLoader();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; String path = &quot;./&quot; + packageName.replace(&#39;.&#39;, &#39;/&#39;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;//Check all the files in the package directory for Panel.class files&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;//If there are any add them to this panel as tabs&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;File dir = new File(path);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;File[] files = dir.listFiles();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;for(File curFile : files)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; if(curFile.getName().endsWith(&quot;Panel.class&quot;) &amp;amp;&amp;amp; !curFile.getName().endsWith(&quot;MasterPanel.class&quot;))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; String curPanel = curFile.getName();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;int index = curPanel.indexOf(&#39;.&#39;);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;curPanel = curPanel.substring(0, index);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Class&amp;lt;MasterPanel&amp;gt; loadPanel = (Class&amp;lt;MasterPanel&amp;gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Class.forName(packageName + &quot;.&quot; + curPanel);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Constructor&amp;lt;MasterPanel&amp;gt; constructPanel = loadPanel.getConstructor(new Class[]{Scene.class});&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MasterPanel newPanel = constructPanel.newInstance(new Object[]{theScene});&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (newPanel != null)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tabPane.addTab(newPanel.name, newPanel);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://solarmist.blogspot.com/feeds/2784486164636128343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://solarmist.blogspot.com/2011/04/creating-plugin-interface-in-java-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/2784486164636128343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/2784486164636128343'/><link rel='alternate' type='text/html' href='http://solarmist.blogspot.com/2011/04/creating-plugin-interface-in-java-in.html' title='Creating a plugin interface in Java in only 16 lines of code'/><author><name>Solarmist</name><uri>http://www.blogger.com/profile/07341019384557152705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-95516589223740181.post-4299074101397401923</id><published>2011-04-21T17:35:00.000-07:00</published><updated>2011-04-21T17:35:07.233-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache"/><category scheme="http://www.blogger.com/atom/ns#" term="LAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Website"/><title type='text'>Time to bite the bullet.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I&#39;ve been interested in making my own website for quite a while, but being so public I always felt shy about putting my first attempts up.&amp;nbsp; Also, I never felt I had anything interesting to put on a web site.&lt;br /&gt;
&lt;br /&gt;
But I decided to go ahead with it.&amp;nbsp; And I&#39;m starting with Linode as my hosting service, since they have a suite of wonder tutorials that will guide me though all the steps I need to get going.&lt;br /&gt;
&lt;br /&gt;
What finally pushed me over the edge to build one was Nai over at &lt;a href=&quot;http://pragmaticstartup.wordpress.com/&quot;&gt;pragmaticstartup&lt;/a&gt;)). This guy is starting from ground zero and letting people know about his successes and failures. So, why can&#39;t I do the same? Of course my first website will suck, but that&#39;s where everyone starts.&lt;br /&gt;
&lt;br /&gt;
I guess I&#39;ve just let my pride in knowing what I&#39;m doing get in the way of trying new things.&lt;br /&gt;
&lt;br /&gt;
Stupid solarmist, get over yourself or you&#39;ll never grow. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://solarmist.blogspot.com/feeds/4299074101397401923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://solarmist.blogspot.com/2011/04/time-to-bite-bullet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/4299074101397401923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/4299074101397401923'/><link rel='alternate' type='text/html' href='http://solarmist.blogspot.com/2011/04/time-to-bite-bullet.html' title='Time to bite the bullet.'/><author><name>Solarmist</name><uri>http://www.blogger.com/profile/07341019384557152705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-95516589223740181.post-5651347289195410951</id><published>2010-12-04T15:18:00.000-08:00</published><updated>2011-02-02T19:20:30.337-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="4-D coordinates"/><category scheme="http://www.blogger.com/atom/ns#" term="graphics"/><category scheme="http://www.blogger.com/atom/ns#" term="linear algebra"/><title type='text'>Graphics fundamentals - the why of &quot;4-D&quot; (homogenous) coordinates</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;(Note: This is not meant to be a comprehensive list of the why&#39;s of homogenous coordinates, just some of the bigger ones)&lt;br /&gt;
&lt;br /&gt;
Apparently computer graphics is a bit of a black art when it comes to why things are represented the way they are, even if you &quot;know&quot; basic linear algebra.&lt;br /&gt;
&lt;br /&gt;
This is a response to http://shawnpresser.blogspot.com/2010/10/how-to-become-game-programmer.html by way of http://www.mauriziopz.eu/from0togame/.&lt;br /&gt;
&lt;br /&gt;
In this article the only&amp;nbsp;prerequisite&amp;nbsp;is knowing matrix multiplication is not commutative(i.e. order matters in&amp;nbsp;multiplication&amp;nbsp;of matrices)&amp;nbsp;and how to multiply and add matrices.&lt;br /&gt;
&lt;br /&gt;
If you&#39;ve never been exposed to OpenGL or D3D you might assume everything is done with 3x3 matrices, but you&#39;d be wrong. &amp;nbsp;Actually, everything is done in homogenous (&quot;4-D&quot;) coordinates. &amp;nbsp;Now why the hell would you use &quot;4-D&quot; coordinate when you&#39;re going to be projecting 3-D objects onto a 2-D screen? &amp;nbsp;Well, it simplifies the math, that&#39;s why.&lt;br /&gt;
&lt;br /&gt;
Suppose you have a line segment (from pt A=(1,1,1) to B=(0,0,0)) in space and you want to stretch it along the y-axis and move it out one unit from the origin on the x-axis. Well, using normal 3-D coordinates you&#39;d need your scaling/stretching matrix (S) and your translation vector (T)&lt;br /&gt;
&lt;br /&gt;
Translation is pretty&amp;nbsp;straight&amp;nbsp;forward just add how much you want to move it on each axis (negative for moving it closer to the origin, positive for further away).&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;T = (1, 0, 0)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The basic scaling matrix looks like this&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[stretches&amp;nbsp;x 0 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;S=[0 stretches y 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 0 stretches z]&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
We&#39;ll stretch it along y by double, so we just make the second term 2 and the rest 1.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[1 0 0]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;S=[0 2 0]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 0 1]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Then you apply it to your points (A and B).&lt;br /&gt;
&lt;br /&gt;
(First stretch then move)&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;New A = SA + T and&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;New B = SB + T&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Well, what&#39;s wrong with that? It seems simple enough. And it is until you realize that most graphics objects are going to be&amp;nbsp;significantly more than two points and you need to apply those transformations (and usually many more) to each point in the same order (because remember multiplication is not commutative for matrices).&lt;br /&gt;
&lt;br /&gt;
Now how can we make this process more fool proof? Well, if we had a way to represent all our transformations as a single object that would make it much easier to not make mistakes. And hey, while we&#39;re at it let&#39;s only have to worry about one type of object, matrices, for those transformations (rather than matrices and vectors/points). &amp;nbsp;It turns out that the 4x4 matrix space takes care of both of these problems for us. And for free it throws in&amp;nbsp;elimination&amp;nbsp;of an operation, addition. Yup, now we can do all of our transformations as matrix multiplication only.&lt;br /&gt;
&lt;br /&gt;
Going back to our last example if we add another coordinate we have points that looks like P = (x,y,z,w). Now we&#39;re going to set w to 1, so terms don&#39;t disappear on us as we move our points around. This makes our original points A=(1,1,1,1) and B=(0,0,0,1). &lt;br /&gt;
&lt;br /&gt;
First, in 4x4 space we have to notice that the identity matrix is&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; [1 0 0 0]&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;I= [0 1 0 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; [0 0 1 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; [0 0 0 1]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;The 1 in the bottom row is important to keep things consistant just like having w = 1. As I&#39;ll show in a couple of steps.&lt;br /&gt;
&lt;br /&gt;
This makes scaling matrices look like&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[Sx 0 &amp;nbsp;0 &amp;nbsp;0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;S=[0 &amp;nbsp;Sy 0 &amp;nbsp;0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 &amp;nbsp;0 &amp;nbsp;Sz 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 &amp;nbsp;0 &amp;nbsp;0 Sw]&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;For the most part we&#39;ll never scale w because it is just there as a place holder.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Moving our S from 3x3 to 4x4 we get&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[1 0 0 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;S=[0 2 0 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 0 1 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 0 0 1]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Now let&#39;s put our T in 4x4 as a matrix this time&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[1 0 0 Tx]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;T=[0 1 0 Ty]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 0 1 Tz]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;[0 0 0 Tw]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Why are we doing it like this? Well&amp;nbsp;we need to notice that if we multiply a matrix and a point (x1,y1,z1,w1) in 4d we get&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[1(x1) + Tx(w1)] &amp;nbsp; [1 0 0 Tx][x1]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[1(y1) + Ty&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(w1)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;] = [0 1 0 Ty][y1]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[1(z1) + Tz&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(w1)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;] &amp;nbsp; [0 0 1 Tz][z1]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[Tw(w1)] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [0 0 0 Tw][w1]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This is almost what we want. Except that w1 is in the way. &amp;nbsp;Ah, that&#39;s why we set w=1. If we do that everything works out right.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Now we can do our formulas again, but this time we need to combine matrices before apply it to the point&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;New A = (T+S)A and&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;New B = (T+S)B&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;I thought you said we could&amp;nbsp;eliminate&amp;nbsp;addition I hear you crying. We can! IF you set Sw = 1 and Tw = 1&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[1 0 0 Tx] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[Sx 0 &amp;nbsp;0 &amp;nbsp;0] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[1 0 0 Tx] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[Sx 0 &amp;nbsp;0 &amp;nbsp;0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 1 0 Ty] *&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 &amp;nbsp;Sy 0 &amp;nbsp;0] =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 1 0 Ty] +&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 &amp;nbsp;Sy 0 &amp;nbsp;0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 0 1 Tz] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 &amp;nbsp;0 &amp;nbsp;Sz 0] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 0 1 Tz] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 &amp;nbsp;0 &amp;nbsp;Sz 0]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 0 0 &amp;nbsp;1] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 &amp;nbsp;0 &amp;nbsp;0 &amp;nbsp;1] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 0 0 &amp;nbsp;1] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[0 &amp;nbsp;0 &amp;nbsp;0 &amp;nbsp;1]&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
That gives us a single matrix that we can work with now&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Sx 0 &amp;nbsp;0 &amp;nbsp;Tx]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;TS = T*S=[0 &amp;nbsp;Sy 0 &amp;nbsp;Ty]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [0 &amp;nbsp;0 &amp;nbsp;Sz Tz]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [0 &amp;nbsp;0 &amp;nbsp;0 &amp;nbsp; 1]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now we can take this TS matrix and apply (multiply) it to each point, rather than having to apply a formula to each point. This saves us coding and it also saves cycles (by only combining our transforms once, rather than each time we apply it to a point).&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;New A = (TS)A and&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;New B = (TS)B&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Be careful with this example though, even though it doesn&#39;t matter what order we did the operation this time that&#39;s not true once you start rotating things in space, then it very much matters what order you build your transformation&amp;nbsp;matrix&amp;nbsp;in.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;If you want to learn more about this subject let me know and I&#39;ll start posting about some more of the fundamentals. &amp;nbsp;Or you can go to check out this course on fundamental math used for graphics (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif; font-size: x-small; line-height: 18px;&quot;&gt;http://bit.ly/hTJNA3).&amp;nbsp;&lt;/span&gt;He keeps the linear algebra as simple as possible. For a more&amp;nbsp;in-depth&amp;nbsp;explination see chapter 4 of&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Essential-Mathematics-Interactive-Applications-Second/dp/0123742978?ie=UTF8&amp;amp;tag=thefosdile-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Essential Mathematics for Games and Interactive Applications, Second Edition: A Programmer&#39;s Guide&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=thefosdile-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0123742978&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;(A great book, all the math you need for graphics and games, but in general WAAAY more than you need for most projects and it&#39;s pretty formal so you better remember your sophomore/junior level linear algebra. Overall, it makes a great reference though).&amp;nbsp;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://solarmist.blogspot.com/feeds/5651347289195410951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://solarmist.blogspot.com/2010/12/graphics-fundamentals-why-of-4-d.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/5651347289195410951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/5651347289195410951'/><link rel='alternate' type='text/html' href='http://solarmist.blogspot.com/2010/12/graphics-fundamentals-why-of-4-d.html' title='Graphics fundamentals - the why of &quot;4-D&quot; (homogenous) coordinates'/><author><name>Solarmist</name><uri>http://www.blogger.com/profile/07341019384557152705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-95516589223740181.post-8679886334730871328</id><published>2010-11-23T15:46:00.001-08:00</published><updated>2011-02-02T19:17:08.267-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Do something"/><category scheme="http://www.blogger.com/atom/ns#" term="Get skills"/><title type='text'>Let down by the system?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I read this presentation the other day and was struck by how much it sounded like advice I&#39;ve heard for computer science students. &amp;nbsp;Go do something real, anything! Go work on an open source project. Start your own. Work through OCW material, something that other people haven&#39;t done. And although it has that self-help guru slimy feeling to it, it does a decent job on delivering what it&amp;nbsp;promises.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;display: block; margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 12px;&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/choehn/recessionproof-graduate-1722966&quot; title=&quot;Recession-Proof Graduate&quot;&gt;Recession-Proof Graduate&lt;/a&gt;&lt;/strong&gt;&lt;object height=&quot;355&quot; id=&quot;__sse1722966&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rpgradfinalsmall-090714204538-phpapp01&amp;stripped_title=recessionproof-graduate-1722966&amp;userName=choehn&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;/&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;/&gt;&lt;embed name=&quot;__sse1722966&quot; src=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=rpgradfinalsmall-090714204538-phpapp01&amp;stripped_title=recessionproof-graduate-1722966&amp;userName=choehn&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style=&quot;padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;View more&amp;nbsp;&lt;a href=&quot;http://www.slideshare.net/&quot;&gt;presentations&lt;/a&gt;&amp;nbsp;from&amp;nbsp;&lt;a href=&quot;http://www.slideshare.net/choehn&quot;&gt;Charlie&amp;nbsp;Hoehn&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;I&amp;nbsp;was treated like Charlie when I was in college. I was told over and over just get through school and you&#39;ll have an amazing job waiting for you at the end of it all.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Having my computer science degree in hand I can tell you that&#39;s not&amp;nbsp;exactly&amp;nbsp;true. While it is an enormously marketable degree and I&#39;ve never had trouble finding a job, they weren&#39;t exactly stimulating or enriching jobs(in any sense of the word) and they actively drained my passion for technology, but I thought that was what a fresh grad was SUPPOSED to do.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Building on Charlie&#39;s thoughts I think the problem is two fold. And it isn&#39;t a problem with college per se, but more the attitude about college.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;First, the education system and people&#39;s thoughts about it are stuck in the past when getting a degree wasn&#39;t something you were expected to do. It was something people did to get ahead, somewhat like getting a master&#39;s degree or MBA today (this won&#39;t be true tomorrow though; considering the rate we&#39;re cranking out MBA&#39;s and other advanced degrees). It made you stand out in the crowd of other people. &amp;nbsp;Sure maybe there were 50 applicants for a job in the 80&#39;s, but only five of them had degrees. Unfortunately this idea is still lingering and people in college the idea they are entitled to a job upon graduating.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Well, that idea is total crap. It&#39;s never been the degree they cared about. They just wanted some way of weeding through all the weak&amp;nbsp;resumes down to a number that was&amp;nbsp;manageable. People aren&#39;t good at making choices based on a large numbers of options. Think&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Paradox-Choice-Why-More-Less/dp/0060005696?ie=UTF8&amp;amp;tag=thefosdile-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;The Paradox of Choice&lt;/a&gt;. They want a handful of decent options to consider.&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=thefosdile-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0060005696&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
This leads to the second problem.&amp;nbsp;The idea of doing a job search the way they teach you in high school and college (by finding job postings, sending out 1,000 resumes and praying for an interview) is completely useless, especially for new graduates! Like Charlie talks you&#39;re&amp;nbsp;competing&amp;nbsp;with all the people that have been in your field for more than a decade, all the people overseas that will do anything to get to the states, and all your peers. Good luck standing out in that crowd. &amp;nbsp;The other method they tell you to use is networking talk to everyone and I&#39;m not sure about you, but I&#39;ve never met anyone outside of sales that&#39;s ever actually been successful with that approach until they started developing skills and a reputation for people to talk about. &quot;Oh, Josh? Yeah, I know him... He&#39;s that guy I went to college with. I think works for a computer company now or something.&quot; or &quot;Hey, you should come work for my company they&#39;re awesome we make software that counts beans! (and they give me a hiring bonus for every sucker I bring in).&quot; Most people don&#39;t get their dream jobs like that.&lt;br /&gt;
&lt;br /&gt;
If you want to stand out and get your dream job then you can&#39;t follow everyone else and just try and do it better than they did. In the past I&#39;ve tried to follow the culture and read &lt;a href=&quot;http://slashdot.org/&quot;&gt;Slashdot&lt;/a&gt;&amp;nbsp;or &lt;a href=&quot;http://arstechnica.com/&quot;&gt;Arstechnica&lt;/a&gt;&amp;nbsp;and while entertaining, it hasn&#39;t let me forward. I could read twice as much Slashdot or write four times as many merge sort algorithms in the languages of the day, but that wouldn&#39;t put me ahead of the game. If you think the heart of the tech industry is facebook then let me tell you, you&#39;re way behind behind the time. Yes, facebook&#39;s a great company and they do cool shit, but they&#39;re no longer &quot;it&quot;. And if you start with your goal of aiming to get into facebook then you&#39;re just like the 10,000 other CS grads this year that want that nice big cushy&amp;nbsp;salary&amp;nbsp;they offer.&lt;br /&gt;
&lt;br /&gt;
What I&#39;ve found has helped me most in finding jobs I&#39;d actually want to do is to plug into the community that&#39;s on the bleeding edge of your field (not academia, of course) and follow it. &amp;nbsp; For me, right now, that&#39;s &lt;a href=&quot;http://news.ycombinator.com/&quot;&gt;Hacker News&lt;/a&gt;.&amp;nbsp;&amp;nbsp;If they recommend a book to each other, then read it and try to figure out why they recommended it. If they think a program is awesome, spend time with it and figure out how they made it like that (ideally read the code if it&#39;s open source). Be pick a technology or language that&#39;s brand new or no one uses and learn it just for the experience. Once you plug it you&#39;ll start feeling the ebb and flow of different topics and what&#39;s hot or not and once you learn more and more you&#39;ll be able to start picking them out yourself. Once you&#39;re on the pulse of the industry you start seeing potential jobs everywhere you look.&lt;br /&gt;
&lt;br /&gt;
I&#39;m not sure I stayed on topic here, but I think I said what I was trying to. Conventional wisdom is wrong and you need to stay &lt;b&gt;at least&lt;/b&gt; one step &lt;b&gt;ahead&lt;/b&gt; of everyone else if you really want to do great things. Who know, by the time you read this all this information may be out of date, but the ideas are sound no matter when it is. If tomorrow everyone has Ph.D.&#39;s (and that may very well turn out true the way the&amp;nbsp;academic&amp;nbsp;system is churning them out in the US) then just having a Ph.D. won&#39;t mean anything to anyone. And all the smart people will have found twelve new ways of standing out.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://solarmist.blogspot.com/feeds/8679886334730871328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://solarmist.blogspot.com/2010/11/recession-proof-graduate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/8679886334730871328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/95516589223740181/posts/default/8679886334730871328'/><link rel='alternate' type='text/html' href='http://solarmist.blogspot.com/2010/11/recession-proof-graduate.html' title='Let down by the system?'/><author><name>Solarmist</name><uri>http://www.blogger.com/profile/07341019384557152705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>