I want to have an understanding as what constitutes a degree of freedom of a system that we consider. My understanding of it, I believe, is pretty naive. I associate it with how an object moves in space. E.g if you have a chain of atoms, where each atom can oscillate in all 3 spatial directions, then for 1 atom you have 3 degrees of freedom, while for $N$ such atoms, the entire system has $3N$ degrees of freedom. But this is just one case.
I am trying to do the same for when we Consider a bar with pendula of mass $m$ fixed to it at intervals $d$. Each pendulum can only swing in and out of the page. The bar is supported at the ends, but can rotate freely. If, e.g., pendula $i$ and $i + 1$ are not aligned, there is a force due to the torsion of the bar. The energy due to the torsion of two neighboring masses is $\frac k 2(\theta_i - \theta_{i+1})^2$, where $\theta_i$ is the angular displacement of mass $i$.
The idea is that one can write the equation of motion for $\theta_i$ by using the lagrangian. But in order to have the lagrangian one needs to determine the degrees of freedom of the system. And I have a hard time understanding the motions that this system does.
I don't understand the description here. If the bar is fixed at the end points, how does rotation of it occurs? I understand that the swing of the pendulum represents a degree of freedom. And because we have $N$ such pendula, we would have $N$ degrees of freedom. But one has to consider also the motion of the bar, which apparently rotate freely. So that would be an additional degree of freedom. But how exactly does the bar rotate? And in what way, when the end parts are fixed?
Therefore I write for the lagrangian:
$$L= \sum_{i=2}^{N-1} \frac{1}{2}m\dot {\theta}_i^2 - \frac k 2 (\theta_i - \theta_{i+1})^2.$$
But an additional term should be added, that would correspond to the free rotation of the bar. But as I said, from the description made here, I don't understand how the bar rotates, if it is fixed in two ends.