Analytic expressions for magnetic field from finite curved conductors