# Visualization of Coalescence of Multiple Small Bubbles with Closed B-Spline Curve

Authors: Fangfang Zhang; Hongjun Li
Journal: International Journal of Computer Games Technology
 (2020)

---

## Abstract

The smoothness of surface shape is one of the key issues to simulate coalescence of underwater bubbles. In this paper, B-spline closed curve is used to realize the visual simulation of multibubble coalescence. The main idea of the proposed algorithm is to construct a continuous bubble deformation which is guided by the normal direction of each control point and weighted by the distance from the point to the geometry center of the contour. The advantages of this algorithm include the smoothness of the bubble contour in the processing of deformation and the randomness of dynamic process and coalescence process. Experiment results show that the simulation algorithm works well and can be used in 3D computer games and animations.


---

## Body

## 1. Introduction

The bubble phenomenon is a common natural phenomenon that occurs in carbonated drinks, waste water, the breath of fish in the water, etc. It is widely considered in various disciplines and industries. Here are three classical applications and literatures.In the petrochemical industry, during oil production and transmission, artificial injection bubbles can carry heavy oil from the ground to the surface [4]; the secondary-metallurgical treatment of the liquid steel relies on the injection of purge gas for improving the steel cleanliness [19]. In addition, liquid gas reactors depend on the interaction of bubbles to change the contact area of different phases [16].In materials science, due to the different mechanical properties of nitrogen bubbles with different diameters on metals, the mechanical effects of nitrogen bubbles and their polymerization behavior on HCP rep-Zr alloy were studied [24]. The stability of bubbles and the potential effects of their interactions are also studied [30]. The interaction between bubbles in liquid affects the mass transfer performance of bubbles [2].In movies and games, bubble simulation is a common material, as shown in Figure1. It enhances the user experience in entertainment systems [5, 25, 29] and the reality visualization effect [33]. Kakuta et al. proposed a mixed reality application for enjoying playing with soap bubbles [17]. Jeong-Mo applied bubble research to animation and game creation based on bubble simulation [15]. Urikovic took a complete computer simulation of a soap bubble from a dynamics perspective and discusses the animation of bubbles [31]. Kunimatsu et al. used computer graphics to animate the phenomenon of throwing the jar into the sink, and the resulting individual bubbles move through the tank [22].Figure 1
Bubbles are used in 3D games. The image is a screen shot of a frame from the mobile game, Feeding frenzy,https://apps.apple.com/cn/app/id1295428885.As we often encounter multiple bubbles or groups of bubbles in these practices, it is important to fully understand the interaction and binding of bubbles in a fluid [13, 32]. Coalescence is one key behavior of bubbles and simulated in many literatures [6–8, 14]. These literatures focus on the effects of initial bubble spacing, size and arrangement angle on the coalescence process, the changes in contour [20], the rise velocity and shape of bubbles in pure water [9], the pressure field around the bubble [7, 14], and so on.In general, coalescence of two bubbles takes place in three main steps: bubble collision and deformation, film drainage, and film rupture [19]. Kee and Chhabra [18] observed the bubble shape and coalescence behavior by using high-speed camera technology and investigate the effects of rheological properties and surface tension on bubble properties and coalescence. Li et al. [28] numerically simulates the interaction of bubbles online to obtain the effect of dimensionless distance on the coalescence of bubbles.For a long time, many scholars have conducted extensive research on bubble behavior [26] and established a relatively sound theoretical basis. However, existing methods mainly study behaviors of one or two bubbles and pay a little attention on the smoothness of the contour of bubbles after coalescence. In the view of computer games, visual effects and the game experience in some cases are more important than physics demands [29]. We in this paper emphasize on the smoothness of the contour and the visualization of multibubble coalescence phenomenon, which results in solving issues as follows:
(i)
Multibubble coalescence rules and deformation rule are built to guide the implementation of the visualization algorithm(ii)
The contour in 2D and the surface in 3D of a bubble should be C1-continuous, so the smoothness of the bubble contour in the processing of deformation is kept(iii)
The multibubble coalescence algorithm is developed


## 2. Method

For visualizing the process of multibubble coalescence, the surface model, the continuous deformation, and rules of motion should be addressed in advance.


### 2.1. Modeling Surface of a Bubble

For the case of small size bubble, its shape can be represented by a sphere [3] or an ellipsoid [1, 12]. However, in most cases, the contour of a bubble is not a simple sphere or a circle, and it can be approximated by a Fourier series [10, 11] or other functions. Given the coalescence of two bubbles from any directions, methods that use x-axis or y-axis as symmetry axis to model contour and surface are not ideal. Given the closed B-spline shows the advantage of the design deformability and flexibility [35], we here use the closed B-spline method to model the contour of a bubble.LetPi, i=1,2,⋯,n, be the control points which denote a sequence of ordered data points on the bubble curve. Let
(1)Cu=∑i=0nNi,puPi,denote a B-Spline curve to be determined to approximate the bubble curve. In formula (1), Ni,pu are the B-spline basis functions of a certain order and can be expressed as follows:
(2)Ni,0u=1,ui≤u≤ui+10,otherwise,Ni,pu=u−uiui+p−uiNi,p−1u+ui+p+1−uui+p+1−ui+1Ni+1,p−1u.We illustrate the calculation of the contour after coalescence of two bubbles in two-dimensional (2D) case. Let a bubble be displayed by a circle or a set of contour points which are ordered and represent discrete closed curve before coalescence. When two bubbles are too closed, the coalescence occurs due to interbubble attraction, as shown in Figure2(a). For obtaining the new contour of the bubble, we at first find the intersection points (points A and B, denoted by red points) of two curves with Little’s method [23]. Then, those inner points (P1, P2, Q1, and Q2) are detected with Kpalma’s method [21] and removed. Finally, we fit those contour points by the closed B-spline method, as shown in Figure 2(b).Figure 2
Fit the contour of two coalesced bubbles using B-spline curves. (a) Find intersection points and detect contour points. (b) Remove points that are located in the inner area, and fit those contour points by the closed B-spline method.
(a)(b)For building the 3D surface of bubble, the surface can be obtained as an axis-symmetric surface of rotation. In our experiments, the perpendicular bisector of the line segment AB in Figure2(a) is used as the axis of symmetry. Figure 3(a) shows another contour with the axis of symmetry. Figure 3(b) is the surface that generated by axis-symmetric surface of rotation using the contour points of Figure 3(a).Figure 3
From contour to 3D surface using axis-symmetric surface of rotation. (a) Contour of bubble and the axis of symmetry. (b) The generated 3D surface.
(a)(b)


### 2.2. Continuous Deformation

After coalescence, the contour of two coalesced bubbles will continuously deform over time due to the combined effects of multiple forces, including surface tension and water pressure. Then, a method of contour deformation guided by the normal direction and weighted by the distance from the point to the geometry center of the contour is proposed. LetPi, i=1,2,⋯,n, be the control points located on the contour, n→i be the unit normal direction of Pi, and di be the Euclidean distance from Pi to the geometry center point C of the contour, as shown in Figure 4.Figure 4
Deformation of the contour after coalescence.At first, we calculate the average distanced¯ from contour to the bubble center. There are two cases. The first case occurs when two bubbles coalesce.
(3)d¯=r12+r221/2,where r1 and r2 are the radii of two bubbles before coalescence. Accordingly, if the simulating is experimented in 3D space, the average distance d¯ from contour to the bubble center is calculated with the following formula.
(4)d¯=r13+r231/3.Formulas (3) and (4) are, respectively, used for keeping the area and volume unchanged after coalescence.The second case is for the deformation of one bubble that changes with time.(5)d¯=1n∑i=1ndi.Then, the moving stepτiof the control point Pi is
(6)τi=ηdi−d¯dmax−dmin,dmax>dmin,0,dmax=dmin,where η is a positive number specified by user, and
(7)dmax=maxdj,j=1,2,⋯,n,dmin=mindj,j=1,2,⋯,n.The control pointPi moves to the new position Pi′, as
(8)Pi′=Pi−τin→i,i=1,2,⋯,n.When all control points move to the new positions, the contour can be updated with the closed B-spline fitting.Note that:(1)
The parameterη is used to adjust the speed of deformation(2)
If the contour is a circle, thendmax=dmin, and the contour keeps the same shape. Therefore, the end shape of the contour is a circle or a sphere(3)
In our experiment, the normal direction of control point is away from the center pointC. If τi>0, i.e., di>d¯, the control point Pi moves towards to the center point C, and vice versa(4)
These proposed formulas can be applied to a three-dimensional (3D) coalescence simulation


