Discrete Dynamics in Nature and Society
Volume 2021 (2021), Article ID 1426212, 10 pages
https://doi.org/10.1155/2021/1426212

Research Article

A Simple Visualization Method for Three-Dimensional (3D) Network

Sangkwon Kim,¹ Chaeyoung Lee,¹ Jintae Park,¹ Sungha Yoon,² Yongho Choi,³ and Junseok Kim¹

¹Department of Mathematics, Korea University, Seoul 02841, Republic of Korea
²Division of Applied Mathematical Sciences, Korea University, Sejong 30019, Republic of Korea
³Department of Mathematics and Big Data, Daegu University, Gyeongsan-si, Gyeongsangbuk-do 38453, Republic of Korea

Correspondence should be addressed to Junseok Kim; cfdkim@korea.ac.kr

Received 25 April 2021; Revised 10 May 2021; Accepted 19 May 2021; Published 27 May 2021

Academic Editor: Juan L. G. Guirao

Copyright © 2021 Sangkwon Kim et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

The network is a concept that can be seen a lot in many areas of research. It is used to describe and interpret datasets in various fields such as social network, biological network, and metabolic regulation network. As a result, network diagrams appeared in various forms, and methods for visualizing the network information are being developed. In this article, we present a simple method with a weight of information data to visualize the network diagram for the three-dimensional (3D) network. The generic method of network visualization is a circular representation with many intersections. When dealing with a lot of data, the three-dimensional network graphics, which can be rotated, are easier to analyze than the two-dimensional (2D) network. The proposed algorithm focuses on visualizing three factors: the position and size of the nodes and the thickness of the edge between linked nodes. In the proposed method, an objective function is defined, which consists of two parts to locate the nodes: (i) a constraint for given distance, which is the weight of the relationship among all the data, and (ii) the mutual repulsive force among the given nodes. We apply the gradient descent method to minimize the objective function. The size of the nodes and the thickness of the edges are defined by using the weight of each node and the weight between other nodes associated with it, respectively. To demonstrate the performance of the proposed algorithm, the relationships of the characters in the two novels are visualized using 3D network diagram.

1. Introduction

The network is a vital concept to understand modern society structure and components of the society. The concept of the network has been applied not only to people but also to social network [1–7], biological network [8–12], metabolic regulation network [13], online social network [14, 15], sports social network [16, 17], structure of neural network [18–20], etc. As a result, the data for storing network information has become complex and diverse. In addition, the need to make complex data more recognizable has been essential, and efforts to meet such demands continue to this day. Therefore, a medium called a network diagram has emerged, which has become essential to understand network information. Network diagrams have appeared in various forms in two-dimensional (2D) and three-dimensional (3D) space. In addition, various methods and programs for drawing such diagrams or visualizing network information have appeared and developed.

In 2D space, the classical algorithm to draw the network automatically is the force-directed algorithm using the straight edges as springs [21]. This algorithm draws aesthetic graphs using only the information of a given graph. Teja and Yemula [22] modified and improved the force-directed algorithm to solve the limitation of the algorithm. Another algorithm for drawing graphs is stress majorization [23], which is widely used. Recently, the authors in [24] proposed an improved stress majorization method. Moreover, this method has an advantage that there is no need to solve the optimization problem with constraints. However, it is not easy to grasp the network in 2D space, and there are needs for the network plot in 3D space.

There are various tools and techniques for network visualization in 3D space. The author in [25] used a Java-based tool called CAVALIER (Communication and Activity VisuALIsation for the EnterRprise) to analyze the social network. In addition, the spring-embedding and alternative layout algorithm was introduced for network visualization. Ho et al. [26] studied the interactions between proteins in 3D diagrams. These visualizations help users to understand the biological process and relationships easily. In [27], the authors proposed a novel visualization tool named Arena3D that could address large scale and complex networks. They demonstrated the utility of Arena3D using network data relevant to Huntington disease. Paananen and Wong [28] presented a new visualization method based on real-time 3D force-directed graphs that can be used to discover new knowledge in the data. They also created and used a software tool which is called FORG3D. By using the given genomic data, they proved the functionality of FORG3D to visualize and explore unified genome-scale data. In [29], the authors developed the evidence network visualization algorithm with the exploration of covariate distribution for network meta-analysis (NMA) in 3D. This algorithm extended the z-axis to the generic 2D network to display the covariate bars for each trial, placing the covariate bars for each information data at the edge between the nodes involved.

