triangulate: Delaunay triangulation of a map (splus)

triangulate: Delaunay triangulation of a map (splus) Deane Merrill

compilation and loading procedure

  1. to run as user merrill on parep2.lbl.gov:
    rlogin parep2.lbl.gov -l merrill
    cd $MDOCS/splus/triangulate
    mkdir .Data
    load.csh
    

  2. to run as user selvin on cedr.lbl.gov:
    rlogin cedr.lbl.gov -l selvin
    cd /h/selvin/2county
    alias splus /cedrvol/splus/Splus
    setenv MDOCS /CEDRCD/data1/merrill/docs
    cp -p $MDOCS/splus/triangulate/triangulate.f .
    cp -p $MDOCS/splus/triangulate/triangulate.s .
    cp -p $MDOCS/splus/triangulate/load.csh .
    chmod 775 load.csh
    load.csh
    

    where load.csh uses triangulate.f and triangulate.s

  3. splus
    dyn.load("triangulate5.o")
    source("triangulate.s")
    triangulate
    triangulate.test1
    triangulate.test1() # OK
    
    # number of segments in each polygon
    ns _ c(13,7,10)
    # polygon 1 (external boundary, 13 points, clockwise)
    p1 _ c(0,.5, 0,1, -1,1, 0,2, 2,2, 2,1, 3,1, 3,0, 2,0, 2,-1, 1,-1, 1,0, 0,0)
    # polygon 2 (7 points, counterclockwise)
    p2 _ c(0,0, 1,0, 1,1, 0,2, -1,1, 0,1, 0,.5)
    # polygon 3 (10 points, counterclockwise)
    p3 _ c(0,2, 1,1, 1,0, 1,-1, 2,-1, 2,0, 3,0, 3,1, 2,1, 2,2)
    #xys is a matrix with two columns
    xys _ matrix(c(p1,p2,p3),ncol=2,byrow=T)
    triangulate(ns,xys)
    
    
    
back to S-Plus utilities
http://merrill.wwh.net/mdocs/splus/triangulate.html 5/28/96
dwmerrill@lbl.gov