# History file 'sal-salt.h' to split the salt interface 'salt.ts'
# into several files which are suitable as input data for inversion.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Input files required
# Output of 'sal-ts.h'
 #chk.pl: ""  "salt-pts.out"
 #chk.pl: ""  "salt-trg.out"
# Output of 'sal-inv2.h'
 #chk.pl: ""  "sal-m2.out"
# Program 'ptsselec.for' located in the directory 'data/sal/'
# must be compiled before running this history file.

  MODEL='sal-m2.out'
  WRL='salt-box.wrl'  VRML='VRML2'

# Setting of cameras (viewpoints) and lights
  UP1=0  UP2=0  UP3=-1  CAMERA='sal-cam.dat'
  DLIGHT='sal-dli.dat'  AMBIENT=0.00
  R=0.00  G=0.00  B=0.00  # Black background
# Colour properties
  COLORS='hsv.dat'   VPER=1.
  AMBIENT=0.00 TRANSP=0.00 SPECULAR=0.22 SHININESS=0.10
  iniwrl:

# Plotting model box wireframe
  LIN='salt-bnd.out'
  KOLLIN=0  R=1.00  G=1.00  B=1.00
  bndlin:
  linwrl:

# Dividing the salt interface according to the normals to the triangles
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  VRTX='salt-pts.out' TRGL='salt-trg.out'
  VECT3=-1. VRTXN='salt-pnt.tmp' TRGLN='salt-tnt.out'
  trglnorm:
  VECT3=1.  VRTXN='salt-pnb.tmp' TRGLN='salt-tnb.out'
  trglnorm:
            VRTXN=               TRGLN=
  VECT3=
  INTF='salt-pnt.tmp' INTFOUT='salt-pn1.tmp' KSRFC=5 KOLUMN=7
  intf:
  INTF='salt-pn1.tmp' INTFOUT='salt-pnt.out' KSRFC=6 KOLUMN=8
  intf:
  INTF='salt-pnb.tmp' INTFOUT='salt-pn1.tmp' KSRFC=5 KOLUMN=7
  intf:
  INTF='salt-pn1.tmp' INTFOUT='salt-pnb.out' KSRFC=6 KOLUMN=8
  intf:
  VRTX='salt-pnt.out' TRGL='salt-tnt.out' WRLOUT='salt-nt2.wrl'
  KOLPOS=0 KOLNEG=7  R=1.00  G=1.00  B=0.00 VPER=2000. VREF=0. CREF=0.66667
  srfwrl:
  VRTX='salt-pnb.out' TRGL='salt-tnb.out' WRLOUT='salt-nb2.wrl'
  KOLPOS=7 KOLNEG=8  R=1.00  G=1.00  B=0.00
  srfwrl:
  VRTX='salt-pnt.out' TRGL='salt-tnt.out' WRLOUT='salt-nt5.wrl'
  KOLPOS=0 KOLNEG=7  R=1.00  G=1.00  B=0.00 VPER=500. VREF=0. CREF=0.66667
  srfwrl:
  VRTX='salt-pnb.out' TRGL='salt-tnb.out' WRLOUT='salt-nb5.wrl'
  KOLPOS=7 KOLNEG=8  R=1.00  G=1.00  B=0.00
  srfwrl:
# Dividing the salt interface according to the distances
# from the interfaces in the model salt-mod.out
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  VRTX='salt-pts.out'  TRGL='salt-trg.out'
  VRTXN='salt-pi.tmp'   TRGLN='salt-ti.out'
  trglnorm:
  VRTXN=' '             TRGLN=' '
  INTF='salt-pi.tmp'   INTFOUT='salt-pid.tmp' KSRFC=5 KOLUMN=7
  intf:
  INTF='salt-pid.tmp'  INTFOUT='salt-pid.out' KSRFC=6 KOLUMN=8
  intf:
  VRTX='salt-pid.out' TRGL='salt-ti.out'
  KOLUM1=7 VRTXN1='salt-pit.out' TRGLN1='salt-tit.out'
  KOLUM2=8 VRTXN2='salt-pib.out' TRGLN2='salt-tib.out'
  trglsort:
  VRTXN1=     VRTXN2=            TRGLN1=    TRGLN2=
  VRTX='salt-pit.out' TRGL='salt-tit.out' WRLOUT='salt-it5.wrl'
  KOLPOS=0 KOLNEG=7  R=1.00  G=1.00  B=0.00 VPER=500. VREF=0. CREF=0.66667
  srfwrl:
  VRTX='salt-pib.out' TRGL='salt-tib.out' WRLOUT='salt-ib5.wrl'
  KOLPOS=0 KOLNEG=8
  srfwrl:

# Further dividing the interfaces according to the normals
# and then according to the interfaces
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  copy.pl: "salt-pnt.out" "salt-pt1.out"
  copy.pl: "salt-tnt.out" "salt-tt1.out"
  VRTX='salt-pnb.out'  TRGL='salt-tnb.out'
  KOLUM1=7 VRTXN1='salt-pt3.out' TRGLN1='salt-tt3.out'
  KOLUM2=8 VRTXN2='salt-pb1.out' TRGLN2='salt-tb1.out'
  trglsort:
  VRTXN1=     VRTXN2=            TRGLN1=    TRGLN2=
  KOLUM1= KOLUM2=
  R=1.00  G=1.00  B=0.00 VPER=500. VREF=0. CREF=0.66667
  VRTX='salt-pt1.out' TRGL='salt-tt1.out' WRLOUT='salt-t15.wrl'
  KOLPOS=0 KOLNEG=7
  srfwrl:
  VRTX='salt-pt3.out' TRGL='salt-tt3.out' WRLOUT='salt-t35.wrl'
  KOLPOS=7 KOLNEG=0
  srfwrl:
  VRTX='salt-pb1.out' TRGL='salt-tb1.out' WRLOUT='salt-b15.wrl'
  KOLPOS=0 KOLNEG=8
  srfwrl:

# Further dividing the top salt interface according to the normals
# and then according to the x3 and x2 coordinates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  KOLUMN=3    VRTX='salt-pnb.out'   TRGL='salt-tnb.out'
  VALUE=1600  VRTXN1='salt-px.tmp'  TRGLN1='salt-tx.tmp'
  trglsort:
  KOLUMN=1    VRTX='salt-px.tmp'    TRGL='salt-tx.tmp'
  VALUE=9000  VRTXN1='salt-pt2.out' TRGLN1='salt-tt2.out'
  trglsort:
              VRTXN1=               TRGLN1=
  VRTX='salt-pt2.out' TRGL='salt-tt2.out' WRLOUT='salt-t25.wrl'
  KOLPOS=0 KOLNEG=7  R=1.00  G=1.00  B=0.00 VPER=500. VREF=0. CREF=0.66667
  srfwrl:


# Further dividing the top salt interface according to the
# interfaces and then according to the normals
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  VRTX='salt-pit.out'  TRGL='salt-tit.out'
  VRTXN='salt-pt4.out' TRGLN='salt-tt4.out'
  VECT3=1. KOLUM1=4 KOLUM2=5 KOLUM3=6
  trglnorm:
  VRTXN=               TRGLN=
  R=1.00  G=1.00  B=0.00 VPER=500. VREF=0. CREF=0.66667
  VRTX='salt-pt4.out' TRGL='salt-tt4.out' WRLOUT='salt-t45.wrl'
  KOLPOS=0 KOLNEG=7
  srfwrl:

# Best results
# ~~~~~~~~~~~~
  copy.pl: "salt-pb1.out" "salt-bo1.pts"
  copy.pl: "salt-pt1.out" "salt-to1.pts"
  copy.pl: "salt-pt2.out" "salt-to2.pts"
  KOLUM1= KOLUM2= KOLUM3=
  PTS='salt-bo1.pts' PTSNEW='salt-b1.pts'  ptsselec:
  PTS='salt-to1.pts' PTSNEW='salt-t1.pts'  ptsselec:
  PTS='salt-to2.pts' PTSNEW='salt-t2.pts'  ptsselec:

# List of the output files
#
# 'salt-pnt.out' 'salt-tnt.out' 'salt-nt2.wrl' 'salt-nt5.wrl'
#   Points and triangles of the top sorted according to the normals.
# 'salt-pnb.out' 'salt-tnb.out' 'salt-nb2.wrl' 'salt-nb5.wrl'
#   Points and triangles of the bottom sorted according to the normals.
#
# 'salt-pit.out' 'salt-tit.out' 'salt-it5.wrl'
#   Points and triangles of the top sorted according to the interfaces.
# 'salt-pib.out' 'salt-tib.out' 'salt-ib5.wrl'
#   Points and triangles of the bottom sorted according to the
#   interfaces.
#
# 'salt-pt1.out' 'salt-tt1.out' 'salt-t15.wrl'
# 'salt-pt3.out' 'salt-tt3.out' 'salt-t35.wrl'
#   Points and triangles of the top sorted according to the normals
#   and then according to the interfaces.
# 'salt-pb1.out' 'salt-tb1.out' 'salt-b15.wrl'
#   Points and triangles of the bottom sorted according to the normals
#   and then according to the interfaces.
#
# 'salt-pt2.out' 'salt-tt2.out' 'salt-t25.wrl'
#   Points and triangles of the top sorted according to the normals
#   and then according to the x3 and x2 coordinates
#
# 'salt-pt4.out' 'salt-tt4.out' 'salt-t45.wrl'
#   Points and triangles of the top sorted according to the
#   interfaces and then according to the normals
#
# Best results
# 'salt-bo1.pts' 'salt-tb1.out' 'salt-b15.wrl'  'salt-b1.pts'
# 'salt-to1.pts' 'salt-tt1.out' 'salt-t15.wrl'  'salt-t1.pts'
# 'salt-to2.pts' 'salt-tt2.out' 'salt-t25.wrl'  'salt-t2.pts'
#
