   Scaling about an arbitrary axis
  Hi Guys,I'm trying (without success) to derive a matrix to scale about an arbitrary axis i.e void Scale(Vector3 axis, float scalar)I'm using opengl style matricies, can someone help out?Kind Regards,Chris   
  Wouldn't it simply bev.x * scale    0   0   00v.y * scale  0   00    0   v.z * scale   00    0   0   1??   ;  Hi soconne,Thanks for the reply, in short, umm no :) as if I'm scaling 2 fold about a normalized vector pointing along positive x (1, 0, 0), that would give me 1 * 2    0   0   00   0 * 2    0   00   0   0 * 2    00   0   0   1===2   0   0   00   0   0   00   0   0   00   0   0   1Which results in a zero scale in both the y and z planes.Kind Regards,Chris   ;  Well, you could use soconne's method, but in the event that one of the axial directions is zero, you just internally use 1/scalar.That said, could you explain what you mean by scaling about an arbitrary axis?  What output are you expecting in certain cases? (eg: scale(Vector3(0,1,0), 5) or scale(Vector3(1,3,0.28), 0.1))-Auron   ;  How about rotating/re-orienting your object so that the scaling axis matches one of the base x/y/or z axis,use a 'standard' scaling along thosethen un-rotate it back to where it was originally pointed?   ;  Hi Guys,Thanks for the reply - i've found the soultion in an old text book - i've posted it in case anyone else is interested:n = normalised vector representing an axis of scale directionk = amount to scale along axis1 + (k-1) n.x n.x|(k – 1)  n.x n.y|(k – 1) n.x n.z|0(k-1) n.x n.y|1 + (k -1) n.y n.y|(k – 1) n.y n.z|0(k-1) n.x n.z|(k-1) n.y n.z|1 + (k -1) n.z n.z|00|0|0|1(excuse the squared terms - no superscript :D)Thanks anyhow,Kind Regards,Chris   