subr sptensepath, xd, yd, ilist
 w2 = $SPpathslicewin
 ;get the path, length criteria
 len=total(sqrt(differ(xd)^2+differ(yd)^2)
 ;;ty,'len =', len
 np=fix(len)+1
 xs=indgen(fltarr(np))/len
 xy=tense_curve(xd, yd, xs)
 xy=float(xy)
 ;note redfine of xs below
 xs=rfix(xy(*,0))        ys=rfix(xy(*,1))
 ;also use $splinexy## here
 exchange, xy, eval(sprintf('$splinexy%d',w2))
 ;we are defining a new path here so set $spxylineindex to 0
 $spxylineindex = 0
 $viewts_type(w2) = 3		;1 for line, 2 for circle, 3 for tense path
 
 !extractline_mode = 0
 slicesp = extractline($spxywcube, xs, ys)
 ;;vname = '$view_data' + string(w2)
 ;;exchange, slice, eval(vname)
 exchange, slicesp, eval(sprintf('$slicesp%d', w2))
 ;note that view won't zoom, etc for these windows, that must be done in spscale
 redrawsp_cb, w2
 ;and show the points in the text box
 sq = ''
 ndm1 = num_elem(xd) - 1
 for is = 0, ndm1 do sq = sq + sprintf('%5.1f, %5.1f\n', xd(is), yd(is))
 xmtextsetstring, $sppathedittext, sq
 endsubr 
 ;============================================================================
