//////////////////////////////////////////////////
/////  Fukui Renderer                        /////
/////  DAWN (Drawer for Academic WritiNgs)   /////
/////                                        /////
//////////////////////////////////////////////////

              Authors:
                 Satoshi   Tanaka    (Ritsumeikan University, JAPAN)
                 Minato    Kawaguti  (Fukui University, JAPAN)
                 Hiroshi   Hasui     (Fukui University, JAPAN)
                 Yoshitaka Kawabata  (Fukui University, JAPAN)
                 Takeshi   Konya     (Fukui University, JAPAN)
                 Tetsuji   Nishimura (Fukui University, JAPAN)
                 Masahiro  Noguchi   (Fukui University, JAPAN)
                 Kensuke   Ohtubo    (Fukui University, JAPAN)
                 Yasuhide  Sawada    (Fukui University, JAPAN)
                 Masayasu  Kawabata  (Fukui University, JAPAN)                 

               E-mail:
                 stanaka@media.ritsumei.ac.jp

               Download:
               http://geant4.kek.jp/~tanaka
               (File name: dawn_VERSION.tar.gz (Linux/Unix), 
                           WinDAWNVersion      (Windows) )
                                   

 What's new? 





<< What is DAWN? >>

  Fukui  Renderer   DAWN (Drawer for Academic WritiNgs) 
  is a renderer, which reads 3D geometrical data and visualize them.  
  It is a vectorized 3D PostScript processor with analytical 
  hidden line/surface removal. 
  It aims at precise technical drawing of complex geometries.  
  It performs geometrical hidden line/surface removal and calculates 
  out all visible parts of the 3D data before drawing.  This drawing 
  algorithm realizes device-independent technical high quality of
  vectorized graphics.
    3D Data files should be generated by a modeler or by hands 
  separately.  If you use DAWN as a visualizer of, 
  say, a simulator of physical experiments, 
  the simulator application itself is recognized as a modeler.
    An important feature of DAWN is that
  it has been developed to visualize 3D data generated by
  a high-energy experimental detector simulator "GEANT4" 
  ( http://geant4.web.cern.ch/geant4 , http://geant4.kek.jp ).  

<< Softwares to be installed beforehand >>

  In order to use DAWN, the following softwares and libraries 
  should be installed beforehand.

  (1) Tcl/Tk 
     http://www.activestate.com/Products/Download/Download.plex?id=ActiveTcl
      * The Tcl/Tk is pre-installed in many Linux packages.
        Try the command "wish" to see if it is preinstalled.

  (2) Name of PostScript viewer that can read EPS images.
      * The PostScript viewer name can be set in the GUI panel. 
        The default setting is "display", i.e., ImageMagick. 

      
<< How to install DAWN in Linux/Mac >>
  * For MS Windows, see INSTALL_IN_WINDOWS.html.

*** STEP 1: SET OF PostScript VIEWER ***

  Before installing DAWN, set the environmental
  variable "DAWN_PS_PREVIEWER" to specify a 
  PostScript-file viewer used by DAWN: 

    $ setenv DAWN_PS_PREVIEWER "viewer_name"

  If you skip to set DAWN_PS_PREVIEWER, the default viewer name 
  "display" (ImageMagick) is used. 

  Examples in Linux:
    $ setenv DAWN_PS_PREVIEWER "display"   // ImageMagick
    $ setenv DAWN_PS_PREVIEWER "ghostview" // ghostview

  Examples in Mac:
    $ setenv DAWN_PS_PREVIEWER "open"   // Default viewer of the system, 
                                         // e.g., "preview"

  If you want to skip viewing and only generate EPS files, 
  set DAWN_PS_PREVIEWER to "NONE" 

    $ setenv DAWN_PS_PREVIEWER "NONE"


*** STEP 2: BUILD ***

  In order to compile DAWN, you need a C++ compiler, e.g., g++,   
  and  the "make" utility.

  After decompressing the DAWN parckage "dawn_VERSION.tgz" with 
  "tar xvzf dawn_VERSION.tgz", 
  go to the created directory "dawn_VERSION/" and do the followings:

    $ make clean
    $ make guiclean
    $ ./configure
       * Answer all questions properly.
       * You may skip to execute "configure" and use the 
         default "Makefile", if you install DAWN to the default 
         directory, i.e. "/usr/local/bin".
    $ make 

  Executing "make" generates two executable files 
  "dawn" and "DAWN_GUI_menu" in the current directory. 
  You need the both of them for executing DAWN.
  The former is the DAWN executable and the latter is the 
  Tcl/Tk script for GUI. 
 
*** STEP 3: INSTALL ***

  Next, execute "make install". 
  (You may have to become a root user beforehand.)

     $ su
     # make install

  Note: The above is equivalent to "sudo make install".
        In Ubuntsu Linux and Mac, this may be better.

  Then "dawn",  "DAWN_GUI_menu",
  and shell scripts "dawninetd", "dawn_unixd" are 
  copied to the directory specified in executing 
  the configure script, e.g., /usr/local/bin. 


*** STEP 4: TEST ***

  After STEP 3 in the above, you can test DAWN as follows.
  In the directory "dawn_VERSION/", you can test DAWN.

     $ dawn  primitives.prim 
     $ dawn  primitives2.prim 

  Files  "primitives.prim"  and "primitives2.prim" display 
  all kinds of 3D primitives which are visualizable by DAWN. 

  In PRIM_DATA, there are several g4.prim-format (DAWN-format) 
  data files with an extension ".prim".  Please try them, too.

  Note: 
    A suitable camera distance is different 
    in each data.  We recommend to use the "AUTO"
    mode by simply giving a value "0" to the 
    Camera Distance entry (the top entry of the GUI menu).


<< Data file format: g4.prim format >>

  The "g4.prim format", which has been developed for GEANT4 visualization, 
  is described in  "dawn_VERSION/DOC/G4PRIM_FORMAT.tex" and 
  "dawn_VERSION/DOC/G4PRIM_FORMAT.pdf".
  There are sample data files in the directory  "dawn_VERSION/PRIM_DATA/".

<< Options >>

 The following options are supported.

    -c: Clean up command history.
        * Use this option as: 
            $ dawn -c
        * Try this first, if DAWN does not work well.
        * See "History mechanism" below. 
    -d: Skip invoking GUI menu, and use the 
        previous parameter stored in a file
        ".DAWN_1.history" in the current directory 
        * See "History mechanism" below. 
        * Use this option as: 
            $ dawn -d xxx.prim
    -h: Help1 (show options)
        * Use this option as: 
            $ dawn -h 
    -H: Help1 (environmental variables)
        * Use this option as: 
            $ dawn -H 

<>
 * PostScripv viewer:
    $ setenv DAWN_PS_PREVIEWER  "viewer_name"

 * Up direction 
    $ setenv DAWN_UP_DIRECTION  Y // Up direction is made Y
    $ setenv DAWN_UP_DIRECTION  Z // Up direction is made Z

 * Quick rendering
    $ setenv DAWN_BFC_MODE 1      // Use the painter's algorithm
                                  //   in the surface rendering.
    $ setenv DAWN_BFC_MODE 0      // Use the DAWN's original algorithm
                                  //   in the surface rendering.

<< History mechanism >>

   DAWN remembers parameters (camera distance etc) used
   in the previous execution, and display them on GUI panel as  
   initial values. The parameters are stored in ".DAWN_1.history"
   in the current directory.  File ".DAWN_1.default"
   stores default parameters.  Contents of these files 
   can be different in different directories.
   The ".DAWN_1.history" is removed with "dawn -c".

<< Drawing edges >>

  Sharp drawing of edges is one of the most characteristic 
  features of DAWN. 
  At rendering time, DAWN automatically distinguishes 
  (1) ordinary edges, (2) auxiliary edges, and (3) outline edges. 

   (1) The "ordinary edge" is a line segment formed between
       two facets, whose normal vector makes an angle greater
       than a given threshold angle.

   (2) The "auxiliary edge" is a line segment formed between
       two facets, whose normal vector makes an angle smaller 
       than a given threshold angle.

   (3) The "outline edge" means a line segment formed between
       two facets, one of which is shows its front face to camera and 
       the other shows its back face.

  The threshold angle can be given on the GUI panel. 
  Its default value is 70.0 degrees.
  Each kind of edge can be assigned different style and width on 
  the GUI panel.  

<< Associated Tools >> 

   We are developing tools to assist DAWN users.
   It is included in dawn_XXX/TOOLS.
   You can use them by invoking make there:

   % cd dawn_XXX/TOOLS
   % make

   Note that you have to install the tools by hands, e.g.,

   % cp dawn_epsclipper /usr/local/bin

   Tools included in dawn_XXX/TOOLS are:
     (A) DAWN EPS clipper: This tool clips EPS figures generated 
                           by DAWN with a given rectangle.
     (B) dawn_eps2ps       : This tool convert EPS file to PS file.

   For details, read dawn_XXX/TOOLS/README.

<< Copy right>>

  The copy right belongs to Satoshi Tanaka.
  He cannot be responsible for any kinds of damages 
  caused by DAWN.

=============== END of README ===============