Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Tangent and its projection

This topic is 3557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
I think you need to explain better what you mean. A tangent is normally a vector used to describe the direction of a path at certain point. A vertex has no direction, its just a point in space.

Share this post


Link to post
Share on other sites
Given that you have a mesh, each vertex is shared by a set of triangles. Estimate a vertex normal, say, by averaging the normals of the triangles sharing the vertex and then normalizing that average. You now have the vertex position P and vertex normal N, so the tangent plane to the vertex is defined by Dot(N,X-P) = 0, where X is any point on the plane.

You have a lot of tangents to choose from. For one of these tangents, call it T, and an edge direction vector D, you can project T onto D in the usual manner. Perhaps instead you want this the other way around: Given an edge direction D, find a tangent vector T that "points in the D direction as close as possible". You simply project D onto the tangent plane (and then normalize the projection).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!