s.sweep(1)	       Grass User's Manual	       s.sweep(1)



NNAAMMEE
       ss..sswweeeepp	- computes Voronoi diagram or Delaunay triangula-
       tion (used by s.voronoi and s.delaunay)

SSYYNNOOPPSSIISS
       ss..sswweeeepp [[--ddssttpp]]

DDEESSCCRRIIPPTTIIOONN
       s.sweep reads the standard input for a set  of  points  in
       the  plane  and	writes	either the Voronoi diagram or the
       Delaunay triangulation to the standard output.  Each input
       line  should  consist  of  two  real numbers, separated by
       white  space.   The  program  is  used  by  s.voronoi  and
       s.delaunay  and	is not meant to be useful as a standalone
       program.  If  option  -t  is  present, the Delaunay trian-
       gulation is produced.  Each output line is a triple i j k,
       which  are the  indices	of  the three points in a  Delau-
       nay  triangle.	Points	are  numbered  starting at 0.  If
       option -t is not present, the  Voronoi  diagram	 is  pro-
       duced.  There are four output record types.

	      s  a b  indicates  that  an  input point at coordi-
       nates a b
		     was seen.

	      l a b c
		     indicates a line with equation ax + by =  c.

	      v a b  indicates a vertex at a b.

	      e l v1 v2
		     indicates	a  Voronoi  segment  which  is	a
       subsegment
		     of line number l with endpoints numbered  v1
       and v2.
		     If  v1  or  v2  is  -1,  the line extends to
       infinity.

       The other options are:

	      s      The input is sorted by  y	coordinate   (the
       second
		     number  in  the pair).  The first input line
       should
		     be  npoints  xmin	xmax  ymin  ymax.    This
       describes the
		     number  of  points  and  the  range  of  the
       points.	This
		     line is  used  to	determine  internal  hash
       table size;
		     it   need	not be exact but performance suf-
       fers if it
		     is grossly wrong.

	      p      Produce  output  suitable	 for   input   to
       plot  (1),
		     rather than the forms described above.

       On unsorted data uniformly distributed in the unit square,
       s.sweep uses about 20n+140/n bytes of storage.  On  sorted
       data, s.sweep uses about 160/n bytes.

RREEFFEERREENNCCEESS
       Steve  J.  Fortune,  (1987).   A  Sweepline  Algorithm for
       Voronoi Diagrams, Algorithmica 2, 153-174.

SSEEEE AALLSSOO
       _v_._a_u_t_o_c_o_r_r_, _v_._s_p_a_g_, _v_._s_u_p_p_o_r_t_, _s_._d_e_l_a_u_n_a_y_, _s_._s_w_e_e_p

AAUUTTHHOORR
       James Darrell McCauley,

       GRASS 5 update, improvements: Andrea Aime, Modena, Italy

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_5 _$



GRASS 5.0					       s.sweep(1)
