Angle-esticted Steine aboescences fo flow ma layout Buchin, K.A.; Seckmann, B.; Vebeek, K.A.B. Published in: Abst. 27th Euoean Woksho on Comutational Geomety (EuoCG) Published: 01/01/2011 Document Vesion Publishe s PDF, also known as Vesion of Recod (includes final age, issue and volume numbes) Please check the document vesion of this ublication: A submitted manuscit is the autho's vesion of the aticle uon submission and befoe ee-eview. Thee can be imotant diffeences between the submitted vesion and the official ublished vesion of ecod. Peole inteested in the eseach ae advised to contact the autho fo the final vesion of the ublication, o visit the DOI to the ublishe's website. The final autho vesion and the galley oof ae vesions of the ublication afte ee eview. The final ublished vesion featues the final layout of the ae including the volume, issue and age numbes. Link to ublication Citation fo ublished vesion (APA): Buchin, K., Seckmann, B., & Vebeek, K. A. B. (2011). Angle-esticted Steine aboescences fo flow ma layout. In Abst. 27th Euoean Woksho on Comutational Geomety (EuoCG) (. 35-38) Geneal ights Coyight and moal ights fo the ublications made accessible in the ublic otal ae etained by the authos and/o othe coyight ownes and it is a condition of accessing ublications that uses ecognise and abide by the legal equiements associated with these ights. Uses may download and int one coy of any ublication fom the ublic otal fo the uose of ivate study o eseach. You may not futhe distibute the mateial o use it fo any ofit-making activity o commecial gain You may feely distibute the URL identifying the ublication in the ublic otal? Take down olicy If you believe that this document beaches coyight lease contact us oviding details, and we will emove access to the wok immediately and investigate you claim. Download date: 29. Se. 2018
EuoCG 2011, Moschach, Switzeland, Mach 28 30, 2011 Angle-Resticted Steine Aboescences fo Flow Ma Layout Kevin Buchin Bettina Seckmann Kevin Vebeek Abstact Flow mas visualize the movement of objects between laces. One o moe souces ae connected to seveal tagets by acs whose thickness coesonds to the amount of flow between a souce and a taget. Flow mas educe visual clutte by meging (bundling) lines smoothly and by avoiding self-intesections. We esent algoithms that comute cossing-fee flows of high visual quality. To this end we intoduce a new vaiant of the geometic Steine aboescence oblem. The goal is to connect the tagets to a souce with a tee of minimal length whose acs obey a cetain estiction on the angle they fom with the souce. Such an angle-esticted Steine aboescence, o simly flow tee, natually induces a clusteing on the tagets and smoothly bundles acs. We study the oeties of otimal flow tees and show that they consist of logaithmic sials and staight lines. Comuting otimal flow tees is NPhad. Hence we conside a vaiant of flow tees which uses only logaithmic sials, so called sial tees. Sial tees aoximate flow tees within a facto deending on the angle estiction. Comuting otimal sial tees emains NP-had. We esent an efficient 2-aoximation fo sial tees, which can be extended to avoid cetain tyes of obstacles. 1 Intoduction Flow mas ae a catogahic method fo the visualization of the movement of objects between laces [9]. One o moe souces ae connected to seveal tagets by acs whose thickness coesonds to the amount of flow between a souce and a taget. Most flow mas ae dawn by hand and few automated methods exist. Good flow mas shae some common oeties. They educe visual clutte by meging (bundling) lines as smoothly and fequently as ossible. Futhemoe, they stive to avoid cossings between lines. Secifically, single-souce flows ae dawn entiely without cossings. Flow mas that deict tade often oute edges along actual shiing outes. In that case a modeate distotion of the undelying geogahy is B. Seckmann and K. Vebeek ae suoted by the Nethelands Oganisation fo Scientific Reseach (NWO) unde oject no. 639.022.707. Deatment of Mathematics and Comute Science, TU Eindhoven, The Nethelands, k.a.buchin@tue.nl, seckman@win.tue.nl, and k.a.b.vebeek@tue.nl Figue 1: Two mas based on the same data set: migation fom Califonia 1995 2000. Phan et al. [4] (to), and the outut of ou algoithm (bottom). admissible. In contast, flow mas that deict moe abstact data, such as migation o intenet taffic, do not distot the geogahy of the undelying ma. In addition, flow mas often ty to avoid coveing imotant ma featues with flows to aid ecognizability. Modeling and fomal oblem descition. We study the oblem of comuting cossing-fee single-souce flows of high visual quality. Ou inut consists of a oint, the oot o souce, and n oints t 1,..., t n, the teminals o tagets. Fo evey taget t i, we ae also given a weight w i, eesenting the amount of flow fom the souce to taget t i. Visually aealing flows mege quickly, but smoothly. Disegading weights, a geometic minimal Steine aboescence on ou inut esults in the shotest ossible tee, which natually meges quickly. A Steine aboescence fo a given oot and a set of teminals is a ooted diected Steine tee, which contains all teminals and whee all edges ae diected away fom the oot. Without additional estictions on the edge diections (as in the ectilinea case o in the vaiant oosed below), a geometic Steine aboescence is simly a geometic Steine tee with diected edges. Steine aboescences have angles of 2π/3 at evey intenal node and hence do not have the smooth aeaance of hand-dawn flow mas. This motivates us to intoduce a new vaiant of the geometic minimal Steine aboescence oblem. This is an extended abstact of a esentation given at EuoCG 2011. It has been made ublic fo the benefit of the community and should be consideed a eint athe than a fomally eviewed ae. Thus, this wok is exected to aea in a confeence with fomal oceedings and/o in a jounal. 35
27th Euoean Woksho on Comutational Geomety, 2011 e β Figue 2: The angle estiction. The goal is to connect the teminals to the oot with a tee of minimal length whose acs obey a cetain estiction on the angle they fom with the oot. Secifically, we use a esticting angle α < π/2 to contol the diection of the acs of a Steine aboescence T. Conside a oint on an ac e fom a teminal to the oot (see Fig. 2). Let β be the angle between the vecto fom to the oot and the tangent vecto of e at. We equie that β α fo all oints on T. We call a Steine aboescence which obeys this angle estiction an angle-esticted Steine aboescence, o simly flow tee. Note, that this definition is not taking weights into account. Hence an otimal flow tee is simly an angle-esticted Steine aboescence of minimal length. Hee and in the emainde of the ae it is convenient to diect flow tees fom the teminals to the oot. Also, to simlify descitions, we often identify the nodes of a flow tee T with thei locations in the lane. In the context of flow mas it is imotant that flow tees can avoid obstacles, which model imotant featues of the undelying geogahic ma. It is also undesiable that teminals become intenal nodes of a flow tee. We can avoid this by coveing each teminal with an obstacle. Hence ou inut also includes a set of m obstacles B 1,..., B m. We denote the total comlexity of all obstacles by M. In the esence of obstacles ou goal is to find the shotest flow tee T that is lana and avoids the obstacles. Finally, most flow mas use thick edges to indicate the amount of flow. To this end we conside weighted flow tees. The acs of a weighted flow tee T must satisfy the following conditions [9]. If an ac e stats at a teminal t i then the thickness of e must be ootional to w i. If an ac e stats at an intenal node u of T then its thickness must be ootional to the sum of the thicknesses of the acs teminating in u. We equie, of couse, that thick acs do not ovela obstacles. Related wok. One of the fist systems fo the automated ceation of flow mas was develoed by Toble in the 1980s [10, 11]. His system does not use edge bundling and hence the esulting mas suffe fom visual clutte. A coule of yeas ago Phan et al. [4] esented an algoithm, based on hieachical clusteing of the teminals, which ceates single-souce flow mas with bundled edges. This algoithm uses an iteative ad-hoc method to oute edges and hence is often unable to avoid cossings. Thee ae many vaiations on the classic Steine tee oblem which use metics that ae elated to thei secific alications. Of aticula elevance is the ectilinea Steine aboescence (RSA) oblem. Hee we ae given a oot at the oigin and a set of teminals t 1,..., t n in the notheast quadant of the lane. The goal is to find the shotest ooted ectilinea tee T with all edges diected away fom the oot, such that T contains all oints t 1,..., t n. Fo any edge T fom = (x, y ) to q = (x q, y q ) it must hold that x x q and y y q. If we do the condition of ectilineaity then we aive at the Euclidean Steine aboescence (ESA) oblem. In both cases it is NPhad [7, 8] to comute a tee of minimum length. Rao et al. [6] give a simle 2-aoximation algoithm fo minimum ectilinea Steine aboescences. Códova and Lee [1] descibe an efficient heuistic which woks fo teminals located anywhee in the lane. Ramnath [5] esents a moe involved 2-aoximation that can also deal with ectangula obstacles. Finally, Lu and Ruan [2] develoed a PTAS fo minimum ectilinea Steine aboescences. Results and oganization. Section 2 gives oeties of otimal flow tees. In aticula, the acs of otimal flow tees consist of (segments of) logaithmic sials and staight lines. Flow tees natually induce a clusteing on the teminals and smoothly bundle lines. In the full ae we show that it is NP-had to comute otimal flow tees. Hence, Section 3 intoduces a vaiant of flow tees, so called sial tees. The acs of sial tees consist only of logaithmic sial segments. We ove that sial tees aoximate flow tees within a facto deending on the esticting angle α. Comuting otimal sial tees emains NPhad. But we can establish a connection between sial tees and ectilinea Steine aboescences. Based on that in Section 4 we develo a 2-aoximation algoithm fo sial tees which uns in O(n log n) time. In the full ae we extend ou aoximation algoithm to include cetain tyes of obstacles. Finally, in Section 5 we biefly comment on weighted flow tees. 2 Otimal flow tees Recall that ou inut consists of a oot, teminals t 1,..., t n, and a esticting angle α < π/2. We can assume that the oot lies at the oigin. Recall futhe that an otimal flow tee is a geometic Steine aboescence, whose acs ae diected fom the teminals to the oot and that satisfies the angle estiction. Sial egions. Fo a oint in the lane, we conside the egion R of all oints that ae eachable fom with an angle-esticted ath, that is, with a ath that satisfies the angle estiction. Clealy, the oot is always in R. The boundaies of R consist of cuves that follow one of the two diections that fom exactly an angle α with the diection towads 36
EuoCG 2011, Moschach, Switzeland, Mach 28 30, 2011 S + R S + S Figue 3: Sials and sial egions. the oot. Cuves with this oety ae known as logaithmic sials (see Fig. 3). Logaithmic sials ae self-simila; scaling a logaithmic sial esults in anothe logaithmic sial. As all sials in this ae ae logaithmic, we simly efe to them as sials. Fo α < π/2 thee ae two sials though a oint. The ight sial S + is given by the following aametic equation in ola coodinates, whee = (R, ϕ): R(t) = Re t and ϕ(t) = ϕ + tan(α)t. The aametic equation of the left sial S is the same with α elaced by α. Note that a ight sial S + can neve coss anothe ight sial S q + (the same holds fo left sials). The sials S + and S coss infinitely often. The eachable egion R is bounded by the ats of S + and S with 0 t π cot(α). We theefoe call R the sial egion of. It follows diectly fom the definition that fo all q R we have that R q R. Lemma 1 The shotest angle-esticted ath between a oint and a oint q R consists of a staight segment followed by a sial segment. Eithe segment can have length zeo. Using Lemma 1 we establish the following oeties. Poety 1 An otimal flow tee consists of staight segments and sial segments (see Fig. 4). Poety 2 Evey node in an otimal flow tee, othe than the oot, has at most two incoming edges. Poety 3 Evey otimal flow tee is lana. Figue 4: An otimal flow tee (α = π/6). 3 Sial tees In this section we intoduce sial tees and ove that they aoximate flow tees. The acs of a sial tee consist only of sial segments of a given α. An otimal sial tee is hence the shotest flow tee that uses only sial segments. Any aticula ac of a sial tee can consist of abitaily many sial segments; it can switch between following its ight sial and following its left sial an abitay numbe of times. The length of a sial segment can be exessed in ola coodinates. Let = (R 1, ϕ 1 ) and q = (R 2, ϕ 2 ) be two oints on a sial, then the distance D(, q) between and q on the sial is D(, q) = sec(α) R 1 R 2. (1) Conside now the shotest sial ath using only sial segments between a oint and a oint q eachable fom. The eachable egion fo is still its sial egion R, so necessaily q R. The length of a shotest sial ath is given by Equation 1. The shotest sial ath is not unique, in aticula, any sequence of sial segments fom to q is shotest, as long as we kee moving towads the oot. Theoem 2 The otimal sial tee T is a sec(α)- aoximation of the otimal flow tee T. Poof. Let C R be a cicle of adius R with the oot as cente. A lowe bound fo the length of T is given by L(T ) 0 T C R dr, whee T C R counts the numbe of intesections between the tee T and the cicle C R. Using Equation 1, the length of T is L(T ) = sec(α) 0 T C R dr. Now conside the sial tee T with the same nodes as T, but whee all acs between the nodes ae elaced by a sequence of sial segments (see Fig. 5). Fo a given cicle C R, this oeation does not change the numbe of intesections of the tee with C R, i.e. T C R = T C R. So we have that L(T ) L(T ) sec(α)l(t ). C R T T Figue 5: T and T. Obsevation 1 An otimal sial tee is lana and evey node u has at most two incoming edges. Relation with ectilinea Steine aboescences. Both ectilinea Steine aboescences and sial tees contain diected aths, fom the oot to the teminals o vice vesa. The edges of a ectilinea Steine aboescence ae esticted to oint ight o u, which is simila to the angle estiction of sial tees. The elation between the concets cannot be used diectly, but some of the techniques develoed fo ectilinea Steine aboescences can be adated to sial tees. 4 Comuting sial tees In the secial case that the sial egions of the teminals ae emty, i.e., if t i / R tj fo all i j, we can use dynamic ogamming to comute an otimal sial tee in O(n 3 ) time, based on the following lemma. Lemma 3 If the sial egions of all teminals ae emty, then the leaf ode of any lana sial tee follows the adial ode of the teminals. C R 37
27th Euoean Woksho on Comutational Geomety, 2011 5 Weighted flow tees C Figue 6: The wavefont W. We now descibe an aoximation algoithm that is based on a geedy algoithm fo ectilinea Steine aboescences [6]. We iteatively join nodes, ossibly with Steine nodes, until all teminals ae connected in a single tee T, the geedy sial tee. Initially, T is a foest. A node (o teminal) is active if it does not have a aent in T. In evey ste, we join the two active nodes fo which the join oint is fathest fom. The join oint uv of two nodes u and v is the fathest oint fom such that R u R v. This oint is unique if u, v, and ae not collinea. The algoithms swees a cicle C, centeed at, inwads ove all teminals. All active nodes that lie outside of C fom the wavefont W (the black nodes in Fig. 6). W is imlemented as a balanced binay seach tee, whee nodes ae soted accoding to the adial ode aound. We join two active nodes u and v as soon as C asses ove uv. Fo any two nodes u, v W it holds that u / R v. Hence, when C asses ove uv and both nodes u and v ae still active, then, by Lemma 3, u and v must be neighbos in W. We ocess the following events. Teminal. When C eaches a teminal t, we add t to W. We need to check if thee exists a neighbo v of t in W such that t R v. If such a node v exists, then we emove v fom W and connect v to t. Finally we comute new join oint events fo t and its neighbos in W. Join oint. When C eaches a join oint uv (and u and v ae still active), we connect u and v to uv. Next, we emove u and v fom W and we add uv to W as a Steine node. Finally we comute new join oint events fo uv and its neighbos in W. We stoe the events in a ioity queue Q, odeed by deceasing distance to. It is easy to veify that the total numbe of events is O(n), and that each event can be handled in O(log n) time, so the total unning time is O(n log n). The geedy sial tee is lana by constuction. We can ove the following esults. Lemma 4 Let C be any cicle centeed at and let T and T be the otimal sial tee and the geedy sial tee, esectively. Then C T 2 C T. Theoem 5 The geedy sial tee is a 2- aoximation of the otimal sial tee and can be comuted in O(n log n) time. When ceating flow mas we need to conside weighted flow tees, that is, flow tees with thick acs. To facilitate easy comaisons between flows these acs should be dawn as thickly as ossible. Howeve, inceasing the thickness can incease the length of the otimal flow tee substantially. This tadeoff between ac thickness and tee length makes it vey difficult to oduce theoetically inteesting esults egading weighted flow tees. Hence we imlemented a heuistic aoach based on ou aoximation algoithm fo (thin) sial tees. We thicken the edges of the geedy sial tee, ushing acs away fom teminals and obstacles, and aly local changes to the tee toology to facilitate thicke flows. The esulting flow mas ae still guaanteed to be cossing fee. Fist esults look vey omising (see Fig. 1); ou mas ae less clutteed than those oduced by othe automated methods, and we can obseve that sial tees natually cluste teminals well. Refeences [1] J. Códova and Y. Lee. A Heuistic Algoithm fo the Rectilinea Steine Aboescence Poblem. Technical Reot, Engineeing Otimization, 1994. [2] B. Lu and L. Ruan. Polynomial Time Aoximation Scheme fo the Rectilinea Steine Aboescence Poblem. Jounal of Combinatoial Otimization, 4(3):357 363, 2000. [3] J. Mitchell. L 1 shotest aths among olygonal obstacles in the lane. Algoithmica, 8(1):55 88, 1992. [4] D. Phan, L. Xiao, R. Yeh, P. Hanahan and T. Winogad. Flow ma layout. In Poc. IEEE Symosium on Infomation Visualization,. 219 224, 2005. [5] S. Ramnath. New aoximations fo the ectilinea Steine aboescence oblem. IEEE Tansactions on Comute-Aided Design of Integated Cicuits and Systems, 22(7):859 869, 2003. [6] S.K. Rao, P. Sadayaan, F.K. Hwang and P.W. Sho. The ectilinea Steine aboescence oblem. Algoithmica, 7(1):277 288, 1992. [7] W. Shi and C. Su. The Rectilinea Steine Aboescence Poblem Is NP-Comlete. In Poc. 11th ACM- SIAM Symosium on Discete Algoithms,. 780 787, 2000. [8] W. Shi and C. Su. The Rectilinea Steine Aboescence Poblem Is NP-Comlete. SIAM Jounal on Comuting, 35(3):729 740, 2005. [9] T.A. Slocum, R.B. McMaste, F.C. Kessle and H.H. Howad. Thematic Catogahy and Geovisualization. Peason, New Jesey, 2010. [10] CSISS - Satial Tools: Toble s Flow Mae. htt://www.csiss.og/cleainghouse/flowmae/. [11] W. Toble. Exeiments in Migation Maing by Comute. The Ameican Catogahe, 14(2):155 163, 1987. 38