# Thread: need help with my maths

1. ## need help with my maths

I want to know if a face is visible.

I have the normal at the faces (at the begining) and I only translate along Oz (in global coordinates) or rotate around Ox and Oy (in local coordinates).

I must calcute (view vector).(face normal) but how can I obtain the face normal ?

2. ## Re: need help with my maths

If you know the vertex's of the face...
(v1 - v2) . (v3-v2)

i.e. the dotproduct of two of the faces (polygons) edges (vectors).

gav

3. ## Re: need help with my maths

You can transform your face normals too to global coordinates.

Only the affine part of your transformation matrix should be applied to the normal(upper left 3*3 part of a 4*4 matrix).

If you do not use matrices, you should apply only rotation to your normal, around the origin of the global coordinate system.

4. ## Re: need help with my maths

I don't want to criticise him ,
but his method is just not correct.
A dot product returns a scalar not a vector.
You can obtain the normal by calculating

(v1-v2)x(v3-v2)

(cross product), but transforming is more efficient(generally).

5. ## Re: need help with my maths

haha, sorry, and I was only doing it yesterday.......
Just been doing angles between vectors and that threw me off....

#### Posting Permissions

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