Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
A problem I am struggling with related vectors (Graphics).
Post Body

So, I have been playing with some 3D graphics and have been implementing various functions for fun. My problem is currently this:

If you have a model, and you want to shade a face based on the angle made between the normal vector of that face and another pointing to an arbitrary point in space from the center of the face. If the angle is less than 90 degrees, you shade, otherwise don't.

Everything is pretty straightforward formula calculations except the part about the normal. Since there are two normals to a plane, one of the angles will always be >= 90 degrees. If we calculate the normal vector by traditional methods, we might possibly end up with a vector pointing into the model. This will incorrectly calculate the degree of shading and will be unpredictable.

So, math people, how would you determine if the normal of a face in a model is pointing outward and not into the model itself?

I understand the right-hand rule, but I need a more algorithmic approach.

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
12,240
Link Karma
672
Comment Karma
11,548
Profile updated: 6 hours ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
12 years ago