In this article, we present a simple method with weight of information data to visualize the network diagram for 3D, and the rotatable 3D network diagram can be obtained to analyze data more easily. While the proposed method is an extension of the method applied in 2D [30], it is further improved in terms of the simplicity of the algorithm. In general, the problem is solved in a regular structure [31–36]; however, we visualized the network using the importance of information and concept of distance in the unstructured place. Furthermore, the position of nodes is relocated by minimizing an objective function which consists of repulsive and attractive energies. The gradient descent method is applied to minimize the objective function. Therefore, an optimal network diagram to the given data is obtained. The proposed method has advantages over other methods for visualizing networks in terms of simplicity.

The composition of this paper consists of the following order. Section 2 describes the proposed algorithm in detail. In Section 3, to demonstrate the performance of the proposed algorithm, 3D network diagram visualizations of the relationship of characters in two novels are presented. Finally, conclusions are made in Section 4.

2. Numerical Algorithm

2.1. Simple Network Visualization Algorithm

The purpose of the proposed algorithm for network visualization in 3D is to find optimal node positions which minimize the following objective function:

where is the normalized weight of the relationship between nodes and and is defined as if ; otherwise, . In addition, is the strength parameter that keeps and away from each other. For the simplicity, is assumed. The distance function for can be used as follows [30]:

where is a nonnegative constant, and then, . Let and be the maximum and minimum distances, respectively. Then, by the definition of the normalized weight, , and for a given value, the nonnegative constant is defined as follows:

where is the minimum positive value of , i.e.,

For example, if and , then is obtained approximately as follows:

Figure 1 shows the distance function using given normalized weight and maximum distance values.

Figure 1: Illustration of distance function using the normalized weighting value of the relationship between nodes and . Here, .

Let be the set of positions of given nodes at iteration . Figure 2 shows the effect of the first term of the objective function . There are two possible cases of forces at nodes and : repulsive force when and attractive force when .

(a)

(b)

Figure 2: Two possible forces at nodes and : (a) repulsive force when and (b) attractive force for the given value.

The second term of the objective function produces the mutual repulsive forces between and , see Figure 3. The effect of this force places nodes with low weight outward in the network. In other words, nodes with small weights are positioned outside the main network diagram.

(a)

(b)

(c)

Figure 3: Mutual repulsive force among nodes: (a) initial state, (b) middle state, and (c) equilibrium state.

Then, we relocate the position of the node points as

where is an artificial temporal step and is the differentiation of equation (1) with respect to , i.e.,

Once the positions of the nodes are renewed, then the network diagram is plotted automatically. The iterative process will be terminated if the process reaches an equilibrium state, i.e.,

for and for some . For example, let us consider four points , , , and . Furthermore, assume that the weighting matrix between and is given as

Let the matrix be redefined by dividing all the elements of by the largest value among the elements of the given . That is,

We take and get because :

Let , , , and be the initial positions of four nodes, where the superscript 0 denotes the starting index. We use , , and . In Figure 4, the node markers and edges are depicted by sphere and gray lines, respectively. Here, the red and blue spheres mean initial and after 1 iteration positions, respectively. Figure 4(a) shows the initial state consisting of four points with red spheres and gray edges of linked nodes using scaled . Note that the values of each element of are represented by the thickness of connecting lines in the diagram. In Figure 4(b), black arrows indicate the force direction acting on each node. The red arrows in Figure 4(c) are net force vectors , and . Using net force vectors, we update the positions of nodes as follows:

(a)

(b)

(c)

(d)

Figure 4: Schematic illustration of the proposed algorithm. (a) Initial state of four nodes. (b) Direction of forces acting on each node. (c) Net force direction of each point. (d) Position of four nodes after 1 iteration using the proposed method. Here, the normalized weight matrix in equation (10) is used.

Figure 4(d) shows the network diagrams after 1 iteration. The nodes are initially located in a tetrahedron, and the network diagram is drawn according to the given weights.

