Sign in to follow this  
kneeride

sine + normal

Recommended Posts

Any point on this curve will be at (x, sin x)

dx/dx=1 and d(sin x)/dx=cos x

So the vector (1, cos x) will point in the direction of the tangent. The normal is perpendicular to the tangent, which gives us (-cos x, 1). Remember to normalise this if you need a unit vector.

[Edited by - Jaywalk on May 3, 2007 4:28:00 AM]

Share this post


Link to post
Share on other sites
Great formula!

I however find my results are perpendicular to the normal.

eg.
sin(pi / 2)
from looking at the graph, the normal is (0, 1) ie pointing straight up.

However when i apply the formula:

n = (1, cos(pi / 2)) = (1, 0)

The normal points in the x direction which is perpendicular to what i was expecting.

Share this post


Link to post
Share on other sites
In 2 dimensions, there's an easy formula for finding perpendicular vectors. A vector (x, y) will be perpendicular to (-y, x).

If you ever happen to need to find perpendicular vectors in 3 or more dimensions then research how to perform a "cross product".

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