# Find normal vector of path

I created a path:

path[x_] := TriangleWave[x*3]

Sin[alpha]}}; (*vector*)

ParametricPlot[Flatten[vecPC], {alpha, 0, 2*Pi}, PlotStyle -> Blue,
ImageSize -> Medium, PlotRange -> 4]


Now I want to calulate the normal vector of the path at each point. How can you do it ?

As a plus: How can I display some normal vectors along the path ?

• – Artes Oct 24 '17 at 15:27

After simplifying your code quite a bit:

With[{BaseRadius = 3, h = 0.4, n = 45},
pos[t_] := (BaseRadius - TriangleWave[3 t/(2 π)]) {Cos[t], Sin[t]};
nrm[t_] = Normalize[Cross[pos'[t]]];
ParametricPlot[pos[t], {t, 0, 2 π},

• That's the dot product... unfortunately Cross[] is not compatible with 2-vectors (except in the use case I gave for generating a normal vector). That's why I was asking for the definition that you use, since you can just implement that manually. – J. M. will be back soon Oct 24 '17 at 15:12