# Find tangent direction of point ?

## Recommended Posts

How to find the tangent direction of a point ?

Edited by CinnamonMetal
##### Share on other sites

I should have said, how can I rotate a tangent vector ?

##### Share on other sites

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();
// 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.

##### Share on other sites

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

Edited by CinnamonMetal
##### 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 on other sites

Thanks it helped

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• #### Support

×
• Create New...