当前位置:网站首页>h t fad fdads
h t fad fdads
2022-06-12 16:18:00 【17506331945】
clc;
clear;
close all;
% rng(0);
% rand(1)*2*pi
%% W: world coordinate system
% 尺寸4X4,齐次矩阵,齐次坐标系
W = eye(4);
W(1:3,1:3)=W(1:3,1:3)*200; % 乘以200是为了使得坐标轴变长,便于作图时候显示
%% 变换(零)
% 动态参考坐标系DRF00,初始状态和世界坐标系完全重合
%(1)绕W的X轴旋转,(2)绕W的Y轴旋转,(3)绕W的Z轴旋转,
%(4)相对于W的坐标原点,沿着W的XYZ方向平移
roll_W_WtoDRF00 = pi/2;
pitch_W_WtoDRF00 = 0;
yaw_W_WtoDRF00 = 0;
EAZYX_W_WtoDRF00 = [yaw_W_WtoDRF00 pitch_W_WtoDRF00 roll_W_WtoDRF00];
TlZYX_W_WtoDRF00 = [200,200,-1000]';
HTfM_W_WtoDRF00= genHTfM_useEularAngle(EAZYX_W_WtoDRF00,TlZYX_W_WtoDRF00);
DRF00 = HTfM_W_WtoDRF00*W;
%% 变换(一)
% 动态参考坐标系DRF01,初始状态和世界坐标系完全重合
%(1)绕W的X轴旋转,(2)绕W的Y轴旋转,(3)绕W的Z轴旋转,
%(4)相对于W的坐标原点,沿着W的XYZ方向平移
roll_W_WtoDRF01 = pi/2;
pitch_W_WtoDRF01 = 0;
yaw_W_WtoDRF01 = 0;
EAZYX_W_WtoDRF01 = [yaw_W_WtoDRF01 pitch_W_WtoDRF01 roll_W_WtoDRF01];
TlZYX_W_WtoDRF01 = [100,100,-1010]';
HTfM_W_WtoDRF01= genHTfM_useEularAngle(EAZYX_W_WtoDRF01,TlZYX_W_WtoDRF01);
DRF01 = HTfM_W_WtoDRF01*W;
%% 变换(二)
% DRF02TMP0初始状态和对DRF01完全重合,对DRF02TMP0做如下变换,最终得到DRF02
%(1)DRF02TMP0绕DRF00的X轴旋转roll_DRF00_DRF01toDRF02,得到DRF02TMP1,
%(2)DRF02TMP1绕DRF00的Y轴旋转pitch_DRF00_DRF01toDRF02,得到DRF02TMP2,
%(3)DRF02TMP2绕DRF00的Z轴旋转yaw_DRF00_DRF01toDRF02,得到DRF02TMP3,即最终的DRF02
%
% 等价于:
% DRF02TMP0初始状态和对DRF01完全重合,对DRF02TMP0做如下变换,最终得到DRF02
% (一)坐标系A绕着坐标系B旋转,就把A和B看作一个整体,A和B同步做相同地变换,使得B和世界坐标系重合
% (1)把DRF02TMP0和DRF00看作一个整体,整体变换到DRF00和W完全重合,此时DRF00的状态记作DRF00TMP1,DRF02的状态记作DRF02TMP4
% (二)由于左乘是绕着世界坐标系旋转,此时B和世界坐标系重合,所以此时左乘即绕着坐标系B旋转。
% (2)DRF02TMP4绕DRF00TMP1的X轴旋转roll_DRF00TMP1_DRF02TMP4toDRF02TMP5,得到DRF02TMP6
% (3)DRF02TMP6绕DRF00TMP1的Y轴旋转pitch_DRF00TMP1_DRF02TMP4toDRF02TMP5,得到DRF02TMP7
% (4)DRF02TMP7绕DRF00TMP1的Z轴旋转raw_DRF00TMP1_DRF02TMP4toDRF02TMP5,得到DRF02TMP8
% (三)把A和B看作一个整体,A和B同步做相同地变换,使得B和B刚开始的位置重合
% (5)把DRF02TMP8和DRF00TMP1看作一个整体,整体变换到DRF00TMP1和DRF00完全重合,此时得到DRF02TMP9,即即最终的DRF02
roll_DRF00_DRF01toDRF02 = pi/2;
pitch_DRF00_DRF01toDRF02 = 0;
yaw_DRF00_DRF01toDRF02 = 0;
EAZYX_DRF00_DRF01toDRF02 = [roll_DRF00_DRF01toDRF02 pitch_DRF00_DRF01toDRF02 yaw_DRF00_DRF01toDRF02];
TlZYX_DRF00_DRF01toDRF02 = [0,0,0]';
EAZYX_W_DRF00toW = inv(HTfM_W_WtoDRF00);
HTfM_DRF01toDRF02 = genHTfM_useEularAngle(EAZYX_DRF00_DRF01toDRF02, TlZYX_DRF00_DRF01toDRF02);
HTfM_WtoDRF02 = HTfM_W_WtoDRF00 * HTfM_DRF01toDRF02 * EAZYX_W_DRF00toW * HTfM_W_WtoDRF01;
DRF02 = HTfM_WtoDRF02*W;
% 画图
axis_limit = 1200;
axis_limitA = [-axis_limit,axis_limit,-axis_limit,axis_limit,-1500,300];
figure(6)
title("figure(6)");
trplot(W,'frame', 'RW','color','r', 'axis',axis_limitA, 'text_opts',{'FontSize', 10, 'FontWeight', 'light'}, 'view','auto', 'thick',1, 'dispar',0.8);
hold on;
plot3(W(1,4),W(2,4),W(3,4),'ro')
hold on;
trplot(DRF00,'frame', 'R00','color','g', 'axis',axis_limitA, 'text_opts',{'FontSize', 10, 'FontWeight', 'light'}, 'view','auto', 'thick',1, 'dispar',0.8);
hold on;
plot3(DRF00(1,4),DRF00(2,4),DRF00(3,4),'go')
hold on;
trplot(DRF01, 'frame', 'R02', 'color', 'b', 'axis',axis_limitA, 'text_opts',{'FontSize', 10, 'FontWeight', 'light'}, 'view','auto', 'thick',1, 'dispar',0.8);
hold on;
plot3(DRF01(1,4),DRF01(2,4),DRF01(3,4),'bo')
hold on;
trplot(DRF02, 'frame', 'R07', 'color', 'k', 'axis',axis_limitA, 'text_opts',{'FontSize', 10, 'FontWeight', 'light'}, 'view','auto', 'thick',1, 'dispar',0.8);
hold on;
plot3(DRF02(1,4),DRF02(2,4),DRF02(3,4),'ko')
边栏推荐
- (四)GoogleNet複現
- Tensorflow function: tf nn. in_ top_ k()
- Object.keys遍历一个对象
- acwing 高精度乘法
- Project training of Software College of Shandong University rendering engine system basic renderer (VII)
- Axure RP 9 for Mac(交互式产品原型设计工具)中文版
- Learning record [email protected] understand canvas
- acwing 2816. Judgement subsequence
- 国产CPLD中AG1280Q48进行开发的实践之一:思路分析
- [browser principle] variable promotion
猜你喜欢