### 2.3. Rules of Motion

In this paper, motion features of bubbles include rising speed, small random swing, and coalescence.In still water, the rising speedvt of a bubble is related to its volume V, the height H from the bubble to the water surface.
(9)vt=fV,H.When bothH and the change of bubble shape are small, fV,H can be a linear function, which is easy to calculate and real time in computer games. So, the contour points rise according to the formula
(10)Pi′=Pi+vt,i=1,2,⋯,n.Adding small random swing to the rising bubbles can improve the effect of coalescence and reality. In our experiment, the direction of rising of a bubble is with random disturbance.(11)Pi′=Pi+ε,i=1,2,⋯,n,where ε~N0,σ2 and σ is specified by user.In summary, according to formulas (10), (11), and (8), the moving of a bubble is
(12)Pi′=Pi−τin→i+vt+ε,i=1,2,⋯,n.As for coalescence of two bubbles, if the bubbles are spherical [14], then we can use the bubble radii and the distance between sphere centers to determine whether the two bubbles are intersected or compatible; if the contour of at least one bubble is represented by discrete points, we use with Little’s method [23] to determine whether the two bubbles are intersected and get the intersect points if there are.


### 2.4. Algorithm of Coalescence

In this subsection, we summarize the algorithm for simulating the process of multiple bubble coalescence.Let the number of bubbles isN, the coordinates of control points of the kth bubble be Pik, where k=1,2,⋯,N; i=1,2,⋯,nk. The simulation time T is represented by the number of iterates Ic, the still rising speed is v, and the random factor is σ.Since the deformation of contour is guided by both the normal direction and the distance of contour point to the center of bubble, the proposed algorithm of bubble coalescence is named NDgBCA (Algorithm1).Algorithm 1: NDgBCA.
Input: the number of bubbles N; the coordinates Pik of bubble contour control points; the number of iterates Ic and the still rising speed v; the random factorσ.Output: the updated contour control points of bubbles Pik.Step 1: The current bubble numberN′←N.Step 2: whileIc>0.Step 3:  All bubbles rising according formula (12).Step 4:  For each bubble, fit those contour points by the closed B-spline method [35].Step 5:  Detect whether there are coalescence occurring in the new positions.Step 6:  If there are coalescence,Step 7:   Find the intersection points using Little’s method [23].Step 8:   Detect and remove the inner points using Kpalma’ method [21];Step 9:   Fit those contour points by the closed B-spline method [35];Step 10:  Update the contour points and the current bubbles numberN′.Step 11:  End IfStep 12:Ic=Ic−1.Step 13: End while.return Pik,k=1,2,⋯,N′.According to Algorithm1, the time complexity is ON2×Ic, because we use enumerate method to detect the coalescence between any two bubbles in Step 4.


## 2.1. Modeling Surface of a Bubble

