Breakpoint Convergence in Fortune's Algorithm -


i implementing fortune's sweepline algorithm computing voronoi diagrams. primary reference "computational geometry: algorithms , applications" de berg et al., , while coverage of topic clear, pass on several small important details have been having trouble working out myself. i've searched web help, other websites either give higher overview textbook, or give exact same pseudocode provided book.

i need way determine whether pair of breakpoints determined triple of arcs on beach line converges or diverges, in order detect upcoming circle events. seems make decision need knowledge shape of voronoi cell edges breakpoints trace out fortune's algorithm progresses. example, if find slope of edge traced breakpoint calculate 2 lines formed breakpoints , respective slopes intersect, , decide whether converge based on result. however, have no idea how information on slopes, current position of breakpoints.

the information have work x,y location of 3 sites , current y-coordinate of sweepline (i'm using horizontal sweepline).

actually, have 1 idea determining convergence. given 2 sites, breakpoint between 2 sections of beachline define governed current position of sweep line. thought recording position of 2 breakpoints, temporarily advancing sweep line small amount, , recording new positions. because edges in normal voronoi diagram not curve, if distance between new pair of breakpoints less distance between old pair, breakpoints converge; otherwise, diverge. seems both dangerous (i have no idea if works) , ugly. surely there must better way.

any ideas appreciated, , pseudocode (in c#-like syntax if possible) so. aware there computational geometry libraries use voronoi diagrams, personal learning exercise, want implement parts of algorithm myself.

welcome drake. implemented checking whether breakpoints physically converge on circle center in 'fictitious' increment of sweepline position. complicates bit because in cases circle center can or precisely @ sweepline position, sweepline increment needs proportional difference between current sweepline position , circle center generated recommend.

say:

1. currentsweepliney = 1.0f; circlecentery = 0.5f (and moving downwards, i.e. in decreasing y direction).

2. set sweepyincrement = (circlecentery - currentsweepliney) / 10.0f (the 10.0f divisor arbitrarily chosen).

3. check new breakpoint positions @ new sweepline position.

4. check distance circle center.

5. if both distances less current distances, breakpoints converge.

i know expensive, since have calculate breakpoint positions multiple times, i'm confident takes care of possible cases.

anyway, i'm finding serious issues floating point precision error elsewhere in algorithm. not straightforward thought initially.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -