When Is a Periodic Function the Curvature of a Closed Plane Curve?