For the case of small size bubble, its shape can be represented by a sphere [3] or an ellipsoid [1, 12]. However, in most cases, the contour of a bubble is not a simple sphere or a circle, and it can be approximated by a Fourier series [10, 11] or other functions. Given the coalescence of two bubbles from any directions, methods that use x-axis or y-axis as symmetry axis to model contour and surface are not ideal. Given the closed B-spline shows the advantage of the design deformability and flexibility [35], we here use the closed B-spline method to model the contour of a bubble.LetPi, i=1,2,⋯,n, be the control points which denote a sequence of ordered data points on the bubble curve. Let
(1)Cu=∑i=0nNi,puPi,denote a B-Spline curve to be determined to approximate the bubble curve. In formula (1), Ni,pu are the B-spline basis functions of a certain order and can be expressed as follows:
(2)Ni,0u=1,ui≤u≤ui+10,otherwise,Ni,pu=u−uiui+p−uiNi,p−1u+ui+p+1−uui+p+1−ui+1Ni+1,p−1u.We illustrate the calculation of the contour after coalescence of two bubbles in two-dimensional (2D) case. Let a bubble be displayed by a circle or a set of contour points which are ordered and represent discrete closed curve before coalescence. When two bubbles are too closed, the coalescence occurs due to interbubble attraction, as shown in Figure2(a). For obtaining the new contour of the bubble, we at first find the intersection points (points A and B, denoted by red points) of two curves with Little’s method [23]. Then, those inner points (P1, P2, Q1, and Q2) are detected with Kpalma’s method [21] and removed. Finally, we fit those contour points by the closed B-spline method, as shown in Figure 2(b).Figure 2
Fit the contour of two coalesced bubbles using B-spline curves. (a) Find intersection points and detect contour points. (b) Remove points that are located in the inner area, and fit those contour points by the closed B-spline method.
(a)(b)For building the 3D surface of bubble, the surface can be obtained as an axis-symmetric surface of rotation. In our experiments, the perpendicular bisector of the line segment AB in Figure2(a) is used as the axis of symmetry. Figure 3(a) shows another contour with the axis of symmetry. Figure 3(b) is the surface that generated by axis-symmetric surface of rotation using the contour points of Figure 3(a).Figure 3
From contour to 3D surface using axis-symmetric surface of rotation. (a) Contour of bubble and the axis of symmetry. (b) The generated 3D surface.
(a)(b)


## 2.2. Continuous Deformation

After coalescence, the contour of two coalesced bubbles will continuously deform over time due to the combined effects of multiple forces, including surface tension and water pressure. Then, a method of contour deformation guided by the normal direction and weighted by the distance from the point to the geometry center of the contour is proposed. LetPi, i=1,2,⋯,n, be the control points located on the contour, n→i be the unit normal direction of Pi, and di be the Euclidean distance from Pi to the geometry center point C of the contour, as shown in Figure 4.Figure 4
Deformation of the contour after coalescence.At first, we calculate the average distanced¯ from contour to the bubble center. There are two cases. The first case occurs when two bubbles coalesce.
(3)d¯=r12+r221/2,where r1 and r2 are the radii of two bubbles before coalescence. Accordingly, if the simulating is experimented in 3D space, the average distance d¯ from contour to the bubble center is calculated with the following formula.
(4)d¯=r13+r231/3.Formulas (3) and (4) are, respectively, used for keeping the area and volume unchanged after coalescence.The second case is for the deformation of one bubble that changes with time.(5)d¯=1n∑i=1ndi.Then, the moving stepτiof the control point Pi is
(6)τi=ηdi−d¯dmax−dmin,dmax>dmin,0,dmax=dmin,where η is a positive number specified by user, and
(7)dmax=maxdj,j=1,2,⋯,n,dmin=mindj,j=1,2,⋯,n.The control pointPi moves to the new position Pi′, as
(8)Pi′=Pi−τin→i,i=1,2,⋯,n.When all control points move to the new positions, the contour can be updated with the closed B-spline fitting.Note that:(1)
The parameterη is used to adjust the speed of deformation(2)
If the contour is a circle, thendmax=dmin, and the contour keeps the same shape. Therefore, the end shape of the contour is a circle or a sphere(3)
In our experiment, the normal direction of control point is away from the center pointC. If τi>0, i.e., di>d¯, the control point Pi moves towards to the center point C, and vice versa(4)
These proposed formulas can be applied to a three-dimensional (3D) coalescence simulation


## 2.3. Rules of Motion

In this paper, motion features of bubbles include rising speed, small random swing, and coalescence.In still water, the rising speedvt of a bubble is related to its volume V, the height H from the bubble to the water surface.
(9)vt=fV,H.When bothH and the change of bubble shape are small, fV,H can be a linear function, which is easy to calculate and real time in computer games. So, the contour points rise according to the formula
(10)Pi′=Pi+vt,i=1,2,⋯,n.Adding small random swing to the rising bubbles can improve the effect of coalescence and reality. In our experiment, the direction of rising of a bubble is with random disturbance.(11)Pi′=Pi+ε,i=1,2,⋯,n,where ε~N0,σ2 and σ is specified by user.In summary, according to formulas (10), (11), and (8), the moving of a bubble is
(12)Pi′=Pi−τin→i+vt+ε,i=1,2,⋯,n.As for coalescence of two bubbles, if the bubbles are spherical [14], then we can use the bubble radii and the distance between sphere centers to determine whether the two bubbles are intersected or compatible; if the contour of at least one bubble is represented by discrete points, we use with Little’s method [23] to determine whether the two bubbles are intersected and get the intersect points if there are.


## 2.4. Algorithm of Coalescence

In this subsection, we summarize the algorithm for simulating the process of multiple bubble coalescence.Let the number of bubbles isN, the coordinates of control points of the kth bubble be Pik, where k=1,2,⋯,N; i=1,2,⋯,nk. The simulation time T is represented by the number of iterates Ic, the still rising speed is v, and the random factor is σ.Since the deformation of contour is guided by both the normal direction and the distance of contour point to the center of bubble, the proposed algorithm of bubble coalescence is named NDgBCA (Algorithm1).Algorithm 1: NDgBCA.
Input: the number of bubbles N; the coordinates Pik of bubble contour control points; the number of iterates Ic and the still rising speed v; the random factorσ.Output: the updated contour control points of bubbles Pik.Step 1: The current bubble numberN′←N.Step 2: whileIc>0.Step 3:  All bubbles rising according formula (12).Step 4:  For each bubble, fit those contour points by the closed B-spline method [35].Step 5:  Detect whether there are coalescence occurring in the new positions.Step 6:  If there are coalescence,Step 7:   Find the intersection points using Little’s method [23].Step 8:   Detect and remove the inner points using Kpalma’ method [21];Step 9:   Fit those contour points by the closed B-spline method [35];Step 10:  Update the contour points and the current bubbles numberN′.Step 11:  End IfStep 12:Ic=Ic−1.Step 13: End while.return Pik,k=1,2,⋯,N′.According to Algorithm1, the time complexity is ON2×Ic, because we use enumerate method to detect the coalescence between any two bubbles in Step 4.


## 3. Experiments

All experiments are done on a laptop computer, with an Intel Core i7-4710MQ CPU@2.50 GHz processor and 4.0 G memory. Our algorithm is implemented in Matlab (2012 version) language. We test our algorithm (NDgBCA) with several experiments: two bubbles in the horizontal line, coalescence occurs from any direction, multiple bubble coalescence, and summary of the information of bubbles after coalescence.


### 3.1. Two Bubbles in the Horizontal Line

Many papers focus on the case, coalescence of two 2D bubbles in horizontal direction [11, 14]. Bubbles are generated with mathematical method. In this experiment, r1=r2=0.6, the centers of two circles are (-0.5, -1.8) and (0.5, -1.8). H=40 is the final height of rising. vx=0, which means that the bubble does not move in the horizontal direction. vy=H/f, where f is the number of simulation steps and also represents the number of iterates in simulation process. In this experiment, f=10, and ten key frames captured from the simulation of the coalescence process are shown in Figure 5.Figure 5
Coalescence of two 2D bubbles in horizontal direction.
(a)
t=0.1(b)
t=0.2(c)
t=0.3(d)
t=0.4(e)
t=0.5(f)
t=0.6(g)
t=0.7(h)
t=0.8(i)
t=0.9(j)
t=1.0


