Does the centroid depend continuously on the curve? Let $\gamma$ be a piecewise smooth curve in $\mathbb{R}^n$.  Recall that the centroid of $\gamma$ is the point $(\overline{x}, \overline{y})$ where $\overline{x}$ is the average value of $x$ on $\gamma$ and $\overline{y}$ is the average value of $y$ on $\gamma$:
$$\overline{x} = \frac{1}{\text{Length}(\gamma)} \int_\gamma x\, d\gamma, \hspace{1cm} \overline{y} = \frac{1}{\text{Length}(\gamma)} \int_\gamma y\, d\gamma$$

My question is: if $\gamma_n$ is a sequence of piecewise smooth curves which converge uniformly to a piecewise smooth curve $\gamma$, is it true that $(\overline{x_n}, \overline{y_n}) \to (\overline{x}, \overline{y})$?  If it is more convenient to replace "piecewise smooth" with "rectifiable" or something else, I don't mind.

A hint that this might not be completely trivial is the observation that $\text{Length}(\gamma_n)$ need not converge to $\text{Length}(\gamma)$: the standard example is a sequence of finer and finer staircase curves converging uniformly to a diagonal line.  However, the sequence of centroids does converge to the right limit in this example.
 A: Given any curve $\gamma:[0,1]\to\mathbb R^3$, any point $p$ in the convex hull of the image $\gamma([0,1])$, and any $\epsilon>0$, we can find a $\gamma':[0,1]\to\mathbb R^3$ so that $|\gamma(t)-\gamma'(t)|<\epsilon$ and the centroid of $\gamma'$ is $p$.
This follows from the "convex integration" technique of Gromov, which in this case is rather trivial: just add a bunch of small fast loops to $\gamma$ near various points in $[0,1]$ to jack up their weight in the definition of the centroid.
A: Here is how one can construct many counterexamples using curves given as graphs   of $C^1$-functions $\newcommand{\bR}{\mathbb{R}}$ $[0,1]\to \bR. $
Take a sequence of $C^1$ functions $f_n:[0,1]\to[0,\infty)$ withe the following properties.
1. $f_n$ converges $C^0$ to $0$.
2. The restriction of $f_n$to $[0,1/2]$ converges  $C^1$ to $0$.
3. The length  $L_n$ of the graph of  the function $f_n$ goes to $\infty$.
4. The  graph of $f_n\bigl|_{[1/2,1]}$ is symmetric about the vertical line $x=3/4$.
(Think of $f_n$  along $[1/2,1]$ as a  wave  with $2n^2$ humps  of height $1/n$ symmetrically arranged about the vertical line $3/4$.
The $x$-coordinate of the barycenter of the limiting graph is $x_\infty=1/2$.  Denote by $x_n$  the  $x$-coordinate $x_n$ of the barycenter of  the graph of $f_n$.  I claim that $x_n$ converges  as $n \to\infty$ to a limit $\neq x_\infty$.
We have
$$ x_n=\frac{\int_0^{1/2} x\sqrt{1+|f'_n|^2} dx+\int_{1/2}^1 x\sqrt{1+|f'_n|^2} dx}{L_n'+L_n''},$$
where
$$  L_n':=\int_0^{1/2} \sqrt{1+|f_n'|^2} dx,\;\;L_n'':= \int_{1/2}^1 \sqrt{1+|f_n'|^2} dx. $$
Note that as $n\to\infty$ we have
$$\int_0^{1/2} x\sqrt{1+|f'_n|^2} dx= \frac{1}{8}+o(1),\;\;L_n'=\frac{1}{2}+o(1)$$
while
$$L_n''\to\infty. $$
On the other hand the $x$-coordinate of the barycenter of the graph  $f_n\bigl|_{[1/2,1]}$ is $3/4$ due to the symmetry of this function.  Hence
$$ \int_{1/2}^1 x\sqrt{1+|f'_n|^2}=\frac{3}{4}L_n''. $$
We deduce
$$x_n=\frac{ \frac{1}{8}+o(1)+\frac{3}{4}L_n''}{\frac{1}{2}+o(1)+L_n''}. $$
This shows that $x_n\to \frac{3}{4}\neq x_\infty$ as $n\to \infty$.
A: The answer is "no". In the unit square, take the "half-finished staircase" converging to left half of the diagonal line with its right half running straight along the diagonal (see drawing below). The sequence of these "combined" curves converges uniformly to the diagonal, but the centroids do not converge to the midpoint of the diagonal.
Added by request: The length of the left-hand half is $\sqrt2$ times the length of the right-hand half, and the centroid of each of the two pieces is in its middle. Therefore the centroid of every curve in the sequence is the weighted average $\frac{\sqrt2(1/4,\ 1/4) + (3/4,\ 3/4)}{1+\sqrt2}\neq(1/2,1/2)$.
${\qquad\qquad\qquad}$
A: It is possible to have $\ \overline{x_n}\rightarrow \overline x\ $ while $\ \overline{y_n}\not\rightarrow\overline y\ $ (so that the convergence holds just for one coordinate but not for both). Just turn @WlodekKuperberg's example by half of the right angle (by $\ 45^\circ\ $ or, professionally speaking, by $\ \frac\pi 4$).
