Jump to content
  • Advertisement
Sign in to follow this  
vanpn

how do i calculate the tangent vector ?

This topic is 3628 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

Suppose i have a cubic spline C. I know the tangent vector at vertex t-1 on C. How can i calculate the tangent vector at the next vertex t?

Share this post


Link to post
Share on other sites
Advertisement
I use gluNurbs to create a cubic spline. So it's a Nurbs. I have 7 control points with 11 knots.

knots[11] = {0., 0., 0., 0., 1., 2., 3., 4., 4., 4., 4.}

[Edited by - vanpn on July 18, 2008 2:38:55 AM]

Share this post


Link to post
Share on other sites
The first derivative ? What do u mean ? I don't know. I don't have.

My program connect to a tablet, so each time i use the device "pen" put a pressure on tablet, those control point will change -> the curves change too. I manage to draw the curve, used opengl commands, but i need to know the tangent vector of each point on the curve.

In original form, 7 control points form a vertical line. With pressure, they make a curve.

Share this post


Link to post
Share on other sites
Quote:
Original post by oliii
the first derivative?


I've been wondering this same thing. If he's using a basis matrix to control his spline with a matrix of MCT with T being the time matrix of [1 t t2 t3] and 'M' being the basis matrix and 'C' being the matrix of coefficients would taking the first derivative simply involve multiplying the 'M' and 'C' matrices by the derivative of 'T'?

In other words would he have MCT with T being [0 1 2t 3t2]?

Furthermore would the normal at this point being taking the second derivative of T which would be [0 0 2 6t]?

Thanks.

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!