Step by step to create a trial version of ABAP program containing custom screen

Unicom Network Management Protocol block diagram

< 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(六)
![Analysis of global and Chinese shipbuilding market in 2021: the global shipbuilding new orders reached 119.85 million dwt, with China, Japan and South Korea accounting for 96.58%[figure]](/img/3e/b54b7f15c4a6326d8c7c4433388a3a.jpg)
Analysis of global and Chinese shipbuilding market in 2021: the global shipbuilding new orders reached 119.85 million dwt, with China, Japan and South Korea accounting for 96.58%[figure]

Homology? Cross domain? How to solve cross domain problems?

Thinking about the probability of drawing cards in the duel link of game king

看《梦华录》上头的人都该尝试下这款抖音特效

MYSQL---服务器配置相关问题
![Development status of China's pig breeding industry in 2021 and comparative analysis of key enterprises: 671million pigs were sold [figure]](/img/fd/5462c8c6deafeb7d7728716eb4db74.jpg)
Development status of China's pig breeding industry in 2021 and comparative analysis of key enterprises: 671million pigs were sold [figure]

Why doesn't Alibaba recommend MySQL use the text type?
随机推荐
<山东大学项目实训>渲染引擎系统(六)
acwing 803. 区间合并
IDEA中文棱形乱码错误解决方法--控制台中文输出棱形乱码
RTOS rt-thread裸机系统与多线程系统
< 山东大学软件学院项目实训 > 渲染引擎系统——辐射预计算(九)
Project training of Software College of Shandong University rendering engine system basic renderer (V)
盒马,最能代表未来的零售
In 2020, the demand for strain sensors in China will reach 9.006 million, and the market scale will reach 2.292 billion yuan [figure]
Explore the Apache shardingsphere SQL parse format function
面试:hashCode()和equals()
Interview: do you understand the packing and unpacking operations?
Interview: hashcode() and equals()
< 山东大学软件学院项目实训 > 渲染引擎系统——点云处理(十)
Multimix:从医学图像中进行的少量监督,可解释的多任务学习
线程池执行流程
Servlet API
<山东大学项目实训>渲染引擎系统(七)
Office VR porn, coquettish operation! The father of Microsoft hololens resigns!
acwing788. 逆序对的数量
[tool recommendation] personal local markdown knowledge map software