(*Motion of a mass M on a rotating turntable *)
(* Forces: weight, normal, friction (static or kinetic). If kinetic, the friction force is opposite to the relative velocity *)
(* In a fixed (x,y) frame *)
(* At a point (x,y) *)
vP[t_]= ω{-y[t], x[t]};
vM[t_] = {x'[t], y'[t]};
vrel[t_] = vM[t] - vP[t];
urel[t_] = Normalize[vrel[t]];
(* Equations of motion *)
r = 0.1;
g = 9.81;
μk = 0.5;
r0 = 0.1;
μs = 0.8;
ω = (Sqrt[((μs g)/r) ]);
tmax = 1;
x0[t_] =  Cos[ω t];
y0[t_] = Sin[ω t];
sol = NDSolve[{-μk  g urel[t][[1]] == x''[t], -μk  g urel[t][[2]] ==y''[t],x'[0]== 0, y'[0]==ω r * 0.999, x[0] == r0, y[0] == 0}, {x, y}, {t, 0, tmax}] ;
ParametricPlot[{(x[t]/.sol)[[1]], (y[t]/.sol)[[1]]}, {t, 0, tmax}]
Manipulate[Show[{Graphics[{White, Rectangle[{-1, -1}, {1, 1}], Black, Thick, Line[{{x0[t], y0[t]}, {-x0[t], -y0[t]}}],Blue, Line[{{x0[t + (π/(2 ω))], y0[t+ (π/(2 ω))]}, {-x0[t+ (π/(2 ω))], -y0[t+ (π/(2 ω))]}}],Black, Circle[{0, 0}, 1], Red, Disk[{(x[t]/.sol)[[1]], (y[t]/.sol)[[1]]}, .04]}], ParametricPlot[{(x[u]/.sol)[[1]], (y[u]/.sol)[[1]]}, {u, 0, tmax}, PlotStyle ->  Directive[Red,Dashed, Thick]]}], {t, 0, tmax}]