Jump to content

Calculating surface normals

Featured Replies

Given 3 points in 3D space as cartesian coordiantes (a triangle) I need to calculate the normal for a 3D graphing program I am making. I haven't done any calculus that might help with this and I don't know about linear algebra so Wolfram's solution is of no help:

 

For a polygon (such as a triangle), a surface normal can be calculated as the vector cross product of two edges of the polygon.

 

Can anybody please translate this into an algebraic solution for me? Thankyou.

Cross product:

 

http://planetmath.org/encyclopedia/CrossProduct.html

 

If your triangle has vertices given by the vectors u,v,and w, then take a=v-u and b=w-u (not the only choices), these will be vectors in the directions of two of the sides. axb and bxa will both give normals, but in opposite directions, axb=-(bxa)

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.