I'm not sure about the question, and I am no expert, but perhaps this will help.
The beam command is usually defined by the user in wavelength, orientation and origin. Assuming a 3d model the origin must be defined in x,y, and z axis, along with two angle statements (phi and theta) which...