So far we have only considered the positions of nodes, now we discuss the visualization of nodes and edges. In general, nodes and edges are visualized as unit sphere shape and straight lines with a fixed thickness. We visualize the size of the nodes and the thickness of edges according to the weight of each node as follows:

where and are positive constants. Characters with relatively high activity are indicated by larger nodes; meanwhile, relatively intimate relationships are depicted by thicker edges.

3. Numerical Results

Numerical simulations are conducted to demonstrate the performance of the proposed algorithm and to visualize the relationship examples of characters in two novels in the 3D network diagram. The first example is “The Venice Merchant” and the second example is “Romeo and Juliet,” which are William Shakespeare’s representative plays. The elements of the weighting matrix are set based on the number of conversations between the characters in each novel.

In the first novel, let of the characters to make the weighting matrix , which is provided in Appendix. Each element of means the cumulative number of dialogues between characters and . The parameters are given as , , , and . Then, is obtained. As shown in Figure 5, the motion of nodes and edges can be observed from the initial state where the nodes are randomly located until the optimal network diagram is found by applying the proposed algorithm repeatedly. The proposed algorithm for “The Venice Merchant” data reached the equilibrium state at 828 iterations.

(a)

(b)

(c)

(d)

Figure 5: Snapshots of the process applying the proposed algorithm for “The Venice Merchant.” (a) Initial state of 19 nodes at . (b) Intermediate state of nodes at . (c) Intermediate state of nodes at . (d) Equilibrium state of nodes at .

Figure 6 shows a diagram of the network in the equilibrium of the iterative algorithm for “The Venice Merchant” dataset. The equilibrium state means that all nodes are properly located according to the weights of a given network. Assortativity refers to the tendency of nodes in a network being connected with similar sized nodes. Therefore, highly assortativity networks are clearly shown to have a core periphery structure between nodes with large and small sizes. These characteristics mean that the basic structure of the interaction that makes up the story of the novel is centered on the main characters. Figure 6, therefore, shows that “The Venice Merchant” has a high assortativity, that is, a novel property that revolves around the main character. As the nodes move, we can confirm that the objective function decreases, as shown in Figure 7.

Figure 6: Magnified network plot of the equilibrium state from another directional view for “The Venice Merchant.” Large-sized nodes are linked together with thicker lines, and small-sized nodes are linked with thinner lines and located around the large-sized nodes.

Figure 7: Temporal evolution of the objective function with respect to the iteration of the algorithm for “The Venice Merchant” case.

As a second example, let of the characters to set the weighting matrix which is based on the number of conversations between 26 characters in “Romeo and Juliet.” This data is provided in Appendix. The parameters are given as and , and then, the value of is about 0.3652. In addition, time step and are used. Figure 8 shows the process of finding the optimal network plot by applying the proposed algorithm. The proposed algorithm for “Romeo and Juliet” data reached the equilibrium state at 617 iterations.

(a)

(b)

(c)

(d)

Figure 8: Snapshots of the process applying the proposed algorithm for “Romeo and Juliet.” (a) Initial state of 26 nodes at . (b) Intermediate state of nodes at . (c) Intermediate state of nodes at . (d) Equilibrium state of nodes at .

Figure 9 shows the network plot of the equilibrium state of the iterative algorithm for the “Romeo and Juliet” dataset. From the results, we can quickly and easily grasp the relationship among characters and see the high assortativity. Furthermore, we can confirm that the objective function decreases and converges during the process of finding the optimal position for all nodes. Figure 10 depicts the decreasing of the objective function.

Figure 9: Magnified network plot of the equilibrium state from another directional view for “Romeo and Juliet.” Large-sized nodes are linked together with thicker lines, and small-sized nodes are linked with thinner lines and located around the large-sized nodes.

Figure 10: Temporal evolution of the objective function with respect to the iteration of the algorithm for the “Romeo and Juliet” case.

4. Conclusion

We proposed a simple method for 3D network diagrams in this article. The proposed method had the advantage of being drawn only with information from a given network. We used the distance function based on the network information and objective function. To minimize the proposed objective function, we used the gradient descent method and confirmed the energy dissipation. According to the given relationship, the network diagrams own various characteristics: (i) different sizes of nodes and (ii) different thickness of edges. Through specific examples, we have known that these features help us to grasp network information at a glance. Furthermore, our algorithm is simple to understand and implement. Finally, the MATLAB source code of our algorithm is provided for the interested readers to try.

