  We propose a simple Hamiltonian to describe the motion and the merging of
Dirac points in the electronic spectrum of two-dimensional electrons. This
merging is a topological transition which separates a semi-metallic phase with
two Dirac cones from an insulating phase with a gap. We calculate the density
of states and the specific heat. The spectrum in a magnetic field B is related
to the resolution of a Schrodinger equation in a double well potential. They
obey the general scaling law e_n \propto B^{2/3} f_n(Delta /B^{2/3}. They
evolve continuously from a sqrt{n B} to a linear (n+1/2)B dependence, with a
[(n+1/2)B]^{2/3} dependence at the transition. The spectrum in the vicinity of
the topological transition is very well described by a semiclassical
quantization rule. This model describes continuously the coupling between
valleys associated with the two Dirac points, when approaching the transition.
It is applied to the tight-binding model of graphene and its generalization
when one hopping parameter is varied. It remarkably reproduces the low field
part of the Rammal-Hofstadter spectrum for the honeycomb lattice.
