Prev: setting color with data
Next: Oracle DB
From: John Dim on 7 May 2010 12:56 Hello, I have a coordinates matrix A: A = [0 0 0 ; 3 4 3; 5 7 3; 4 5 3; 6 6 3; 6 9 3] and I want to rotate this matrix 60 degrees on the Zdirection=[0 0 1] from an arbitrary point lets say centre= [0 1 1]. I use the function rotation as follows: rotation(A,Zdirection,60,center) and I get an error because this function is only made to rotate objects. Is there another function to use in order to do it? If not any ideas please??
From: us on 7 May 2010 15:57 "John Dim" <mitsoujohn(a)yahoo.com> wrote in message <hs1gn4$hnq$1(a)fred.mathworks.com>... > Hello, > > I have a coordinates matrix A: > > A = [0 0 0 ; 3 4 3; 5 7 3; 4 5 3; 6 6 3; 6 9 3] > > and I want to rotate this matrix 60 degrees on the Zdirection=[0 0 1] from an arbitrary point lets say > centre= [0 1 1]. > > I use the function rotation as follows: > > rotation(A,Zdirection,60,center) > > and I get an error because this function is only made to rotate objects. Is there another function to use in order to do it? > If not any ideas please?? well... ML is just meant to do this kind of stuff - albeit in another way... 1) create your 3x3 | 4x4 transformation matrix TMAT for a good tutorial see for instance http://www.senocular.com/flash/tutorials/transformmatrix 2) then r=tmat*A us
From: Bruno Luong on 7 May 2010 16:03 "John Dim" <mitsoujohn(a)yahoo.com> wrote in message <hs1gn4$hnq$1(a)fred.mathworks.com>... > If not any ideas please?? help makehgtform Bruno
From: ImageAnalyst on 7 May 2010 16:10 If you have the Image Processing Toolbox, you can consider your matrix as an image and use imrotate() to rotate it around the Z axis (i.e. spinning in the x-y plane).
From: Bruno Luong on 7 May 2010 16:22
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <7a9c02de-fbba-40f5-a470-4347509b2c1c(a)d39g2000yqa.googlegroups.com>... > If you have the Image Processing Toolbox, you can consider your matrix > as an image and use imrotate() to rotate it around the Z axis (i.e. > spinning in the x-y plane). You can't do that: OP's matrix contains 3D coordinates of points, it is not an image. Bruno |