The method described provides a simple procedure for the design of structures intended to generate a magnetic field that follows a specific variation law in an air gap. The emphasis is laid on design rules derived from well known theorems such as the superimposition principle, the easy axis rotation theorem, and the image theorem. An example is given for a linear displacement sensor application. Magnetic structures for producing trapezoidal or triangular profiles of the magnetic induction consist of simple yoked and yokeless configurations. An experimental device has been designed and built with the help of analytical and numerical calculations.