View Full Version : normals for a curved surface?
how do I find the normal for a surface that is curved (not necessary perfectly round curve, in my case: cross section looks like a quarter circle). Also, to draw a 2D quarter circle, how i specfiy the coordinates along the arc?
01-06-2004, 07:02 PM
How to compute the normals depends on how you compute the curved surface itself. If you have a formula that describes the curved surface, you "only" need to find the plane that is tangent to the surface at the point where the vertex is, and from this, compute the perpendicular normal vector. Or, easier but probably with worse results, take all faces that share one specific vertex, compute all normal vectors of these faces, and take the average (which is simply adding the normals and normalizing the result).
thanx but i not very sure how to specify the curved surface also. I want to draw a surface which is a 3D quarter hollow cylinder. Can anyone guide me?
01-08-2004, 06:42 PM
if it's a cylinder, then the function that describes the curve probably simply is a cirle function, which is very easy (although I cannot post it from mind, but shouldn't be a problem to find *rhyming* *gg*).
for a curved surface (1/4 of a hollow cylinder), to find the normal that is pointing outwards from the "inner" surface, where is this normal?
01-11-2004, 10:01 PM
The normal for a point on the sides of a round cylinder is exactly the same vector as the distance between that point and the cylinder axis.
01-11-2004, 10:09 PM
If the cylinder is going along the Z axis for example, just take the coordinates for each vertex, set Z to zero and normalize it, that is the vertex normal.
The Graphics Gems code has complete code to create vertex normals for any mesh, it even includes "fuzziness" if you want it ;o)
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.