Bezier quadratic curve: calculate tangent

I have a quadratic Bezier curve, and I want to calculate the slope of the tangent at a given point. For example, let it be the midpoint of a quadratic Bezier curve, so t = 0.5 (see the link below to illustrate this). I calculated the first derivative of the formula for a quadratic Bezier curve; however, I get 400 as the value for the slope, although it should be 0. Maybe I'm using the first derivative incorrectly? I know that I could also calculate tangents using trigonometric functions; however, I would like to do this using the first derivative, isn't that possible? Thanks for any hint!

For clarification / note: I'm interested in a general way to get the slope at an arbitrary given point on a quadratic Bezier curve, and not just to get the tangent at the start and end point.

Image of my problem, including the text above: http://cid-0432ee4cfe9c26a0.skydrive.live.com/self.aspx/%c3%96ffentlich/Quadratic%20Bezier%20Curve.pdf

Thanks so much for any hint!

+5
source share
2 answers

Using the formula for B'(t)estimated in t=1/2, we obtain

B'(1/2) = -P0 + P2

From the look of your graph, P0 = (0,0) and P2 = (400,0). So

B'(1/2) = (400,0).

This is the "speed" of a point moving along B (t) at t = 1/2.

(400.0) is a horizontal vector with a magnitude of 400.

, , . B '(t) , "" 0.

+4

+1

All Articles