Sign in to follow this  
Si_con

Vector 2D normals

Recommended Posts




Having a 2D Vector (x,y), it has two normals, (-y,x) and (y,-x). If you make a function that returns the normal of a 2d vector, which of both is usually more useful? i mean for return that and not the other.

Share this post


Link to post
Share on other sites
Generally, it will make no difference as long as you are consistent. The only times I can think in which it would make a difference is for instance computing the edge normals for a polygon; depending on the polygon winding (clockwise or anticlockwise) one normal or the other would point into the polygon or out of the polygon.

Share this post


Link to post
Share on other sites
As long as you are consistent you should be ok with either conventions. I think it's more common to use (-y,x) since it represents a “positive” rotation of 90° and { (x,y), (-y,x) } is a positively oriented basis (it has the same orientation of the current basis). It also corresponds to the multiplication by the imaginary unit when using complex numbers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this