Program for producing trajectories that are distributed according to the

Lambert cosine law.


This is supplied with the CPO3D package and is called ‘prog10.f90’. A compiled version, prog10.exe, is also supplied and can be activated by the command ‘prog10’. An example of an input data file is shown below and is also included in the package.

The output data are put into tempout.dat.

This is intended for 3D systems only -for 2D systems see the note on 2D Lambert distribution.


Warning, there are no checks in this program.


The input data are in file prog10.dat and have the format:


el = 'el' for electrons, otherwise put atomic number and charge/(electron charge)

-3 0 0 = coordinate of centre of source (mm)

0 0 0 = coordinate of another point on axis, for orientation

5000. =field at source, V/mm (usually zero)

0.001 = starting distance from source disc, mm (zero when field is zero)

r = 'd' for disc, or 'r' for rectangle, for shape of source

0.1 0.2 = radius of disc, or sides of rectangle in cyclic directions (y,z here)

10 = number of rays per energy, random angles and positions

0.1 = seed for random distributions

5 = number of different energies

0.1 1E-3 = 1st energy and current, eV and mA

0.2 1E-3 = 2nd energy and current

0.3 1E-3

0.4 1E-3

0.5 1E-3