7. As shown in the figure, a square $A B C D$ with side length 1 rolls along the positive direction of the $x$-axis, i.e., it first rotates clockwise around $A$, and when $B$ lands on the $x$-axis, it then rotates clockwise around $B$, and so on. When a vertex of the square $A B C D$ lands on the $x$-axis, it rotates clockwise around that vertex. Let the curve traced by vertex $C$ during the rolling be $y=f(x)$, then the expression for $f(x)$ on [2017,2018] is $\qquad$ .
Given $f(x)=f(x-504 \cdot 4)=\sqrt{1+2(x-2016)-(x-2016)^{2}}$.
Parse $y=f(x)=\left\{\begin{array}{ll}\sqrt{1+2 x-x^{2}} & , x \in[0,2] \\ \sqrt{4 x-x^{2}-3} & , x \in(2,3] \\ \sqrt{8 x-x^{2}-15} & , x \in(3,4]\end{array}\right.$.
Since $f(x)$ is a periodic function with a period of 4, when $x \in[2017,2018]$, $x-504 \cdot 4=x-2016 \in[1,2]$, at this point, by the periodicity and the result of (1), we get $f(x)=f(x-504 \cdot 4)=\sqrt{1+2(x-2016)-(x-2016)^{2}}$.