how do i calculate the tangent vector ?

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

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 on other sites
How the cubic spline is defined/represented?

Share on other sites
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 on other sites
the first derivative?

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 on other sites
Quote:
 Original post by oliiithe 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.

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 14
• 14
• Forum Statistics

• Total Topics
633387
• Total Posts
3011608
• Who's Online (See full list)

There are no registered users currently online

×