This paper analyses the shape of the air-fuel mixture in the latest version of an internal combustion engine (gasoline direct injection GDI). In this type of an engine there is an ultra-lean combustion mode where the fuel injection occurs at the compression stroke. An ignition occurs at an ultra-lean air-fuel ratio of 30 to 40 even 55 including exhaust gas recirculation. This mode of combustion of the stratified mixture decreases fuel consumption by around 35% and even 40% during idling. This gasoline engine becomes as efficient as a Diesel engine.The problem considered is the shaping of the air-fuel mixture in such an engine where the injector is situated at an angle to the axis of a curved piston.The analysis in this paper includes the following parameters: the diameter of the opening and the angle of the injector, the pressure of the injected fuel, the shape of the surface of the curved piston, the speed of the piston as a function of the crank angle, and dimensions of an engine.The aim of the mathematical model developed is to find the injection advance angle needed for the core of the rich mixture to reach the igniting spark.