# History file 'len-mod.h' transforms surfaces and velocity sections
# in the model with LENticular inclusion into VRML or GOCAD
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Input files required
 #chk.pl: "data/len/" "len-mod.dat"
 #chk.pl: "data/len/" "len-cam.dat"
 #chk.pl: "data/len/" "len-dli1.dat"
 #chk.pl: "data/len/" "len-dli2.dat"
 #chk.pl: "forms/"    "hsv.dat"

# General settings
# ~~~~~~~~~~~~~~~~
# Form of output file
  VRML='VRML2'
 #VRML='GOCAD'

# Input data
  MODEL='len-mod.dat'

# Temporary files (several times overwritten)
  VRTX='vrtx.tmp'  TRGL='trgl.tmp'  PLGN='plgn.tmp'

# Setting of cameras (viewpoints) and lights, only VRML
  UP1=0  UP2=0  UP3=1  CAMERA='len-cam.dat'
  DLIGHT='len-dli1.dat'  AMBIENT=0.00
  R=0.00  G=0.00  B=0.00  # Black background

# Colour properties
  COLORS='hsv.dat'
  TRANSP=0.00  SPECULAR=0.22  SHININESS=0.10

# Structural interfaces in the model
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Name of output file
  WRL='len-srf.wrl'  # VRML
 #WRL='len-srf.mx'   # GOCAD
  iniwrl:

# Colours correspond to surface indices
  COLUMN07='ISRF'
  KOLSRF=7  VPER=6  VREF=1  CREF=0.

# Triangulating and plotting interfaces
  N1=25  N2=17  N3=15  D1=2.5  D2=2.5  D3=2.5  O1=0.   O2=-20. O3=-25.
  VRTX='len-srfv.out' TRGL='len-srft.out'
  modsrf:
  trgl:
  KOLUMN=7
  VALUE=1  VRTXN='len-pts1.out'  TRGLN='len-trg1.out'  trglsort:
  VALUE=2  VRTXN='len-pts2.out'  TRGLN='len-trg2.out'  trglsort:
  VALUE=3  VRTXN='len-pts3.out'  TRGLN='len-trg3.out'  trglsort:
  VALUE=4  VRTXN='len-pts4.out'  TRGLN='len-trg4.out'  trglsort:
  PROPERTIES='N1 N2 N3 ISRF'                         # just for GOCAD
  NAME='Surface1'                                    # just for GOCAD
  VRTX='len-pts1.out'  TRGL='len-trg1.out'  srfwrl:
  NAME='Surface2'                                    # just for GOCAD
  VRTX='len-pts2.out'  TRGL='len-trg2.out'  srfwrl:
  NAME='Surface3'                                    # just for GOCAD
  VRTX='len-pts3.out'  TRGL='len-trg3.out'  srfwrl:
  NAME='Surface4'                                    # just for GOCAD
  VRTX='len-pts4.out'  TRGL='len-trg4.out'  srfwrl:

# Adding model box wireframe
  LIN='len-bnd.out'
  KOLLIN=0  R=1.00  G=1.00  B=1.00
  NAME='ModelBox'  PROPERTIES=' '  # just for GOCAD
  bndlin:
  linwrl:

# Solid P-wave velocity model
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Setting lights
  DLIGHT='len-dli2.dat'
  R=0.00  G=0.00  B=0.00  # Resetting black background

# Name of output file
  WRL='len-vp.wrl' # VRML
 #WRL='len-vp.mx'  # GOCAD
  iniwrl:

# Colours correspond to P-wave velocities
  COLUMN07='ISRF'  COLUMN08='+VP'
  KOLSRF=8  VPER=-6  VREF=7  CREF=0.
  PROPERTIES='N1 N2 N3 ISRF +VP'  # just for GOCAD

# Triangulating individual velocity sections
# Section perpendicular to X1, minimum X1 coordinate, part 1
  N1=1   N2=2   N3=16  D1=1.   D2=20.  D3=2.   O1=0.   O2=0.   O3=-25.
  NAME='Section1Min1'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X1, minimum X1 coordinate, part 2
                N3=2                   D3=4.           O2=-20.
  NAME='Section1Min2'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X1, maximum X1 coordinate
                N3=16          D2=40.  D3=2.   O1=60.
  NAME='Section1Max'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X1, inside model box
         N2=11                 D2=2.           O1=20.
  NAME='Section1Mid'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X2, minimum X2 coordinate, part 1
  N1=9   N2=1          D1=5.   D2=20.          O1=20.
  NAME='Section2Min1'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X2, minimum X2 coordinate, part 2
  N1=2          N3=2   D1=20.          D3=4.   O1=0.   O2=-20.
  NAME='Section2Min2'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X2, maximum X2 coordinate
  N1=13         N3=16  D1=5.                           O2=20.
  NAME='Section2Max'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X2, inside model box
  N1=11                D1=2.                           O2=0.
  NAME='Section2Mid'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X3, maximum X3 coordinate, part 1
  N1=5   N2=2   N3=2   D1=5.           D3=5.                   O3=-1.
  NAME='Section3Max1'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X3, maximum X3 coordinate, part 2
  N1=9                         D2=40.          O1=20.  O2=-20.
  NAME='Section3Max2'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X3, minimum X3 coordinate
  N1=2          N3=1   D1=60.                  O1=0.           O3=-25.
  NAME='Section3Min1'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:
# Section perpendicular to X3, inside model box
                       D1=20.          D3=2.                   O3=-21.
  NAME='Section3Mid'  # just for GOCAD
  modsrf:
  trgl:
  srfwrl:

# 3D P-wave velocity cube (GOCAD Voxet), only GOCAD
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Name of output file
  WRL='len-vpv.mx'  # GOCAD
 #iniwrl:

# Grid dimensions, initial position
  N1=151  N2=101  N3=76  D1=0.4  D2=0.4  D3=0.4  # sparser grid
# N1=301  N2=201  N3=151 D1=0.2  D2=0.2  D3=0.2  # minimum MRAM=9500000
  O1=0    O2=-20  O3=-25

  VEL='len-vpv.out'
 #grid:  # Gridding velocities
  GRD='len-vpv.out' IN='len-vpv.bin'
 #ascbin:
 #swap:  # Gridded data for GOCAD must be big-endian (workstations)
         # Comment the above line on big-endian computers (workstations)
  NAME='VelocityCube'                # GOCAD object (and property) name
  PROPERTY='Velocity'                # GOCAD property name equal to NAME
  NODATA=0. VPER=-6  VREF=7  CREF=0. # Colour scale
 #grdwrl:
