View Full Version : calculating normals of quads
03-22-2000, 11:26 AM
i know how to calculate normals for triangles, but how can I do this for quads? Any one an idea?
03-22-2000, 12:21 PM
Exactly the same way.
Just use the first 3 points to calulate the normal from, and you're all set.
Only if the four vertices of the quad lie on the same plane you can use any 3 of the 4 points.
03-24-2000, 06:49 AM
How can I calculate them, if they are not on one plane?
if the quad is not a plane, but it should be a single surface the same, then it is better known as a "patch": something like curved surfaces.
for a patch, there's not a unique normal.
but if the quad has to be considered not to be curved, you have to split it in two triangles:
| \ |
| \ |
| \ |
| \ |
then, you'll have two planar surfaces, hence two normals for that quad.
first, calculate the normal for triangle ADB, then for triangle ACD.
[This message has been edited by dmy (edited 03-24-2000).]
03-24-2000, 09:49 AM
One other question, is it better to use triangles instead of quads? Any difference in speed (which one is better to handle by the graphic chip)?
I think it's better to send triangles to OpenGL, because I think all poly's get converted to triangles anyway before they are sent to the card. (Someone correct me if I'm wrong). Also, with triangles you a) never have to worry about non-coplanar polys, which don't render correctly, and b) avoid some weird OpenGL clipping/lighting artifacts that sometimes happen when you use quads.
Also, you can use triangle strips and fans, which are fast http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.