I am trying to plot a number of lines from a point on the segment connecting points from a given list of points to the coordinate origin (0,0). Since I want to automate this procedure, I am using \foreach. When I am trying to use the calc features to calculate the coordinates of the points I am running into an error.
Here is my code
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\def\points{(-2,0), (-1.2, 1), (0, 1.55), (0.8, 1.65), (1.3, 1.4), (2, 0.1), (1.8, -0.7), (1,-1.6), (-1, -1)}
\begin{document}
\begin{tikzpicture}
\foreach \p in \points{
\draw[gray!80!white] \p--(0,0);
\draw[gray, ->] \p--($\p!0.1!(0,0)$);}
\end{tikzpicture}
\end{document}
And here the error:
File ended while scanning use of \tikz@cc@parse@factor.
Note that this question is different from this one since I do not use the axis environment.

...!(0.0)$), it should be...!(0,0)$). – Alenanno Jan 16 '18 at 13:56(at the begining, like this$(\p!0.1!(0,0)$– Kpym Jan 16 '18 at 20:27