RMZ Materials and Geoenvironment, Vol. 55, No. 1, pp. 127-134, 2008 127 How we calculate volume with the use of NTF method Kako izračunamo volumen z uporabo metode NTF An e s Du r g u t o v i ć 1, Mi l i v o j Vu l i ć 2 1 Oikos d.o.o., Jarška cesta 30, SI-1230 Ljubljana, Slovenia; E-mail: anes.durgutovic@oikos.si 2 University of Ljubljana, Faculty of Natural sciences and Engineering, Department of Geotechnology and Mining Engineering, Aškerčeva cesta 12, SI-1000 Ljubljana, Slovenia; E-mail: milivoj.vulic@ntf.uni-lj.si Received: November 23, 2007 Accepted: January 4, 2008 Abstract: In the article titled Volume calculation with the use of NTF method and the UDF for calculation of volumes with the use of NTF method, mathematic plan of the mentioned principal method is presented and instructions for the use of UDF are also given. When it comes to the introduction into work with new computer programs the most effective explanation of the method of use is on the basis of a practical example. The purpose of this article is to represent the calculation of volumes with the use of NTF method with the use of UDF in the simple way on a practical example. Izvleček: V prispevkih z naslovoma Izračun volumnov z uporabo metode NTF ter UDF -ji za izračun volumnov po metodi NTF, je predstavljena matematična zasnova osnove omenjene metode ter so podana navodila za uporabo UDF -jev. Pri uvajanju v delo z novimi računalniškimi programi se najbolje obnese razlaga načina uporabe na praktičnem primeru. Z namenom, da vam izračun volumnov z metodo NTF čim bolj enostavno prikažemo, vam bomo v tem prispevku, na praktičnem primeru, prikazali postopek izračuna prostornine po metodi NTF, z uporabo UDF -jev. Key words: volume calculation, Delauney triangulation, MS Excel, UDF Ključne besede: izračun volumnov, Delaunayeva triangulacija, MS Excel, UDF Scientific paper
128 Du r g u t o v i ć, A., Vu l i ć, M. In t r o d u c t i o n In order to carry out, calculation of the volume with the use NTF method, in the simple way. We have on the basis of the result which is shown in the above mentioned paragraph, prepared our own written functions of UDF which enable realization of the calculation of volume with the use of program MS Excel. When it comes to the introduction into work with new computer programs the most effective explanation of the method of use is on the basis of a practical example. The purpose of this article is to represent the calculation of volumes with the use of NTF method with the use of UDF in the simple way on a practical example. For the representation of the calculation of volume with the use of NTF method we have, in the program»rhinoceros 3D«, made 3D model of an imaginary geometrical shape which is formed by the selection of thirty points. Graphic representation of the model is represented in the picture below. After we have carried out Delaney triangulation and got data about the edges of the triangles we can, therefore, calculate the volume of the shape which is formed, in our case, by the selected points. The process of calculation can be divided into three points: The calculation of the volume between upper surface of the shape and the surface on the reference high (volume of the upper part of the shape), Determination of the outline points (only in the case if we do not have data about the points of the down surface) and the calculation of the volume between down surface of the shape and the surface on the reference high (volume of the down part of the shape), The calculation of the final volume. How we carry out Delaney triangulat i o n In order to carry out Delaney triangulation of the upper or rather down surface we use the computer program»triangel Net«, which is available for free on the internet [6]. For the use of the mentioned program we need collective data of coordinate points in the text file with ending.nod. When we have prepared the data in already mentioned file.nod we can use the already mentioned computer program»triangel Net«. With a simple series of commands the program automatically carries out the Delaunay triangulation. On the place where we have saved the file with ending.nod we get new file with ending.tri. In that file edge of Delaunay triangle are written. With it we have carried out Delaunay triangulation of our collected points and got file with edge of Delaunay triangles. We transmit data from the mentioned file with ending.tri on the work sheet program tools Microsoft Excel where we have saved data of collective coordinated points.
How we calculate volume with the use of NTF method 129 Figure 1. Shape to which we will calculate volume Slika 1. Oblika izbranega modela, ki ga tvori trideset točk The c a l c u l at i o n o f v o l u m e o f t h e u p- per part After we got data about edges of triangles of the Delaunay triangulation we can calculate the volume of the upper part. First we must find for the given edges suitable coordinates. The computer program»triangel Net«, with which we have carried out Delaunay triangulation, marks edges which form Delaunay triangles with numbering which starts going upwards from the number 0. Because we are familiar with the feature of the mentioned program we also mark (give ID) coordinate points by numbering them, starting with 0. In the next step we use UDF»coVol- W3ID«, which finds the value of coordinate points for every individual edge of Delaunay triangles and simultaneously gives the value of the upper part of shape volume. Instructions for the use UDF are given in the article titled UDF for volume calculation with the use of NTF method. For reference high (z ref ), we took minimal high from the collective coordinated points, which value in 50 m. The explanation of the meaning of the reference high (z ref ) in the article titled Volume calculation with the use of NTF method. After we have carried out calculation we got the value of the volume of the upper part which we write as V UP =46870.83. After getting a volume of the upper part we must, for the purpose of the calculation of the final volume, calculate the down part of the volume shape. How we calculate volume of the mentioned part is represented in the following.
130 Du r g u t o v i ć, A., Vu l i ć, M. Table 1. Calculated volume of the upper part Tabela 1. Izračunana prostornina zgornjega dela a a a b b b c c c Y X Z Y X Z Y X Z V 185.0 55.0 50.0 190.0 65.0 70.3 200.0 55.0 50.3 515.00 185.0 55.0 50.0 175.0 65.0 50.1 190.0 65.0 70.3 510.00 200.0 55.0 50.3 200.0 65.0 70.3 210.0 65.0 70.2 680.00 200.0 55.0 50.3 210.0 65.0 70.2 215.0 55.0 50.2 517.50 200.0 55.0 50.3 190.0 65.0 70.3 200.0 65.0 70.3 681.67 215.0 55.0 50.2 210.0 65.0 70.2 225.0 65.0 50.1 512.50 175.0 65.0 50.1 180.0 75.0 70.3 190.0 65.0 70.3 1017.50 175.0 65.0 50.1 170.0 75.0 50.1 180.0 75.0 70.3 341.67 190.0 65.0 70.3 180.0 75.0 70.3 190.0 80.0 90.1 2017.50 190.0 65.0 70.3 190.0 80.0 90.1 195.0 75.0 90.0 1255.00 190.0 65.0 70.3 195.0 75.0 90.0 200.0 65.0 70.3 1343.33 200.0 65.0 70.3 195.0 75.0 90.0 205.0 75.0 90.1 1673.33 200.0 65.0 70.3 205.0 75.0 90.1 210.0 65.0 70.2 1343.33 210.0 65.0 70.2 205.0 75.0 90.1 210.0 80.0 90.1 1255.00 210.0 65.0 70.2 210.0 80.0 90.1 220.0 75.0 70.1 2010.00 210.0 65.0 70.2 220.0 75.0 70.1 225.0 65.0 50.1 1010.00 225.0 65.0 50.1 220.0 75.0 70.1 230.0 75.0 50.2 340.00 170.0 75.0 50.1 170.0 85.0 50.1 180.0 75.0 70.3 341.67 180.0 75.0 70.3 180.0 85.0 70.3 190.0 80.0 90.1 1345.00 180.0 75.0 70.3 170.0 85.0 50.1 180.0 85.0 70.3 678.33 195.0 75.0 90.0 190.0 80.0 90.1 195.0 85.0 90.0 1000.83 195.0 75.0 90.0 195.0 85.0 90.0 205.0 85.0 90.0 2000.00 195.0 75.0 90.0 205.0 85.0 90.0 205.0 75.0 90.1 2001.67 205.0 75.0 90.1 205.0 85.0 90.0 210.0 80.0 90.1 1001.67 220.0 75.0 70.1 210.0 80.0 90.1 220.0 85.0 70.0 1336.67 220.0 75.0 70.1 220.0 85.0 70.0 230.0 75.0 50.2 671.67 230.0 75.0 50.2 220.0 85.0 70.0 235.0 85.0 50.1 507.50 190.0 80.0 90.1 180.0 85.0 70.3 195.0 85.0 90.0 1255.00 210.0 80.0 90.1 205.0 85.0 90.0 210.0 95.0 70.1 1252.50 210.0 80.0 90.1 210.0 95.0 70.1 220.0 85.0 70.0 2005.00 170.0 85.0 50.1 175.0 95.0 50.0 180.0 85.0 70.3 340.00 180.0 85.0 70.3 175.0 95.0 50.0 190.0 95.0 70.2 1012.50 180.0 85.0 70.3 190.0 95.0 70.2 190.0 80.0 90.1 2015.00 195.0 85.0 90.0 180.0 85.0 70.3 190.0 95.0 70.2 2012.50 195.0 85.0 90.0 190.0 95.0 70.2 200.0 95.0 70.1 1338.33 195.0 85.0 90.0 200.0 95.0 70.1 205.0 85.0 90.0 1668.33 205.0 85.0 90.0 200.0 95.0 70.1 210.0 95.0 70.1 1336.67 220.0 85.0 70.0 210.0 95.0 70.1 225.0 95.0 50.1 1005.00 220.0 85.0 70.0 225.0 95.0 50.1 235.0 85.0 50.1 505.00 175.0 95.0 50.0 190.0 105.0 50.0 190.0 95.0 70.2 505.00 190.0 95.0 70.2 190.0 105.0 50.0 200.0 95.0 70.1 671.67 200.0 95.0 70.1 200.0 105.0 50.3 210.0 95.0 70.1 675.00 200.0 95.0 70.1 190.0 105.0 50.0 200.0 105.0 50.3 340.00 210.0 95.0 70.1 200.0 105.0 50.3 215.0 105.0 50.2 515.00 210.0 95.0 70.1 215.0 105.0 50.2 225.0 95.0 50.1 510.00 Together 46870.83
How we calculate volume with the use of NTF method 131 Definition of the outline points When we do not have the definition of the down surface, we can only from the outline points determine the surface which we use as down surface. As the first step of defining of the outline points of the down surface of the mentioned shape we have, among the given edges which form Delaunay triangles, connected straight lines. During that we eliminated straight lines which have appeared among the same edges twice. For the calculation of that mentioned process we use UDF»linesSortedW3«. The functions offers us, from the individual edges of triangle net, classification of lines between two edges and also mark the ones which occur only once. (See the article titled UDF for volume calculation with the use of NTF method). In the next step we use udf»outlinew«, which, from contour lines between two edges in triangle net, gives us only contour lines. (See the article titled UDF for volume calculation with the use of NTF method). By doing this we must pay attention to the given selection of outpoints and checks the given selection by drawing them in some program for designing. In this way we will check whether we got the actual shape of the outline surface. Because of that the example, where it is necessary to eliminate the last three given outlines, is presented. The reason for that, is that represented way of determining of outpoints, can cause mistakes. In the already presented example there are 14 outpoints which we will use for the further calculation. For the selection of outpoints of the down surface we use UDF»outPoints«which, from sorted contour lines between two edges in triangle net, gives us only contour point. (See the article titled UDF for volume calculation with the use of NTF method). Th e c a l c u l at i o n o f v o l u m e o f t h e d o w n pa r t After we have determined the points of the down surface, we can start with calculation of the volume between down surface of the shape and the surface on the reference high (volume of the down part of the shape). Firstly, we must determine suitable coordinate values to the outline points of the down surface. For the selection of the suitable coordinate values we use UDF»coEntW«see the article titled UDF for volume calculation with the use of NTF method). Therefore, we get written coordinate values of the outpoints of the down surface. After getting written coordinate values of the outpoints of the down surface, we again carry out the same steps which we have made at volume calculation of the upper surface. At first, we prepared the data (coordinate values of the outpoints of the down surface) in the text file with ending.nod. Therefore, with the use of program (»Triangel Net«), carry out the Delaunay triangulation of down surface. We carry out the calculation of the down surface volume in the same way as we calculated the upper surface volume. After we have carried out calculation which is pre-
132 Du r g u t o v i ć, A., Vu l i ć, M. Table 2. Calculated volume of the down part Tabela 2. Izračunana prostornina spodnjega dela d d d e e e f f f Y X Z Y X Z Y X Z V 185.0 55.0 50.0 175.0 65.0 50.1 200.0 55.0 50.3 10.00 200.0 55.0 50.3 175.0 65.0 50.1 175.0 95.0 50.0 50.00 200.0 55.0 50.3 175.0 95.0 50.0 200.0 105.0 50.3 125.00 200.0 55.0 50.3 200.0 105.0 50.3 225.0 95.0 50.1 145.83 200.0 55.0 50.3 225.0 95.0 50.1 225.0 65.0 50.1 62.50 200.0 55.0 50.3 225.0 65.0 50.1 215.0 55.0 50.2 15.00 175.0 65.0 50.1 170.0 75.0 50.1 170.0 85.0 50.1 2.50 175.0 65.0 50.1 170.0 85.0 50.1 175.0 95.0 50.0 5.00 225.0 65.0 50.1 225.0 95.0 50.1 230.0 75.0 50.2 10.00 230.0 75.0 50.2 225.0 95.0 50.1 235.0 85.0 50.1 10.00 175.0 95.0 50.0 190.0 105.0 50.0 200.0 105.0 50.3 5.00 225.0 95.0 50.1 200.0 105.0 50.3 215.0 105.0 50.2 15.00 Together 455.83 sented in table 2 we got the volume of the down surface V DOWN = 455.83. Now we can determine the final volume presented shape in terms of subtracting the down shape volume from upper shape volume. In this way we get final volume of the presented shape, that is: V = V UP - V DOWN = 46870.83-455.83 = 46415.00 Co n c l u s i o n s Throughout the presented method of the volume calculation with the use of NTF method we have established: That the final result of the shape volume depends on the way of collecting points at topographic measurement (if we made mistakes at field measurements, we will most likely get the incorrect result about the shape volume). That in the case of a large number of collected points the time of calculation is extended, because we need more time to calculate Delaunay triangulation. That when do not have the definition of the down surface, we can with the help of UDF select outline points and determine the surface which we use as down surface. By doing this we must pay attention to the given selection of outpoints and check the given selection by drawing them in some program for designing. That we can simultaneously check the process of calculation and in this way dismiss possible mistakes which we made in the process of calculation. Visually presented example of the entire process of calculation is available on the web site: http:/www. ntfgam.uni-lj.si/mvulic.
How we calculate volume with the use of NTF method 133 Po v z e t e k Kako izračunamo volumen z uporabo metode NTF V prispevku je na praktičnem primeru prikazan postopek izračuna prostornine po metodi NTF, z uporabo UDF -jev. Prispevek je nadaljevanje člankov Calculation of volume with the use of NTF method [9] and ''UDF for volume calculation with the use of NTF method [8]. Za prikaz postopka izračuna na praktičnem primeru je bil predhodno oblikovan model telesa, ki ga tvori trideset izbranih točk. Model telesa smo oblikovali z uporabo računalniškega programa»rhinoceros 3D«. Delaunayevo triangulacijo iz točk izbranega telesa izvedemo v računalniškem programu ''Triangel Net''. Na podlagi izvedene triangulacije dobimo podatke o ogliščih, ki tvorijo Delaunayeve trikotnike. To nam je tudi osnova za izvedbo izračuna. Ko smo izvedli Delaunayevo triangulacijo ter dobili podatke o ogliščih trikotnikov izvedene triangulacije, lahko izračunamo prostornino telesa, ki ga tvorijo, v našem primeru izbrane točke. Sam postopek izračuna lahko razdelimo na tri dele: določitev prostornine med plaščem in referenčno ravnino, izbor konturnih točk ter določanje prostornine med konturo in referenčno ravnino, določitev končne prostornine. Postopek izračuna volumna po izvedeni Delaunayevi triangulaciji izvedemo z uporabo lastno zapisanih funkcij (MS Excel) UDF. Vizualna predstavitev praktičnega primera izračuna oz. prikaz celotnega procesa je dostopen na: http:/www.ntfgam.uni-lj.si/ mvulic. Re f e r e n c e s [1] Br o n š t e j n, J.N., Se m e n d j a j e v, K.A. (1978): Matematični priročnik. Tehniška založba Slovenije, Ljubljana, 683 p. [2] O`Rourke, J. (1997): Computational geometry in C. Cabbridge univerity press, 350 p. [3] Vu l i ć, M. (2005): User Defined Function. Naravoslovnotehniška fakulteta, Ljubljana. [4] Vu l i ć, M. (2005): Matematične osnove določanja prostornin tristranih prizem (interna predavanja). Naravoslovnotehniška fakulteta, Ljubljana. [5] Vu l i ć, M. (2005): Osnove Delaunayeve triangulacije in Voronoi diagramov (interna predavanja). Naravoslovnotehniška fakulteta, Ljubljana. [6] http://www.codeproject.com/cpp/kazumi.asp. [7] Du r g u t o v i ć, A. (2005): Izmera in določanje prostornin nepravilnih teles z uporabo metode RTK-GPS : diplomsko delo. Naravoslovnotehniška fakulteta, Ljubljana. [8] Vu l i ć, M., Du r g u t o v i ć, A. (2007): UDF for volume calculation with the use of NTF method. RMZ - Materials and Geoenvironment; Vol. 54, No. 3, pp. 419-425.
134 Du r g u t o v i ć, A., Vu l i ć, M. [9] Vu l i ć, M., Du r g u t o v i ć, A. (2006): Calculation of volume with the use of NTF method. RMZ - Materials and Geoenvironment; Vol. 53, No. 2, pp. 221-227. Vu l i ć, M. (2005): Osnove topologije (interna predavanja). [10] Naravoslovnotehniška fakulteta, Ljubljana. [11] Vu l i ć, M. (2005): Transformacije koordinatnih sistemov (interna predavanja). Naravoslovnotehniška fakulteta, Ljubljana.