Tranform a point another coordinate system

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 件のコメント

William Rose
William Rose 2023 年 2 月 28 日
Please provide more information. What are the three transform matrices you have? What transformations do they represent? Translate, rotate, perspective, etc?
A key question when you have multiple transformation matrices is the order in which to apply them. To answer that question, give a clear description, with words or equations or both, of how the coordinate systems are related.
Furkan KORKMAZ
Furkan KORKMAZ 2023 年 3 月 1 日
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
William Rose 2023 年 3 月 1 日

0 投票

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 件のコメント

Furkan KORKMAZ
Furkan KORKMAZ 2023 年 3 月 3 日
Thank you, I need a numerical solution and this one is solved my problem. Thank you again.
William Rose
William Rose 2023 年 3 月 3 日
@Furkan KORKMAZ, you're welcome.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by