i Preface Welcome to the Volume 4 Number 1 of the International Journal of Design, Analysis and Tools for Integrated Circuits and Systems (IJDATICS). This issue comprises of i) enhanced and extended version of research papers from the International DATICS Workshops in 2012 and 2013, and ii) ordinary manuscript submissions in 2012 and 2013. DATICS Workshops were created by a network of researchers and engineers both from academia and industry in the areas of i) Design, Analysis and Tools for Integrated Circuits and Systems and ii) Communication, Computer Science, Software Engineering and Information Technology. The main target of DATICS Workshops is to bring together software/hardware engineering researchers, computer scientists, practitioners and people from industry to exchange theories, ideas, techniques and experiences. This IJDATICS issue presents five high quality academic papers. This mix provides a well- rounded snapshot of current research in the field and provides a springboard for driving future work and discussion. The five papers presented in this volume are summarized as follows: • Image Processing: Liutkevi č ius and Davidsona modeled structured surface from unstructured cloud of points. • Integrated Circuits: Rao and Srinivasulu propose an approach to implement a 16-BIT RCA using current sink restorer structure. Meanwhile, Jamali, Ahmadi and Fathabadi conduct a chipless RFID case study on a RF/Digital co-Design approach based on VHDL-AMS modeling. • Software Engineering: Arnuphaptrairong perform an empirical validation study on early stage software effort estimation via Function Point Analysis. • Sensor Networks: I mran, Khursheed, Ahmad, Waheed, O’Nils and Lawal propose an architecture of wireless visual sensor node with region of interest coding. We are beholden to all of the authors for their contributions to the Volume 4 Number 1 of IJDATICS. We would also like to thank the IJDATICS editorial team. Editors: Ka Lok Man , Xi’an Jiaotong-Liverpool University, China, and Baltic Institute of Advanced Technology (BPTI), Lithuania Chi-Un Lei , University of Hong Kong, Hong Kong Amir-Mohammad Rahmani , University of Turku, Finland Nan Zhang , Xi’an Jiaotong-Liverpool University, China David Afolabi , Xi’an Jiaotong-Liverpool University, China ii Table of Contents Vol. 4, No. 1, December 2013 Preface ................................................................................................. i Table of Contents ................................................................................... ii 1. Modeling of Structured Surface from Unstructured Cloud of Points ........................ ....................................................................... R. Liutkevi č ius and A. Davidsonas 1 2. 16-BIT RCA Implementation Using Current Sink Restorer Structure ..................... ............................................ Tirumalasetty Venkata Rao and Avireni Srinivasulu 9 3. Early Stage Software Effort Estimation Using Function Point Analysis: An Empirical Validation .......................................................... Tharwon Arnuphaptrairong 15 4. RF/Digital Co-Design Approach Based on VHDL-AMS Modeling: A Chipless RFID Case Study ................... Arash Jamali, Arash Ahmadi and Omid Sadeghi Fathabadi 22 5. Architecture of Wireless Visual Sensor Node with Region of Interest Coding ........................................... Muhammad Imran, Khursheed Khursheed, Naeem Ahmad, Malik A. Waheed, Mattias O’Nils and Najeem Lawal 30 INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 1 Abstract — This paper presents a new approach for creating a model of a structured surface from an unstructured cloud of points where points are measured from a surface containing a centre-line such that all perpendicular rays to that line intersect with a surface no more than once. A presented algorithm analyses cloud of points, generated by a point based 3D scanner and calculates parameters for a single non-uniform 3D B-spline mesh. A calculated model can be used directly in a 3D graphics API, such as OpenGL or converted to a structured triangle mesh. Index Terms —3D scanning and visualization, 3D surface reconstruction, B-Spline, cloud of points approximation, computational geometry. I. I NTRODUCTION surface reconstruction from a cloud of points is an increasingly important problem in computer graphics, computer aided design, quality control, medical imaging etc. Laser range scanners, hand-held digitizers or imaging systems are often used to capture surface points from real objects and a wide variety of algorithms have been developed for building surface models from the captured data. A very early solution to the reconstruction problem was suggested by Boissonnat [6] who proposed a sculpting of the Delaunay triangulation. Later, Edelsbrunner and Mücke [12] suggested a more refined sculpting strategy, named α -shapes. Another parametric surface reconstruction algorithm was proposed by Bajaj et al. [4]. An algorithm uses α -shapes and cubic Bernstein-Bezier (BB) surfaces to create a surface approximating triangulation. Bernardini et al. [5] also proposed an algorithm based on α -shapes but suggested solution how to avoid expensive computation of the Delaunay triangulation. The algorithm was named Ball Pivoting Algorithm (BPA). A major drawback of using α -shapes for a surface reconstruction is that such algorithms require an experimentally chosen parameter α that depends on the sampling density. The sampling density may vary over different parts of the surface, so there may be no optimal value of α A different approach to a surface reconstruction problem was proposed by Hoppe et al. [14]. In his algorithm approximating surface is created from a set of values for which signed distance functions, defined by the input point samples, are equal to zero. The algorithm was named zero-set and later was improved by Curless and Levoy [8] and Turk and Levoy [17]. Zero-set based algorithms along with the points coordinates expect the normal vectors and other information like errors. This can be a problem if 3D scanner can capture only surface points. A first theoretically proven reconstruction algorithm was proposed by Amenta, Bern and Kamvysselis [1]. This algorithm, named Crust, builds Voronoi diagrams out of acquired data and uses it to reconstruct a surface. Crust algorithm was greatly improved by Amenta, Choi, Dey and Leekha [2] and is now known as Cocone algorithm. Cocone and Crust algorithms produce holes and other artifacts’ if data contain undersampling, noise or reconstructed surface has sharp corners. To overcome these problems Amenta, Choi and Kolluri [3] introduced Power Crust algorithm. Authors extended Crust algorithm by using additional power shape structure. However, Power Crust algorithm adds comparatively large amount of extra data points in the output. Dey and Goswami [10] have extended Cocone algorithm to handle surfaces containing sharp corners. Their version of an algorithm is called Tight Cocone. Algorithm performs undersampling detection to avoid a formation of surface holes in the undersampling areas. If compared to Power Crust algorithm, Tight Cocone adds no extra points to the output. Nevertheless, surface holes are avoided only if the undersampling is local and detectable. Also, algorithm is sensitive to noise. Dey and Goswami [11] modified Tight Cocone algorithm and made the reconstruction available from noisy data. Unfortunately a result of the algorithm, named as Robust Cocone, is usually a very rough surface approximation. All the algorithms, mentioned above produce piecewise linear approximations of a surface in a form of an unstructured triangle mesh. In the presence of undersampling, noise and sharp corners, these algorithms often produce errors that usually result in structure flaws and holes on a models surface. This paper presents a surface reconstruction algorithm that generates a water-tight (without holes) and well-structured surface out of noisy and unstructured input data. These very important characteristics of a surface are guaranteed thanks to the non-uniform B-splines. The use of B-splines makes the proposed algorithm different from above mentioned algorithms while keeping its quality at a highly competitive level. This paper is organized as follows. Definitions and structure of the input data are described in the next section. The proposed surface modeling algorithm is comprehensively presented in section III, through A-E subsections. Practical usage of the algorithm results are discussed in Section IV. Section V covers Modeling of Structured Surface from Unstructured Cloud of Points R. Liutkevi č ius, A. Davidsonas A Authors are associated with the Department of System Analysis, Vytautas Magnus University, Lithuania. Authors can be reached by e-mail r.liutkevicius@live.vdu.lt and andrius@live.vdu.lt respectively. INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 2 implementation and experimental results. Finally Section VI concludes the paper. II. S OURCE DATA AND DEFINITIONS The presented algorithm takes as an input a three dimensional points’ set ⌰ : ⌰ 〒 䙦 ᡶ 〒 , ᡷ 〒 , ᡸ 〒 䙧 , 1 ≤ ᡡ ≤ ‑ (1) Here x , y , and z represent point’s coordinates in the Cartesian coordinate system, γ is a number of acquired surface points. It is assumed that this point set has been sampled from a surface ⌳ ε ℝ 3 that has a centre-line I , such that all perpendicular rays to that line intersects with a surface not more than once. An approximating surface is formed by converting a cloud of points into a parametric non-uniform B-spline surface [15] that is defined as: iii 䙦 ᡳ , ᡴ 䙧 = 㔳 㔳 i 〰 , ぃ 䙦 ᡳ 䙧 i 〱 , い 䙦 ᡴ 䙧 iii 〰 , 〱 ぇ 〱 ⢀ ⡨ う 〰 ⢀ ⡨ (2) ᡳ 十 ≤ ᡳ ≤ ᡳ 十 ⡸ ⡩ , ᡴ 卄 ≤ ᡴ ≤ ᡴ 卄 ⡸ ⡩ (3) Here p is a surface degree in u direction; q is a surface degree in v direction; viii = 䙨 ᡳ 十 |0 ≤ ᡣ ≤ ᡱ + ᡨ + 1䙩 is a B-spline’s knot vector in u direction; ix = 䙨ᡴ 卄 |0 ≤ ᡤ ≤ ᡲ + ᡩ + 1䙩 is a B-spline’s knot vector in v direction; i 〰,ぃ 䙦ᡳ䙧 and i 〱,い 䙦ᡴ䙧 are B-spline’s blending functions of degree p and q, respectively; P c,d are B-spline’s control (de-Boor) points [13]; u and v are parameterization intervals (infinite set of points in a predefined range) and should not be confused with single values. The parameters U , V , i 〰,ぃ 䙦ᡳ䙧 , i 〱,い 䙦ᡴ䙧 and P c,d are described in more detail in the following sections. III. S URFACE MODELING A. Overview of an algorithm Out of unstructured input data the algorithm computes unknown parameters U , V , i ⤓,⤦ 䙦u䙧 , i ⤔,⤧ 䙦v䙧 and iii ⤓,⤔ of a parametric B-spline surface P (u,v), defined in (2) so that it approximates a surface ⌳ . The steps of how to calculate these unknown parameters are shown in Fig. 1. Unstructured data usually do not meet necessary and sufficient conditions and direct approximation is not possible to implement using B-splines [16]. However, an approximation of unstructured data using B-splines is possible. To overcome the problem of unstructured data, an approach to transform input data ⌰ i into two spaces D ( 1 ) εℝ 2 and D ( 2 ) εℝ 2 and then calculate unknown B-spline parameters from transformed data is proposed, implemented and experimental results presented in this paper to demonstrate algorithm’s advantage over the other well-known algorithms. A key thing here is a source data transformation, described in more details in section III B that is applied at the first step of the algorithm (Fig. 1). During the next step transformed data D (b), b = 1,2 are subdivided into separate data blocks, which represent patches of the B-spline surface. Data blocks are used to form B-spline knot vectors U and V . During the third step B-spline blending functions i ⤓,⤦ 䙦u䙧 and i ⤔,⤧ 䙦v䙧 are calculated from knot vectors and D (b). At the fourth step, B-spline control points P c,d are calculated based on the blending functions and other calculated data by applying optimization in the least square sense. Calculated parameters U , V and P c,d are finally used to form a B-spline surface that approximates a surface ⌳ Fig. 1. The process of parametric surface creation B. Transformation of input data Shoenberg and Whitney [16] proved that data must be structured for a direct parametric surface interpolation and an approximation to be possible. An example of structured data is shown in Fig. 2. 3D scanners usually output unstructured data. Fig. 3 shows data, acquired with an experimental scanner, built at Vytautas Magnus University [9]. It can be noticed from Fig. 3 that there is no simple way to restructure data into a structured form. So a parametric surface cannot be approximated from such data directly. To solve the problem input data ⌰ i are transformed into spaces D (b) ε ℝ 2 , b = 1,2. The steps of the transformation process are: 1. Positioning of cloud of points ⌰ i as shown in Fig. 4; 2. Sorting of cloud of points by z coordinate in ascending order; 3. Grouping of points ⌰ i along the center axis I ; 4. Sorting of points in each group by their position related to the center axis I and storing in matrices D (b) ; INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 3 5. Filling of empty entries of matrices D (b) with values, calculated using linear interpolation between neighbor non-empty entries. Fig. 2. Example of the structured data Fig. 3. Example of the unstructured data A cloud of points must be properly aligned with respect to the coordinate system for the transformation algorithm to work properly. This is done during the first step by translating and rotating a cloud of points ⌰ i so that the surface’s center axis I coincides to the z axis and starts from z =0 as shown in Fig. 4. The positioning of a surface is done by multiplying a cloud of points ⌰ i by appropriate transformation and rotation matrices [13]. Transformation matrices can be saved and used to position a surface back to the original position after the reconstruction if the original surface position is important. During the second step positioned points are sorted in the ascending order by z coordinate. Fig. 4. Positioning of the surface The next step is grouping of points by the z coordinate. The idea of grouping is to label each point ⌰ i as 〒 and save labeling information in the separate vector Z grp : ↂ 〴ぅぃ = 㐵 ⡩ , ⡰ , ... , 〒 , ... , も 㐹 , 〒 = ᜩ ᡸ 〒 ∆ ᡳ ᜰ ∆ᡳ , ᡸ ⡩ ≤ ᡸ ⡰ ≤ ≤ ᡸ 〒 ≤ ≤ ᡸ も , ᡡ = 1 , ... , ‑ (4) Here ᜩ · ᜰ is a round down operator. Vector Z grp are then used to group points into m unique groups: V = 䙦 〒 䙧 , 〒 ≠ 〷 , ᡡ ≠ ᡢ , ᡡ , ᡢ = 1 , ... , ‑ (5) Each group is denoted as h i as shown below: V = 䙦 ℎ ⡩ , ℎ ⡰ , ... , ℎ 〒 , ... , ℎ 䙧 , V ⊆ ↂ 〴ぅぃ , ℎ ⡩ < ℎ ⡰ < < ℎ 〒 < < ℎ (6) The vector H contains m ( m ≤ γ ) unique elements from the vector ↂ 〴ぅぃ . The parameter ∆ᡳ depends on input data and is selected experimentally. Usually values from 5 to 10 give sufficient results. A value of 1 should be used when points are already distributed in groups. Higher values of ∆ᡳ decrease the INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 4 number of groups and increase the number of points in the groups. During the fourth step the points in each group ℎ 〒 are sorted again but this time by a parameter ‖ ⤠ that takes into account a point’s position from the center axis I . Based on this parameter, points are written into matrices D (b) ‖ ⤠ is calculated using an equation: ‖ ⤠ = ᝃ ᝂ ᝂ ᝂ ᝂ 䙸 360 + 㐶 y 㕖 | y 㕖 | cos ⡹ ⡩ ᡶ ⤠ ᡰ 〷 㑀 䙹 mod 360 ∆ ᡴ ᝆ ᝅ ᝅ ᝅ ᝅ , (7) ᡷ 㕖 = 㐠 ᡷ 〷 , ᡷ 〷 ≠ 0 1 , ᡷ 〷 = 0 , ᡰ 〷 = 㒕ᡶ 〷 ⡰ + ᡷ 〷 ⡰ , 0 < ∆ ᡴ ≤ 1 , ᡢ = 1 , ... , ‑ Here ᜩ∙ᜰ is a round to nearest operator. The parameter ∆ᡴ depends on the input data and is selected experimentally. ∆ᡴ affects surface' approximation: the lower the value of the ∆ᡴ is, the more detailed a surface’s approximation is. If data contain noise, higher values of the ∆ᡴ give better results. For the sorting of data, a new vector A is used: ⅗ = 㐵 ᡓ ⡩ , ᡓ ⡰ , ... , ᡓ 〷 , ... , ᡓ ぁ 㐹 = ∆ ᡴ × 䙦 ᡢ − 1 䙧 , ᡦ = 㘨 360 ∆ ᡴ 㘨 , 0 < ∆ ᡴ ≤ 1 (8) The sorting is performed using an equation: I 䙦 〩 䙧 㐵 ℎ 〒 , ᡓ 〷 㐹 = 㐠 ᡷ 十 ℎ 〒 = 十 , ᡔ = 1 − ᡶ 十 ᡓ 〷 = ‖ 十 , ᡔ = 2 , ℎ ⡩ < ℎ ⡰ <. . . < ℎ 〒 <. . . < ℎ , ᡓ ⡩ < ᡓ ⡰ < < ᡓ 〷 < < ᡓ ぁ , ᡣ = 1 , ... , ‑ (9) The result of this equation is written into matrices I 〒,〷 䙦〩䙧 : I 〒 , 〷 䙦 〩 䙧 = I 䙦 〩 䙧 㐵 ℎ 〒 , ᡓ 〷 㐹 , ᡔ = 1 , 2 , ᡡ = 1 , ... , ᡥ , ᡢ = 1 , ... , ᡦ (10) If a cloud of points is unstructured, matrices I 䙦〩䙧 most likely will contain empty entries that must be calculated to proceed. In the presented algorithm, a simple linear interpolation between the neighbor non-empty entries is used. Further calculations are performed on modified matrices I 䙦〩䙧 that do not have empty entries. C. Formation of knot vectors B-spline knot vectors U and V are calculated by subdividing I 䙦〩䙧 into ᡰ × ᡵ data blocks as shown in Fig. 5. Endpoints of each data block are marked as ᡳ 十 and ᡴ 卄 Fig. 5. Subdivision of I 䙦〩䙧 Subdivision can be non-uniform. Although the endpoints have to be selected according to the following requirements: ᡳ 十 ≤ ℎ 〒 ≤ ᡳ 十 ⡸ ⡩ , 1 ≤ ᡡ ≤ ᡥ , 0 ≤ ᡣ ≤ ᡰ , 1 ≤ ᡰ ≤ ᡥ − ᡨ , (11) ᡴ 卄 ≤ ᡓ 〷 ≤ ᡴ 卄 ⡸ ⡩ , 1 ≤ ᡢ ≤ ᡦ , 0 ≤ ᡤ ≤ ᡵ , 1 ≤ ᡵ ≤ ᡦ − ᡩ (12) Here p and q are B-spline degrees in the directions u and v , respectively. In B-spline theory, a cubic spline is the most common type, sufficient to approximate most types of shapes, so cubic B-spline surface i.e. of order 4 (degree = 3) is used through this paper too. The parameters r and w are selected experimentally. A B-spline surface approximates acquired data more precisely if higher r and w values are used. The requirements in (11) and (12) ensure that Shoenberg-Whitney conditions are met i.e. it is possible to create a valid parametric surface that approximates a given data set [16]. Knots ᡳ 十 and ᡴ 卄 are calculated using equations: ᡳ 十 = 㐢 ℎ ⡩ ᡡ < ᡨ ℎ ⡩ + 䙦 ᡡ − ᡨ 䙧 䙦 ℎ − ℎ ⡩ 䙧 ᡥ − 1 ᡨ ≤ ᡡ < ᡰ + ᡨ − 2 ℎ ᡡ > ᡰ + ᡨ − 2 , (13) ᡴ 卄 = 㐢 ᡓ ⡩ ᡢ < ᡩ ᡓ ⡩ + 䙦 ᡢ − ᡩ 䙧 䙦 ℎ ぁ − ℎ ⡩ 䙧 ᡦ − 1 ᡩ ≤ ᡢ < ᡵ + ᡩ − 2 ᡓ ぁ ᡢ > ᡵ + ᡩ − 2 , (14) 0 ≤ ᡡ ≤ ᡰ + 2 ᡨ , 0 ≤ ᡢ ≤ ᡵ + 2 ᡩ INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 5 Knot vectors U and V are created directly from the knots ᡳ 十 and ᡴ 卄 : viii = 䙦 ᡳ 十 䙧 , (15) ix = 䙦 ᡴ 卄 䙧 , (16) 0 ≤ ᡣ ≤ ᡰ , 1 ≤ ᡰ ≤ ᡥ − ᡨ , 0 ≤ ᡤ ≤ ᡵ , 1 ≤ ᡵ ≤ ᡦ − ᡩ D. Calculation of B-spline blending functions Blending functions define the type of the splines used to form a parametric surface. In this paper these functions are encoded into parameters i 〰,ぃ 䙦ᡳ䙧 and i 〱,い 䙦ᡴ䙧 of the (2) equation and are used to calculate B-spline’s control points P c,d The relation between the parameterization intervals u and v in the expressions (3) and the values h i and a j in the expressions (11)-(12) are used to calculate B-spline’s blending functions. As a result blending functions are defined by p +1 and q +1 non-zero coefficients i 〰,ぃ 䙦ℎ 〒 䙧 , ℎ 〒 ∈ ᡳ and i 〱,い 㐵ᡓ 〷 㐹 , ᡓ 〷 ∈ ᡴ respectively. These coefficients are calculated using Cox-de Boor recurrences [7]: Initialize i 〰 , ⡨ 䙦 ℎ 〒 䙧 = 㐠 1 , ℎ 〒 ∈ 㐧 ᡳ 十 , ᡳ 十 ⡸ ⡩ 㐹 0 , otherwise , i 〱,⡨ 㐵 ᡓ 〷 㐹 = 㐠 1, ᡓ 〷 ∈ 㐧ᡴ 卄, ᡴ 卄⡸⡩ 㐹 0 , otherwise , i 〰 , ぃ 䙦 ℎ 〒 䙧 = 䙦 ℎ 〒 − ᡳ 十 䙧 i 〰 , ぃ ⡹ ⡩ 䙦 ℎ 〒 䙧 ᡳ 十⡸ぃ − ᡳ 十 + + 㐵 ᡳ 十 ⡸ ぃ ⡸ ⡩ − ℎ 〒 㐹 i 〰⡸⡩,ぃ⡹⡩ 䙦 ℎ 〒 䙧 ᡳ 十 ⡸ ぃ ⡸ ⡩ − ᡳ 十 ⡸ ⡩ , (17) i 〱 , い 㐵 ᡓ 〷 㐹 = 㐵 ᡓ 〷 − ᡴ 卄 㐹 i 〱 , い ⡹ ⡩ 㐵 ᡓ 〷 㐹 ᡴ 卄⡸い − ᡴ 卄 + + 㐵 ᡴ 卄 ⡸ い ⡸ ⡩ − ᡓ 〷 㐹 i 〱⡸⡩,い⡹⡩ 㐵 ᡓ 〷 㐹 ᡴ 卄 ⡸ い ⡸ ⡩ − ᡴ 卄 ⡸ ⡩ , (18) ᡳ 十 ≤ ℎ 〒 ≤ ᡳ 十 ⡸ ⡩ , 1 ≤ ᡡ ≤ ᡥ , ᡴ 卄 ≤ ᡓ 〷 ≤ ᡴ 卄 ⡸ ⡩ , 1 ≤ ᡢ ≤ ᡦ Here viii = 䙨ᡳ 十 |0 ≤ ᡣ ≤ ᡱ + ᡨ + 1䙩 and ix = 䙨ᡴ 卄 |0 ≤ ᡤ ≤ ᡲ + ᡩ + 1䙩 are B-spline’s knot vectors. E. Calculation of B-spline control points A B-spline surface P ( u , v ) is an infinite set of points. In order to create an approximation of a surface ⌳ , a certain number of these points should be close or equal to a finite set of the acquired point’s ⌰ i . Matrices D (b) , b = 1,2 are used instead of the ⌰ i to create such mapping. Surfaces P ( b ) ( u , v ) interpolate D (b) if at points h i and a j : I 〒 , 〷 䙦 〩 䙧 = iii 䙦 〩 䙧 㐵 ℎ 〒 , ᡓ 〷 㐹 = 㔳 㔳 i 〰 , ぃ 䙦 ℎ 〒 䙧 i 〱 , い 㐵 ᡓ 〷 㐹 iii 〰 , 〱 䙦 〩 䙧 ぇ 〱 ⢀ ⡨ う 〰 ⢀ ⡨ , (19) ᡳ 十 ≤ ℎ 〒 ≤ ᡳ 十⡸⡩ , ᡴ 卄 ≤ ᡓ 〷 ≤ ᡴ 卄⡸⡩ , 1 ≤ ᡡ ≤ ᡥ, 1 ≤ ᡢ ≤ ᡦ, ᡔ = 1,2. Here viii = 䙨ᡳ 十 |0 ≤ ᡣ ≤ ᡱ + ᡨ + 1䙩 and ix = 䙨ᡴ 卄 |0 ≤ ᡤ ≤ ᡲ + ᡩ + 1䙩 are B-spline knot vectors. The parameters i 〰,ぃ 䙦ℎ 〒 䙧 and i 〱,い 㐵ᡓ 〷 㐹 are calculated according to the equations, described in details in Section III D. The parameters iii 〰,〱 䙦〩䙧 are the control points of the surfaces P ( b ) ( u , v ). They are unknown in advance but can be calculated using an equation (24). Since i 〰,ぃ 䙦ᡳ䙧 in (19) does not depend on the index d , the equation can be rewritten as: I 〒 , 〷 䙦 〩 䙧 = 㔳 i 〰 , ぃ 䙦 ℎ 〒 䙧 㐷 㔳 i 〱 , い 㐵 ᡓ 〷 㐹 iii 〰 , 〱 䙦 〩 䙧 ぇ 〱 ⢀ ⡨ 㑁 う 〰 ⢀ ⡨ (20) The parameters i 〰,ぃ 䙦ℎ 〒 䙧 and i 〱,い 㐵ᡓ 〷 㐹 are stored in the matrices i 〒,〰 and i 〷,〱 respectively: i 〰,ぃ 䙦 ℎ 〒 䙧 = i 〒,〰 = 㐸 ᡀ ⡩ , ⡩ ᡀ ⡩ , ⡰ ⋯ ᡀ ⡩ , う ᡀ ⡰,⡩ ᡀ ⡰,⡰ ⋯ ᡀ ⡰,う ⋮ ⋮ ⋱ ⋮ ᡀ , ⡩ ᡀ , ⡰ ⋯ ᡀ , う 㑂 , (21) i 〱,い 㐵 ᡓ 〷 㐹 = i 〷,〱 = 㐸 ᡀ ⡩ , ⡩ ᡀ ⡩ , ⡰ ⋯ ᡀ ⡩ , ぇ ᡀ ⡰,⡩ ᡀ ⡰,⡰ ⋯ ᡀ ⡰,ぇ ⋮ ⋮ ⋱ ⋮ ᡀ ぁ , ⡩ ᡀ ぁ , ⡰ ⋯ ᡀ ぁ , ぇ 㑂 , (22) 0 ≤ ᡕ ≤ ᡱ, 0 ≤ ᡖ ≤ ᡲ, 1 ≤ ᡡ ≤ ᡥ, 1 ≤ ᡢ ≤ ᡦ. The inner sum of the equation (20) can be denoted as iv 〰,〷 䙦〩䙧 : I 〒 , 〷 䙦 〩 䙧 = 㔳 i 〒 , 〰 iv 〰 , 〷 䙦 〩 䙧 う 〰 ⢀ ⡨ , (23) iv 〰 , 〷 䙦 〩 䙧 = 㔳 i 〷 , 〱 iii 〰 , 〱 䙦 〩 䙧 ぇ 〱 ⢀ ⡨ (24) There is a possibility, that there are no such iii 〰,〱 䙦〩䙧 for which both equations (23) and (24) are valid. So a minimization is used to solve these equations. The equation (23) hides n over-determined systems of linear equations. The unknown coefficients iv 〰,〷 䙦〩䙧 can be calculated by minimizing a sum: ‒ 〷 ⡰ = min 〘 ㉸ , ㊅ 㔳 㘧 I 〒 , 〷 䙦 〩 䙧 − i 〒 , 〰 iv 〰 , 〷 䙦 〩 䙧 㘧 ⡰ 〒 ⢀ ⡩ , (25) iv 〰,〷 䙦〩䙧 = ᜶ ᜵ ᡃ ⡩ , 〷 䙦 〩 䙧 ᡃ ⡰,〷 䙦〩䙧 ⋮ ᡃ う,〷 䙦〩䙧 ᝀ , I 〒,〷 䙦〩䙧 = ᜶ ᜵ ᠰ ⡩ , 〷 䙦 〩 䙧 ᠰ ⡰,〷 䙦〩䙧 ⋮ ᠰ ,〷 䙦〩䙧 ᝀ , 0 ≤ ᡕ ≤ ᡱ , 1 ≤ ᡢ ≤ ᡦ , ᡔ = 1 , 2 INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 6 Here |∙| is the length of a vector. The equation (24) hides s over-determined systems of linear equations. The unknown coefficients iii 〰,〱 䙦〩䙧 can be calculated by minimizing a sum: ‰ 〰 ⡰ = min 〗 ㉸ , ㉹ 㔳 㘧 iv 〰 , 〷 䙦 〩 䙧 〡 − i 〷 , 〱 iii 〰 , 〱 䙦 〩 䙧 〡 㘧 ⡰ ぁ 〷 ⢀ ⡩ , (26) iii 〰,〱 䙦〩䙧 = ᜶ ᜵ ᡂ ⡩,〰 䙦 〩 䙧 ᡂ ⡰,〰 䙦〩䙧 ⋮ ᡂ ぇ , 〰 䙦 〩 䙧 ᝀ 〡 , iv 〰,〷 䙦〩䙧 = ᜶ ᜵ ᡃ ⡩,〰 䙦 〩 䙧 ᡃ ⡰,〰 䙦〩䙧 ⋮ ᡃ ぁ , 〰 䙦 〩 䙧 ᝀ 〡 , 0 ≤ ᡕ ≤ ᡱ, 0 ≤ ᡖ ≤ ᡲ, ᡔ = 1,2. The control points iii 〰,〱 are points in ℝ 3 and have three coordinates that are defined as a tensor: iii 〰 , 〱 = 㐵 iii 〰 , 〱 䙦 ⡩ 䙧 , iii 〰 , 〱 䙦 ⡰ 䙧 , viii 13点 〰 , 〱 㐹 , 0 ≤ ᡕ ≤ ᡱ , 0 ≤ ᡖ ≤ ᡲ (27) Here viii 13点 〰,〱 is a vector, which stores averages of p successive B-spline knots starting from u c and is calculated using an equation: viii 13点 〰 , 〱 = 㐵 ᡳ 〰 ⡸ ⡩ + ⋯ + ᡳ 〰 ⡸ ぃ 㐹 ᡨ (28) Here parameter p is the degree of a B-spline surface in u direction. IV. V ISUALIZATION OF PARAMETRIC SURFACE Calculated parameters can be directly used to visualize a surface using OpenGL graphical library 1 . The control points iii 〰,〱 and two knot vectors U and V are accepted as parameters by GLU function gluNurbsSurface() and are sufficient to create and visualize a surface. Additionally, a parametric surface can be converted to a triangulated mesh by evaluating surface points from equation (2) and then using algorithm [9] to pair them into triangles. V. E XPERIMENTAL RESULTS For the experiments a cloud of points, representing a head sculpture, shown in Fig. 6(a), is used. A cloud of points consists of 80589 unstructured points as shown in Fig. 6(b). The results of the surface reconstruction algorithm, presented in this paper, are shown in Fig. 6(c) – 6(g). The algorithm is implemented using MATLAB 2 and a custom built code. The exception is the calculation of the control points. MATLAB’s implementation of QR algorithm 3 is used to solve the systems of linear equations (23) and (24). The parametric surface 6(c) is created using 35728 control points, 180 knots in u direction and 207 knots in v direction. A 1 http://www.opengl.org/ 2 http://www.mathworks.se/products/matlab/ 3 http://www.mathworks.se/help/matlab/ref/qr.html fragment of the parametric surface’s internal structure is shown in Fig. 6(e). The parametric surface can be converted into a triangle mesh of a desired level of details. As an example, the parametric surface 6(c) is converted into a triangle mesh 6(d), which contains of 171570 triangles. Like the parametric surface, the triangle mesh is well structured as shown in Fig. 6(f). In order to demonstrate that the proposed algorithm is capable of creating parametric models of other shapes of surfaces, few other objects were scanned. The calculated models of these items are shown in Fig. 6(g). In order to evaluate the accuracy of an approximation of the presented algorithm, vectors connecting input data points of transformed surface and the corresponding points on the B-spline’s surface were calculated. The mean of vector lengths is 0.0281 mm, the standard deviation is 0.0885 mm. These numbers are influenced by possible measurement errors that are present in the input data. The calculated mean and standard deviation show that approximation errors are quite small and hardly visually noticeable. Other algorithms mentioned in the introduction usually do not produce approximation errors, because surface points are interpolated, meaning that measurement errors and noise are interpolated too. The approximation of head sculpture using the presented algorithm took 24.742 s to complete (transformation: 15.9161s, calculation of control points: 8.099, other steps: 0.7269) using a PC with 2.4GHz Core 2 Duo CPU and 4GB memory. 3D surface was visualized using OpenGL library and hardware accelerated graphics enabled. The parameters of B-spline’s surface were stored in a custom format in a text file and its size was 743KB. The triangulation results were stored in a plain text object file format (OFF) and its size is 5.12MB. VI. C ONCLUSIONS In this paper the new algorithm for a surface reconstruction from an unstructured cloud of points is presented. The algorithm guarantees to generate hole free surface as it creates a single B-spline surface of a shape of a cloud of points. A generated model is well-structured and simple to modify because a parametric B-spline surface preserves C 2 continuity when changing its parameters. This is much harder to accomplish then using triangulated surfaces. The combination of all three features, mentioned above, makes the presented algorithm different from the other well-known algorithms such us Tight Cocone [10], Power Crust [3], etc. The experimental results presented in this paper prove that the proposed algorithm can be successfully used for creating a model of a structured surface from an unstructured cloud of points where points are measured from a surface containing a centre-line such that all perpendicular rays to that line intersect with a surface no more than once. It was also experimentally proved that the suggested algorithm has small average processing time and its output uses ~7 times less space on a hard drive disk compared to an output of triangulation based algorithms. INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 7 R EFERENCES [1] N. Amenta, M. Bern, M. Kamvysselis. A New Voronoi-Based Surface Reconstruction Algorithm. SIGGRAPH 98 , pp. 415-421 [2] N. Amenta, S. Choi, T. K. Dey, N. Leekha. A simple algorithm for homeomorphic surface reconstruction. International Journal of Computational Geometry and Applications - IJCGA , vol. 12, no. 1-2 , pp. 125-141, 2002. [3] N. Amenta, S. Choi, R. K. Kolluri. The Power Crust. Proceedings of 6’th Annual Symposium on Solid Modeling Applications , pp. 249-260, 2001. [4] C. L. Bajaj, F. Bernardini, G. Xu. Automatic reconstruction of surfaces and scalar fields from 3D scans. Annual Conference on Computer Graphics – SIGGRAPH ’95 , pp. 109-118, 1995. [5] F. Bernardini, J. Mittleman, H. E. Rushmeier, C. T. Silva, G. Taubin. The ball-pivoting algorithm for surface reconstruction. IEEE Transactions on Visualization and Computer Graphics - TVCG , vol. 5, no. 4, pp. 349–359, 1999. a) b) c) d) e) f) g) Fig. 6. Input data: (a) - test cloud of points, (b) – distribution of the points in the cloud. Surface reconstruction results using proposed algorithm: (c) - parametric surface, (d) – triangulated surface, (e) – structure of parametric surface, (f) – structure of triangulated surface, (g) – examples of the other parametric reconstructions INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 8 [6] J. D. Boissonnat. Geometric structures for three dimensional shape representation. ACM Transactions on Graphics - TOG , vol. 3, no. 4 , pp. 266–286, 1984. [7] C. de Boor. On calculating with B-splines. Journal of Approximation Theory , 6 , 50–62, 1972. [8] B. Curless, M. Levoy. A volumetric method for building complex models from range images. Annual Conference on Computer Graphics – SIGGRAPH ’96, pp. 303-312, 1996. [9] A. Davidsonas, R. Liutkevi č ius. A PLC Application for Data Scanning and Visualization. Proceedings of International Conference “Electrical and Control Technologies – 2008” , Kaunas, pp. 144-149, 2008. [10] T. K. Dey, S. Goswami. Tight Cocone: A water tight surface reconstructor. Symposium on Solid Modeling and Applications - SMA, vol. 3, no. 4 , , pp. 127-134, 2003. [11] T. K. Dey, S. Goswami. Provable surface reconstruction from noisy samples. Computational Geometry: Theory and Applications - COMGEO, vol. 35, no. 1-2 , pp. 124–141, 2006. [12] H. Edelsbrunner, E. P. Mücke. Three-dimensional alpha shapes. ACM Transactions on Graphics (TOG), vol. 13, no. 1 , pp. 43-72, 1994. [13] Eric Lengyel. Mathematics for 3D Game Programming and Computer Graphics, Third Edition. Cengage Learning , 2011. [14] H. Hoppe, T. Derose, T. Duchamp, J. A. McDonald, W. Stuetzle. Surface Reconstruction from Unorganized Points. ACM Siggraph Computer Graphics, vol. 26, no. 2 , pp. 71-78, 1992. [15] L. Piegl, W. Tiller. The NURBS Book, Second Edition. Springer-Verlag , 1997. [16] I. J. Schoenberg, A. Whitney. On Pólya frequency functions. III. The positivity of translation determinants with an application to the interpolation problem by spline curves. Transactions of the American Mathematical Society , Volume 74 , pp. 246-259, 1953. [17] G. Turk, M. Levoy. Zippered polygon meshes from range images. Annual Conference on Computer Graphics – SIGGRAPH ’94 , 311-318, 1994.J. U. Duncombe, “Infrared navigation—Part I: An assessment of feasibility (Periodical style),” IEEE Trans. Electron Devices , vol. ED-11, pp. 34–39, Jan. 1959. Raimundas Liutkevi č ius was born in Kaunas, Lithuania, in 1974. He received his Bachelor, Master and PhD degrees in computer science from Vytautas Magnus University. His research areas include computer graphics, system modeling and learning control. Andrius Davidsonas was born in Kaunas, Lithuania, in 1982. He received the Bachelor degree in Applied Informatics from Vytautas Magnus University, Kaunas in 2005, Master degree in Informatics from Vytautas Magnus University in 2007. At present he is a Ph.D student at Vytautas Magnus University. His research areas are computer graphics, surface reconstruction algorithms, 3D scanners and 3D printers. INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 9 Abstract —This paper presents the design of a 16-BIT Ripple Carry Adder (RCA) in Branch-Based Logic and Pass-Transistor logic (BBL-PT), a static design style that minimizes the internal node capacitances. This feature is used to lower the dynamic power dissipation, while maintaining good speed performances. And, we proposed a modified level restorer using current sink restorer structure for branch-based logic and pass-transistor (BBL-PT) full adder [1]. In BBL-PT full adder, there lies a drawback i.e. voltage step existence of, which could be eliminated in the proposed logic by using the current sink restorer. The proposed ripple carry adder is compared with the conventional static CMOS logic and BBL-PT RCAs, demonstrated the good delay performance. The performance of the 16-bit RCA based on proposed BBL-PT cell with current sink restorer structure and other conventional RCA structures are examined using PSPICE and the model parameters of a 0.13 μm CMOS process. Index Terms —CMOS digital integrated circuits, current sink restorer, full adder, high-speed, performance analysis, ripple carry adder. I. I NTRODUCTION ull adder is the core element of complex arithmetic circuits like addition, multiplication, division, exponentiation, etc. Adders play an important part in the final phase of signal processing in some advanced architectures of high-speed analog-to-digital converters. Adders are important components in applications such as digital signal processors (DSP) architectures and microprocessors. In addition to its main task, which is adding two numbers, it participates in many other useful operations such as subtraction, multiplication, division,, address calculation, ..Etc. In most of these systems adder lies in the critical path that affects the overall speed of the system. Accordingly, extensive research is being conducted to develop novel architectures, circuit configurations, layouts, design styles, and design methodologies with the aim of improving adder speed and energy efficiency [1]-[3]. The performance parameter of the full adder seems to be delay, power consumption and power-delay product. The logic style used in the logic gates basically influences the speed, size, power dissipation and the wiring complexity of a circuit. The circuit delay is determined by number of inversion levels, the number of transistors in series, transistor sizes (i.e. channel widths) and intra-cell wiring capacitances. Circuit size depends on the number of transistors, their sizes and on their wiring complexity. Some of them use one logic style for the whole full adder where as others use more than one logic style for their implementation [4]-[7]. The ever-increasing demand for mobile products, working with a high throughput capability and a limited source of power, makes the design of low-power adder cells another significant goal to be attained. The design of a full-adder having low-power consumption and low propagation delay results of great interest for the implementation of modern digital systems [8]-[9]. The full adders TG-CMOS (Transmission Gate based Complementary Metal Oxide Semiconductor), TFA (Transmission Function full Adder) and 14T having the advantage of lower transistor count, intermediate nodes and provide better performance than CMOS and CPL (Complementary Pass Transistor Logic) designs. The above logics TG-CMOS, TFA, 14T, CMOS and CPL show good behavior when implementing a 1-bit full adder cell but they may show performance degradation when used to implement more complex structures. Recently, building the low-power VLSI systems has gained momentum because of the fast growth of technologies in mobile communication and computation. However, the battery technology doesn’t exhibit faster growth as the microelectronics technology. There is however a limited amount of power availability for the mobile systems. So designers are faced with more constraints such as high speed, high throughput, small silicon area, and at the same time low-power consumption. So building low-power, high-performance adder cells is an important factor in today’s growing VLSI Technologies [10]-[12]. Adder performance can be improved by efficiently implementing the carry propagation chain. This can be addressed by either improving the structure of the 1-bit full adder which is one of the basic cells in adders such as the carry select or carry skip, as well as the building block of the ripple carry adder (RCA). since an n-bit RCA is formed by n 1- bit full-adders, or by using improved fast adder architectures such as conditional sum adders (CSAs) or carry look-ahead (CLA) adders [1]. With n -bit ripple carry adders, the speed of operation is mainly limited by the time taken to generate and propagate a carry from input to output in each one-bit cell involved [13]. The circuit delay is determined by number of inversion levels, the number of transistors in series, transistor sizes (i.e. channel widths) and intra-cell wiring capacitances. Circuit size depends on the number of transistors, their sizes and on their wiring complexity. Some of them use one logic style for the whole full 16-BIT RCA Implementation Using Current Sink Restorer Structure Tirumalasetty Venkata Rao, Avireni Srinivasulu, Member, IEEE F Authors are associated with the Department of Electronics and Communications, Vignan University, Vadlamudi-522 213, Guntur, A.P, India. Authors can be reached by e-mail venkatarao.srp@gmail.com and avireni@ieee.org, respectively. INTERNATIONAL JOURNAL OF DESIGN, ANALYSIS AND TOOLS FOR INTERGRATED CIRCUITS AND SYSTEMS, VOL. 4, NO. 1, DECEMBER 2013 10 adder where as others use more than one logic style for their implementation. In this paper, we proposed a modified level restorer using current sink restore structure (within the circle shown in fig. 1) for BBL-PT full adder [1]. The proposed circuit eliminates the voltage step in the existing full adder and having good delay performance i.e. high operating speed. The remaining section of the paper is organized as follows. In section II, proposed full adder structure implementation. The implementation of a 16-bit RCA based on the proposed full adder and their simulation results is described in section III and finally in section IV ended up drawing with conclusion. II. PROPOSED FULL ADDER IMPLEMENTATION A Full Adder (FA) cell is a three-input and two-output block in which the outputs are obviously the addition of three inputs. This has three 1-bit inputs (A, B, and C in ) and two 1-bit outputs (sum and carry). The relations between the inputs and the outputs are expressed in in in in Sum ABC ABC ABC ABC = + + + (1) in in Carry AB BC AC = + + (2) For the low power design, a cell schematic must be implemented with few transistors and intra-cell node connections as far as possible. The branch-based design technique meets these requirements while ensuring robustness with respect to voltage and device scaling. Here, logic cells are designed exclusively with branches composed of transistors in series connected between a supply line and the gate output. In branch-based design, the networks are composed only of branches, i.e., series connections of transistors between the output node and the supply rail. The advantages of transistor branches are higher layout regularity and simpler characterization (i.e., branch instead of gate modeling) [14]. Branch based design having the advantages of no diffusion interruption, common drain for two branches, a minimal number of contacts and few metal connections. Since a lower capacitance is switched during each transition, this results in less dynamic power consumption and lower delays. The disadvantage of BBL-PT full adder implementation lies in the discharge of weak high output level in pass- transistors used in the sum block that can be realized by the feedback pull-up PMOS transistor. In order to restore the weak logic “1” (i.e. V dd V tn) caused by the pass transistors, it has provided sufficient drive to the successive stages. However, the level restoration implemented this way causes a voltage step at the output node “S out ” during a 1 0 → transition. This voltage step is due