  Let X be a smooth complex projective variety, and let Y in X be a smooth very
ample hypersurface such that -K_Y is nef. Using the technique of relative
Gromov-Witten invariants, we give a new short and geometric proof of (a version
of) the "mirror formula", i.e. we show that the generating function of the
genus zero 1-point Gromov-Witten invariants of Y can be obtained from that of X
by a certain change of variables (the so-called "mirror transformation").
Moreover, we use the same techniques to give a similar expression for the
(virtual) numbers of degree-d plane rational curves meeting a smooth cubic at
one point with multiplicity 3d, which play a role in local mirror symmetry.
