Jump to content
CinnamonMetal

Find tangent direction of point ?

Recommended Posts

To rotate vector (N) with matrix (you can also rotate vector with quaternions or euler):
 

// Set orientation vector: normal
@N = {1,0,0};
// create matrix
matrix3 matrx = ident();
float angle = -radians(chf('Rotation_Y'));
// rotate matrix
rotate(matrx, angle, {0,1,0});
// Apply rotation
@N *= matrx;

To create a vector from 2 points you just need to subtract their positions.  If you have only one point you can use origin as a second position.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Ok, how do you get two vectors to point at each other, or that ties in with vector subtraction.

 

Edited by CinnamonMetal

Share this post


Link to post
Share on other sites

I did not understand your question, Christopher... 
But the position of a vector does not matter (if we are not speaking about the spetial type of vectors - positional vectors), you can move a vector anywhere in 3D space and it would be the same vector.  

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

×