필터 지우기
필터 지우기

Rotate around 2 axes in VRsink

조회 수: 1 (최근 30일)
Stefan Zeller
Stefan Zeller 2017년 6월 25일
댓글: Andreas Bernatzky 2018년 4월 25일
Hello, is it possible to rotate a box around 2 axes separately by using the VR sink in Simulink? Because its just possible to have one input with the angle and one rotation axis. Thanks!

답변 (1개)

Mandar Patwardhan
Mandar Patwardhan 2017년 6월 27일
In order to rotate an object around 2 axes separately, use euler angles and convert 2 axes rotation into one quaternion and then provide this axis input to the VR Sink.
eul = [0 pi/2 0];
qZYX = eul2quat(eul);
Take the last three values of qZYX and provide them as axes for the VR Sink. Note that default order is ZYX for this function. so [0 pi/2 0] means 0 in Z, 90 is Y and 0 in X.
  댓글 수: 1
Andreas Bernatzky
Andreas Bernatzky 2018년 4월 25일
Hi Mandar,
I have one additional Question. If i have the passed Angle over time (in Rad) by two axes (x and y axis). I can directly go into eul=[0 passed Angle-Y passed Angle-X]; and use eul2quat(eul) afterwards and send it into vrsink. The problem is it looks kinda strange but your explanation seems really simple.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by