===== DAWNCUT =====

      Version 1.54a

      July 1, 2005

      Satoshi Tanaka and Masayasu Kawabata

      Ritsumeikan University, Japan

DAWNCUT is a tool to generate a 3D scene data clipped with an arbitrary plane.
It reads a source DAWN-format file and outputs a new DAWN-format data, 
describing a plane-clipped 3D scene.  The output DAWN-format data can be 
visualized with Fukui Renderer DAWN.

DAWNCUT is a free software obtainable from our Web page or ftp site:



[A. COMPILATION]

  DAWNCUT is described with the C++ language and compiled with help of 
  the file "Makefile" in this directory.  
  If the compilation is successfully completed, you will get 
  an executable file "dawncut" in this directory. 
  We recommend to use g++/egcs compiler.
  Compilation with the HP aCC compiler is also supported at present.

  1. g++/egcs compiler 

   % make 

  2. HP aCC compiler 

   % setenv G4SYSTEM HP-aCC
   % make 

  Copy the generated binary file "dawncut" to your favoritte directory,
  e.g. /usr/local/bin.

[B. USAGE]

  DAWNCUT is invoked from the command line as follows:  

   % dawncut a b c d input-file [output-file]

       input-file : Source DAWN-format file describing a 3D scene.

       output-file: Output DAWN-format file describing a plane-clipped 
                    3D scene.  The default output stream is stdout.

       a, b, c, d : Parameters  a, b, c, and d  are double values to
                    define a clipping plane described with the following 
                    equation: 

                       ax + by + cz + d = 0. 

                    Vector (a,b,c) defines the normal vector of 
                    the clipping plane.  
                    3D scene data in the half space at the front side 
                    of the clipping plane are clipped out and erased. 
                    The normal vector (a,b,c) needs not be a unit vector. 
                    If it is a unit vector, parameter "d" gives distance 
                    between the clipping plane and origin (0,0,0).

       [example] (a, b, c, d) = (1, 0, 0, 2)

                    plane equation :   x + 2 = 0  
                    normal vector  :   n(1, 0, 0) 
                    origin         :   O(0, 0, 0) 

                       plane
                      (x = -2)     
                         |         clip side
                         |   n
                         |--->---O 
                         |        

  The default plane is  "y = 0".  That is to say, 

      % dawncut input-file [output-file]

  is equivalent to the following:

      % dawncut 0 1 0 0 input-file [output-file]



[C. DISPLAYED MESSAGE]

   When clipping is completed, the following message is displayed:

        SOURCE OBJECTS : Number of total 3D shapes included the 
                         source DAWN-format file.
        cut            : Number of 3D shapes intersected with 
                         the clipping plane.
        erased         : Number of 3D shapes which is completely
                         clipped out from data.  Each of the 3D shapes 
                         is totally included in the half space at the 
                         front side of the clipping plane.
        unchanged      : Number of unaffected 3D shapes. 
        failed         : Number of 3D shapes for which the clipping 
                         algorithm failed.

[D.VISUALIZATION]

   DAWNCUT outputs a DAWN-format file, describing a plane-clipped 
   3D scene.  It is visualizable with DAWN :

        % dawn output-file.prim

[E.SUPPORTED 3D SHAPES]

  DAWNCUT supports clipping of the following 3D shapes defined in the 
  g4.prim format:

     /Box, /Polyhedron ... /EndPolyhedron, /Column, /Cons, /Parallelepiped,
     /Sphere, /Trap, /Trd, /Tubs, /Torus.    

  In polyhedron data /Polyhedron ... /EndPolyhedron, all facets
  should be convex.

  Polylines (/Polyline ... /EndPolyline etc )      are not clipped. 
  Markers   (/MarkCircle2D and /MarkSquare2D etc ) are not clipped. 


[Multiple-time clipping]

  An output DAWN-format file can be read by DAWNCUT again and be 
  clipped with an additional clipping plane.
  However, results of the secondary clipping is not guaranteed,
  though they seems to be fine in many cases.  

[Example]
  See  dawncut_VERSION/SAMPLES/README.txt in the DAWNCUT package.

##### end of documents