1. ## calculating normals of quads

i know how to calculate normals for triangles, but how can I do this for quads? Any one an idea?

Diapolo

2. ## Re: calculating normals of quads

Exactly the same way.
Just use the first 3 points to calulate the normal from, and you're all set.

John

3. ## Re: calculating normals of quads

Only if the four vertices of the quad lie on the same plane you can use any 3 of the 4 points.

4. ## Re: calculating normals of quads

How can I calculate them, if they are not on one plane?

5. ## Re: calculating normals of quads

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:

Code :
```
A        B
+------+
|\     |
| \    |
|  \   |
|   \  |
|    \ |
|     \|
+------+
C        D```
then, you'll have two planar surfaces, hence two normals for that quad.

first, calculate the normal for triangle ADB, then for triangle ACD.

Dolo/\/\ightY

[This message has been edited by dmy (edited 03-24-2000).]

6. ## Re: calculating normals of quads

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)?

Diapolo

7. ## Re: calculating normals of quads

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

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•