Local volatility
Heston explains the smile with a random volatility. Dupire showed that a deterministic volatility that depends on the spot level and time can reproduce any arbitrage-free smile exactly. Pick a market shape, read off the local volatility his formula implies, and check by simulation that it really does give the smile back.
Implied surface
Market and check
Implied vol at (K, T)
20.51%
From the shapeLocal vol at (K, T)
22.57%
Dupire's formulaSimulated with local vol
20.30%
Implied vol of the simulated price, $5.69 ± 0.0704Round trip
-0.21%
Recovered minus implied; Monte Carlo noise is a few tenths of a percentSlice at maturity
0.5 y