### 3.2. Coalescence from Any Direction

Only small ratio of literature studies the case about coalescence of two 2D bubbles which occurs in any direction. In our experiment, bubbles are represented by circles and generated with mathematical method. Letr1=0.5163 and r2=0.64798, the centers of two circles are (-0.62034, -1.56054) and (0.2911, -1.9122). H=40, vx=0. The bubble does not move in the horizontal direction. vy=H/f. Ten key frames (f=10) captured from the simulation of the coalescence process are shown in Figure 6.Figure 6
Coalescence of two 2D bubbles in nonhorizontal direction.
(a)
t=0.1(b)
t=0.2(c)
t=0.3(d)
t=0.4(e)
t=0.5(f)
t=0.6(g)
t=0.7(h)
t=0.8(i)
t=0.9(j)
t=1.0


### 3.3. Multiple Bubble Coalescence

The coalescence of several bubbles is simulated with two experiments: bubbles with constant rising speed or with variable speed.For the case of constant rising speed, i.e.,vy=H/f, we assume
(1)
The number of initial bubbles is 6(2)
In the horizontal direction allowing the random swing,vx≠0. The swing distance τx abides the scaled standard normal distribution N (0, 1) with limited bound σ(13)τx=−0.1σ,τ<−σ,0.1τ,−σ≤τ≤σ,0.1σ,τ>σ,where τ abides standard normal distribution N (0, 1), and σ is specified by user. In our experiment, σ=0.8.
(3)
The radiusri of each bubble abides by uniform distribution U [0.30, 0.70](4)
The center position (xi,yi) of each bubble is randomly in the rectangle −3,3×−3,−1The simulation results are shown in Figure7(a). From bottom to top, 6 bubbles coalesce and become 5 bubbles at last.Figure 7
Coalescence of multiple 2D bubbles. (a) 6 bubbles with constant speed (dvy/dt=0). (b) 5 bubbles with variable speed (dvy/dt≠0).
(a)(b)For the case of variable rising speed, i.e.,dvy/dt≠0, referring that the trailing bubble has the higher acceleration [19], we assume that the rising speed vy is inverse to the distance from current position (Ho) to the top (H) of water surface, which can be calculated with formula (14).
(14)vy=Hf1+ζ1−HoH,where parameter ζ is a positive number and specified by user. Under this assumption, the trailing bubble has a chance to be coalesced to the former bubble.We conduct a simulation experiment using 5 initial bubbles and the assumption. The simulation results are shown in Figure7(b). From bottom to top, 5 bubbles coalesce and become 3 bubbles at last. The coalescence of two bubbles on the left illustrates the coalescence effect of formula (14).


### 3.4. Visualization with 3D Surface

In order to enrich a real environment with virtual information, we can use axial symmetry technology to generate 3D surface of bubble (Figure3) and merge these 3D bubbles into an underwater image, as shown in Figure 8. From the bottom to the top in the figure, it can be found that after coalescence, the bubble gradually develops into an ellipsoid or a sphere, which is the same as the statement in other literatures [19]. From this example, it is obvious that our method can be used to add bubbles in some computer games and improve the visual effect.Figure 8
Coalescence of multiple 3D bubbles merging to an underwater image.


### 3.5. Performance Analysis

This subsection discusses the performance of the proposed algorithm (NDgBCA). All these data are illustrated with the data from the last experiment, i.e., Figure8.The model complexity is represented by the number of points of a curve or the number of polygons of a mesh surface. In this experiment, the number of bubbles is 5. For each bubble, its radius is in [0.40, 0.80], and the number of points that represent the contour is 90. After axial symmetry rotation, the numbers of vertices and polygons of each 3D bubble are 1622 and 3240, respectively.The time complexity is represented by running time of each step of the coalescence processing. In Figure9, the blue curve is the running time in each step. The average time of each step is 0.10 seconds. The first step is to generate 5 bubble contour points, and the other steps are corresponding to the proposed algorithm that detect coalescing or not and update the contour if coalescence cost only 5% of whole time. Most of the time is spent in calculating continuous deformation and generating 3D mesh bubbles.Figure 9
Time consumption in each step of the coalescence processing.The orange curve is the cumulative time, and it shows a liner curve, which means that the algorithm is stable in the simulation iteration processing.


