From: John Dim on
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
"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
"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
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
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
 |  Next  |  Last
Pages: 1 2
Prev: setting color with data
Next: Oracle DB