# How to calculate the different angles the normal of a plane makes with the different axis in a 3D space?

I am working with point clouds and I need to find all of the angles (actually only that ones that the normal forms with the x axis and the z axis) of the normal in each point in my point cloud. The problem is that I don't quite understand how to calculate those values but I know it involves vector translation, vector projection and only working in 2D each time. Could someone please explain in detail how to approach this issue? I'm sorry if the question sounds confusing, I'm also having trouble finding the answer to this on the internet.

EDIT: I talked to the project manager. I need to calculate the angles that the normal makes with the different axis using the spheric coordinate system but I'm still having issues with understanding it.

• What do you mean by point cloud? – Larara Apr 15 '16 at 6:57
• A point cloud is a 3D graphical reconstitution of reality using points. link – Vlad Adrian Moglan Apr 15 '16 at 7:15
• Each point is just a point; it does not have a normal. If you have three points in 3D, those define a plane, and the plane does have a normal. Perhaps, if you were to draw a diagram (with only a few points) identifying a "normal" and what you want to calculate, we might be able to help. – Nominal Animal Apr 16 '16 at 0:59
• Ok so I didn't explain it well. I'm iterating through the cloud and for each point of the cloud I look for its two closest neighbours to form a plane. I then find the normal of that plane that has its origin in the point that's currently being treated. I have to find the angles that the normal makes with x and with z, I think they're called theta and phi of the spheric coordinate system. – Vlad Adrian Moglan Apr 16 '16 at 7:24
• Here is what my program should give as a result at the end (considering that it's given a point cloud as a parameter): point cloud normal visualisation – Vlad Adrian Moglan Apr 16 '16 at 7:29