Curve Estimation Based On Localised Principal Components: Theory And Applications