Social distancing and contact tracing can contribute to curbing the spread of the COVID-19 virus. Research on SARS-COV-2 transmission control strategies in actual social networks using GPS or mobile data is actively being conducted. In future works, we plan to use the proposed algorithm to present a contact network diagram. Using this diagram, we can visualize the contact network for the dynamics of the COVID-19 spreading.

Appendix

In this appendix, we provide the MATLAB source codes of the proposed algorithm for novel data as “The Merchant of Venice” and “Romeo and Juliet,” and Table 1 describes each character name and corresponding node number. The source code is available on the following website: http://elie.Korea.ac.kr/∼cfdkim/codes/.

Table 1: Name of the character corresponding to each number.

Number
Character name

The Merchant of Venice
Romeo and Juliet

1
Antonio
Montague

2
Bassanio
Lady Montague

3
Shylock
Capulet

4
Portia
Lady Capulet

5
Nerissa
Second Capulet

6
Lorenzo
Romeo

7
Jessica
Juliet

8
Duke
Nurse

9
Tubal
Peter

10
Salerio
Prince Escalus

11
Salanio
Paris

12
Gratiano
Mercutio

13
Leonardo
Benvolio

14
Launcelot Gobbo
Tybalt

15
Old Gobbo
Friar Laurence

16
Stephano
Balthasar

17
Prince of Morocco
Sampson

18
Prince of Arragon
Gregory

19
Servant
Abraham

20

Apothecary

21

Musician

22

Page

23

Servant

24

Watchman

25

Friar john

26

Citizen

Here, the weights of each novel data were presented as and in the source code.

clear;

   flag = 1; if flag = = 1  = ; else if flag = = 2  = ; end  = W/max (max(W)); minW = min(min(W(W > 0))); N = size(W,1); lbD = 1; ubD = 5; q = −log (ubD)/log(minW); rand(“seed”,3773); t1 = rand(N,1); t2 = rand(N,1); xy = ubD  [sin(pi  t1)  cos (2  pi  t2), sin (pi t1)  sin (2  pi  t2), cos (pi  t1)]; for i = 1:N     for j = 1:N         if W(i, j) > 0         d (i, j) = 1/W(i, j)^q;         end     end end dt = 0.2; gam = 0.01; tol = 0.001; error = 2tol; n = 0; while error ≥ tol     n = n + 1; F = zeros(N, 3);         for i = 1 : N             for j = i + 1 : N                 if W(i, j) > 0                 vt = xy (i, :)-xy (j, :);                 F (i, :) = F(i, :) - (norm(vt)-d(i, j))  vt/norm (vt);                 F (j, :) = F(j, :) + (norm(vt)-d(i, j))  vt/norm (vt);                 end             end         end     for i = 1:N         for j = 1:N             if j∼ = i             vt = xy (i, :)-xy(j, :);             F(i, :) = F(i, :) + gamvt/norm(vt);             end         end     end     xy = xy + dtF; error = norm(dtF)/sqrt(N);     if mod(n, 30) = = 0 \Vert error < tol     DrawNetwork(xy, W); pause(0.1)     end end function DrawNetwork(xy,W) n = 20; x = linspace(−1.1, 1.1, n); y = x; z = x; [xx, yy, zz] = meshgrid(x, y, z); u(1:n, 1:n, 1:n) = 0; for i = 1:n     for j = 1:n         for k = 1:n         u(i, j, k) = 1-sqrt(x(i)^2y(j)^2z(k)^2);         end     end end N = length (xy); clf; for i = 1 : N s = 0.2sum (W(i,:))^0.5 + 0.1; isosurface (sxx + xy(i,1),syy + xy(i,2),szz + xy(i,3),u,0); hold on end camlight; lighting phong; for i = 1:N     for j = i+1:N     if W(i, j) > 0.4     plot3 (xy ([i, j], 1), xy ([i, j], 2), xy ([i, j], 3), “r”, “linewidth,” 15W (i, j)^2 + 1);     elseif W (i, j) > 0     plot3 (xy ([i, j], 1), xy ([i, j], 2), xy ([i, j], 3), “b”, “linewidth”, 15W(i, j)^2 + 1);     end     end end for i = 1:N s = 0.2sum (W(i , :))^0.5 + 0.4; a = 0.15; b = 0; text (xy(i, 1)-a,xy(i, 2)-b, xy (i, 3) + s, num2str (i), “fontsize,”10); end axis off; axis image; end

Data Availability

We have released the code and data of this paper in the Appendix and the corresponding author’s homepage.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The corresponding author (J.S. Kim) expresses thanks for the support from the BK21 FOUR Program.

References

J. Scott, “Social network analysis,” Sociology, vol. 22, no. 1, pp. 109–127, 1988.

S. Marcus, M. Moy, and T. Coffman, “Social network analysis,” Mining Graph Data, pp. 443–467, 2007.

J. Lee, G. Noh, G. Oh, and C. K. Kim, “Trustor clustering with an improved recommender system based on social relationships,” Information Systems, vol. 77, pp. 18–128, 2018.

P. De Meo, L. Fotia, F. Messina, D. Rosaci, and G. M. L. Sarné, “Providing recommendations in social networks by integrating local and global reputation,” Information Systems, vol. 78, pp. 58–67, 2018.

C. Zhan, D. Zhang, Y. Wang, D. Lin, and H. Wang, “IES-backbone: an interactive edge selection based backbone method for small world network visualization,” IEEE Access, vol. 7, pp. 166415–166427, 2019.

W. Didimo, L. Grilli, G. Liotta, L. Menconi, F. Montecchiani, and D. Pagliuca, “Combining network visualization and data mining for tax risk assessment,” IEEE Access, vol. 8, pp. 16073–16086, 2020.

H. Yuan, Y. Song, J. Hu, and Y. Ma, “Design of festival sentiment classifier based on social network,” Computational Intelligence and Neuroscienc, vol. 2020, Article ID 8824009, 10 pages, 2020.

M. Girvan and M. E. J. Newman, “Community structure in social and biological networks,” National Academy of Sciences, vol. 99, no. 12, pp. 7821–7826, 2002.

G. Jia, Z. Cai, M. Musolesi et al., “Community detection in social and biological networks using differential evolution,” Lecture Notes in Computer Science, pp. 71–85, 2012.

J. Lee and J. Lee, “Hidden information revealed by optimal community structure from a protein-complex bipartite network improves protein function prediction,” PLoS One, vol. 8, no. 4, Article ID e60372, 2013.

Y. Atay, I. Koc, I. Babaoglu, and H. Kodaz, “Community detection from biological and social networks: a comparative analysis of metaheuristic algorithms,” Applied Soft Computing, vol. 50, pp. 194–211, 2017.

S. Shirakol, M. Kalyanshetti, and S. M. Hosamani, “QSPR analysis of certain distance based topological indices,” Applied Mathematics and Nonlinear Sciences, vol. 4, no. 2, pp. 371–386, 2019.

J. Krasensky and C. Jonak, “Drought, salt, and temperature stress-induced metabolic rearrangements and regulatory networks,” Journal of Experimental Botany, vol. 63, no. 4, pp. 1593–1608, 2012.

R. Ghazzali, “Modeling a rumor propagation in online social network: an optimal control approach,” Discrete Dynamics in Nature and Society, vol. 2020, Article ID 6724815, 12 pages, 2020.

A. Bhih, “A discrete mathematical Modeling and optimal control of the rumor propagation in online social network,” Discrete Dynamics in Nature and Society, vol. 2020, Article ID 4386474, 12 pages, 2020.

T. Zhao, N. Cui, Y. Chen, and M. Li, “Efficient strategy mining for football social network,” Complexity, vol. 2020, Article ID 8823189, 11 pages, 2020.

J. Zhang, “Analysis and modeling of football team’s collaboration mode and performance evaluation using network science and BP neural network,” Mathematical Problems in Engineering, vol. 2020, Article ID 7397169, 13 pages, 2020.

M. Umar, Z. Sabir, M. A. Z. Raja, F. Amin, T. Saeed, and Y. Guerrero-Sanchez, “Integrated neuro-swarm heuristic with interior-point for nonlinear SITR model for dynamics of novel COVID-19,” Alexandria Engineering Journal, vol. 60, no. 3, pp. 2811–2824, 2021.

Z. Sabir, M. A. Z. Raja, H. A. Wahab, G. C. Altamirano, Y.-D. Zhang, and D.-N. Le, “Integrated intelligence of neuro-evolution with sequential quadratic programming for second-order Lane-Emden pantograph models,” Mathematics and Computers in Simulation, vol. 188, pp. 87–101, 2021.

Z. Sabir, C. M. Khalique, M. A. Z. Raja, and D. Baleanu, “Evolutionary computing for nonlinear singular boundary value problems using neural network, genetic algorithm and active-set algorithm,” The European Physical Journal, vol. 136, no. 2, pp. 1–19, 2021.

P. Eades, “A heuristic for graph drawing,” Congruent Number, vol. 42, pp. 149–160, 1984.

S. C. Teja and P. K. Yemula, “Power network layout generation using force directed graph technique,” in Proceedings of the 2014 Eighteenth National Power Systems Conference (NPSC) IEEE, pp. 1–6, Guwahati, India, 2014.

E. R. Gansner, Y. Koren, and S. North, “Graph drawing by stress majorization,” in Proceedings of the International Symposium on Graph Drawing, pp. 239–250, New York, NY, USA, 2004.

Y. Wang, Y. Wang, Y. Sun et al., “Revisiting stress majorization as a unified framework for interactive constrained graph visualization,” IEEE Transactions on Visualization and Computer Graphics, vol. 24, no. 1, pp. 489–499, 2017.

A. Dekker, “Visualisation of social networks using CAVALIER,” ACM, vol. 16, pp. 49–55, 2001.

E. Ho, R. Webber, and M. R. Wilkins, “Interactive three-dimensional visualization and contextual analysis of protein interaction networks,” Journal of Proteome Research, vol. 7, no. 1, pp. 104–112, 2008.

G. A. Pavlopoulos, S. I. O'Donoghue, V. P. Satagopam, T. G. Soldatos, E. Pafilis, and R. Schneider, “Arena3D: visualization of biological networks in 3D,” BMC Systems Biology, vol. 2, no. 1, p. 104, 2008.

J. Paananen and G. Wong, “FORG3D: force-directed 3D graph editor for visualization of integrated genome scale data,” BMC Systems Biology, vol. 3, no. 1, p. 26, 2009.

S. Batson, R. Score, and A. J. Sutton, “Three-dimensional evidence network plot system: covariate imbalances and effects in network meta-analysis explored using a new software tool,” Journal of Clinical Epidemiology, vol. 86, pp. 182–195, 2017.

J. Park, S. Yoon, C. Lee, and J. Kim, “A simple method for network visualization,” Mathematics, vol. 8, no. 6, p. 1020, 2020.

H. M. Baskonus, H. Bulut, and T. A. Sulaiman, “New complex hyperbolic structures to the Lonngren-wave equation by using sine-gordon expansion method,” Applied Mathematics and Nonlinear Sciences, vol. 4, no. 1, pp. 141–150, 2019.

M. Modanli and A. Akgül, “On Solutions of Fractional order Telegraph partial differential equation by Crank-Nicholson finite difference method,” Applied Mathematics and Nonlinear Sciences, vol. 5, no. 1, pp. 163–170, 2020.

E. Ilhan and I. O. Kıymaz, “A generalization of truncated M-fractional derivative and applications to fractional differential equations,” Applied Mathematics and Nonlinear Sciences, vol. 5, no. 1, pp. 171–188, 2020.

E. I. Eskitasçıoglu, M. B. Aktas, and H. M. Baskonus, “New complex and hyperbolic forms for Ablowitz–Kaup–Newell–Segur wave equation with fourth order,” Applied Mathematics and Nonlinear Sciences, vol. 4, no. 1, pp. 105–112, 2019.

H. Duru, O. Tasbozan, and A. K. de Griñó, “New analytical solutions of conformable time fractional bad and good modified Boussinesq equations,” Applied Mathematics and Nonlinear Sciences, vol. 5, no. 1, pp. 447–454, 2020.

H. Duru, A. Kurt, and O. Tasbozan, “New travelling wave solutions for KdV6 equation using sub equation method,” Applied Mathematics and Nonlinear Sciences, vol. 5, no. 1, pp. 455–460, 2020.