Faceted Mirror Calculations:

General Introduction:
A faceted mirror is a mirror which is formed by dividing a much 
larger smooth mirror surface into many tiny areas.  The much larger mirror
surface forms a baseline for those tiny mirrors. 

The user specifies a base system, and a data file.  The data file contains
the polynomial that describes the smaller mirrors.  They are all identical.
The polynomial can be up to degree 4.

Example:
The following is an example of a use for faceted mirrors in x-ray 
lithography.  The faceted mirror concept is to use the baseline to focus 
the incoming source and to use each micro mirror to independently diverge 
the source so that each micro mirror can illuminate the whole image 
region.  The advantage is to cover the illuminated region with enough 
angle divergence, phase difference, and uniformity.

In this example, we use a spherical baseline at normal incidence (0), 
source distance 50, image distance 50.  The questions of importance are:
     ....
     Compound mirrors ( or lenses) are formed
     by several smaller mirrors ( facets) combined
     together.
     A: Is this mirror faceted [Y/N] ? Y
     B: File with the polynomial describing the facet? SHAPE.DAT
     We need to define which side of the surface
     to use (see demo for further explanation).
      3      closest
      2      ...
      1      ...
      4      farthest
     Choice[1-4]? 4
(note: fourth degree facet polynomial usually will generate four layer 
of solution surface). 
     Size of the Facet?
      x-length ? 20
      y-length ? 20
     Choose the baseline for facet
     Lets define the mirror. I may compute its parameters, like the
     radius or the axes. This will not affect the rest of the 
     calculations; all the geometrical parameters may be modified later.
     Or, you may wish to specify the mirror parameters yourself.
     What kind of surface are we dealing with ?
     spherical    = 1
     elliptical   = 2
     toroidal     = 3
     paraboloid   = 4
     plane        = 5
     Codling slit = 6
     hyperbolical = 7
     cone         = 8
     polynomial   = 9
     Mirror surface [ 1-9] ? 1
     Do you want to specify the mirror parameters ? Y
     Is the mirror Cylindrical ? N
     ....
     Spherical Mirror Radius ? 50

     ....

Example of SHAPE.DAT file used:  We use 9 plane mirrors on a spherical
baseline for the facets.
The description of the small mirrors is as follows:
1
0 0 1 1
0 0 0 0 
-1

Explanation: The first line indicates the order of the polynomial (1).
The (0 0 1 ) in the 2nd line means  x^0y^0z^1  and the
last number 1 means x^0y^0z^1=1.  The third line means the
constant term equals zero(i.e. x^0y^0z^0=0). 
(-1) denotes end-of-file.


Second Example:
A more complex facet description for toroidal facets:

4 				! degree of polynomial = 4
2 0 0 184806921.4254561 	! x^2 = 184806921.425461
4 0 0 1. 			! x^4 = 1
0 2 0 728306.4834865600 	! y^2 = 728306.4834865600
2 2 0 2. 			! and so on ...
0 4 0 1. 
0 0 1 9920435542.118486 
2 0 1 27242.4748840000 
0 2 1 27242.474884000 
0 0 2 186266415.9348293 
2 0 2 2. 
0 2 2 2. 
0 0 3 27027.754884000 
0 0 4 1.00000 
-1

