7659 Englan UK Journal of Informaton an Computng cence Vol. No. 007 pp. 7-6 Vsualzaton of D Data By Ratonal Quaratc Functons Malk Zawwar Hussan + Nausheen Ayub Msbah Irsha Department of Mathematcs Unversty of the Punjab Lahore-Pakstan (Receve July 8 006 Accepte October 5 006) Abstract. A local shape preservng nterpolaton scheme for D ata s scusse by usng pecewse ratonal quaratc functon. To preserve the shape of the ata n the vew of curves constrants are mae on free parameters n the escrpton of ratonal quaratc functon. Keywors: Vsualzaton Ratonal Quaratc Functons Postve Curves Monotonc Curves Convex Curves.. Introucton Vsualzaton of scentfc ata n D an 3D s very vtal aspect n CAGD. There are plenty of splnes whch can prouce smooth curves but ncapable to preserve the nherte shape of gven ata. Postvty monotoncty an convexty are very mportant features of shape. There are many physcal stuatons where enttes only have meanng when ther values appear n postve monotonc or convex shape. Therefore t s very mportant to scuss shape preservng nterpolaton problems to prove a computatonally economcal an vsually pleasng soluton to the problems of fferent scentfc phenomena. Many people have worke n the area of shape preservaton. For example Frtsch an Carlson [4] an Frtsch an Butlan [5] have scusse the pecewse cubc nterpolaton of monotonc ata. Also McAllster Passow an Rouler [8] consere the pecewse polynomal nterpolaton of monotonc an convex ata. Butt an Brole[3] Brole an Butt [] have scusse the problem of shape preservng usng pecewse cubc nterpolaton. The cubc nterpolaton metho [3] requres the ntroucton of atonal knots when use as shape preservng metho. An algorthm for quaratc splne nterpolaton s gven by McAllster an Rouler [9]. chmt an Hess [] have use cubc polynomals an erve the necessary an suffcent contons to make the nterpolant postve. arfaraz et al [] have use C pecewse ratonal cubc functons. Ths paper examnes the problem of shape preservaton of ata that arose from some scentfc phenomena or from some mathematcal functon. The ratonal quaratc functon efne n ecton s use to preserve the shape of ata by makng the shape constrants on the free parameters n the escrpton of ratonal quaratc functon. The metho uner conseraton n ths paper has an mportant an avantageous feature that no atonal ponts (knots) nee to be supple to preserve the shape of ata.. Ratonal Quaratc Functon For gven set of ata ponts ( x f ) =... n where x < x <... < xn. The pecewse ratonal quaratc functon ( x ) s efne over each subnterval I = [ x x+ ] as: p ( θ ) ( x) = () q ( θ ) wth where p f r f h θ f θ q ( θ ) = + ( r ) θ( θ) ( θ ) = ( θ) + ( + )( θ ) + + + E-mal: malkzawwar@math.pu.eu.pk Publshe by Worl Acaemc Press Worl Acaemc Unon
8 M. Z. Hussan et al: Vsualzaton of D Data By Ratonal Quaratc Functons r s the shape parameter. where x x θ = 0 θ h = x+ x h The ratonal quaratc functon () has the followng propertes: ( ) x ( ) = f x = f + + () ( x ) = () ( x) enote the fferentaton wth respect to x an enote ervatve values (gven or estmate by some metho) at knots x... ome Observatons For r = the ratonal quaratc () reuces to quaratc as: ( ) θ θθ θ + x = f ( ) + ( f + h )( ) + f. () When r 0 equaton () becomes: f( θ ) + h ( θθ ) + f+ θ ( x) =. ( θθ ) In ths case the curve gets loosene; t bulges outse the convex hull for negatve values. When r ( x) = f. Table x.0.5 4.0 4.5 5.0 f 5.0.0 0.7.0 3.0 Fgure : Curve to the ata n Table when r = JIC emal for contrbuton: etor@jc.org.uk
Journal of Informaton an Computng cence Vol. (007) No. pp 7-6 9 Fgure : Curve to the ata n Table when r = 0 C Fgure 3: Curve to the ata n Table when r.. Ratonal Quaratc Functon The ratonal quaratc functon preserves contnuty of zeroth orer; the orer of contnuty can be ncrease up to st orer by applyng followng contons on the ratonal quaratc functon (). () ( x ) = (3) () ( x ) = (4) + + The equaton (3) s satsfe by ratonal quaratc functon. Thus n orer to acheve frst orer contnuty conton n (4) s also requre. Dfferentatng equaton () wth respect to x when x = x.e. θ = 0 when x = x +.e. θ = () ( r ) θ + θ( θ) + ( θ) ( x) = [ + ( r ) θ( θ)] () ( x) = () ( x) = ( r ) x ( ) wll preserve frst orer contnuty f an f only f () ( x+ ) = + JIC emal for subscrpton: nfo@jc.org.uk
0 M. Z. Hussan et al: Vsualzaton of D Data By Ratonal Quaratc Functons therefore or ( r ) = + + + r =. Theorem. The ratonal quaratc functon () preserves contnuty of st orer f an only f equaton (5) s satsfe. (5) 3. Determnaton of ervatves In most applcatons ervatves parameters the ata ( x f ) are not gven an hence must be etermne ether from or by some approprate methos. An obvous choce s mentone here. 3.. Arthmetc Mean Metho Ths s the three-pont fference approxmaton wth otherwse an the en contons are gven as: otherwse otherwse where 4. Postve Curves =0 f h = h + h + h =0 or =0 + = 3 n-. = 0 f =0 or sgn ( * ) sgn( ) n = * = h ( + h + h ) =0 f n =0 or sgn ) sgn( n ) n = * n = f n h + n ( * n ( h + = = h f n n + h n... n. For gven ata ponts ( x f) =... n where f > 0 f > 0... f n > 0. The curve x ( ) s postve on the whole nterval f ( ) 0 n x> x x x. As r > guarantees postve enomnator of ratonal quaratc functon () so the frst conton on r s r > Now the postvty of x ( ) efne n () only s the postvty of numerator of ().e. n ). ( ) = + + + θ p θ f ( θ) ( r f h )( θ) θ f + JIC emal for contrbuton: etor@jc.org.uk
Journal of Informaton an Computng cence Vol. (007) No. pp 7-6 an p ( θ ) s postve f Hence ( x) > 0 f an only f r h r > f h > Max f (6) Theorem. The ratonal quaratc functon gven n () preserves postvty n [ x x + ] = n f satsfes (6). Equaton (6) can be rearrange as: h r = l + Max where l > 0. f r 4.. Demonstraton For the emonstraton conser the postve ata n Table. Ths ata has come from the known volume of NAOH taken n a beaker an ts conuctvty was etermne. HCL soluton was ae from the burette n steps rop by rop. After each aton volume of HCL (x) was strre by gentle shakng an conuctance (f) was etermne as shown n Table. Applcaton of the quaratc splne metho prouces the curve n Fgure 4. Ths curve shows the negatve value of conuctance whch s rculous. Ths flaw s recovere ncely n Fgure 5 usng postvty preservng ratonal quaratc scheme of ecton 4. Table x 3 7 8 9 3 4 f 0 3 7 3 0 Fgure 4: Quaratc curve to the ata n Table JIC emal for subscrpton: nfo@jc.org.uk
M. Z. Hussan et al: Vsualzaton of D Data By Ratonal Quaratc Functons Fgure 5: hape preservng ratonal quaratc curve to ata n Table 5. Monotonc curves For gven set of ata ponts ( x f) = 3... n where x < x <... < x n let us assume monotoncally ncreasng set of ata such that or equvalently an ervatve parameter s chosen such that f f... f n 0 = n-. Now the ratonal quaratc functon () preserves monotonc curve through monotonc ata f Where Where () ( x ) 0 () ( x ) >0 can be obtane by fferentatng () wth respect to x as () j j Σ j= 0 Aj ( θ ) θ j ( x) = [ + ( r ) θ( θ)] A0 = A = A = r. Now or () ( x ) >0 f an only f A j >0 j = 0. r >. (7) Theorem 3. The ratonal quaratc functon gven n () preserves monotoncty n [ x x + ] = n f satsfes (7). r JIC emal for contrbuton: etor@jc.org.uk
Journal of Informaton an Computng cence Vol. (007) No. pp 7-6 3 The equaton (7) can be rearrange as: r = m + where m > 0. Remark. The case of monotoncally ecreasng ata can be erve n a smlar way. 5.. Demonstraton We take a monotonc ata as n Table 3. Fgure 6 s prouce by usng quaratc splne metho whch oes not preserve monotoncty. Fgure 7 shows the monotonc curve through monotonc ata n Table 3 usng monotonc ratonal quaratc scheme erve n ecton 5. Table 3 x.0.5 4.0 4.5 5.0 f 5.0 0.0 7.0 0.0 30.0 Fgure 6: Quaratc curve to the ata n Table 3 6. Convex curves Fgure 7: hape preservng ratonal quaratc curve to ata n Table 3 The ata set {( x f) : =... n} s sa to be convex f... n n an t s strctly convex f < <... < n < n. If ervatve values at ata ponts are also gven then these values must satsfy < <. + The ratonal quaratc functon efne n () wll preserve convex curve through convex ata f n each subnterval JIC emal for subscrpton: nfo@jc.org.uk
4 M. Z. Hussan et al: Vsualzaton of D Data By Ratonal Quaratc Functons Where Where () ( x) s gven by () () ( x ) > 0 3 3 j j Σ j= 0 Aj ( θ) θ ( x) = 3 h[ + ( r ) θ( θ)] A0 = r + + A = 6 + 6 A = 6r 6 6 A = r r r +. 3 Clearly the enomnator of () ( x) s postve f r > an postvty of all the A j j = 03. guarantees the postve numerator of () ( x ) an A j >0 j = 03 f + r >. Thus () ( x) s postve f r + > max. (8) r Theorem 4. The ratonal quaratc functon gven n () preserves convexty n [ x x + ] = n f satsfes (8). The equaton (8) can be rearrange as: + r = n + max where n > 0. 6.. Demonstraton An example of convex ata s shown n Table 4. Applcaton of the quaratc splne metho prouces the curve n Fgure 8. Ths curve shows nose whch s msgung. Fgure 9 s prouce by applyng quaratc splne metho on ths convex ata. One can see that the convexty nature of the ata s preserve n a pleasng way. Table 4 X 0 3 4 5 6 F 9 4 3.40.0.5.0 JIC emal for contrbuton: etor@jc.org.uk
Journal of Informaton an Computng cence Vol. (007) No. pp 7-6 5 Fgure 8: Quaratc curve to the ata n Table 4 Fgure 9: hape preservng ratonal quaratc curve to ata n Table 4 Theorem 5. The ratonal quaratc functon preserves postvty monotoncty an convexty through postve monotone an convex ata f the parameter satsfes the followng conton n each subnterval [ x x + ] = n. 7. Concluson r h r > max + f In ths paper the problem of shape preservng curves s scusse an the constrants are mae on free parameters n the escrpton of ratonal quaratc functon to preserve the shape of ata. In future ths problem can be extene for the shape preservng ratonal bquaratc functon. 8. References [] R. Asm. Vsualzaton of Data ubject to Postve Constrant. Ph. D. thess chool of Computer tues. Unversty of Leas Leas U. K. 000 [] K. W. Brole an. Butt. Preservng Convexty Usng Pecewse Cubc Interpolaton. Computers an Graphcs 99 5():5-3. [3]. Butt an K. W. Brole. Preservng Postvty Usng Pecewse Cubc Interpolaton. Computers an Graphcs. 993 7():55-64. [4] F. N. Frtsch an R. E. Carlson. Monotone Pecewse Cubc Interpolaton. IAM J. Numer. Anal. 980 7(): 38-46. [5] F. N. Frtsch an J. Butlan. A Metho for Constructng Local Monotone Pecewse Cubc Interpolants. IAM J. of c. tat. Comput. 984 5:300-304. [6] T. N. T.Gooman an K. Unsworth. hape Preservng Interpolaton by Parametrcally Defne Curves. IAM J. JIC emal for subscrpton: nfo@jc.org.uk
6 M. Z. Hussan et al: Vsualzaton of D Data By Ratonal Quaratc Functons Numer.Anal. 988 5:-3. [7] M. Z. Hussan hape Preservng Curves an urfaces for Computer Graphcs Ph. D. thess Unversty of the Punjab Pakstan. 00. [8] D. F. McAllster E. Passow an J. A. Rouler. Algorthms for Comptng hape Preservng plne Interpolatons to Data. Math. Comp. 977 3:77-75. [9] D. F. McAllster an Rouler J. A. Rouler. An Algorthm for Computng a hape Preservng Osculatory Quaratc plne. ACM Trans. Math. oftware. 98 7:33-347. [0] M. arfraz M. Z. Hussan an. Butt. A Ratonal plne for Vsualzng Postve Data Proc. IEEE Internatonal Conference on Informaton Vsualzaton. Lonon U. K pp57-6 000. [] M. arfraz. Butt an M. Z. Hussan. Vsualzaton of hape Data by a Ratonal Cubc plne Interpolaton. Computers an Graphcs. 00 5(5):833-845. [] J. W.chmt an W. Hess. Postvty of Cubc Polynomal on Intervals an Postve plne Interpolaton. BIT 988 8:340-35. [3] J. W. chmt. Postvty Monotone an -convex C Interpolaton on Rectangular Grs. Computng. 99 48:363-37. JIC emal for contrbuton: etor@jc.org.uk