Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. Foreword: most of the facts here speak in the context of linear transforms, but can be trivially generalized to the affine, 4x4 transformation matrix a CFrame is
  2.  
  3. Ok so, the space for vectors or whatnot is what you would call a 3D space (as you'd expect). a Cframes rotational component contains 3 orthogonal (perpendicular) vectors representing a basis for this 3D space. We call it a basis because any vector can be expressed as a linear combination of these 3 vectors v1, v2, and v3. A linear combination is a sum of the form c1v1 + c2v2 + c3v3. the vector (c1, c2, c3) is called the coordinate matrix of the vector represented by such a sum in the ordered basis (v1, v2, v3). now a Cframe also has the translational component of course.
  4.  
  5. We'll return to that after this paragraph- but now its important to mention that a Cframe represents a linear transformation composed with a translation. This is the way you should picture a Cframe, it just represents transforming points in 3D space. Now here are some useful facts for your intuition (know that the standard basis is (1,0,0) (0,1,0) (0,0,1)):
  6.  
  7. - For a transform L, its matrix in the standard basis is defined by Aj (the j'th column of L's matrix in std basis A) = [L(aj)], the coordinates of the transformed j'th basis vector (so, for j = 1, A1 = [L(1,0,0)]). alternatively, from a matrix M you can get the transformation associated with this matrix via a similar process.
  8.  
  9. - For a transform L and two basis' b and b', its matrix relative to b and b' is defined by the equation [Ta]_b' = A[a]
  10.  
  11. - For a transform L and a transform U, [L o U] matrix in the standard basis (this linear transforms "CFrame" (upto generalizing to a 4x4 with identity affine component)) [L]*[U] where [X] is the matrix in the standard basis for X (L o U being your standard function composition, ie, L o U (x) = L(U(x)), ie, its transformation concatenation).
  12.  
  13. - For a transform L, [L^-1] (L^-1 being its inverse, assuming it exists) is the inverse matrix for [L] (in the standard basis of course), meaning cf:inverse represents the inverse transformation to cf.
  14.  
  15. Q: how do I get the coordinates of a vector v in another basis b?
  16.  
  17. A: Let L be the transform which takes each standard basis element ej to bj in b. then [v] = [L][v]_b where [v]_b is vs coordinate matrix in b (I know this one is a bit unintuitive, but consider that L will take each standard basis element to bj and thus take the (x,y,z) coordinates to the "world space" representation of v) and then [v]_b = [L^-1][v]
  18. if u have any other questions about Cframe things u can ask and ill explain best i can
  19. but the really important part to get is the Cframe as a transform inverse as inverse transform and multiplication as composure
  20.  
  21. I didn't mention the strongest theorem regarding the transform stuff where if u have a transform and two basis b and b' its matrix relative to b and b' is defined by [Ta]_b' = A[a]_b where A is its matrix, that 1 would've made the first Q1 much simpler since its the identity transform relative to two basis.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement