Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find the normal and tangent of acceleration. I know the formula for the tangent of acceleration is $((Acceleration . Velocity)/(Velocity.Velocity))*Velocity$ and the normal of acceleration is the same but with $Velocity$ replaced with the perpendicular of velocity. I think my errors arise because I am trying to manipulate parametric functions incorrectly.

Anyway, here is my attempt:

x[t_] = 2 Sin[t]; 
y[t_] = 6 Sin[t/2]^2;
z[t_] = 3 Cos[t];
P[t_] = {x[t], y[t], z[t]}; 

curveplot = ParametricPlot3D[P[t],{t,1,6},PlotStyle->Thickness[0.01]];
velocity[t_] = {x'[t], y'[t], Z'[t]};
acceleration[t_] = {x''[t], y''[t], z''[t]};

atan[t_] = ((acceleration[t].velocity[t])/(velocity[t].velocity[t]))*velocity[t];
tanvector[t_]:= Vector[atan[t],Tail->P[t],VectorColor->Blue]

  PlotRange -> All, AxesLabel -> {"x","y","z"}]

This question is different from this question: Finding unit tangent normal and binormal vectors because I am asking for the tangent and normal of acceleration using the equation: $((Acceleration . Velocity)/(Velocity.Velocity))*Velocity$.

I am missing an undertanding of how to manipulate parametric plots.

share|improve this question
Please note that you can format your question better using Markdown. See for more information the question mark button at the top right of the edit box – Sjoerd C. de Vries Jun 23 '13 at 21:31
Site users are accustomed to read code formatted as I have done (and as Sjoerd hinted that you do). It's hard for users to quickly parse unformatted code. With it now being formatted, one thing that pops out is that for the Dot product, you should use a period, not a center dot: acceleration[t].velocity[t], and so forth. – Michael E2 Jun 24 '13 at 0:02
I'd like to believe this site is useful for some people, but so far, it seems like people just mark questions as duplicates because they dont feel like responding. These duplicates end up being related only by name and not by solution. Sigh... I'll search for a different forum. – J. Musk Jun 24 '13 at 0:53
@J.Musk - I have reopened your question for the time being. Please understand that people aren't closing questions because they don't feel like answering them; sometimes they can be genuinely misled by confusing terminology, as in this case. Please also understand that everyone here is volunteering their own time to help others with their questions, and it helps us to help you if you provide complete minimum working examples and make some effort to format your post to be legible. – Verbeia Jun 24 '13 at 4:32
@J.Musk - I'd also point out that marking a question is duplicate is not the same as closing it for some problem (e.g. being off-topic). It is not intended as negative feedback. It's a device for saving everyone some time. If your issue has already been answered adequately elsewhere, then you will get quicker resolution by being pointed to that answer than by waiting for someone to come up with another version of the same solution. – Verbeia Jun 24 '13 at 4:40
up vote 2 down vote accepted

You had a typo in the definition of velocity: capital Z instead of z. With this typo fixed, you may be able to get the result you want. However, I can't use your plot commands directly to verify this because Vector isn't defined. So I use a simple replacement by Arrow for this purpose:

Clear[t, x, y, z, P, velocity, acceleration, atan, tanvector];
x[t_] = 2 Sin[t];
y[t_] = 6 Sin[t/2]^2;
z[t_] = 3 Cos[t];
P[t_] = {x[t], y[t], z[t]};

curveplot = 
  ParametricPlot3D[P[t], {t, 1, 6}, PlotStyle -> Thickness[0.01]];
velocity[t_] = {x'[t], y'[t], z'[t]};
acceleration[t_] = {x''[t], y''[t], z''[t]};

atan[t_] = ((acceleration[t].velocity[t])/(velocity[t].velocity[t]))*
tanvector[t_] := {Blue, Arrow[{#, # + atan[t]} &@P[t]]}

Show[curveplot, Graphics3D@Table[tanvector[t], {t, 1, 6, (6 - 1)/10}],
  PlotRange -> All, AxesLabel -> {"x", "y", "z"}]


share|improve this answer
Also, some typing can be saved with atan[t_] := Projection[acceleration[t], velocity[t]] – Suba Thomas Jun 24 '13 at 20:09
@SubaThomas Correct, but I wanted to minimize any changes to the original code because it's only the typo that caused the actual problem. – Jens Jun 24 '13 at 20:21
Point taken. Probably I should have added this comment after the question. – Suba Thomas Jun 24 '13 at 20:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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