I am having a hard time with my Computer Aided Graphic Design class. I am presented with the bezier control polygon (in a Mathematica statement):

P = Table[{x^2, x^3, 0}, {x, 4,7}]

And the questions:

Given the curve P, display the point on the curve and the tangent vector there for t=[0,1]. Use the manipulate function.

My question isn't how to do this in Mathematica (yet). I know I need to come up with a parametric equation, but I am not sure how to go from the table to a parametric equation. Then I need to calculate the tangent, which should just be the derivative...?

I am desperately confused on what this question is asking. Hopefully someone can kind of explain the steps needed to display a tangent vector at a given point on a Bezier curve.


I can only make an educated guess as to what you are being asked to do.

The given table expands to $$ (4^2,4^3,0), \; (5^2, 5^3,0), \; (6^2,6^3,0), \; (7^2,7^3,0) $$ which is $$ (16,64,0), \; (25,125,0), \; (36, 216, 0), \; (49,343,0) $$ You said this table of four points is supposed to be used as the control polygon of a Bézier curve. So, the parametric equation of this Bézier curve is $$ \mathbf{P}(t) = (1-t)^3(16,64,0) +3t(1-t)^2(25,125,0) +3t^2(1-t)(36,216,0) + t^3(49,343,0) $$ The tangent direction at the parameter value $t$ is in the direction of the first derivative vector, which you can get by differentiating the equation above. To draw a tangent, just draw a line from $\mathbf{P}(t)$ to $\mathbf{P}(t)+k\mathbf{P}'(t)$. Choose the value of $k$ to give the tangent lines the right length for a good-looking display. Using $k=1/3$ would probably work ok.

Code all this in Mathematica, and use the Manipulate function to animate the tangent line as $t$ varies from $0$ to $1$.

  • $\begingroup$ Oh you are a life saver... Thank you so much. $\endgroup$ – rphello101 Feb 12 '14 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.