## 3.1. Two Bubbles in the Horizontal Line

Many papers focus on the case, coalescence of two 2D bubbles in horizontal direction [11, 14]. Bubbles are generated with mathematical method. In this experiment, r1=r2=0.6, the centers of two circles are (-0.5, -1.8) and (0.5, -1.8). H=40 is the final height of rising. vx=0, which means that the bubble does not move in the horizontal direction. vy=H/f, where f is the number of simulation steps and also represents the number of iterates in simulation process. In this experiment, f=10, and ten key frames captured from the simulation of the coalescence process are shown in Figure 5.Figure 5
Coalescence of two 2D bubbles in horizontal direction.
(a)
t=0.1(b)
t=0.2(c)
t=0.3(d)
t=0.4(e)
t=0.5(f)
t=0.6(g)
t=0.7(h)
t=0.8(i)
t=0.9(j)
t=1.0


## 3.2. Coalescence from Any Direction

Only small ratio of literature studies the case about coalescence of two 2D bubbles which occurs in any direction. In our experiment, bubbles are represented by circles and generated with mathematical method. Letr1=0.5163 and r2=0.64798, the centers of two circles are (-0.62034, -1.56054) and (0.2911, -1.9122). H=40, vx=0. The bubble does not move in the horizontal direction. vy=H/f. Ten key frames (f=10) captured from the simulation of the coalescence process are shown in Figure 6.Figure 6
Coalescence of two 2D bubbles in nonhorizontal direction.
(a)
t=0.1(b)
t=0.2(c)
t=0.3(d)
t=0.4(e)
t=0.5(f)
t=0.6(g)
t=0.7(h)
t=0.8(i)
t=0.9(j)
t=1.0


## 3.3. Multiple Bubble Coalescence

The coalescence of several bubbles is simulated with two experiments: bubbles with constant rising speed or with variable speed.For the case of constant rising speed, i.e.,vy=H/f, we assume
(1)
The number of initial bubbles is 6(2)
In the horizontal direction allowing the random swing,vx≠0. The swing distance τx abides the scaled standard normal distribution N (0, 1) with limited bound σ(13)τx=−0.1σ,τ<−σ,0.1τ,−σ≤τ≤σ,0.1σ,τ>σ,where τ abides standard normal distribution N (0, 1), and σ is specified by user. In our experiment, σ=0.8.
(3)
The radiusri of each bubble abides by uniform distribution U [0.30, 0.70](4)
The center position (xi,yi) of each bubble is randomly in the rectangle −3,3×−3,−1The simulation results are shown in Figure7(a). From bottom to top, 6 bubbles coalesce and become 5 bubbles at last.Figure 7
Coalescence of multiple 2D bubbles. (a) 6 bubbles with constant speed (dvy/dt=0). (b) 5 bubbles with variable speed (dvy/dt≠0).
(a)(b)For the case of variable rising speed, i.e.,dvy/dt≠0, referring that the trailing bubble has the higher acceleration [19], we assume that the rising speed vy is inverse to the distance from current position (Ho) to the top (H) of water surface, which can be calculated with formula (14).
(14)vy=Hf1+ζ1−HoH,where parameter ζ is a positive number and specified by user. Under this assumption, the trailing bubble has a chance to be coalesced to the former bubble.We conduct a simulation experiment using 5 initial bubbles and the assumption. The simulation results are shown in Figure7(b). From bottom to top, 5 bubbles coalesce and become 3 bubbles at last. The coalescence of two bubbles on the left illustrates the coalescence effect of formula (14).


## 3.4. Visualization with 3D Surface

