
Rendering Normal
Hi all.
I am looking for an explaination of how to render a normal for a polygon in 3D using OpenGL.
Specifically I have my 3D normals calculated for a polygon/plane, but I want to be able to draw a 3d line to display it to visually make sure it is correct.
Source code would be appreciated
shumner-

I am not sure if this would work but...
You could just find the point that is the center of you plane/polygon and then use the normal vector to find where the second point is (ie. where the vector is pointing) and use these two points to draw a 3D line
You could just find the point that is the center of you plane/polygon and then use the normal vector to find where the second point is (ie. where the vector is pointing) and use these two points to draw a 3D line
---Ranok---
Thanks for the quick reply to my post. I appreciate it.
OK, I can find the center of the triangle ( already wrote that code just in case it popped up
)
Now, how would I directly determine the direction the normal is pointing to derive teh second point ( figuring that the line should have length of 5 to 10 units.
Could I just do a sum of the center coordinate location nd the normal vector to get the 2nd point? Then just scale it by the length I want?
shumner-
OK, I can find the center of the triangle ( already wrote that code just in case it popped up

Now, how would I directly determine the direction the normal is pointing to derive teh second point ( figuring that the line should have length of 5 to 10 units.
Could I just do a sum of the center coordinate location nd the normal vector to get the 2nd point? Then just scale it by the length I want?
shumner-
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement