Introduction

Biofilms are bacterial communities embedded in extracellular matrix and polysaccharide polymers (Flemming et al. 2016). The life form of biofilm allows bacteria to continue to survive under most harsh conditions, which makes biofilm removal being a problem in some cases (Nadell et al. 2016). In fact, biofilms have caused high costs in the fields of medical, health, water supply and drainage pipes, corrosion of industrial machinery and equipment, and agriculture (Hao et al. 1996; Pavithra and Doble 2008; Stoodley et al. 2002). Bacillus subtilis is a kind of gram-positive bacteria, which has been widely used in agricultural production and scientific research. No matter in liquid environment or on solid surfaces, biofilms always grow into complex but regularly organized surface morphology, which shows diversity during biofilm growth (Wang et al. 2016).

The study of biofilm surface morphology involves the adhesion characteristics of biofilm, which is of great significance for the effective removal of harmful biofilm adhered to the surface of objects (Gingichashvili et al. 2021). In addition, the morphological characteristics of biofilm are also related to hydrophobicity, which affects the ability of bacteria to form biofilm (Donlan 2002). In previous studies, it is found that Bacillus subtilis biofilm undergoes the evolution of concentric ring fold, labyrinth fold, radial ridge fold, and dendritic fold (Giverso et al. 2015; Guo et al. 2004; Okegbe et al. 2014; Zhang et al. 2016). Except these traditional forms, biofilms also have different morphological changes under different growth conditions. Many scholars have found that Bacillus subtilis biofilm grows into a branching structure under the condition of low humidity and low nutrition (Fujikawa and Matsushita 1989; Matsuyama and Matsushita 1992; Sander 1986). Ben-Jacob et al. (1998) introduced the concept of “morphotype” in the study of Bacteroides dendritic. He found three biofilm branching structures: tip-splitting (T) morphotype, chiral (C) morphotype, and vortex (V) morphotype and discussed the self-organization phenomenon caused by the interaction of bacteria through communication and coordination (Ben-Jacob et al. 1998; Ben-Jacob and Levine 2006; Ingham and Jacob 2008). In addition, he also studied the interaction among mechanics, nutrient diffusion, and consumption of cells, and found that mechanical interaction controls the collective behavior of the system, resulting in a phase separation pattern in non-equilibrium growing colonies (Ghosh et al. 2015).

As the above branching structure is very similar to fractal, many scholars have introduced fractal method to study it. Fractal geometry theory is an important method for describing nonlinear systems proposed by Mandelbrot (1982). Its appearance has brought major changes to the research of various disciplines and fields. It provides a new method and perspective for solving nonlinear and non-equilibrium problems. Moreau et al. (2009) carried out fractal analysis on Xylella fastidiosa biofilm and proposed two types of structural models, namely Eden model in the early stage of biofilm formation and Diffusion-Limited-Aggregation model in the late stage. Matos et al. (2020, 2018, 2021) analyzed kefir biofilm by X-ray diffraction and found that it was semi crystalline in structure; they introduced new parameters for quantitative study of its micro texture and proved that fractal parameters can be used to characterize the surface properties of biofilms. To study the forming mechanism and adhesion mechanism of biofilm fractal structure, Gonzalez-Perez et al. (2016) used the drying process of polymer solution to simulate the biofilm fractal structure evolution. Bisht et al. (2017) studied the law of random walking of bacteria under the action of pili from the microscopic point of view. With the help of real-time Neisseria gonorrhoeae trajectory, a coarse-grained model describing the trajectory was established, and their effects on the first passage time and the formation of bacterial micro colony were studied.

Besides the preceding fractal structures, we observed more new biofilm morphological structures in the extremely nutrient-lacking experiments. We grow Bacillus subtilis biofilm more than 35 days, and find the morphological structures are completely different from those in the early stage, especially, one of these morphological structures can make the biofilm grow fast, as shown in Fig. 1d; this fractal structure has obvious branches, which is different from any form in early growth stage of Bacillus subtilis biofilm. We extend the fractal method to analyze the morphology and find bacterial clusters move back and forth in these branching structures, which is further described by Succolarity (Suc).

Fig. 1
figure 1

Transmitted light images of Bacillus subtilis biofilm growth (ad growth at 4, 15, 25, and 35 days, respectively. The scale is 5 mm. d Different colored arcs in three directions represent the position where the biofilm grows to different culturing time. e Changes in the expansion radius of the biofilm in specific directions shown in b)

Material and methods

Biofilm inoculation and culture

Bacillus subtilis strain NCIB 3610 is used in our experiments. We culture the colonies on agar gel medium (MSgg) and the agar solution is cooled to 55 °C before the rest of the material is added. We use a medium with a diameter of 100 mm and a 2-mm thick agar layer, cover with a lid, and naturally cool at room temperature for 12 h before inoculation of bacteria.

When the medium is cooling, the strain is taking out of the refrigerator, at which time the strain is grown on approximately 3 ml of vibrating medium at 37 °C. Prior to inoculation of the colonies, we remove the lid from the medium and allow the surface of the medium to air dry for 5–10 min. For smaller colonies, we use a sharp stick to lick the bacterial culture and gently poke the agar surface. It is necessary to dry for another 5–10 min after inoculation, and the lid is not capped until the meniscus of the initially dripped culture fluid is not visible and the bacteria exhibit a coffee ring in distribution. To take a photo of the biofilm at any time, we culture the colonies in a Tupperware container and stuff the container mouth with a tissue paper and seal the microscope objective with a plastic film. The temperature of the microscope is controlled at 32 °C by heating and fan system. We culture the biofilm under this condition for more than 35 days to observe the formation of biofilm branching structure.

Calculation of fractal parameters

Fractal dimension

The calculation method of the box-counting dimension is very mature, and the calculation process can be expressed as follows:

Place the binary image of branching structure on a uniformly divided grid with side length εi, and calculate the minimum number of grids required to cover the entire fractal structure as N(εi).

Decrease the size of the grid in turn and calculate the number of grids needed to cover the binary image.

$$N(\varepsilon_{i} ) \propto \varepsilon_{i}^{ - \dim }$$
(1)

Then the calculation of the box-counting dimension will be represented by the following formula:

$$\dim_{box} (S) = \mathop {\lim }\limits_{\varepsilon \to 0} \frac{\log N(\varepsilon )}{{\log ({1 \mathord{\left/ {\vphantom {1 \varepsilon }} \right. \kern-\nulldelimiterspace} \varepsilon })}}$$
(2)

Lacunarity

In morphological analysis, Lacunarity (Lac) is defined as gappiness, unevenness, visual texture, translation, rotation invariance, etc. It is not only related to gaps, but also related to heterogeneity. In fact, Lac quantifies the heterogeneity and can be used as a supplement to the Fd to describe Fractal objects. It uses pixel quality instead of box count (Schneider et al. 2012).

The most basic calculation formula of Lac is as follows:

$$\lambda_{\varepsilon ,g} = \left( {\frac{{\sigma_{\varepsilon ,g} }}{{\mu_{\varepsilon ,g} }}} \right)^{2}$$
(3)

where σ is the standard deviation and μ is the average pixel of each box under the size ε in the box count in a grid orientation, g. That is to say, a λ will be calculated in each orientation and each box size.

To put heterogeneity from one perspective and one series of grid sizes into an average, the mean (λ or Λ) from all ε sized boxes at a grid orientation, g, is calculated:

$$\Lambda_{g} = \frac{{\sum\nolimits_{b = 1}^{BoxSizes} {\lambda_{\varepsilon (b)} } }}{BoxSizes}$$
(4)

In order to represent the average Lac of all grid sizes under all orientations, continue the following calculation:

$$\overline{\Lambda } = \frac{{\sum\nolimits_{g = 1}^{Grids} {\Lambda_{g} } }}{Grids}$$
(5)

Succolarity

The calculation steps of Succolarity (Suc) are as follows (de Melo and Conci 2013):

First, enter a binary image, consider all white pixels as obstacles, and black pixels as channels through which fluid can pass. We can simulate the ability of fluid drainage or seepage through images.

Second, select a direction, fill the liquid from this direction, and fill the area where the liquid can pass.

Third, divide image pixels into different boxes. Calculate the OP and PR values in each box separately. The calculation formula of Suc is as follows:

$$\sigma \left( {BS\left( k \right),dir} \right) = \frac{{\sum\nolimits_{k = 1}^{n} {OP\left( {BS\left( k \right)} \right) \times PR(BS(k),pc)} }}{{\sum\nolimits_{k = 1}^{n} {OP\left( {BS(k)} \right) \times \max PR(BS(k),pc)} }}$$
(6)

where OP is the occupancy rate of white pixels in each box, and PR is the pressure value of the position of each box. Assuming that the direction of fluid flow is from up to down, the pressure reference line is at the top of the image. PR is the minimum distance from the center of mass of each box to this baseline.

Image acquisition and processing

To record the biofilm growth, we use a wide field stereo microscope with a bright-field channel to record the biofilm and use ImageJ software to measure the radial growth of biofilm.

We calculate the thickness of the branching structure based on the Lambert–Beer law, which holds that when a beam of parallel monochromatic light penetrates an object, the thickness of the object is positively correlated with its absorbance. During the experiment, infrared filters are used to filter the light. We measure the optical density (OD) of images and calculate the thickness (h) of branching structure through Eqs. (7) and (8), where I is intensity of the transmitted light through the substrate and biofilm, and I0 is that through the transparent substrate. λ is attenuation length. In previous studies, we have conducted multiple cutting experiments on biofilms to measure the thickness information. We obtain a linear statistic between the thickness and the OD with the attenuation coefficient being 1.2 mm (Wang et al. 2016).

$$OD = \lg \left( {\frac{{I_{0} }}{I}} \right)$$
(7)
$$h = OD \cdot \lambda$$
(8)

We use the open-CV module in Python to match the features in the images. We use Scale Invariant Feature Transform algorithm (Lowe 2004) to calculate the key points and feature vectors and use Brute Force matching method (Charras and Lecroq 2004) to match two images.

Results and discussions

The biofilm growth

Through long-term cultivation of the biofilm, we find that a completely different morphology appears in the periphery of the biofilm, as shown in Fig. 1. In the first 4 days, the biofilm has grown into labyrinth networks, concentric rings, and radial ridge successively, as shown in Fig. 1a. The biofilm keeps in a stable state at this stage. However, in the further growth, the periphery of the biofilm grows inhomogeneous and represents more new structures, as shown in Fig. 1b and c. We speculate that the biofilm has undergone a phase change at this stage, which results in some irregular and chaotic structures coming up; we call this area the “Chaotic Zone.” In the late stage of biofilm growth, the branching structures begin to spread outward from the “Chaotic Zone.” It can be observed that these branching structures are thinner and cover a wider range, as shown in Fig. 1d.

We believe that the appearance of these structures is due to the environmental changes. We use the measurement tool of ImageJ software to measure the biofilm growth along certain directions, along which the biofilm shows different morphological characteristics in the subsequent growth. The biofilm forms a fractal shape with a branching structure in the direction 1; the biofilm forms a paste-like smooth shape in the direction 2; the biofilm forms a wave-like fan shape and further forms a branching structure in the direction 3. Although the biofilm at the early growth stage has the uniform growth velocity along radius, different morphological structures around the late-stage biofilm lead to different growth velocity, as shown in Fig. 1e.

In detail, we find that within the first 15 days, the biofilm grows into circular shape, which means that velocities in all directions are almost the same. After 15 days, the velocity along direction 1 and direction 3 is larger than that along direction 2. After 25 days, the velocity along direction 1 becomes the largest one and keeps increasing quickly until 33 days. Corresponding to the biofilm morphological structures, the biofilm morphology remains basically stable during the first 15 days, and the biofilm begin to produce various complex and chaotic shapes between 15 and 25 days. After 25 days, the branching structure is first produced in direction 1, making the biofilm spread rapidly along this direction.

The above analysis shows that the morphology of the biofilm in the “Chaotic Zone” is in an unstable stage. During this stage, the biofilm evolves into diverse structures to find ways to adapt to the nutrient-deficient environment. The biofilm expands faster by generating branching structure. The thickness of the biofilm in branching structure is smaller than that in other area. The thin thickness speeds up the biofilm expansion and helps bacteria explore more nutrient. In the next study, we explore characteristics of the branching structure and the movement of bacterial clusters in the branching structure.

Fractal analysis of branching structures

Fractal geometry theory is an important method for describing nonlinear systems proposed by the French mathematician Mandelbrot (1982), based on the analysis of many irregular objects with complex shapes exhibiting similar shapes and features on different scales in nature. Mandelbrot studied this phenomenon and proposed the quantitative concept of fractal dimension. Biofilms have typical fractal characteristics, especially branching structures in the late biofilm growth, which can be explained by using fractal theory.

After growing for a period, the branching structure no longer grows evenly around the periphery, but gradually forms several larger bifurcations. These bifurcations have not been completely combined in the later growth. We call it the “separation of main branches and stems,” as shown in Fig. 2a. We divide this structure into inner (area inside the purple line) and outer (area between purple and yellow line) parts from the bifurcation position, as shown in Fig. 2b. We binarize these two areas to obtain the surface texture and calculate Fd and Lac with time, respectively. The results are shown in Fig. 3a and b.

Fig. 2
figure 2

The phenomenon of “separation of main branches and stems,” and division of inner biofilm and outer biofilm

Fig. 3
figure 3

Fractal dimension (Fd) and Lacunarity (Lac) of inner and outer branching structure with time

From Fig. 3a, we find that Fd and Lac of branching structure have different manifestations in different parts. In the inner part of the branching structure, Fd increases steadily between 28 and 31 days in the early growth stage; between 31 and 32 days, Fd reaches a stable value near 1.72; on day 33, a large increase suddenly occurs, and then gradually decrease. In the outer part of the branching structure, the overall value of Fd is smaller than that of the inner part, and the trend is similar to that of the inner part. The maximum value of Fd in the outer part appears on day 34, while the Fd of the inner and outer parts decreases and tends to be equal on day 35.

In image analysis, Lac reflects the heterogeneity of graphics. The change trend of Lac value is just opposite to that of Fd, which shows that the two fractal parameters complement each other. Lac is used to characterize the pattern extracted from the digital image. The more uniform and dispersed the gap is, the smaller the value of Lac is. On the contrary, the more uneven the gap is, the greater the value of Lac is. Through Fig. 3b, we find that the average Lac of the inner part is less than that of the outer part, and both of them decrease with time. The Lac variation also represents the porosity evolution; the porosity decreases greatly in the 2 days after the formation of the branching structure, but only decreases slightly in the subsequent growth.

The difference between Fd and Lac in the inner and outer parts of the branching structure indicates that the surface textures of the inner and outer parts are no longer the same after “the separation of main branches and stems.” The surface texture of the inner part is fragment and loose, and the gap is small and uniform. The “branches” of the outer part are obviously more coherent, and the gap between branches is large, which leads to lower Fd and higher Lac values in the outer part than those in the inner part of branching structure. Although the branching structures of the inner and outer parts are quite different in the early stage, this difference is gradually decreasing with time, which indicates that the branching structures of two parts become coherence.

The fractal analysis shows that Fd increases greatly on day 33, and decreases in the next few days, which is inconsistent with our expectation, i.e., Fd keeps a constant. We find out the reason caused Fd variation in the next section.

The movement of bacterial clusters

We find some interesting phenomena through the observation of wide field stereo microscope and the calculation of branching structure thickness. The branching structure starts from day 29, and a “bright spot” comes up inside, which has the large thickness, as areas in blue circles shown in Fig. 4 from day 29 to 32. Based on the optical measurement and Lambert Beer law, we calculate the thickness of the branching structure around the “bright spot”; we choose three areas in branching structure, the “bright spot” area, the area inside the “bright spot” toward the biofilm center, and the area outside the “bright spot” toward the biofilm edge. By comparing the thicknesses of these three areas and the movement of “bright spot,” we speculate the movement of bacterial clusters in the branching structure.

Fig. 4
figure 4

The movement of bacterial clusters in branching structure and thickness measurement of branching structure. In the image at the top, the blue-dotted line represents the position of bacterial clusters in 1 day, the purple-dotted line represents the position of bacterial clusters in the previous day, and the green arrow represents the movement direction of bacterial clusters. The enlarged rectangular images at the bottom highlight an example of bacterial cluster movement at the later stage of biofilm. The histogram shows the changes of biofilm thickness in different parts

Through calculation, we find that the thickness of the branching structure is much thinner than that of the area near the biofilm center (around 255 µm from Wang et al. (2020)), which explains the reason why this branching structure can grow at a fast speed. We explore the collective movement of bacterial clusters through the observation of experimental images and the thickness comparison of different parts of branching structure. On day 27 and day 28, the biofilm grows and spread in a fractal way; there is no significant difference in the thickness of each part, and the average thickness of the branching structure reaches the peak on day 28. Starting from day 29, the branching structure forms an obvious protruding “bright spot” in the center. At this time, the biofilm at the edge is sparse and thin, and the thickness of each part is different. From day 30 to day 32, “bright spots” show a trend of moving forward. The average thickness of the bright spot changes a bit in these days. However, the thickness of the area inside the “bright spot” toward the biofilm center increases; the thickness of the area outside the “bright spot” toward the biofilm edge almost does not change. Although the average thickness of bright spots remains at a certain value, it is observed that the bright spots become sparser and tend to dissipate gradually. On day 33, all the bright spots disappear. The thickness of the area outside the “bright spot” toward the biofilm edge of the branching structure becomes larger; the thickness originally belonging to the “bright spot” position (day 32) becomes very small, only about 35 µm. The thickness of the area inside the “bright spot” toward the biofilm center remains around 50 µm without much change, indicating that a large part of the bacterial clusters moves to the edge of the branching structure at this time. The green arrows in Fig. 4 clearly show the moving direction of the bacterial clusters. In addition to moving outward, bacterial clusters also move back and forth inside the branching structure, as shown in the enlarged figure in Fig. 4.

In order to study how bacterial clusters move in the branching structure, we further use the feature matching method to locally match surface texture at different time but at the same location. These texture structures are too heterogeneity to make sure bacteria still follow the mode of “sub-membrane passages” in the biofilm ontological system (Gingichashvili et al. 2020; Wilking et al. 2013). One possibility is that bacteria swim in the folded ridges, the other one is that bacteria move in the sunken valleys, which we approved by comparing certain screenshots from images of 29–35 days, as shown in Fig. 5.

Fig. 5
figure 5

Feature matching of surface texture in branching structure

On day 29, the screenshot is located at the edge of the branching structure; after 1 day growth, the surface texture changes resulting in low feature matching degree between these 2 days. Only a small number of feature points can be mapped on, and most feature points cannot correspond to the corresponding position, as shown in Fig. 5a. This indicates that the movement of bacterial clusters is not limited by the surface texture. From day 30 to day 32, we find that the surface texture has great similarity, and there is no obvious collective movement of bacterial clusters in the branching structure, and the texture features remain stable. However, on day 33, the surface texture changes dramatically comparing with both the day before and the day after. Combining with the approvement of bacterial clusters’ movement from Fig. 4, we find that bacterial clusters move forth and back in the inner branching structure in the latter stage of branching structure growth. From day 34 to day 35, the texture matching degree of branching structure increases. Interestingly, when we match the screenshots of day 32 and day 35, we find that the matching degree of the two screenshots is very high, which shows that the protrusions in the texture inside the branching structure are composed of inactive cells, i.e., spores. Therefore, the main features of the surface texture of the branching structure can still be maintained after the bacterial cluster moves.

From Fig. 4, we conclude that bacterial clusters move collectively within the branching structure in the last few days of branching structure growth. The collective movement of bacteria occurs on day 33. If the movement of bacterial clusters occurs in the ridges of the branching structure texture, the feature matching result of the surface texture should be relatively stable, because the ridge is the main factor affecting the surface texture features. However, the image of day 33 is very different from that of the day before and the day after, indicating that the moving position of bacterial clusters is between the protrusions. That is, most bacteria move in valleys.

Succolarity to describe the movement of bacterial clusters

To describe the movement of bacterial clusters in local areas of branching structure, we calculate the value of Succolarity (Suc) at valleys to indicate the possible direction of the movement of bacterial clusters. Suc represents an assessment of quantitative measure, which can analyze the percolation degree of an image/system (Mandelbrot 1982). As a new feature, Suc is ideal for representing the ability of bacteria clusters’ movement in valleys of branching structure. We use the method proposed by de Melo and Conci (2013) to calculate Suc, as shown in Fig. 6a–f.

Fig. 6
figure 6

Calculation results of Succolarity (Suc) (af Numerical results of Suc; gl the intermediate generated image of processing. From left to right are the original image, the binary image, and the Succolarity image of liquid from up to down, down to up, left to right, and right to left, separately)

Based on Suc of screenshots in branching structure, combining with the moving direction of bacterial clusters, we find that moving directions of bacteria clusters in a certain period of time are directions with maximum Suc. On days 29 and 33 (Fig. 6g, k), the moving direction of the bacterial clusters in these screenshots is up-down, and Suc is also high in up-down and down-up directions, which means bacterial clusters move easily along up-down or down-up directions, as the resistance in the valley is small. On day 30 (Fig. 6h), Suc is high in each direction; comparing the “bright spot” locations on day 29 and day 30 in Fig. 4, the “bright spot” moves downward which is coincident with the high Suc along up-down direction. On days 31, 32, and 34, Suc in right-left becomes higher than that in up-down, which is corresponding to the fast growing of the branching structure. Suc coincides with the moving directions of bacterial clusters suggesting that Succolarity can be used to describe the movement of bacterial clusters in the branching structure.

Conclusions

The Bacillus subtilis biofilm forms a variety of morphologies in the later stage of growth resulting from the bacterial adapting to the environment, such as the fractal shape with a branching structure, the paste-like smooth shape, and the wave-like fan shape as shown in Fig. 1d. These morphologies have different characteristics. Branching structure, as a form with the fastest expansion speed and the most extensive coverage, is a special existence in all morphologies. And the paste-like morphology in direction 2, as shown in Fig. 1b, has very smooth surface without any fold pattern. There are distinct boundaries between the early formed biofilm and these morphologies. The reason of these morphologies’ formation still needs further study.

Studies have shown that bacteria move through “submembrane channels” in the biofilm (Gingichashvili et al. 2020; Wilking et al. 2013), but in the case of branching structure, we find that bacterial movement does not follow this way. In fact, in this case, the biofilm has only a thin layer, the highest point is only about 130 microns, and the lowest point is even less than 50 microns, which makes it difficult for the biofilm to form a stable “submembrane channel.” We demonstrate that bacterial clusters move at valleys in the branching structure. We can further speculate that the surface viscosity of the branching structure is so low that the bacterial clusters can easily move from valleys, but this needs further experimental proof.

Through microscope technology, we notice the movement of bacterial clusters and study the direction of it. Interestingly, the movement of bacteria in the branching structure is not always outward. In the first few days after the emergence of the branching structure, it does, but after 33 days, some of bacterial clusters continue to move outward, while others begin to move inside the branching structure. This is unusual. It seems that bacteria are looking for new ways to adapt to the environment. They can always find appropriate methods to deal with environmental changes. The formation of this branching structure is originally a means for them to deal with the nutrient depletion; as the environment changes always, bacteria never stop to find the optimized method to survive.