<p>I'm an embedded developer here with very little experience in computer graphics. I'm currently working on a GUI that can display a calculated inertial solution at run time. I have hardware that can send an IMU's attitude (pitch, roll, and heading angles) to a PC. Currently I can display those numbers on the screen in real time, which change as I move the IMU in my hand. However, at the moment they are only numbers on a screen.</p>
<p>I'm wanting to take it to the next level and display 3 orthogonal vectors rotating around a fixed reference frame (see screenshot attached). This rotation would take place in real time. The entire inertial solution is already calculated elsewhere, and outputs the 3 Euler angles required for the rotation. As far as the math goes, I think I'm moderately comfortable with the rotation matrix required here, I just don't know the best way to go about implementing this in terms of what software/libraries/programs to use. I also don't know if I'm over trivializing the effort here. Can someone point me in the right direction on how to implement this on the graphics side of things?
<a href="https://i.sstatic.net/2v3hY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2v3hY.png" alt="Real time inertial solution rotation displayed " /></a></p>

CC BY-SA 4.0
2023-03-04T21:34:53.420Z
Welcome to computer graphics stack exchange! Where do you want to render this visualization? Have you experience in opengl directX or any other computer graphics library? On which operating system should your program work? Do you already have a canvas to render to? Please share some information to us to help you
Thomas
CC BY-SA 4.0
2023-03-05T01:17:29.283Z
1. Rendering could take place in a separate window from my main GUI. I'm not too picky about where in this case. 
2. I do not have experience in those, and am looking for guidance where to start. I only do embedded development, so graphics is a completely new subject. 
3. Windows 10 and 11. 
4. What do you mean by canvas?

Thank you for your reply as well.
Henry Gilbert
CC BY-SA 4.0
2023-03-05T03:03:40.853Z
What framework or API are you using to create your _existing_ GUI? What you're looking for is a **very** simple 3D graphic, so it would be easy to compute the necessary points and draw it in real time using almost any drawing API. But knowing what you have already will determine what the easiest thing to add is.
Kevin Reid
CC BY-SA 4.0
2023-03-05T04:05:38.453Z
Kevin Reid, the existing GUI is built using DearImGui. My plan was to use the c++ application in DearImGUI to place the Euler angles in a shared memory structure (File Mapping since I'm on windows). Another application, capable of drawing the 3D graphic, could read the Euler angles from the shared memory and perform all necessary drawing. Is this a reasonable approach?
Henry Gilbert
<rendering><3d><matrix>
How to display real time 3-D orthogonal vector rotations?
Henry Gilbert
# How to display real time 3-D orthogonal vector rotations?

(Asked by: username_0 on 2023-03-04)

I'm an embedded developer here with very little experience in computer graphics. I'm currently working on a GUI that can display a calculated inertial solution at run time. I have hardware that can send an IMU's attitude (pitch, roll, and heading angles) to a PC. Currently I can display those numbers on the screen in real time, which change as I move the IMU in my hand. However, at the moment they are only numbers on a screen.

I'm wanting to take it to the next level and display 3 orthogonal vectors rotating around a fixed reference frame (see screenshot attached). This rotation would take place in real time. The entire inertial solution is already calculated elsewhere, and outputs the 3 Euler angles required for the rotation. As far as the math goes, I think I'm moderately comfortable with the rotation matrix required here, I just don't know the best way to go about implementing this in terms of what software/libraries/programs to use. I also don't know if I'm over trivializing the effort here. Can someone point me in the right direction on how to implement this on the graphics side of things?
[![Real time inertial solution rotation displayed ](https://i.sstatic.net/2v3hY.png)](https://i.sstatic.net/2v3hY.png)

**Tags:** rendering, 3d, matrix

> **Comments:**
> **username_1**: Welcome to computer graphics stack exchange! Where do you want to render this visualization? Have you experience in opengl directX or any other computer graphics library? On which operating system should your program work? Do you already have a canvas to render to? Please share some information to us to help you  
> **username_0**: 1. Rendering could take place in a separate window from my main GUI. I'm not too picky about where in this case.  2. I do not have experience in those, and am looking for guidance where to start. I only do embedded development, so graphics is a completely new subject.  3. Windows 10 and 11.  4. What do you mean by canvas?  Thank you for your reply as well.  
> **username_2**: What framework or API are you using to create your _existing_ GUI? What you're looking for is a **very** simple 3D graphic, so it would be easy to compute the necessary points and draw it in real time using almost any drawing API. But knowing what you have already will determine what the easiest thing to add is.  
> **username_0**: username_2, the existing GUI is built using DearImGui. My plan was to use the c++ application in DearImGUI to place the Euler angles in a shared memory structure (File Mapping since I'm on windows). Another application, capable of drawing the 3D graphic, could read the Euler angles from the shared memory and perform all necessary drawing. Is this a reasonable approach?  

---

## 0 answers

