We demonstrate a device which induces a controlled and reversible tran
sition in the scattering dynamics of electrons, from nominally 'regula
r' to 'chaotic' motion of the electrical current. This is achieved usi
ng a gate-defined semiconductor cavity which undergoes an evolution in
shape from a square to a 'Sinai' geometry. We report remarkable fract
al behaviour which appears in the device conductance at low temperatur
es during the transition. This is the first example of a man-made syst
em where fractals can be introduced and removed in a controllable fash
ion. Classical simulations are employed to determine the electron path
s associated with conductance structure seen at the different scales.