Skip to content

perp2lim.m

Basic Information

  SYNTAX: [rz_out]= perp2lim(rz_in,dperp);

  PURPOSE:
       Generates 2-D (r,z) perpendicular boundary displaced dperp from rz_in .

  INPUTS:
       rz_in = r,z index of input boundary rz_in= [r,z] or [r;z]
       dperp = Perpendicular distance (+ outward, - inward) scaler or size(r)
       iplot = 1 => plot new rz_out, -1 plot _in & _out geometry <0>= no plot

  OUTPUTS:
       rz_out = output data with dperp perpendicular displacement from rz_in

  RESTRICTIONS:
       rz_in must have at least 2 points
       if rz_in has only 2 points direction of vector is taken from r=0,z=0
       for negative (inward displacement) watch out for crossing of center
  METHOD:
       uses mean of r and z to determine centroid r0, z0
       and displaces dperp along radial from r0,z0 to ri,zi, based on dperp
       drperp= + displace away from center = - displace toward center

Dependencies