Using market European option prices, a method for computing a smooth local volatility function in a 1-factor continuous diffusion model is proposed. Smoothness is introduced to facilitate accurate approximation of the local volatility function from a finite set of observation data. Assuming that the underlying indeed follows a 1-factor model, it is emphasized that accurately approximating the local volatility function prescribing the 1-factor model is crucial in hedging even simple European options and for pricing exotic options. A spline functional approach is used: the local volatility function is represented by a spline whose values at chosen knots are determined by solving a constrained nonlinear optimization problem. The optimization formulation is amenable to various option evaluation methods; a partial differential equation implementation is discussed. Using a synthetic European call option example, we illustrate the capability of the proposed method in reconstructing the unknown local volatility function. Accuracy of pricing and hedging is also illustrated. Moreover, it is demonstrated that, using different implied volatilities for options with different strikes/maturities can produce erroneous hedge factors if the underlying follows a 1-factor model. In addition, real market European call option data on the S&P500 stock index is used to compute the local volatility function; stability of the approach is demonstrated.