<p>I'm making a raytracer and want to print debug arrows</p>

<p>Blender example:<br>
<a href="https://i.sstatic.net/z2hGH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/z2hGH.png" alt="enter image description here"></a></p>

<p>Old version of 3d max:<br>
<a href="https://i.sstatic.net/5lRWz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5lRWz.png" alt="enter image description here"></a></p>

<p>How do I do the same having camera forward, up and right vector?
I think I need some kind of matrix transformation? Can it be done without using matrices?</p>

CC BY-SA 4.0
2020-05-27T07:52:45.647Z
I don't really understand what your problem is here. Yes, you want to draw a small coordinate system, but why is this a problem? What are you struggling with? Which API/Engine do you use? If you are somewhat familiar with a Graphics API like OpenGL or DirectX, drawing such a coordinate system is rather easy. So please tell us a little bit more about your problem.
wychmaster
CC BY-SA 4.0
2020-05-27T16:30:08.707Z
Hi Herrgott, each raytracer needs some sort 3D transformations to place, rotate and scale all the objects in the scene correctly. Such transformations are mostly represented by matrices, since that is mathematically the most natural and easiest way. You should not try to avoid matrices (my impressions is you do). So briefly: 1) You may create the helper object as part of the raytraced scene, attached to the camera, 2) or you can render them as an overlay using rasterization. In my opinion the second approach is more suitable for your use-case.
Isolin
<3d><transformations>
How to transform x-y-z red-green-blue arrows and draw them on 2D screen?
IC_
# How to transform x-y-z red-green-blue arrows and draw them on 2D screen?

(Asked by: username_0 on 2020-05-27)

I'm making a raytracer and want to print debug arrows

Blender example:  
[![enter image description here](https://i.sstatic.net/z2hGH.png)](https://i.sstatic.net/z2hGH.png)

Old version of 3d max:  
[![enter image description here](https://i.sstatic.net/5lRWz.png)](https://i.sstatic.net/5lRWz.png)

How do I do the same having camera forward, up and right vector?
I think I need some kind of matrix transformation? Can it be done without using matrices?

**Tags:** 3d, transformations

> **Comments:**
> **username_1**: I don't really understand what your problem is here. Yes, you want to draw a small coordinate system, but why is this a problem? What are you struggling with? Which API/Engine do you use? If you are somewhat familiar with a Graphics API like OpenGL or DirectX, drawing such a coordinate system is rather easy. So please tell us a little bit more about your problem.  
> **username_2**: Hi Herrgott, each raytracer needs some sort 3D transformations to place, rotate and scale all the objects in the scene correctly. Such transformations are mostly represented by matrices, since that is mathematically the most natural and easiest way. You should not try to avoid matrices (my impressions is you do). So briefly: 1) You may create the helper object as part of the raytraced scene, attached to the camera, 2) or you can render them as an overlay using rasterization. In my opinion the second approach is more suitable for your use-case.  

---

## 0 answers

