# Tranform a point another coordinate system

4 views (last 30 days)
Furkan KORKMAZ on 28 Feb 2023
Commented: William Rose on 3 Mar 2023
Hi,
I have a point matrix. How can I convert the definition of this point in one local coordinate system to another local coordinate system? I have 3 tranform matrices.
##### 2 CommentsShow 1 older commentHide 1 older comment
Furkan KORKMAZ on 1 Mar 2023
Thank you William for your response.
Point_Sp, x1, x2 and x3 are my matrices. "Point_Sp" is explained in S1 (x1,y1) coordinate system. I want to transform "Point_Sp" firstly with x3 matrix, then with x1 matrix and finally transform to x2 matrix.
Point_Sp=[k1;k1*r;0,1];
Transform matrices:
x1=[[1,0,0,0];[0,1,0,-e];[0,0,1,0];[0,0,0,1]];
x2=[[cos(alfa2),sin(alfa2),0,0];[-sin(alfa2),cos(alfa2),0,0];[0,0,1,0];[0,0,0,1]];
x3=[[cos(alfa1),-sin(alfa1),0,0];[sin(alfa1),cos(alfa1),0,0];[0,0,1,0];[0,0,0,1]];

William Rose on 1 Mar 2023
Do you want a symbolic solution or a numerical solution?
If you want a numerical solution, then define the constants: k1, r, e, alfa1, alfa2, and then calculate
Sp2=x2*x1*x3*Sp;
If you want a symbolic solution, then define the variables symbolically:
syms k1 r e alfa1 alfa2
Sp=[k1;k1*r;0;1];
Transform matrices:
x1=[[1,0,0,0];[0,1,0,-e];[0,0,1,0];[0,0,0,1]];
x2=[[cos(alfa2),sin(alfa2),0,0];[-sin(alfa2),cos(alfa2),0,0];[0,0,1,0];[0,0,0,1]];
x3=[[cos(alfa1),-sin(alfa1),0,0];[sin(alfa1),cos(alfa1),0,0];[0,0,1,0];[0,0,0,1]];
Transform with x3, then x1, then x2:
Sp2=x2*x1*x3*Sp
Sp2 = ##### 2 CommentsShow 1 older commentHide 1 older comment
William Rose on 3 Mar 2023
@Furkan KORKMAZ, you're welcome.