Sign in to follow this  
JoryRFerrell

How do I create a vector tangent to each point in a non-function defined surface/model?

Recommended Posts

JoryRFerrell    143

I am learning a little calculus (very little :P), and I am feeling a little impatient. I want to write a shader (completely unnecessary since OpenGL can handle lighting, but it's a puzzle I'd like to solve for several other reasons) and this is a useful bit of math involved apparently. But again, I am not hardcore in math, so I need some assistance. Can anyone help point me to resources covering the math involved in this technique or lay out the exact equation/s behind it? I found a possible solution that gives at least an approximation, for most situations, on yahoo answers which I'll try after this post, but I was wondering if there are any equations for handling every problem set definitively. I appreciate the help.

 

http://answers.yahoo.com/question/index?qid=20121229103849AACTgSg&r=w

Share this post


Link to post
Share on other sites

sounds like an XY situation: http://www.perlmonks.org/index.pl?node_id=542341

Why don't you describe what your actually trying to do?

 

You want to write a shader, a shader to do what? 

 

You mention lighting, you mean that you want to write a shader to emulate how opengl would do its lighting?

 

You're talking about 'vector tangent to a point', do you mean the surface normal? You need to specify those for opengl lighting in the first place, so lighting is not really the question here, it seems to me you have a mesh, and you want to find the normals for each vertex of the mesh's triangles.

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