Re: [Plib-devel] KobayashiMaru & plib
Brought to you by:
sjbaker
From: Wolfram K. <w_...@rz...> - 2000-08-08 18:10:56
|
Steve wrote: >The "matrices can be your friend" document is an example one of >those documents you either love or hate. Several mathematicians have >come close to death threats over it. Strange. I don't really see why. As far as I see, what you do is mathematically correct. In mathematical speak, you choose a basis in one coordinate system, namely the straight-forward basis (0,0,1), (0,1,0) and (1,0,0) and then look at the transformed vectors, which will again be a basis of three dimensional space as long as the matrix is nice enough :-), that is as long as it is invertible. When I started with computer graphics, I knew matrices quite well and had no problem understanding that they can be used to transform vertices etc. However, I didn't understand at once why it is advantageous to use them versus rotating, translating and projecting the vertices "manually". The point why 4x4 matrices (or at least 4x3 if you don't have projection) are effective and why you don't use 3x3 matrices is that translating - which normally means adding numbers - has been converted into multiplications. This means instead of transforming the vertex with operation1, then operation2 etc you can multiply all the matrices and then transform each vertex only once. For a slight overhead (multiplying all the matrices) you save something per vertex. For example, if A and B are matrices and v is a vertex, then you may calculate either A*(B*v) or (A*B)*v For n vertices, the first costs n*(16+16) multiplications, the second costs once 16*4 multiplications and then for each vertex another 16. This means for five or more vertices its faster to merge all transformations into one large one. This is only possible via matrices or equivalent stuff. Steve writes all this in one sentence in his FAQ :-). >If only math teachers could figure out the importance of teaching >*some* students that way. Most things can be taught in a variety of ways. For example I once saw an article that you can explain the formula pressure=force/area in five completely different ways. For example you can start with "if you double the area, the force will double". Or you can try it experimentally and say the harder you push the nail into you flesh, and the smaller its "front area", the higher the pain ;-). But it is always difficult to teach in several ways, since you don't have as much time and since this will often cause additional confusion. Even people who understand the first explanation can be confused by the second if it doesn't fir their way of thinking. Bye bye, Wolfram. |