PDA

View Full Version : Display normals of a geometry



debonair
10-12-2013, 03:32 PM
I have a rectangle which is created by 2 triangles and it is in x-z plane, and i have object on it. Now, the normals of two triangles (face normals) are y axis i.e. (0,1,0). I want to display normals of two triangles for which i need two points to draw a line to show normal. Intuitively if i take center of a triangle as one and (0,1,0) as second point of a normal then both of the normals will converge to single point. I dont think it is correct as the normal should be exactly perpendicular to the surface. We can do a trick and take one point as a center and other by increasing y coordinate keeping x and z same, but what if we have curved surface and not a plane board? What about the cylinder made of triangles? How could we display normals as a lines of cylinder? I guess i am missing very basic concept here, please help me to understand it and tell me how to calculate the two points of normal.

carsten neumann
10-13-2013, 12:50 AM
Take the center of the triangle as one point, and center of the triangle plus the normal as the other.

debonair
10-13-2013, 11:44 AM
Take the center of the triangle as one point, and center of the triangle plus the normal as the other.
Thanks..!!