Math Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspxIn this chapter of our primer, we’ll examine affine spaces, and see what affine and linear combinations are. Furthermore, we can use these concepts to define some other related concepts, such as affine and linear dependency.
Affine Space
Anen-USTelligent Evolution Platform Developer Build (Build: 5.6.50428.7875)re: Math Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx#10206574Tue, 06 Sep 2011 04:53:05 GMT91d46819-8472-40ad-a661-2c78acb4018c:10206574Vikram<p>1. The star(*) in the figures threw me off track for a while, may be u can change to dot(.) when u're free</p>
<p>2. I was hoping u can add a section like before - why and where it is used in game programming (significance)</p>
<p>3. I miss the "notify follow up comments via email" thingy in this blog?</p>
<p>Thanks for all the gr8 work :)</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10206574" width="1" height="1">re: Math Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx#10198468Mon, 22 Aug 2011 13:32:39 GMT91d46819-8472-40ad-a661-2c78acb4018c:10198468Reza Nourai - MSFT<p>Thanks for catching that Deniz. It does completely change the meaning, and I've fixed it. Glad your enjoying the posts!</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10198468" width="1" height="1">re: Math Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx#10198453Mon, 22 Aug 2011 12:39:53 GMT91d46819-8472-40ad-a661-2c78acb4018c:10198453Deniz<p>Hello Reza,</p>
<p>at the beginning of chapter "affine combinations" you write "Well, it turns out if we impose the restriction that the coefficients equal 1". </p>
<p>I think you forgot the word "sum" which would lead to "Well, it turns out if we impose the restriction that the sum of the coefficients equal 1". </p>
<p>Sorry for hairsplitting but that makes a difference (despite the correct equation). </p>
<p>Thanks for your math lessons.</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10198453" width="1" height="1">re: Math Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx#10184611Fri, 08 Jul 2011 15:03:26 GMT91d46819-8472-40ad-a661-2c78acb4018c:10184611Reza Nourai - MSFT<p>I think a discussion of barycentric coordinates will be really helpful, so I'll post about that next before continuing with matrices. It will serve 2 purposes I think are valuable now. Firstly, it should help in understanding affine combinations more clearly. Secondly, it will give us a chance to apply what we've covered to an actual game programming problem, specifically collision detection.</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10184611" width="1" height="1">re: Math Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx#10182729Sun, 03 Jul 2011 16:39:51 GMT91d46819-8472-40ad-a661-2c78acb4018c:10182729Reza Nourai - MSFT<p>That's a great question, Brian. I actually missed a very important piece when describing affine combinations, thanks for pointing it out. I'll update the post in a bit when I get a chance to properly type it up, but the gist of it is this: The equation as I have it doesn't have the restriction that each coefficient equals one (though I incorrectly stated that it does). However, the canonical form of an affine combination is P = aoPo + a1P1 + a2P2 + ... anPn. In that form, it *does* have this restriction of equaling 1. This can be shown by substituting ao = 1 - a1 - a2 ... - an back into the equation and solving, which will lead you to exactly the equation I have above (P = Po + a1(P1-Po) ...). Another way to think of it would be to try and factor our final equation back into the canonical form. Mathematically, it will end up with the restriction of all coefficients equaling 1. In the non-canonical form (the one I derive visually) you can think of the implicit a0 parameter automatically enforcing the restriction, so a1-an are free to be whatever you want.</p>
<p>Also, you're correct that when the remaining coefficients equal exactly 1 (implying a0 = 0), you get the outline of the corresponding simplex (triangle in this case). That's exactly how we arrive at these simplices, which we'll examine in further detail in later posts. I'm going to detour over to matrices first, but we'll eventually discuss simplices & barycentric coordinates in detail when we talk about certain collision detection algorithms.</p>
<p>Again, I'll type this up and edit the post. Thanks for pointing it out.</p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10182729" width="1" height="1">re: Math Primer Series: Vectors III: Affine Spaces, Linear and Affine Combinationshttp://blogs.msdn.com/b/rezanour/archive/2011/06/26/math-primer-series-vectors-iii-affine-spaces-linear-and-affine-combinations.aspx#10182679Sun, 03 Jul 2011 03:49:18 GMT91d46819-8472-40ad-a661-2c78acb4018c:10182679Brian<p>Can you explain further why the coefficients must add up to 1? The wikipedia page for affine combinations says the same thing, but again without much further explanation. I can accept this as a definition, but I'm having trouble making it stick in my brain, because nothing jumps to mind as to why this definition is significant.</p>
<p>Generally I'm having trouble separating affine combination from the general concept of linear combinations of vectors. If you restrict the coefficients of u and v such that they add up to one, doesn't that effectively mean that D must be colinear with the line-segment C<->B? D could be anywhere along that line if you used coefficients like 2 and -1, generalized to N and -(N-1). Yet your point D doesn't quite seem to fit that line - although who knows, your drawing might have an issue. </p>
<div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10182679" width="1" height="1">