In order to enrich a real environment with virtual information, we can use axial symmetry technology to generate 3D surface of bubble (Figure3) and merge these 3D bubbles into an underwater image, as shown in Figure 8. From the bottom to the top in the figure, it can be found that after coalescence, the bubble gradually develops into an ellipsoid or a sphere, which is the same as the statement in other literatures [19]. From this example, it is obvious that our method can be used to add bubbles in some computer games and improve the visual effect.Figure 8
Coalescence of multiple 3D bubbles merging to an underwater image.


## 3.5. Performance Analysis

This subsection discusses the performance of the proposed algorithm (NDgBCA). All these data are illustrated with the data from the last experiment, i.e., Figure8.The model complexity is represented by the number of points of a curve or the number of polygons of a mesh surface. In this experiment, the number of bubbles is 5. For each bubble, its radius is in [0.40, 0.80], and the number of points that represent the contour is 90. After axial symmetry rotation, the numbers of vertices and polygons of each 3D bubble are 1622 and 3240, respectively.The time complexity is represented by running time of each step of the coalescence processing. In Figure9, the blue curve is the running time in each step. The average time of each step is 0.10 seconds. The first step is to generate 5 bubble contour points, and the other steps are corresponding to the proposed algorithm that detect coalescing or not and update the contour if coalescence cost only 5% of whole time. Most of the time is spent in calculating continuous deformation and generating 3D mesh bubbles.Figure 9
Time consumption in each step of the coalescence processing.The orange curve is the cumulative time, and it shows a liner curve, which means that the algorithm is stable in the simulation iteration processing.


## 4. Discussion

The behavior of underwater bubbles is very complex. Our method emphasizes on visual effects of bubble coalescence and pays little attention on the physical theory. As mentioned in [29], creating the underwater feeling is a tricky balance between reality and game experience. So, our method is particularly suited for visualizing bubble coalescence in the underwater computer games.Although particle system gets good performance when simulating small particle motion, fire and liquid [27], for example, literature [29] uses particle system to create bubbles uniformly; some parameters of particle systems are not open and cannot be dynamically adjusted during operation. Therefore, its performance is limited. Our method is easy to use because there are only a few parameters, including initial radii and the number and locations of bubbles, which are set at the beginning of the NDgBCA. In addition, our method also shows more details of bubble coalescence process and achieves better visualization effect.Comparing to the method of using fitting curves [34] to visualize the bubble coalescence process in horizontal direction, the proposed method shows an advantage of displaying the coalescence process of two bubbles in any direction. If a bubble pair coalesces in the vertical direction, the coalescence effect visualized with our method is in line with the results from the experimental investigation of bubble coalescence [19], as shown in Figure 10, and numerical simulation [36]. Figure 10(a) displays their sequence of key frames acquired by a high-speed video camera and one of the bubble coalescence processes is marked by a yellow arrow [19]. Figure 10(b) shows our simulation results. In the simulation experiment, we adopt an assumption that for two bubbles on the vertical line, the trailing bubble is accelerated to approach the leading bubble, resulting in the coalescence of the two bubbles [36].Figure 10
Comparing coalescence process of 3D bubbles in vertical direction to photo (from literatures [19]).
(a)
Image from literatures [19], and coalescence events are marked by yellow arrows(b)
Sequence of key frames are captured using our methodIt is interesting that the phenomenon of droplets has a similar coalescing process [26], which means that the proposed method can be used to visualize droplet coalescence with minor modifications based on the force analysis of droplets.


## 5. Conclusions

In this paper, a novel algorithm (NDgBCA) is proposed for simulating the multiple bubble coalescence. In the simulating, the continuous bubble deformation process is guided by the normal direction of each control point and weighted by the distance from the geometry center of the contour. The advantages of this algorithm include two aspects. The one is that the contour surface is uniform and smooth. The other is that it can simulate the coalescence of bubbles of different sizes from any angle and direction.



---

*Source: 8953893-2020-08-27.xml*