summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_img/photo3.jpgbin56407 -> 46071 bytes
-rw-r--r--_img/photo5.jpgbin57660 -> 41836 bytes
-rw-r--r--generate_graph.py42
-rw-r--r--graph.json2
-rw-r--r--main.js202
5 files changed, 153 insertions, 93 deletions
diff --git a/_img/photo3.jpg b/_img/photo3.jpg
index 94ebe82..6143b9b 100644
--- a/_img/photo3.jpg
+++ b/_img/photo3.jpg
Binary files differ
diff --git a/_img/photo5.jpg b/_img/photo5.jpg
index 5757123..9845eda 100644
--- a/_img/photo5.jpg
+++ b/_img/photo5.jpg
Binary files differ
diff --git a/generate_graph.py b/generate_graph.py
index d47e345..1715404 100644
--- a/generate_graph.py
+++ b/generate_graph.py
@@ -11,7 +11,17 @@ subnode_threshold = float(sys.argv[10])
nodes = {}
-nodes['n0'] = {'width': base_size, 'height': base_size, 'color': 'rgba(255,255,255,0.01)', 'mass': base_size, 'fixed': True, 'x': 0, 'y': 0, 'image': 'photo' + str(random.randint(1, 5)) + '.jpg'}
+nodes['n0'] = {
+ 'width': base_size,
+ 'height': base_size,
+ 'color': 'rgba(255,255,255,0.01)',
+ 'mass': base_size,
+ 'fixed': True,
+ 'x': 0,
+ 'y': 0,
+ 'image': 'photo' + str(random.randint(1, 5)) + '.jpg',
+ 'main': True
+}
node_count = 1
node_sizes = []
@@ -24,8 +34,8 @@ node_colors = {
0.8: 'rgba(52,149,255,0.33)',
0.7: 'rgba(52,149,255,0.33)',
0.3: 'rgba(255,0,0,0.33)',
- 0.2: 'yellow',
- 0.1: 'white'
+ 0.2: 'rgba(255,255,0,0.33)',
+ 0.1: 'rgba(255,255,255,0.33)'
}
angular_positions = [2 * pi / len(node_sizes) * (n - 1) for n in range(1, len(node_sizes)+1)]
@@ -40,9 +50,16 @@ for node_size in node_sizes:
node_angular_position = angular_positions[node_count-1]
node_position = { 'x': 0.8 * cos(node_angular_position),
'y': 0.8 * sin(node_angular_position) }
- nodes[node_id] = {'width': node_dimension, 'height': node_dimension, 'mass': node_mass, 'color': node_colors[node_size], 'fixed': True, 'x': node_position['x'], 'y': node_position['y']}
- if node_size > 0.2:
- nodes[node_id]['image'] = 'photo' + str(random.randint(1, 5)) + '.jpg'
+ nodes[node_id] = {
+ 'width': node_dimension,
+ 'height': node_dimension,
+ 'mass': node_mass,
+ 'color': node_colors[node_size],
+ 'fixed': True,
+ 'x': node_position['x'],
+ 'y': node_position['y'],
+ 'image': 'photo' + str(random.randint(1, 5)) + '.jpg'
+ }
edges['n0'][node_id] = {}
edges[node_id] = {}
node_count += 1
@@ -52,9 +69,16 @@ for node_size in node_sizes:
subnode_id = node_id + '_' + str(subnode_count)
subnode_dimension = max(5, int(ceil(base_size * node_size * subnode_size * size_quotient * size_quotient)))
subnode_mass = int(ceil(base_size * mass_quotient))
- nodes[subnode_id] = {'width': subnode_dimension, 'height': subnode_dimension, 'mass': subnode_mass, 'color': node_colors[subnode_size], 'fixed': True, 'x': node_position['x'] * (0.995 + random.random() / 100), 'y': node_position['y'] * (0.995 + random.random() / 100)}
- if subnode_size > 0.2:
- nodes[subnode_id]['image'] = 'photo' + str(random.randint(1, 5)) + '.jpg'
+ nodes[subnode_id] = {
+ 'width': subnode_dimension,
+ 'height': subnode_dimension,
+ 'mass': subnode_mass,
+ 'color': node_colors[subnode_size],
+ 'fixed': True,
+ 'x': node_position['x'] * (0.995 + random.random() / 100),
+ 'y': node_position['y'] * (0.995 + random.random() / 100),
+ 'image': 'photo' + str(random.randint(1, 5)) + '.jpg'
+ }
edges[node_id][subnode_id] = {}
subnode_count += 1
diff --git a/graph.json b/graph.json
index c04e3e6..24044c6 100644
--- a/graph.json
+++ b/graph.json
@@ -1 +1 @@
-{"nodes": {"n7_8": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.47067718119711, "x": 0.6499656759303052, "fixed": true}, "n7_4": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.4699391941836866, "x": 0.6472009837989573, "fixed": true}, "n7_5": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.47094288568682546, "x": 0.649020776220796, "fixed": true}, "n7_6": {"color": "yellow", "height": 9, "width": 9, "mass": 10, "y": 0.4707281469290535, "x": 0.6460470428585983, "fixed": true}, "n7_7": {"color": "yellow", "height": 9, "width": 9, "mass": 10, "y": 0.4718060146119481, "x": 0.6495352500876849, "fixed": true}, "n7_1": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 45, "width": 45, "mass": 10, "y": 0.47241042049496096, "x": 0.6503554055694857, "fixed": true}, "n7_2": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 36, "width": 36, "mass": 10, "y": 0.47128260215734263, "x": 0.6455662641260381, "fixed": true}, "n7_3": {"color": "rgba(255,0,0,0.33)", "image": "photo2.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.46914413446458236, "x": 0.6475249512766832, "fixed": true}, "n5_2": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.29469710089556084, "x": -0.7440680081722543, "fixed": true}, "n5_3": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.29491959273718155, "x": -0.7401384839122067, "fixed": true}, "n5_1": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 35, "width": 35, "mass": 10, "y": 0.29592775917062736, "x": -0.7404147470340549, "fixed": true}, "n5_6": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": 0.2950996018755881, "x": -0.7462066083472896, "fixed": true}, "n5_7": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.29356604422867594, "x": -0.7426225730335434, "fixed": true}, "n5_4": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.29459696817064773, "x": -0.7422295225367798, "fixed": true}, "n5_5": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.29360327547911447, "x": -0.7409597469506806, "fixed": true}, "n30": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 30, "width": 30, "mass": 10, "y": 0.1002665868514434, "x": 0.7936917610515823, "fixed": true}, "n31": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": -0.47022820183397873, "x": -0.6472135954999578, "fixed": true}, "n32": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": 0.3854029392813722, "x": -0.7010453440350909, "fixed": true}, "n25_2": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.7994478367242747, "x": -0.04998133457779231, "fixed": true}, "n34": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": -0.7608452130361228, "x": -0.24721359549995806, "fixed": true}, "n35": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": -0.3854029392813723, "x": -0.7010453440350908, "fixed": true}, "n25_5": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.7950337996199864, "x": -0.05044501035070123, "fixed": true}, "n37": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": 0.4702282018339786, "x": -0.6472135954999579, "fixed": true}, "n38": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": -0.19895190973188404, "x": -0.7748665289029049, "fixed": true}, "n39": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": 0.10026658685144328, "x": -0.7936917610515823, "fixed": true}, "n3_1": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 50, "width": 50, "mass": 10, "y": -0.10075602956982901, "x": -0.7970415273336862, "fixed": true}, "n3_2": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": -0.09994258829610071, "x": -0.7917904220414633, "fixed": true}, "n3_3": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": -0.10012785201365171, "x": -0.7903138262909633, "fixed": true}, "n8_3": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.783381004658459, "x": 0.14939450773071347, "fixed": true}, "n8_2": {"color": "rgba(255,0,0,0.33)", "image": "photo4.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.7826939101903494, "x": 0.15057758256250323, "fixed": true}, "n8_1": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 45, "width": 45, "mass": 10, "y": -0.7827709543433563, "x": 0.14964138717427, "fixed": true}, "n1_6": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": 0.6768955963080234, "x": 0.4278323741278408, "fixed": true}, "n1_4": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.6759377708057329, "x": 0.430627639523772, "fixed": true}, "n1_5": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": 0.6740857395808431, "x": 0.4279921200789879, "fixed": true}, "n1_2": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 45, "width": 45, "mass": 10, "y": 0.6754775886042603, "x": 0.4287875685885402, "fixed": true}, "n1_3": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.6723830127244091, "x": 0.4278558073207485, "fixed": true}, "n1_1": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 50, "width": 50, "mass": 10, "y": 0.6721370040924634, "x": 0.42729084057277056, "fixed": true}, "n12": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 90, "width": 90, "mass": 10, "y": 0.7608452130361228, "x": -0.24721359549995806, "fixed": true}, "n13": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 90, "width": 90, "mass": 10, "y": 0.6164105942206315, "x": 0.5099391917989518, "fixed": true}, "n10": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 90, "width": 90, "mass": 10, "y": -0.7238616419728159, "x": -0.34062343325205774, "fixed": true}, "n11": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 90, "width": 90, "mass": 10, "y": -0.38540293928137226, "x": 0.7010453440350909, "fixed": true}, "n16": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 80, "width": 80, "mass": 10, "y": -0.6754623404016122, "x": -0.42866143598319706, "fixed": true}, "n17": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 80, "width": 80, "mass": 10, "y": 0.5476376847429508, "x": -0.5831749019371294, "fixed": true}, "n14": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 90, "width": 90, "mass": 10, "y": -0.760845213036123, "x": 0.2472135954999578, "fixed": true}, "n15": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 90, "width": 90, "mass": 10, "y": 0.675462340401612, "x": -0.4286614359831975, "fixed": true}, "n3_4": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": -0.09976541246918436, "x": -0.7901041788621811, "fixed": true}, "n18": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 80, "width": 80, "mass": 10, "y": 0.7238616419728157, "x": -0.3406234332520582, "fixed": true}, "n19": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 70, "width": 70, "mass": 10, "y": 0.785829800582951, "x": 0.14990505166857962, "fixed": true}, "n3_5": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.10033448586087677, "x": -0.7905186338049698, "fixed": true}, "n4_8": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.8000780576727367, "x": -0.05024435315178556, "fixed": true}, "n4_3": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 40, "width": 40, "mass": 10, "y": -0.7951388042730414, "x": -0.05019833471123481, "fixed": true}, "n4_2": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 40, "width": 40, "mass": 10, "y": -0.7973837705524047, "x": -0.05024973967785655, "fixed": true}, "n4_1": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 45, "width": 45, "mass": 10, "y": -0.7959743029238526, "x": -0.050014845091079355, "fixed": true}, "n4_7": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.8002415736432474, "x": -0.05006888653707851, "fixed": true}, "n4_6": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.7983810039677018, "x": -0.05027244884299702, "fixed": true}, "n4_5": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.8001610387542626, "x": -0.05012364247003241, "fixed": true}, "n4_4": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": -0.7954559111009277, "x": -0.050040321126610984, "fixed": true}, "n33": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": -0.6164105942206315, "x": -0.5099391917989516, "fixed": true}, "n36": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": -0.7984213827426173, "x": 0.05023241562345098, "fixed": true}, "n2_1": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 45, "width": 45, "mass": 10, "y": -0.5486942331734604, "x": 0.5830794693730875, "fixed": true}, "n2_3": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": -0.5493148430630673, "x": 0.5810036137343629, "fixed": true}, "n2_2": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 15, "width": 15, "mass": 10, "y": -0.5452139764988674, "x": 0.5826181336721712, "fixed": true}, "n2_5": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.5458340928677875, "x": 0.580675222009302, "fixed": true}, "n2_4": {"color": "yellow", "height": 10, "width": 10, "mass": 10, "y": -0.5455192103182154, "x": 0.5828114942064134, "fixed": true}, "n2_7": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.5456446241047354, "x": 0.5835206292640702, "fixed": true}, "n2_6": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.5462765746312843, "x": 0.5848278697077831, "fixed": true}, "n28_2": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 5, "width": 5, "mass": 10, "y": -0.47071517943005403, "x": 0.6445906968873014, "fixed": true}, "n28_3": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.4691702707952998, "x": 0.6487248866366403, "fixed": true}, "n28_4": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.46957340091621275, "x": 0.6479889278175615, "fixed": true}, "n28_5": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.47208815652588004, "x": 0.6485931947650088, "fixed": true}, "n6_5": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.3844231876313806, "x": 0.700560063827298, "fixed": true}, "n6_4": {"color": "yellow", "height": 9, "width": 9, "mass": 10, "y": 0.3854219262787882, "x": 0.7036118404795527, "fixed": true}, "n29_3": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.1985516760851855, "x": -0.772588347105185, "fixed": true}, "n29_2": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.19857209477551424, "x": -0.7784326864556351, "fixed": true}, "n6_1": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 45, "width": 45, "mass": 10, "y": 0.38513660103665726, "x": 0.7002643109325484, "fixed": true}, "n29_4": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 11, "width": 11, "mass": 10, "y": 0.19878394847371034, "x": -0.7774566053310069, "fixed": true}, "n6_3": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 32, "width": 32, "mass": 10, "y": 0.38478482025698796, "x": 0.7020288033671186, "fixed": true}, "n6_2": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 41, "width": 41, "mass": 10, "y": 0.3858524152897949, "x": 0.6982692382454059, "fixed": true}, "n29_9": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.1995994601900456, "x": -0.778324914144648, "fixed": true}, "n29_8": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.1986597573514416, "x": -0.7715913506112191, "fixed": true}, "n28_7": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.4686104870562901, "x": 0.6473033853717821, "fixed": true}, "n22_4": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.29566974554046027, "x": 0.7445942998381102, "fixed": true}, "n22_2": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 5, "width": 5, "mass": 10, "y": 0.2935385074852545, "x": 0.742156643204965, "fixed": true}, "n22_3": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.2936930102347662, "x": 0.7450019361533936, "fixed": true}, "n22_1": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.293234857769945, "x": 0.7420017822629454, "fixed": true}, "n15_1": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 45, "width": 45, "mass": 10, "y": 0.6730851488742589, "x": -0.4278626194455169, "fixed": true}, "n15_2": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 41, "width": 41, "mass": 10, "y": 0.6777376134710421, "x": -0.4306980903808832, "fixed": true}, "n15_3": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 41, "width": 41, "mass": 10, "y": 0.6729708394252135, "x": -0.42903267856606747, "fixed": true}, "n17_2": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 36, "width": 36, "mass": 10, "y": 0.5489170313243269, "x": -0.5809038864583442, "fixed": true}, "n17_3": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 36, "width": 36, "mass": 10, "y": 0.5453475420628987, "x": -0.5825991770728641, "fixed": true}, "n17_1": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 40, "width": 40, "mass": 10, "y": 0.5485336214127234, "x": -0.580776634680051, "fixed": true}, "n17_6": {"color": "yellow", "height": 8, "width": 8, "mass": 10, "y": 0.5485067750843886, "x": -0.5842746299556832, "fixed": true}, "n17_7": {"color": "yellow", "height": 8, "width": 8, "mass": 10, "y": 0.5492749273490618, "x": -0.5833456270065104, "fixed": true}, "n17_4": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 32, "width": 32, "mass": 10, "y": 0.5492532153475622, "x": -0.5826447970512549, "fixed": true}, "n17_5": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 28, "width": 28, "mass": 10, "y": 0.5478119598529362, "x": -0.5858685109420222, "fixed": true}, "n19_1": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 35, "width": 35, "mass": 10, "y": 0.7836299855248199, "x": 0.1491882639343399, "fixed": true}, "n19_2": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 32, "width": 32, "mass": 10, "y": 0.7884465202405296, "x": 0.1506109522170776, "fixed": true}, "n19_3": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 32, "width": 32, "mass": 10, "y": 0.7836918827528051, "x": 0.14957129092487625, "fixed": true}, "n19_4": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 32, "width": 32, "mass": 10, "y": 0.7829951310730505, "x": 0.14987368472416748, "fixed": true}, "n19_5": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 28, "width": 28, "mass": 10, "y": 0.7893079176746515, "x": 0.14931377588700442, "fixed": true}, "n19_6": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 28, "width": 28, "mass": 10, "y": 0.7896389400814494, "x": 0.14973970483239327, "fixed": true}, "n19_7": {"color": "yellow", "height": 7, "width": 7, "mass": 10, "y": 0.7856787844637992, "x": 0.1503902460298548, "fixed": true}, "n25_3": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 12, "width": 12, "mass": 10, "y": 0.7995590000670421, "x": -0.05021827360214054, "fixed": true}, "n26_2": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.6187562997512985, "x": 0.5081475406866758, "fixed": true}, "n26_3": {"color": "rgba(255,0,0,0.33)", "image": "photo2.jpg", "height": 5, "width": 5, "mass": 10, "y": -0.6183765886201662, "x": 0.5102558816378029, "fixed": true}, "n26_1": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.6175317392303712, "x": 0.5082038746417112, "fixed": true}, "n26_6": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.6173216807449313, "x": 0.5097471414257093, "fixed": true}, "n26_4": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.6143970814983685, "x": 0.5078232207086613, "fixed": true}, "n26_5": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.6191021781137145, "x": 0.5100419358500254, "fixed": true}, "n49": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": 0.7238616419728157, "x": 0.3406234332520581, "fixed": true}, "n48": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": 0.7858298005829509, "x": -0.14990505166857987, "fixed": true}, "n41": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": -0.547637684742951, "x": -0.5831749019371293, "fixed": true}, "n40": {"color": "yellow", "height": 20, "width": 20, "mass": 10, "y": 0.7608452130361228, "x": 0.24721359549995797, "fixed": true}, "n43": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": 0.7984213827426173, "x": 0.05023241562345065, "fixed": true}, "n24_3": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.19829127130599034, "x": 0.7736727059107382, "fixed": true}, "n45": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": -0.675462340401612, "x": 0.42866143598319745, "fixed": true}, "n44": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": -0.7238616419728157, "x": 0.3406234332520581, "fixed": true}, "n47": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": -0.10026658685144303, "x": 0.7936917610515823, "fixed": true}, "n46": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": -0.29449964214774266, "x": -0.743821188710601, "fixed": true}, "n30_5": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.0999408925242096, "x": 0.7963283536557391, "fixed": true}, "n30_4": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.0998357495582858, "x": 0.7925736244022124, "fixed": true}, "n30_3": {"color": "rgba(255,0,0,0.33)", "image": "photo2.jpg", "height": 5, "width": 5, "mass": 10, "y": 0.10020129315688532, "x": 0.7943886170454824, "fixed": true}, "n30_2": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.10031475340269372, "x": 0.7914798741427597, "fixed": true}, "n30_1": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.1004814115624187, "x": 0.7970000450415579, "fixed": true}, "n11_1": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 41, "width": 41, "mass": 10, "y": -0.3871018147934204, "x": 0.7032214489984691, "fixed": true}, "n11_2": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.38567514112200957, "x": 0.7044061130287178, "fixed": true}, "n20_1": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 32, "width": 32, "mass": 10, "y": 0.6167414470277169, "x": -0.5080911994163313, "fixed": true}, "n20_2": {"color": "yellow", "height": 7, "width": 7, "mass": 10, "y": 0.6152379392532505, "x": -0.5090086489240767, "fixed": true}, "n20_3": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.6137507543631333, "x": -0.5106933346168645, "fixed": true}, "n20_4": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.6136730705096926, "x": -0.5086564467210327, "fixed": true}, "n13_6": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.6158507362405491, "x": 0.5097601112257722, "fixed": true}, "n28_1": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 15, "width": 15, "mass": 10, "y": -0.47041531020502075, "x": 0.6482066829625965, "fixed": true}, "n13_4": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 41, "width": 41, "mass": 10, "y": 0.6170413882632084, "x": 0.5117798373394994, "fixed": true}, "n13_5": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.6138255029790757, "x": 0.5122828709170619, "fixed": true}, "n13_2": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 45, "width": 45, "mass": 10, "y": 0.6176594793908764, "x": 0.5074248234424878, "fixed": true}, "n13_3": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 41, "width": 41, "mass": 10, "y": 0.61781679667954, "x": 0.5092312142670442, "fixed": true}, "n28_6": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.4712993224605197, "x": 0.6463432328696729, "fixed": true}, "n13_1": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 45, "width": 45, "mass": 10, "y": 0.6163135600636098, "x": 0.5081522954776093, "fixed": true}, "n14_5": {"color": "yellow", "height": 9, "width": 9, "mass": 10, "y": -0.7614026427006391, "x": 0.2466050807921045, "fixed": true}, "n14_4": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.757454941675338, "x": 0.2480817773291594, "fixed": true}, "n14_1": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 45, "width": 45, "mass": 10, "y": -0.7593781474125715, "x": 0.24674095965602505, "fixed": true}, "n14_3": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 41, "width": 41, "mass": 10, "y": -0.761922098434847, "x": 0.24729078254553266, "fixed": true}, "n14_2": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 41, "width": 41, "mass": 10, "y": -0.7574643505151212, "x": 0.2460321267329389, "fixed": true}, "n21_1": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.5449781475964978, "x": 0.5839250147921414, "fixed": true}, "n21_3": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 12, "width": 12, "mass": 10, "y": 0.545941580148333, "x": 0.5853465063123692, "fixed": true}, "n21_2": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 14, "width": 14, "mass": 10, "y": 0.5472811636849855, "x": 0.5824630197315076, "fixed": true}, "n21_5": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.5464374413013275, "x": 0.581003465203625, "fixed": true}, "n21_4": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.5474386472779819, "x": 0.5859369781400524, "fixed": true}, "n50": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": -0.785829800582951, "x": -0.1499050516685797, "fixed": true}, "n23_4": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.1996210178774835, "x": 0.7764595411633568, "fixed": true}, "n23_3": {"color": "rgba(255,0,0,0.33)", "image": "photo2.jpg", "height": 5, "width": 5, "mass": 10, "y": -0.19882058288741677, "x": 0.7781852995614014, "fixed": true}, "n23_2": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 5, "width": 5, "mass": 10, "y": -0.19898379576783867, "x": 0.7782467713531775, "fixed": true}, "n23_1": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 12, "width": 12, "mass": 10, "y": -0.19959021626677184, "x": 0.7785024026506377, "fixed": true}, "n29_1": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.199399183798943, "x": -0.7747441819630747, "fixed": true}, "n16_3": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 40, "width": 40, "mass": 10, "y": -0.6782458968209568, "x": -0.4300968966913019, "fixed": true}, "n16_2": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 40, "width": 40, "mass": 10, "y": -0.6781913014333827, "x": -0.4275307993465763, "fixed": true}, "n16_1": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 40, "width": 40, "mass": 10, "y": -0.6775631406659045, "x": -0.42870865762303684, "fixed": true}, "n25_6": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.8015576578269854, "x": -0.05046140508454178, "fixed": true}, "n25_1": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 15, "width": 15, "mass": 10, "y": 0.7959891800848251, "x": -0.05039746437170698, "fixed": true}, "n16_6": {"color": "yellow", "height": 8, "width": 8, "mass": 10, "y": -0.6727916592745684, "x": -0.42688035208543723, "fixed": true}, "n16_5": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 12, "width": 12, "mass": 10, "y": -0.6776807931078418, "x": -0.42690342916969937, "fixed": true}, "n16_4": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 36, "width": 36, "mass": 10, "y": -0.6740521011159454, "x": -0.42684526693125485, "fixed": true}, "n27_3": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.2945337653907568, "x": 0.7419817354975717, "fixed": true}, "n27_2": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.2933849505866539, "x": 0.7461293468494088, "fixed": true}, "n27_1": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.29496894719526884, "x": 0.7456219280117944, "fixed": true}, "n27_7": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.29307633123052435, "x": 0.7408746531357605, "fixed": true}, "n27_6": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -0.29327185939823264, "x": 0.7426692421427428, "fixed": true}, "n27_5": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.29402880799830433, "x": 0.7448257777945867, "fixed": true}, "n27_4": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": -0.29311956539989614, "x": 0.7440253836216589, "fixed": true}, "n18_1": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 36, "width": 36, "mass": 10, "y": 0.727185817888441, "x": -0.3409288892758087, "fixed": true}, "n29_5": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 5, "width": 5, "mass": 10, "y": 0.19911204214464645, "x": -0.7723535850043676, "fixed": true}, "n18_3": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.7258579266738453, "x": -0.3404884492486002, "fixed": true}, "n18_2": {"color": "rgba(255,0,0,0.33)", "image": "photo4.jpg", "height": 12, "width": 12, "mass": 10, "y": 0.7253180162885154, "x": -0.3391202884142035, "fixed": true}, "n18_4": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.7269262236706641, "x": -0.3403351778298603, "fixed": true}, "n42": {"color": "white", "height": 10, "width": 10, "mass": 10, "y": 0.0, "x": 0.8, "fixed": true}, "n29_7": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.19961966761481223, "x": -0.7723383748195778, "fixed": true}, "n29_6": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.1996322132750394, "x": -0.778550896656694, "fixed": true}, "n29": {"color": "rgba(255,0,0,0.33)", "image": "photo5.jpg", "height": 30, "width": 30, "mass": 10, "y": 0.19895190973188387, "x": -0.7748665289029049, "fixed": true}, "n28": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 30, "width": 30, "mass": 10, "y": -0.47022820183397807, "x": 0.6472135954999583, "fixed": true}, "n24_1": {"color": "rgba(255,0,0,0.33)", "image": "photo2.jpg", "height": 5, "width": 5, "mass": 10, "y": 0.1991665400734973, "x": 0.7714994215103353, "fixed": true}, "n23": {"color": "rgba(255,0,0,0.33)", "image": "photo4.jpg", "height": 30, "width": 30, "mass": 10, "y": -0.1989519097318836, "x": 0.774866528902905, "fixed": true}, "n22": {"color": "rgba(255,0,0,0.33)", "image": "photo2.jpg", "height": 30, "width": 30, "mass": 10, "y": 0.2944996421477424, "x": 0.7438211887106011, "fixed": true}, "n21": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 30, "width": 30, "mass": 10, "y": 0.547637684742951, "x": 0.5831749019371293, "fixed": true}, "n20": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 70, "width": 70, "mass": 10, "y": 0.6164105942206315, "x": -0.5099391917989519, "fixed": true}, "n27": {"color": "rgba(255,0,0,0.33)", "image": "photo4.jpg", "height": 30, "width": 30, "mass": 10, "y": -0.2944996421477423, "x": 0.7438211887106012, "fixed": true}, "n26": {"color": "rgba(255,0,0,0.33)", "image": "photo4.jpg", "height": 30, "width": 30, "mass": 10, "y": -0.6164105942206313, "x": 0.509939191798952, "fixed": true}, "n25": {"color": "rgba(255,0,0,0.33)", "image": "photo4.jpg", "height": 30, "width": 30, "mass": 10, "y": 0.7984213827426173, "x": -0.050232415623450724, "fixed": true}, "n24": {"color": "rgba(255,0,0,0.33)", "image": "photo3.jpg", "height": 30, "width": 30, "mass": 10, "y": 0.19895190973188384, "x": 0.7748665289029049, "fixed": true}, "n10_1": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 41, "width": 41, "mass": 10, "y": -0.7227771683037595, "x": -0.3398082685608284, "fixed": true}, "n10_2": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 14, "width": 14, "mass": 10, "y": -0.7208889354102254, "x": -0.338993018840841, "fixed": true}, "n9_2": {"color": "yellow", "height": 9, "width": 9, "mass": 10, "y": -2.57803239222217e-16, "x": -0.8016765764502483, "fixed": true}, "n9_3": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": -2.5618952565822057e-16, "x": -0.7992231842858051, "fixed": true}, "n9_1": {"color": "rgba(52,149,255,0.33)", "image": "photo5.jpg", "height": 36, "width": 36, "mass": 10, "y": -2.576053255869123e-16, "x": -0.8010183546987726, "fixed": true}, "n8": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 90, "width": 90, "mass": 10, "y": -0.7858298005829509, "x": 0.14990505166858012, "fixed": true}, "n9": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 90, "width": 90, "mass": 10, "y": -2.572996239482619e-16, "x": -0.8, "fixed": true}, "n24_2": {"color": "yellow", "height": 5, "width": 5, "mass": 10, "y": 0.19977046113534389, "x": 0.7766302549549643, "fixed": true}, "n12_4": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.7635160346135146, "x": -0.24774983478117998, "fixed": true}, "n12_3": {"color": "white", "height": 5, "width": 5, "mass": 10, "y": 0.7638025219475083, "x": -0.24657952198967245, "fixed": true}, "n12_2": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 41, "width": 41, "mass": 10, "y": 0.7595275574716617, "x": -0.24791019066301315, "fixed": true}, "n12_1": {"color": "rgba(52,149,255,0.33)", "image": "photo1.jpg", "height": 45, "width": 45, "mass": 10, "y": 0.7592985826302802, "x": -0.24759013220478393, "fixed": true}, "n25_4": {"color": "rgba(255,0,0,0.33)", "image": "photo1.jpg", "height": 5, "width": 5, "mass": 10, "y": 0.7964635697895904, "x": -0.05005676078724839, "fixed": true}, "n0": {"width": 200, "mass": 200, "y": 0, "color": "rgba(255,255,255,0.01)", "x": 0, "image": "photo2.jpg", "fixed": true, "height": 200}, "n1": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 100, "width": 100, "mass": 10, "y": 0.6754623404016121, "x": 0.4286614359831973, "fixed": true}, "n2": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 100, "width": 100, "mass": 10, "y": -0.5476376847429506, "x": 0.5831749019371295, "fixed": true}, "n3": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 100, "width": 100, "mass": 10, "y": -0.10026658685144343, "x": -0.7936917610515823, "fixed": true}, "n4": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 100, "width": 100, "mass": 10, "y": -0.7984213827426173, "x": -0.05023241562345057, "fixed": true}, "n5": {"color": "rgba(52,149,255,0.33)", "image": "photo2.jpg", "height": 100, "width": 100, "mass": 10, "y": 0.2944996421477422, "x": -0.7438211887106012, "fixed": true}, "n6": {"color": "rgba(52,149,255,0.33)", "image": "photo4.jpg", "height": 90, "width": 90, "mass": 10, "y": 0.38540293928137226, "x": 0.7010453440350909, "fixed": true}, "n7": {"color": "rgba(52,149,255,0.33)", "image": "photo3.jpg", "height": 90, "width": 90, "mass": 10, "y": 0.4702282018339785, "x": 0.647213595499958, "fixed": true}}, "repulsion": 2200, "fps": 15, "stiffness": 900, "edges": {"n12": {"n12_4": {}, "n12_3": {}, "n12_2": {}, "n12_1": {}}, "n13": {"n13_6": {}, "n13_4": {}, "n13_5": {}, "n13_2": {}, "n13_3": {}, "n13_1": {}}, "n10": {"n10_1": {}, "n10_2": {}}, "n11": {"n11_1": {}, "n11_2": {}}, "n16": {"n16_3": {}, "n16_2": {}, "n16_1": {}, "n16_6": {}, "n16_5": {}, "n16_4": {}}, "n17": {"n17_2": {}, "n17_3": {}, "n17_1": {}, "n17_6": {}, "n17_7": {}, "n17_4": {}, "n17_5": {}}, "n14": {"n14_5": {}, "n14_4": {}, "n14_1": {}, "n14_3": {}, "n14_2": {}}, "n15": {"n15_1": {}, "n15_2": {}, "n15_3": {}}, "n18": {"n18_1": {}, "n18_3": {}, "n18_2": {}, "n18_4": {}}, "n19": {"n19_1": {}, "n19_2": {}, "n19_3": {}, "n19_4": {}, "n19_5": {}, "n19_6": {}, "n19_7": {}}, "n50": {}, "n38": {}, "n39": {}, "n30": {"n30_5": {}, "n30_4": {}, "n30_3": {}, "n30_2": {}, "n30_1": {}}, "n31": {}, "n32": {}, "n33": {}, "n34": {}, "n35": {}, "n36": {}, "n37": {}, "n49": {}, "n48": {}, "n41": {}, "n40": {}, "n43": {}, "n42": {}, "n45": {}, "n44": {}, "n47": {}, "n46": {}, "n29": {"n29_1": {}, "n29_3": {}, "n29_2": {}, "n29_5": {}, "n29_4": {}, "n29_7": {}, "n29_6": {}, "n29_9": {}, "n29_8": {}}, "n28": {"n28_1": {}, "n28_2": {}, "n28_3": {}, "n28_4": {}, "n28_5": {}, "n28_6": {}, "n28_7": {}}, "n23": {"n23_4": {}, "n23_3": {}, "n23_2": {}, "n23_1": {}}, "n22": {"n22_4": {}, "n22_2": {}, "n22_3": {}, "n22_1": {}}, "n21": {"n21_1": {}, "n21_3": {}, "n21_2": {}, "n21_5": {}, "n21_4": {}}, "n20": {"n20_1": {}, "n20_2": {}, "n20_3": {}, "n20_4": {}}, "n27": {"n27_3": {}, "n27_2": {}, "n27_1": {}, "n27_7": {}, "n27_6": {}, "n27_5": {}, "n27_4": {}}, "n26": {"n26_2": {}, "n26_3": {}, "n26_1": {}, "n26_6": {}, "n26_4": {}, "n26_5": {}}, "n25": {"n25_5": {}, "n25_4": {}, "n25_6": {}, "n25_1": {}, "n25_3": {}, "n25_2": {}}, "n24": {"n24_1": {}, "n24_2": {}, "n24_3": {}}, "n8": {"n8_3": {}, "n8_2": {}, "n8_1": {}}, "n9": {"n9_2": {}, "n9_3": {}, "n9_1": {}}, "n0": {"n12": {}, "n13": {}, "n10": {}, "n11": {}, "n16": {}, "n17": {}, "n14": {}, "n15": {}, "n18": {}, "n19": {}, "n50": {}, "n38": {}, "n39": {}, "n30": {}, "n31": {}, "n32": {}, "n33": {}, "n34": {}, "n35": {}, "n36": {}, "n37": {}, "n49": {}, "n48": {}, "n41": {}, "n40": {}, "n43": {}, "n42": {}, "n45": {}, "n44": {}, "n47": {}, "n46": {}, "n29": {}, "n28": {}, "n23": {}, "n22": {}, "n21": {}, "n20": {}, "n27": {}, "n26": {}, "n25": {}, "n24": {}, "n8": {}, "n9": {}, "n1": {}, "n2": {}, "n3": {}, "n4": {}, "n5": {}, "n6": {}, "n7": {}}, "n1": {"n1_6": {}, "n1_4": {}, "n1_5": {}, "n1_2": {}, "n1_3": {}, "n1_1": {}}, "n2": {"n2_1": {}, "n2_3": {}, "n2_2": {}, "n2_5": {}, "n2_4": {}, "n2_7": {}, "n2_6": {}}, "n3": {"n3_1": {}, "n3_2": {}, "n3_3": {}, "n3_4": {}, "n3_5": {}}, "n4": {"n4_8": {}, "n4_3": {}, "n4_2": {}, "n4_1": {}, "n4_7": {}, "n4_6": {}, "n4_5": {}, "n4_4": {}}, "n5": {"n5_2": {}, "n5_3": {}, "n5_1": {}, "n5_6": {}, "n5_7": {}, "n5_4": {}, "n5_5": {}}, "n6": {"n6_5": {}, "n6_4": {}, "n6_1": {}, "n6_3": {}, "n6_2": {}}, "n7": {"n7_8": {}, "n7_4": {}, "n7_5": {}, "n7_6": {}, "n7_7": {}, "n7_1": {}, "n7_2": {}, "n7_3": {}}}, "dt": 0.005, "precision": 0.1, "friction": 0, "gravity": true}
+{"nodes": {"n7_4": {"width": 32, "mass": 10, "y": -0.383995997177819, "color": "rgba(52,149,255,0.33)", "x": 0.7039962028512448, "image": "photo5.jpg", "fixed": true, "height": 32}, "n7_5": {"width": 14, "mass": 10, "y": -0.3848777219319597, "color": "rgba(255,0,0,0.33)", "x": 0.697652805934399, "image": "photo5.jpg", "fixed": true, "height": 14}, "n7_6": {"width": 9, "mass": 10, "y": -0.38725651077471585, "color": "rgba(255,255,0,0.33)", "x": 0.7012904100098307, "image": "photo4.jpg", "fixed": true, "height": 9}, "n7_7": {"width": 5, "mass": 10, "y": -0.3872691360331407, "color": "rgba(255,255,255,0.33)", "x": 0.7037607189183401, "image": "photo2.jpg", "fixed": true, "height": 5}, "n7_1": {"width": 45, "mass": 10, "y": -0.3841827137219557, "color": "rgba(52,149,255,0.33)", "x": 0.6980559329571677, "image": "photo4.jpg", "fixed": true, "height": 45}, "n7_2": {"width": 41, "mass": 10, "y": -0.384029160855324, "color": "rgba(52,149,255,0.33)", "x": 0.7031242631769136, "image": "photo2.jpg", "fixed": true, "height": 41}, "n7_3": {"width": 36, "mass": 10, "y": -0.38677852208705954, "color": "rgba(52,149,255,0.33)", "x": 0.7017007937327371, "image": "photo4.jpg", "fixed": true, "height": 36}, "n5_2": {"width": 15, "mass": 10, "y": -0.6756863878240758, "color": "rgba(255,0,0,0.33)", "x": 0.42670488961414127, "image": "photo3.jpg", "fixed": true, "height": 15}, "n5_3": {"width": 5, "mass": 10, "y": -0.6733465254453156, "color": "rgba(255,255,255,0.33)", "x": 0.43069913323630443, "image": "photo4.jpg", "fixed": true, "height": 5}, "n5_1": {"width": 15, "mass": 10, "y": -0.6736727573556683, "color": "rgba(255,0,0,0.33)", "x": 0.4290507900966652, "image": "photo1.jpg", "fixed": true, "height": 15}, "n30": {"width": 30, "mass": 10, "y": -0.7238616419728157, "color": "rgba(255,0,0,0.33)", "x": 0.3406234332520581, "image": "photo1.jpg", "fixed": true, "height": 30}, "n31": {"width": 20, "mass": 10, "y": -0.785829800582951, "color": "rgba(255,255,0,0.33)", "x": -0.1499050516685797, "image": "photo5.jpg", "fixed": true, "height": 20}, "n32": {"width": 20, "mass": 10, "y": -0.5476376847429506, "color": "rgba(255,255,0,0.33)", "x": 0.5831749019371295, "image": "photo5.jpg", "fixed": true, "height": 20}, "n33": {"width": 20, "mass": 10, "y": -0.760845213036123, "color": "rgba(255,255,0,0.33)", "x": 0.2472135954999578, "image": "photo5.jpg", "fixed": true, "height": 20}, "n34": {"width": 20, "mass": 10, "y": -0.19895190973188404, "color": "rgba(255,255,0,0.33)", "x": -0.7748665289029049, "image": "photo3.jpg", "fixed": true, "height": 20}, "n35": {"width": 20, "mass": 10, "y": -0.29449964214774266, "color": "rgba(255,255,0,0.33)", "x": -0.743821188710601, "image": "photo3.jpg", "fixed": true, "height": 20}, "n36": {"width": 20, "mass": 10, "y": -0.1989519097318836, "color": "rgba(255,255,0,0.33)", "x": 0.774866528902905, "image": "photo4.jpg", "fixed": true, "height": 20}, "n37": {"width": 20, "mass": 10, "y": -0.10026658685144343, "color": "rgba(255,255,0,0.33)", "x": -0.7936917610515823, "image": "photo3.jpg", "fixed": true, "height": 20}, "n9_10": {"width": 5, "mass": 10, "y": -0.5467723865433617, "color": "rgba(255,255,255,0.33)", "x": -0.5839271264266858, "image": "photo4.jpg", "fixed": true, "height": 5}, "n38": {"width": 20, "mass": 10, "y": -0.10026658685144303, "color": "rgba(255,255,0,0.33)", "x": 0.7936917610515823, "image": "photo5.jpg", "fixed": true, "height": 20}, "n39": {"width": 20, "mass": 10, "y": -0.2944996421477423, "color": "rgba(255,255,0,0.33)", "x": 0.7438211887106012, "image": "photo2.jpg", "fixed": true, "height": 20}, "n3_1": {"width": 35, "mass": 10, "y": 0.5467248428554522, "color": "rgba(52,149,255,0.33)", "x": 0.5818816782194006, "image": "photo4.jpg", "fixed": true, "height": 35}, "n3_2": {"width": 15, "mass": 10, "y": 0.5450559012918481, "color": "rgba(255,0,0,0.33)", "x": 0.5840829584726058, "image": "photo2.jpg", "fixed": true, "height": 15}, "n3_3": {"width": 10, "mass": 10, "y": 0.546534887369673, "color": "rgba(255,255,0,0.33)", "x": 0.5843553392049733, "image": "photo2.jpg", "fixed": true, "height": 10}, "n8_3": {"width": 5, "mass": 10, "y": 0.294529830968374, "color": "rgba(255,255,255,0.33)", "x": 0.7470115246066017, "image": "photo1.jpg", "fixed": true, "height": 5}, "n8_2": {"width": 9, "mass": 10, "y": 0.2954141859198167, "color": "rgba(255,255,0,0.33)", "x": 0.7442205270841054, "image": "photo2.jpg", "fixed": true, "height": 9}, "n8_1": {"width": 45, "mass": 10, "y": 0.2939802907064834, "color": "rgba(52,149,255,0.33)", "x": 0.7439727073618816, "image": "photo2.jpg", "fixed": true, "height": 45}, "n1_6": {"width": 5, "mass": 10, "y": -0.6140437103147365, "color": "rgba(255,255,255,0.33)", "x": 0.5095445948236502, "image": "photo5.jpg", "fixed": true, "height": 5}, "n1_7": {"width": 5, "mass": 10, "y": -0.6188304709569514, "color": "rgba(255,255,255,0.33)", "x": 0.5111290512942748, "image": "photo4.jpg", "fixed": true, "height": 5}, "n1_4": {"width": 15, "mass": 10, "y": -0.6193233307297877, "color": "rgba(255,0,0,0.33)", "x": 0.5100656877701262, "image": "photo4.jpg", "fixed": true, "height": 15}, "n1_5": {"width": 10, "mass": 10, "y": -0.6179982402100741, "color": "rgba(255,255,0,0.33)", "x": 0.5114922740521238, "image": "photo5.jpg", "fixed": true, "height": 10}, "n1_2": {"width": 40, "mass": 10, "y": -0.6178726784381499, "color": "rgba(52,149,255,0.33)", "x": 0.5078400639776423, "image": "photo4.jpg", "fixed": true, "height": 40}, "n1_3": {"width": 15, "mass": 10, "y": -0.615597603889997, "color": "rgba(255,0,0,0.33)", "x": 0.509414880857829, "image": "photo4.jpg", "fixed": true, "height": 15}, "n1_1": {"width": 40, "mass": 10, "y": -0.6169571367405565, "color": "rgba(52,149,255,0.33)", "x": 0.512357497485496, "image": "photo5.jpg", "fixed": true, "height": 40}, "n12": {"width": 90, "mass": 10, "y": 0.1002665868514434, "color": "rgba(52,149,255,0.33)", "x": 0.7936917610515823, "image": "photo5.jpg", "fixed": true, "height": 90}, "n13": {"width": 90, "mass": 10, "y": 0.6754623404016121, "color": "rgba(52,149,255,0.33)", "x": 0.4286614359831973, "image": "photo3.jpg", "fixed": true, "height": 90}, "n10": {"width": 90, "mass": 10, "y": -2.572996239482619e-16, "color": "rgba(52,149,255,0.33)", "x": -0.8, "image": "photo1.jpg", "fixed": true, "height": 90}, "n11": {"width": 90, "mass": 10, "y": 0.19895190973188387, "color": "rgba(52,149,255,0.33)", "x": -0.7748665289029049, "image": "photo5.jpg", "fixed": true, "height": 90}, "n16": {"width": 80, "mass": 10, "y": -0.7984213827426173, "color": "rgba(52,149,255,0.33)", "x": 0.05023241562345098, "image": "photo4.jpg", "fixed": true, "height": 80}, "n17": {"width": 80, "mass": 10, "y": 0.10026658685144328, "color": "rgba(52,149,255,0.33)", "x": -0.7936917610515823, "image": "photo5.jpg", "fixed": true, "height": 80}, "n14": {"width": 90, "mass": 10, "y": -0.6164105942206315, "color": "rgba(52,149,255,0.33)", "x": -0.5099391917989516, "image": "photo3.jpg", "fixed": true, "height": 90}, "n15": {"width": 90, "mass": 10, "y": -0.7984213827426173, "color": "rgba(52,149,255,0.33)", "x": -0.05023241562345057, "image": "photo2.jpg", "fixed": true, "height": 90}, "n3_4": {"width": 10, "mass": 10, "y": 0.5499496924336268, "color": "rgba(255,255,0,0.33)", "x": 0.5827462762790602, "image": "photo5.jpg", "fixed": true, "height": 10}, "n18": {"width": 80, "mass": 10, "y": 0.0, "color": "rgba(52,149,255,0.33)", "x": 0.8, "image": "photo4.jpg", "fixed": true, "height": 80}, "n19": {"width": 70, "mass": 10, "y": 0.38540293928137226, "color": "rgba(52,149,255,0.33)", "x": 0.7010453440350909, "image": "photo3.jpg", "fixed": true, "height": 70}, "n3_5": {"width": 10, "mass": 10, "y": 0.5495241961389729, "color": "rgba(255,255,0,0.33)", "x": 0.5845894968810096, "image": "photo1.jpg", "fixed": true, "height": 10}, "n4_3": {"width": 35, "mass": 10, "y": 0.7983870514388888, "color": "rgba(52,149,255,0.33)", "x": -0.05017995960394596, "image": "photo4.jpg", "fixed": true, "height": 35}, "n4_2": {"width": 40, "mass": 10, "y": 0.7954191469898886, "color": "rgba(52,149,255,0.33)", "x": -0.05041263066057135, "image": "photo1.jpg", "fixed": true, "height": 40}, "n4_1": {"width": 45, "mass": 10, "y": 0.7984555603509096, "color": "rgba(52,149,255,0.33)", "x": -0.05019339319373335, "image": "photo3.jpg", "fixed": true, "height": 45}, "n4_7": {"width": 5, "mass": 10, "y": 0.7968578616942795, "color": "rgba(255,255,255,0.33)", "x": -0.05037861333274004, "image": "photo3.jpg", "fixed": true, "height": 5}, "n4_6": {"width": 10, "mass": 10, "y": 0.7970599204154124, "color": "rgba(255,255,0,0.33)", "x": -0.050418449649662286, "image": "photo2.jpg", "fixed": true, "height": 10}, "n4_5": {"width": 15, "mass": 10, "y": 0.7997944643175318, "color": "rgba(255,0,0,0.33)", "x": -0.05002071106802368, "image": "photo3.jpg", "fixed": true, "height": 15}, "n4_4": {"width": 15, "mass": 10, "y": 0.8013634418346756, "color": "rgba(255,0,0,0.33)", "x": -0.050143222319158805, "image": "photo5.jpg", "fixed": true, "height": 15}, "n28_9": {"width": 5, "mass": 10, "y": -0.3860596685271384, "color": "rgba(255,255,255,0.33)", "x": -0.6989024921654493, "image": "photo2.jpg", "fixed": true, "height": 5}, "n2_1": {"width": 15, "mass": 10, "y": 0.3872061108625982, "color": "rgba(255,0,0,0.33)", "x": -0.7038641895316793, "image": "photo3.jpg", "fixed": true, "height": 15}, "n2_3": {"width": 10, "mass": 10, "y": 0.38428751049834897, "color": "rgba(255,255,0,0.33)", "x": -0.7029687038092687, "image": "photo2.jpg", "fixed": true, "height": 10}, "n2_2": {"width": 15, "mass": 10, "y": 0.3872874340315173, "color": "rgba(255,0,0,0.33)", "x": -0.7030616724627795, "image": "photo3.jpg", "fixed": true, "height": 15}, "n28_2": {"width": 12, "mass": 10, "y": -0.3839341986276551, "color": "rgba(52,149,255,0.33)", "x": -0.7034166711233202, "image": "photo3.jpg", "fixed": true, "height": 12}, "n28_3": {"width": 11, "mass": 10, "y": -0.38479277035836684, "color": "rgba(52,149,255,0.33)", "x": -0.700320581438254, "image": "photo5.jpg", "fixed": true, "height": 11}, "n28_4": {"width": 5, "mass": 10, "y": -0.38731442917234654, "color": "rgba(255,0,0,0.33)", "x": -0.7041086716485973, "image": "photo2.jpg", "fixed": true, "height": 5}, "n28_5": {"width": 5, "mass": 10, "y": -0.38628991596618634, "color": "rgba(255,255,0,0.33)", "x": -0.703850951189113, "image": "photo4.jpg", "fixed": true, "height": 5}, "n29_1": {"width": 14, "mass": 10, "y": 0.7263490716142457, "color": "rgba(52,149,255,0.33)", "x": 0.34071395260759435, "image": "photo3.jpg", "fixed": true, "height": 14}, "n29_2": {"width": 5, "mass": 10, "y": 0.7233457646046779, "color": "rgba(255,0,0,0.33)", "x": 0.34174356036232995, "image": "photo1.jpg", "fixed": true, "height": 5}, "n6_1": {"width": 14, "mass": 10, "y": 0.6722573416525813, "color": "rgba(255,0,0,0.33)", "x": -0.4283668415517507, "image": "photo1.jpg", "fixed": true, "height": 14}, "n6_2": {"width": 5, "mass": 10, "y": 0.6735441485634455, "color": "rgba(255,255,255,0.33)", "x": -0.42754722967953745, "image": "photo3.jpg", "fixed": true, "height": 5}, "n28_7": {"width": 5, "mass": 10, "y": -0.38621129903992335, "color": "rgba(255,255,255,0.33)", "x": -0.6996426647309077, "image": "photo5.jpg", "fixed": true, "height": 5}, "n22_6": {"width": 5, "mass": 10, "y": 0.8006273431113045, "color": "rgba(255,255,255,0.33)", "x": 0.04998816998041839, "image": "photo4.jpg", "fixed": true, "height": 5}, "n22_7": {"width": 5, "mass": 10, "y": 0.8023623976029179, "color": "rgba(255,255,255,0.33)", "x": 0.05038677919670097, "image": "photo4.jpg", "fixed": true, "height": 5}, "n22_4": {"width": 5, "mass": 10, "y": 0.7986505690352081, "color": "rgba(255,0,0,0.33)", "x": 0.050365962009597136, "image": "photo2.jpg", "fixed": true, "height": 5}, "n22_5": {"width": 5, "mass": 10, "y": 0.8015174041568746, "color": "rgba(255,255,0,0.33)", "x": 0.05029878147253311, "image": "photo5.jpg", "fixed": true, "height": 5}, "n22_2": {"width": 14, "mass": 10, "y": 0.7973084689725141, "color": "rgba(52,149,255,0.33)", "x": 0.050289661233335836, "image": "photo5.jpg", "fixed": true, "height": 14}, "n22_3": {"width": 11, "mass": 10, "y": 0.8017994129534691, "color": "rgba(52,149,255,0.33)", "x": 0.05031346498192239, "image": "photo2.jpg", "fixed": true, "height": 11}, "n22_1": {"width": 15, "mass": 10, "y": 0.8008595317408592, "color": "rgba(52,149,255,0.33)", "x": 0.050006619381927436, "image": "photo2.jpg", "fixed": true, "height": 15}, "n15_1": {"width": 45, "mass": 10, "y": -0.7989731273106541, "color": "rgba(52,149,255,0.33)", "x": -0.05045094489355925, "image": "photo5.jpg", "fixed": true, "height": 45}, "n15_2": {"width": 14, "mass": 10, "y": -0.7976428185924108, "color": "rgba(255,0,0,0.33)", "x": -0.0503420494817467, "image": "photo4.jpg", "fixed": true, "height": 14}, "n17_2": {"width": 12, "mass": 10, "y": 0.10031679420466874, "color": "rgba(255,0,0,0.33)", "x": -0.7929198407643986, "image": "photo3.jpg", "fixed": true, "height": 12}, "n17_3": {"width": 12, "mass": 10, "y": 0.10008851073446676, "color": "rgba(255,0,0,0.33)", "x": -0.7925586342834996, "image": "photo5.jpg", "fixed": true, "height": 12}, "n17_1": {"width": 32, "mass": 10, "y": 0.10007222088092176, "color": "rgba(52,149,255,0.33)", "x": -0.7966343137413827, "image": "photo2.jpg", "fixed": true, "height": 32}, "n24_1": {"width": 14, "mass": 10, "y": 0.7603920836676894, "color": "rgba(52,149,255,0.33)", "x": -0.24778457891751332, "image": "photo4.jpg", "fixed": true, "height": 14}, "n24_2": {"width": 11, "mass": 10, "y": 0.7582642023802706, "color": "rgba(52,149,255,0.33)", "x": -0.24669430969206507, "image": "photo3.jpg", "fixed": true, "height": 11}, "n24_3": {"width": 5, "mass": 10, "y": 0.75868315783251, "color": "rgba(255,255,255,0.33)", "x": -0.24748628737343698, "image": "photo1.jpg", "fixed": true, "height": 5}, "n19_1": {"width": 35, "mass": 10, "y": 0.38387651138317175, "color": "rgba(52,149,255,0.33)", "x": 0.7000344781572398, "image": "photo5.jpg", "fixed": true, "height": 35}, "n19_2": {"width": 11, "mass": 10, "y": 0.3838425885009619, "color": "rgba(255,0,0,0.33)", "x": 0.7016189048332949, "image": "photo1.jpg", "fixed": true, "height": 11}, "n19_3": {"width": 5, "mass": 10, "y": 0.38367882238160733, "color": "rgba(255,255,255,0.33)", "x": 0.7036946792392113, "image": "photo3.jpg", "fixed": true, "height": 5}, "n19_4": {"width": 5, "mass": 10, "y": 0.38675915989927784, "color": "rgba(255,255,255,0.33)", "x": 0.6978022837759931, "image": "photo1.jpg", "fixed": true, "height": 5}, "n19_5": {"width": 5, "mass": 10, "y": 0.38567682993673946, "color": "rgba(255,255,255,0.33)", "x": 0.7042721752815791, "image": "photo1.jpg", "fixed": true, "height": 5}, "n26_2": {"width": 11, "mass": 10, "y": -0.4679341127511066, "color": "rgba(52,149,255,0.33)", "x": -0.6482758505966066, "image": "photo5.jpg", "fixed": true, "height": 11}, "n26_3": {"width": 5, "mass": 10, "y": -0.4700820945686771, "color": "rgba(255,0,0,0.33)", "x": -0.6499824744327518, "image": "photo5.jpg", "fixed": true, "height": 5}, "n26_1": {"width": 14, "mass": 10, "y": -0.46938350305893484, "color": "rgba(52,149,255,0.33)", "x": -0.6463576341337494, "image": "photo3.jpg", "fixed": true, "height": 14}, "n26_4": {"width": 5, "mass": 10, "y": -0.46850255611755776, "color": "rgba(255,0,0,0.33)", "x": -0.6496515839089567, "image": "photo1.jpg", "fixed": true, "height": 5}, "n49": {"width": 10, "mass": 10, "y": -0.6754623404016122, "color": "rgba(255,255,255,0.33)", "x": -0.42866143598319706, "image": "photo5.jpg", "fixed": true, "height": 10}, "n9_6": {"width": 14, "mass": 10, "y": -0.5481225673070375, "color": "rgba(255,0,0,0.33)", "x": -0.5846206485604234, "image": "photo4.jpg", "fixed": true, "height": 14}, "n41": {"width": 10, "mass": 10, "y": 0.5476376847429508, "color": "rgba(255,255,255,0.33)", "x": -0.5831749019371294, "image": "photo3.jpg", "fixed": true, "height": 10}, "n40": {"width": 20, "mass": 10, "y": 0.19895190973188384, "color": "rgba(255,255,0,0.33)", "x": 0.7748665289029049, "image": "photo1.jpg", "fixed": true, "height": 20}, "n43": {"width": 10, "mass": 10, "y": 0.4702282018339786, "color": "rgba(255,255,255,0.33)", "x": -0.6472135954999579, "image": "photo1.jpg", "fixed": true, "height": 10}, "n42": {"width": 10, "mass": 10, "y": 0.4702282018339785, "color": "rgba(255,255,255,0.33)", "x": 0.647213595499958, "image": "photo4.jpg", "fixed": true, "height": 10}, "n45": {"width": 10, "mass": 10, "y": 0.2944996421477422, "color": "rgba(255,255,255,0.33)", "x": -0.7438211887106012, "image": "photo5.jpg", "fixed": true, "height": 10}, "n44": {"width": 10, "mass": 10, "y": -0.7238616419728159, "color": "rgba(255,255,255,0.33)", "x": -0.34062343325205774, "image": "photo1.jpg", "fixed": true, "height": 10}, "n47": {"width": 10, "mass": 10, "y": -0.7858298005829509, "color": "rgba(255,255,255,0.33)", "x": 0.14990505166858012, "image": "photo1.jpg", "fixed": true, "height": 10}, "n46": {"width": 10, "mass": 10, "y": 0.6164105942206315, "color": "rgba(255,255,255,0.33)", "x": -0.5099391917989519, "image": "photo4.jpg", "fixed": true, "height": 10}, "n10_2": {"width": 9, "mass": 10, "y": -2.565944497644499e-16, "color": "rgba(255,255,0,0.33)", "x": -0.7969524244393402, "image": "photo3.jpg", "fixed": true, "height": 9}, "n30_6": {"width": 5, "mass": 10, "y": -0.726654716860602, "color": "rgba(255,255,255,0.33)", "x": 0.34126801861397615, "image": "photo5.jpg", "fixed": true, "height": 5}, "n30_5": {"width": 5, "mass": 10, "y": -0.7262215506481675, "color": "rgba(255,255,0,0.33)", "x": 0.3420069109808419, "image": "photo1.jpg", "fixed": true, "height": 5}, "n30_4": {"width": 5, "mass": 10, "y": -0.7238622313788841, "color": "rgba(255,255,0,0.33)", "x": 0.33961272511809704, "image": "photo4.jpg", "fixed": true, "height": 5}, "n30_3": {"width": 5, "mass": 10, "y": -0.7219445231229186, "color": "rgba(255,255,0,0.33)", "x": 0.33911157148549465, "image": "photo4.jpg", "fixed": true, "height": 5}, "n30_2": {"width": 5, "mass": 10, "y": -0.7271529470894841, "color": "rgba(255,255,0,0.33)", "x": 0.3417637953655464, "image": "photo2.jpg", "fixed": true, "height": 5}, "n30_1": {"width": 5, "mass": 10, "y": -0.722660714546064, "color": "rgba(255,0,0,0.33)", "x": 0.33976188957597603, "image": "photo5.jpg", "fixed": true, "height": 5}, "n11_1": {"width": 14, "mass": 10, "y": 0.1981770454864807, "color": "rgba(255,0,0,0.33)", "x": -0.7733282750771046, "image": "photo3.jpg", "fixed": true, "height": 14}, "n11_2": {"width": 5, "mass": 10, "y": 0.19948313851029667, "color": "rgba(255,255,255,0.33)", "x": -0.7777439005070599, "image": "photo2.jpg", "fixed": true, "height": 5}, "n28_8": {"width": 5, "mass": 10, "y": -0.38485035550481234, "color": "rgba(255,255,255,0.33)", "x": -0.7017561739888978, "image": "photo3.jpg", "fixed": true, "height": 5}, "n20_1": {"width": 32, "mass": 10, "y": 0.7613837698449379, "color": "rgba(52,149,255,0.33)", "x": 0.24669539031017235, "image": "photo4.jpg", "fixed": true, "height": 32}, "n20_2": {"width": 32, "mass": 10, "y": 0.7588103075282726, "color": "rgba(52,149,255,0.33)", "x": 0.2463224422276938, "image": "photo4.jpg", "fixed": true, "height": 32}, "n20_3": {"width": 32, "mass": 10, "y": 0.7584371553507435, "color": "rgba(52,149,255,0.33)", "x": 0.2469830202872555, "image": "photo5.jpg", "fixed": true, "height": 32}, "n20_4": {"width": 11, "mass": 10, "y": 0.7573822690713563, "color": "rgba(255,0,0,0.33)", "x": 0.2460332819179402, "image": "photo3.jpg", "fixed": true, "height": 11}, "n20_5": {"width": 7, "mass": 10, "y": 0.7609422536790558, "color": "rgba(255,255,0,0.33)", "x": 0.2475727237810985, "image": "photo1.jpg", "fixed": true, "height": 7}, "n20_6": {"width": 7, "mass": 10, "y": 0.760820660897869, "color": "rgba(255,255,0,0.33)", "x": 0.24626312081263527, "image": "photo2.jpg", "fixed": true, "height": 7}, "n20_7": {"width": 7, "mass": 10, "y": 0.7642561959492524, "color": "rgba(255,255,0,0.33)", "x": 0.24724193900079167, "image": "photo2.jpg", "fixed": true, "height": 7}, "n20_8": {"width": 5, "mass": 10, "y": 0.7589761831956174, "color": "rgba(255,255,255,0.33)", "x": 0.2481864208458187, "image": "photo4.jpg", "fixed": true, "height": 5}, "n28_1": {"width": 15, "mass": 10, "y": -0.3848662151982947, "color": "rgba(52,149,255,0.33)", "x": -0.6984665957870325, "image": "photo4.jpg", "fixed": true, "height": 15}, "n13_4": {"width": 9, "mass": 10, "y": 0.6741983276931309, "color": "rgba(255,255,0,0.33)", "x": 0.4266129504396739, "image": "photo5.jpg", "fixed": true, "height": 9}, "n13_5": {"width": 5, "mass": 10, "y": 0.6783299942144199, "color": "rgba(255,255,255,0.33)", "x": 0.42740730857377535, "image": "photo5.jpg", "fixed": true, "height": 5}, "n13_2": {"width": 45, "mass": 10, "y": 0.6727386940847, "color": "rgba(52,149,255,0.33)", "x": 0.42746785552394, "image": "photo2.jpg", "fixed": true, "height": 45}, "n13_3": {"width": 14, "mass": 10, "y": 0.677842384374323, "color": "rgba(255,0,0,0.33)", "x": 0.4299342387238503, "image": "photo4.jpg", "fixed": true, "height": 14}, "n28_6": {"width": 5, "mass": 10, "y": -0.3854847519918865, "color": "rgba(255,255,0,0.33)", "x": -0.701471868303655, "image": "photo4.jpg", "fixed": true, "height": 5}, "n13_1": {"width": 45, "mass": 10, "y": 0.6779354666701501, "color": "rgba(52,149,255,0.33)", "x": 0.43018715667746005, "image": "photo4.jpg", "fixed": true, "height": 45}, "n14_1": {"width": 5, "mass": 10, "y": -0.6162843098532645, "color": "rgba(255,255,255,0.33)", "x": -0.5088112310806137, "image": "photo2.jpg", "fixed": true, "height": 5}, "n48": {"width": 10, "mass": 10, "y": -0.7608452130361228, "color": "rgba(255,255,255,0.33)", "x": -0.24721359549995806, "image": "photo3.jpg", "fixed": true, "height": 10}, "n21_1": {"width": 15, "mass": 10, "y": 0.788302204630518, "color": "rgba(52,149,255,0.33)", "x": 0.14982325411667097, "image": "photo4.jpg", "fixed": true, "height": 15}, "n21_3": {"width": 5, "mass": 10, "y": 0.7866908906830686, "color": "rgba(255,255,255,0.33)", "x": 0.15012150079929482, "image": "photo1.jpg", "fixed": true, "height": 5}, "n21_2": {"width": 5, "mass": 10, "y": 0.7830697024380439, "color": "rgba(255,255,0,0.33)", "x": 0.15008918342133618, "image": "photo4.jpg", "fixed": true, "height": 5}, "n50": {"width": 10, "mass": 10, "y": -0.47022820183397807, "color": "rgba(255,255,255,0.33)", "x": 0.6472135954999583, "image": "photo5.jpg", "fixed": true, "height": 10}, "n23_6": {"width": 5, "mass": 10, "y": 0.7255358638754819, "color": "rgba(255,255,255,0.33)", "x": -0.3398599836093813, "image": "photo2.jpg", "fixed": true, "height": 5}, "n23_5": {"width": 5, "mass": 10, "y": 0.7233885789962465, "color": "rgba(255,255,255,0.33)", "x": -0.34155174933579624, "image": "photo1.jpg", "fixed": true, "height": 5}, "n23_4": {"width": 5, "mass": 10, "y": 0.7220976800479788, "color": "rgba(255,255,255,0.33)", "x": -0.3406865639061677, "image": "photo3.jpg", "fixed": true, "height": 5}, "n23_3": {"width": 5, "mass": 10, "y": 0.7240635812062822, "color": "rgba(255,0,0,0.33)", "x": -0.34025480069400016, "image": "photo4.jpg", "fixed": true, "height": 5}, "n23_2": {"width": 14, "mass": 10, "y": 0.7232331006051895, "color": "rgba(52,149,255,0.33)", "x": -0.340865037040567, "image": "photo2.jpg", "fixed": true, "height": 14}, "n23_1": {"width": 14, "mass": 10, "y": 0.7225409002493933, "color": "rgba(52,149,255,0.33)", "x": -0.34186957941930995, "image": "photo1.jpg", "fixed": true, "height": 14}, "n8": {"width": 90, "mass": 10, "y": 0.2944996421477424, "color": "rgba(52,149,255,0.33)", "x": 0.7438211887106011, "image": "photo2.jpg", "fixed": true, "height": 90}, "n9": {"width": 90, "mass": 10, "y": -0.547637684742951, "color": "rgba(52,149,255,0.33)", "x": -0.5831749019371293, "image": "photo5.jpg", "fixed": true, "height": 90}, "n25_5": {"width": 5, "mass": 10, "y": 0.6179477146145389, "color": "rgba(255,255,255,0.33)", "x": 0.5095501113186369, "image": "photo4.jpg", "fixed": true, "height": 5}, "n16_2": {"width": 12, "mass": 10, "y": -0.8003759540914763, "color": "rgba(255,0,0,0.33)", "x": 0.050435696978869, "image": "photo1.jpg", "fixed": true, "height": 12}, "n16_1": {"width": 28, "mass": 10, "y": -0.7992772853627121, "color": "rgba(52,149,255,0.33)", "x": 0.05009028668576268, "image": "photo2.jpg", "fixed": true, "height": 28}, "n25_1": {"width": 14, "mass": 10, "y": 0.6151584783575127, "color": "rgba(52,149,255,0.33)", "x": 0.5119084288278117, "image": "photo2.jpg", "fixed": true, "height": 14}, "n25_3": {"width": 12, "mass": 10, "y": 0.6157754835513837, "color": "rgba(52,149,255,0.33)", "x": 0.5116291183816015, "image": "photo2.jpg", "fixed": true, "height": 12}, "n25_2": {"width": 14, "mass": 10, "y": 0.6142635023889843, "color": "rgba(52,149,255,0.33)", "x": 0.5084244853227046, "image": "photo2.jpg", "fixed": true, "height": 14}, "n27_2": {"width": 5, "mass": 10, "y": 0.7863328181870233, "color": "rgba(255,255,255,0.33)", "x": -0.14957529400739872, "image": "photo3.jpg", "fixed": true, "height": 5}, "n27_1": {"width": 5, "mass": 10, "y": 0.7839719115784817, "color": "rgba(255,255,0,0.33)", "x": -0.15048250032069166, "image": "photo3.jpg", "fixed": true, "height": 5}, "n18_1": {"width": 5, "mass": 10, "y": 0.0, "color": "rgba(255,255,255,0.33)", "x": 0.801764826980039, "image": "photo5.jpg", "fixed": true, "height": 5}, "n18_3": {"width": 5, "mass": 10, "y": 0.0, "color": "rgba(255,255,255,0.33)", "x": 0.8028716210767888, "image": "photo2.jpg", "fixed": true, "height": 5}, "n18_2": {"width": 5, "mass": 10, "y": 0.0, "color": "rgba(255,255,255,0.33)", "x": 0.8017225918220803, "image": "photo2.jpg", "fixed": true, "height": 5}, "n29": {"width": 30, "mass": 10, "y": 0.7238616419728157, "color": "rgba(255,0,0,0.33)", "x": 0.3406234332520581, "image": "photo5.jpg", "fixed": true, "height": 30}, "n28": {"width": 30, "mass": 10, "y": -0.3854029392813723, "color": "rgba(255,0,0,0.33)", "x": -0.7010453440350908, "image": "photo2.jpg", "fixed": true, "height": 30}, "n23": {"width": 30, "mass": 10, "y": 0.7238616419728157, "color": "rgba(255,0,0,0.33)", "x": -0.3406234332520582, "image": "photo5.jpg", "fixed": true, "height": 30}, "n22": {"width": 30, "mass": 10, "y": 0.7984213827426173, "color": "rgba(255,0,0,0.33)", "x": 0.05023241562345065, "image": "photo4.jpg", "fixed": true, "height": 30}, "n21": {"width": 30, "mass": 10, "y": 0.785829800582951, "color": "rgba(255,0,0,0.33)", "x": 0.14990505166857962, "image": "photo3.jpg", "fixed": true, "height": 30}, "n20": {"width": 70, "mass": 10, "y": 0.7608452130361228, "color": "rgba(52,149,255,0.33)", "x": 0.24721359549995797, "image": "photo3.jpg", "fixed": true, "height": 70}, "n27": {"width": 30, "mass": 10, "y": 0.7858298005829509, "color": "rgba(255,0,0,0.33)", "x": -0.14990505166857987, "image": "photo3.jpg", "fixed": true, "height": 30}, "n26": {"width": 30, "mass": 10, "y": -0.47022820183397873, "color": "rgba(255,0,0,0.33)", "x": -0.6472135954999578, "image": "photo4.jpg", "fixed": true, "height": 30}, "n25": {"width": 30, "mass": 10, "y": 0.6164105942206315, "color": "rgba(255,0,0,0.33)", "x": 0.5099391917989518, "image": "photo2.jpg", "fixed": true, "height": 30}, "n24": {"width": 30, "mass": 10, "y": 0.7608452130361228, "color": "rgba(255,0,0,0.33)", "x": -0.24721359549995806, "image": "photo3.jpg", "fixed": true, "height": 30}, "n10_1": {"width": 14, "mass": 10, "y": -2.5752468885649103e-16, "color": "rgba(255,0,0,0.33)", "x": -0.8022261106290902, "image": "photo5.jpg", "fixed": true, "height": 14}, "n9_7": {"width": 14, "mass": 10, "y": -0.5496747789981987, "color": "rgba(255,0,0,0.33)", "x": -0.5828014226261231, "image": "photo5.jpg", "fixed": true, "height": 14}, "n9_4": {"width": 36, "mass": 10, "y": -0.5466839727123521, "color": "rgba(52,149,255,0.33)", "x": -0.5813748583258179, "image": "photo5.jpg", "fixed": true, "height": 36}, "n9_5": {"width": 32, "mass": 10, "y": -0.5499118093596735, "color": "rgba(52,149,255,0.33)", "x": -0.580893612017248, "image": "photo5.jpg", "fixed": true, "height": 32}, "n9_2": {"width": 41, "mass": 10, "y": -0.5458101683925402, "color": "rgba(52,149,255,0.33)", "x": -0.5835907219207228, "image": "photo3.jpg", "fixed": true, "height": 41}, "n9_3": {"width": 41, "mass": 10, "y": -0.5491599685702665, "color": "rgba(52,149,255,0.33)", "x": -0.5825519134440678, "image": "photo1.jpg", "fixed": true, "height": 41}, "n9_1": {"width": 45, "mass": 10, "y": -0.5453659721025973, "color": "rgba(52,149,255,0.33)", "x": -0.5833909754807919, "image": "photo1.jpg", "fixed": true, "height": 45}, "n9_8": {"width": 14, "mass": 10, "y": -0.5486991603374366, "color": "rgba(255,0,0,0.33)", "x": -0.5830740567786749, "image": "photo3.jpg", "fixed": true, "height": 14}, "n9_9": {"width": 5, "mass": 10, "y": -0.5495302670340118, "color": "rgba(255,255,255,0.33)", "x": -0.5808251582578895, "image": "photo3.jpg", "fixed": true, "height": 5}, "n12_7": {"width": 5, "mass": 10, "y": 0.10029111401040162, "color": "rgba(255,255,255,0.33)", "x": 0.7972219604085642, "image": "photo2.jpg", "fixed": true, "height": 5}, "n12_6": {"width": 9, "mass": 10, "y": 0.10024362288747526, "color": "rgba(255,255,0,0.33)", "x": 0.793458296474629, "image": "photo2.jpg", "fixed": true, "height": 9}, "n12_5": {"width": 41, "mass": 10, "y": 0.10048219250895137, "color": "rgba(52,149,255,0.33)", "x": 0.7970206243626472, "image": "photo5.jpg", "fixed": true, "height": 41}, "n12_4": {"width": 41, "mass": 10, "y": 0.10069503029828812, "color": "rgba(52,149,255,0.33)", "x": 0.7931081801508473, "image": "photo3.jpg", "fixed": true, "height": 41}, "n12_3": {"width": 41, "mass": 10, "y": 0.09977397982317683, "color": "rgba(52,149,255,0.33)", "x": 0.7965324891706064, "image": "photo4.jpg", "fixed": true, "height": 41}, "n12_2": {"width": 41, "mass": 10, "y": 0.10049951935032744, "color": "rgba(52,149,255,0.33)", "x": 0.7908352691586429, "image": "photo4.jpg", "fixed": true, "height": 41}, "n12_1": {"width": 41, "mass": 10, "y": 0.10016243983417929, "color": "rgba(52,149,255,0.33)", "x": 0.793776560045695, "image": "photo4.jpg", "fixed": true, "height": 41}, "n25_4": {"width": 5, "mass": 10, "y": 0.6176107230115504, "color": "rgba(255,0,0,0.33)", "x": 0.5116296215169256, "image": "photo5.jpg", "fixed": true, "height": 5}, "n0": {"width": 200, "main": true, "mass": 200, "y": 0, "color": "rgba(255,255,255,0.01)", "x": 0, "image": "photo3.jpg", "fixed": true, "height": 200}, "n1": {"width": 100, "mass": 10, "y": -0.6164105942206313, "color": "rgba(52,149,255,0.33)", "x": 0.509939191798952, "image": "photo2.jpg", "fixed": true, "height": 100}, "n2": {"width": 100, "mass": 10, "y": 0.3854029392813722, "color": "rgba(52,149,255,0.33)", "x": -0.7010453440350909, "image": "photo2.jpg", "fixed": true, "height": 100}, "n3": {"width": 100, "mass": 10, "y": 0.547637684742951, "color": "rgba(52,149,255,0.33)", "x": 0.5831749019371293, "image": "photo1.jpg", "fixed": true, "height": 100}, "n4": {"width": 100, "mass": 10, "y": 0.7984213827426173, "color": "rgba(52,149,255,0.33)", "x": -0.050232415623450724, "image": "photo1.jpg", "fixed": true, "height": 100}, "n5": {"width": 100, "mass": 10, "y": -0.675462340401612, "color": "rgba(52,149,255,0.33)", "x": 0.42866143598319745, "image": "photo5.jpg", "fixed": true, "height": 100}, "n6": {"width": 90, "mass": 10, "y": 0.675462340401612, "color": "rgba(52,149,255,0.33)", "x": -0.4286614359831975, "image": "photo4.jpg", "fixed": true, "height": 90}, "n7": {"width": 90, "mass": 10, "y": -0.38540293928137226, "color": "rgba(52,149,255,0.33)", "x": 0.7010453440350909, "image": "photo5.jpg", "fixed": true, "height": 90}}, "repulsion": 2200, "fps": 15, "stiffness": 900, "edges": {"n12": {"n12_7": {}, "n12_6": {}, "n12_5": {}, "n12_4": {}, "n12_3": {}, "n12_2": {}, "n12_1": {}}, "n13": {"n13_4": {}, "n13_5": {}, "n13_2": {}, "n13_3": {}, "n13_1": {}}, "n10": {"n10_1": {}, "n10_2": {}}, "n11": {"n11_1": {}, "n11_2": {}}, "n16": {"n16_2": {}, "n16_1": {}}, "n17": {"n17_2": {}, "n17_3": {}, "n17_1": {}}, "n14": {"n14_1": {}}, "n15": {"n15_1": {}, "n15_2": {}}, "n18": {"n18_1": {}, "n18_3": {}, "n18_2": {}}, "n19": {"n19_1": {}, "n19_2": {}, "n19_3": {}, "n19_4": {}, "n19_5": {}}, "n50": {}, "n38": {}, "n39": {}, "n30": {"n30_6": {}, "n30_5": {}, "n30_4": {}, "n30_3": {}, "n30_2": {}, "n30_1": {}}, "n31": {}, "n32": {}, "n33": {}, "n34": {}, "n35": {}, "n36": {}, "n37": {}, "n49": {}, "n48": {}, "n41": {}, "n40": {}, "n43": {}, "n42": {}, "n45": {}, "n44": {}, "n47": {}, "n46": {}, "n29": {"n29_1": {}, "n29_2": {}}, "n28": {"n28_8": {}, "n28_9": {}, "n28_1": {}, "n28_2": {}, "n28_3": {}, "n28_4": {}, "n28_5": {}, "n28_6": {}, "n28_7": {}}, "n23": {"n23_6": {}, "n23_5": {}, "n23_4": {}, "n23_3": {}, "n23_2": {}, "n23_1": {}}, "n22": {"n22_6": {}, "n22_7": {}, "n22_4": {}, "n22_5": {}, "n22_2": {}, "n22_3": {}, "n22_1": {}}, "n21": {"n21_1": {}, "n21_3": {}, "n21_2": {}}, "n20": {"n20_1": {}, "n20_2": {}, "n20_3": {}, "n20_4": {}, "n20_5": {}, "n20_6": {}, "n20_7": {}, "n20_8": {}}, "n27": {"n27_2": {}, "n27_1": {}}, "n26": {"n26_2": {}, "n26_3": {}, "n26_1": {}, "n26_4": {}}, "n25": {"n25_5": {}, "n25_4": {}, "n25_1": {}, "n25_3": {}, "n25_2": {}}, "n24": {"n24_1": {}, "n24_2": {}, "n24_3": {}}, "n8": {"n8_3": {}, "n8_2": {}, "n8_1": {}}, "n9": {"n9_6": {}, "n9_7": {}, "n9_4": {}, "n9_5": {}, "n9_2": {}, "n9_3": {}, "n9_1": {}, "n9_8": {}, "n9_9": {}, "n9_10": {}}, "n0": {"n12": {}, "n13": {}, "n10": {}, "n11": {}, "n16": {}, "n17": {}, "n14": {}, "n15": {}, "n18": {}, "n19": {}, "n50": {}, "n38": {}, "n39": {}, "n30": {}, "n31": {}, "n32": {}, "n33": {}, "n34": {}, "n35": {}, "n36": {}, "n37": {}, "n49": {}, "n48": {}, "n41": {}, "n40": {}, "n43": {}, "n42": {}, "n45": {}, "n44": {}, "n47": {}, "n46": {}, "n29": {}, "n28": {}, "n23": {}, "n22": {}, "n21": {}, "n20": {}, "n27": {}, "n26": {}, "n25": {}, "n24": {}, "n8": {}, "n9": {}, "n1": {}, "n2": {}, "n3": {}, "n4": {}, "n5": {}, "n6": {}, "n7": {}}, "n1": {"n1_6": {}, "n1_7": {}, "n1_4": {}, "n1_5": {}, "n1_2": {}, "n1_3": {}, "n1_1": {}}, "n2": {"n2_1": {}, "n2_3": {}, "n2_2": {}}, "n3": {"n3_1": {}, "n3_2": {}, "n3_3": {}, "n3_4": {}, "n3_5": {}}, "n4": {"n4_3": {}, "n4_2": {}, "n4_1": {}, "n4_7": {}, "n4_6": {}, "n4_5": {}, "n4_4": {}}, "n5": {"n5_2": {}, "n5_3": {}, "n5_1": {}}, "n6": {"n6_1": {}, "n6_2": {}}, "n7": {"n7_4": {}, "n7_5": {}, "n7_6": {}, "n7_7": {}, "n7_1": {}, "n7_2": {}, "n7_3": {}}}, "dt": 0.005, "precision": 0.1, "friction": 0, "gravity": true}
diff --git a/main.js b/main.js
index 0eb433c..94e511e 100644
--- a/main.js
+++ b/main.js
@@ -12,7 +12,8 @@
var particleSystem
var canvasBackground;
-
+ var mainNode;
+ var balloonNode;
var that = {
init:function(system){
//
@@ -86,7 +87,80 @@
ctx.fill();
}
- particleSystem.eachEdge(function(edge, pt1, pt2){
+ var detectDestination = function(pt1, pt2, imageBox) {
+ var destination = {};
+ var intersectingSegment = undefined;
+ if (pt1.x != pt2.x) {
+ var lineSlope = (pt1.y - pt2.y) / (pt1.x - pt2.x);
+ var width = imageBox.width;
+ var height = imageBox.height;
+ if ((-height / 2 <= lineSlope * width / 2)
+ && (lineSlope * width / 2 <= height / 2)) {
+ if (pt1.x > pt2.x) {
+ intersectingSegment = [
+ { x: pt2.x + width / 2,
+ y: pt2.y - height / 2 },
+ { x: pt2.x + width / 2,
+ y: pt2.y + height / 2 }
+ ];
+ }
+ else {
+ intersectingSegment = [
+ { x: pt2.x - width / 2,
+ y: pt2.y - height / 2 },
+ { x: pt2.x - width / 2,
+ y: pt2.y + height / 2 }
+ ];
+ }
+ }
+ if ((-width / 2 <= (height / 2) / lineSlope)
+ && ((height / 2) / lineSlope <= width / 2)) {
+ if (pt1.y > pt2.y) {
+ intersectingSegment = [
+ { x: pt2.x - width / 2,
+ y: pt2.y + height / 2 },
+ { x: pt2.x + width / 2,
+ y: pt2.y + height / 2 }
+ ];
+ }
+ else {
+ intersectingSegment = [
+ { x: pt2.x - width / 2,
+ y: pt2.y - height / 2 },
+ { x: pt2.x + width / 2,
+ y: pt2.y - height / 2 }
+ ];
+ }
+ }
+ }
+ else {
+ intersectingSegment = (pt1.y > pt2.y) ? [
+ { x: pt2.x - width / 2,
+ y: pt2.y - height / 2 },
+ { x: pt2.x + width / 2,
+ y: pt2.y - height / 2 }
+ ] : [
+ { x: pt2.x - width / 2,
+ y: pt2.y + height / 2 },
+ { x: pt2.x + width / 2,
+ y: pt2.y + height / 2 }
+ ];
+ }
+ if (intersectingSegment) {
+ var intersectAngle = ((intersectingSegment[1].y - intersectingSegment[0].y) * (pt2.x - pt1.x))
+ - ((intersectingSegment[1].x - intersectingSegment[0].x) * (pt2.y - pt1.y));
+ var aSlope = pt1.y - intersectingSegment[0].y;
+ var bSlope = pt1.x - intersectingSegment[0].x;
+ var numerator1 = ((intersectingSegment[1].x - intersectingSegment[0].x) * aSlope)
+ - ((intersectingSegment[1].y - intersectingSegment[0].y) * bSlope);
+ var intersectSlope = numerator1 / intersectAngle;
+ destination = { x: pt1.x + (intersectSlope * (pt2.x - pt1.x)),
+ y: pt1.y + (intersectSlope * (pt2.y - pt1.y)) };
+ }
+ return destination;
+ }
+
+ var drawEdge = function(edge, pt1, pt2) {
// edge: {source:Node, target:Node, length:#, data:{}}
// pt1: {x:#, y:#} source position in screen coords
// pt2: {x:#, y:#} target position in screen coords
@@ -101,87 +175,35 @@
if (edge.data.arrow) {
if (edge.target.data.imageObject) {
- var destination = {};
- var intersectingSegment = undefined;
- if (pt1.x != pt2.x) {
- var lineSlope = (pt1.y - pt2.y) / (pt1.x - pt2.x);
- var width = edge.target.data.imageObject.width;
- var height = edge.target.data.imageObject.height;
- if ((-height / 2 <= lineSlope * width / 2)
- && (lineSlope * width / 2 <= height / 2)) {
- if (pt1.x > pt2.x) {
- intersectingSegment = [
- { x: pt2.x + width / 2,
- y: pt2.y - height / 2 },
- { x: pt2.x + width / 2,
- y: pt2.y + height / 2 }
- ];
- }
- else {
- intersectingSegment = [
- { x: pt2.x - width / 2,
- y: pt2.y - height / 2 },
- { x: pt2.x - width / 2,
- y: pt2.y + height / 2 }
- ];
- }
- }
- if ((-width / 2 <= (height / 2) / lineSlope)
- && ((height / 2) / lineSlope <= width / 2)) {
- if (pt1.y > pt2.y) {
- intersectingSegment = [
- { x: pt2.x - width / 2,
- y: pt2.y + height / 2 },
- { x: pt2.x + width / 2,
- y: pt2.y + height / 2 }
- ];
- }
- else {
- intersectingSegment = [
- { x: pt2.x - width / 2,
- y: pt2.y - height / 2 },
- { x: pt2.x + width / 2,
- y: pt2.y - height / 2 }
- ];
- }
- }
- }
- else {
- intersectingSegment = (pt1.y > pt2.y) ? [
- { x: pt2.x - width / 2,
- y: pt2.y - height / 2 },
- { x: pt2.x + width / 2,
- y: pt2.y - height / 2 }
- ] : [
- { x: pt2.x - width / 2,
- y: pt2.y + height / 2 },
- { x: pt2.x + width / 2,
- y: pt2.y + height / 2 }
- ];
- }
- if (intersectingSegment) {
- var intersectAngle = ((intersectingSegment[1].y - intersectingSegment[0].y) * (pt2.x - pt1.x))
- - ((intersectingSegment[1].x - intersectingSegment[0].x) * (pt2.y - pt1.y));
- var aSlope = pt1.y - intersectingSegment[0].y;
- var bSlope = pt1.x - intersectingSegment[0].x;
- var numerator1 = ((intersectingSegment[1].x - intersectingSegment[0].x) * aSlope)
- - ((intersectingSegment[1].y - intersectingSegment[0].y) * bSlope);
- var intersectSlope = numerator1 / intersectAngle;
- destination = { x: pt1.x + (intersectSlope * (pt2.x - pt1.x)),
- y: pt1.y + (intersectSlope * (pt2.y - pt1.y)) };
+ var destination = detectDestination(pt1, pt2, edge.target.data.imageObject);
+ if (destination) {
+ pt2 = destination;
}
}
}
- if (destination) {
- pt2 = destination;
+ var setOpacity = function(color, opacity) {
+ if (color.substring(0, 5) == 'rgba(') {
+ color = color.replace(/,[^,]*\)$/, ',' + opacity + ')');
+ }
+ return color;
+ }
+
+ if (mainNode && balloonNode) {
+ if (edge.source.data.balloon || edge.target.data.balloon ||
+ (balloonNode != mainNode
+ && particleSystem.getEdgesTo(balloonNode)[0].source == edge.target
+ && edge.source == mainNode)) {
+ ctx.strokeStyle = setOpacity(edge.target.data.color, 0.8);
+ }
}
+
ctx.lineTo(pt2.x, pt2.y);
ctx.stroke();
if (edge.data.arrow) {
drawArrow(pt1, pt2, edge.data.arrow, ctx.strokeStyle);
}
- })
+ };
var drawImage = function(image, coords, color) {
if (!image.height) {
@@ -213,10 +235,20 @@
var repositionBalloon = function(div, node) {
var topOffset = node.data.p.y - node.data.height / 2;
+ if (topOffset < 0) {
+ topOffset = 0;
+ }
if (topOffset + div.outerHeight() > $(window).height()) {
topOffset = $(window).height() - div.outerHeight();
}
- var leftOffset = node.data.p.x + node.data.width / 2 + 2;
+ var leftMargin = node.data.width / 2 + 2;
+ if (mainNode && node.data.p.x < mainNode.data.p.x) {
+ leftMargin = -leftMargin - div.outerWidth();
+ }
+ var leftOffset = node.data.p.x + leftMargin;
+ if (leftOffset < 0) {
+ leftOffset += div.outerWidth() + node.data.width + 4;
+ }
if (leftOffset + div.outerWidth() > $(window).width()) {
leftOffset -= div.outerWidth() + node.data.width + 4;
}
@@ -226,20 +258,22 @@
}
var currentZIndex = 0;
- var balloonNode = undefined;
var drawNode = function(node, pt){
// node: {mass:#, p:{x,y}, name:"", data:{}}
// pt: {x:#, y:#} node position in screen coords
+ node.data.p = pt;
node.data.zindex = currentZIndex++;
+ if (node.data.main) {
+ mainNode = node;
+ }
- if (node.data.image) {
+ if (node.data.image && node.data.width > 10) {
if (node.data.imageObject) {
node.data.imageObject.width = node.data.width;
node.data.imageObject.height = node.data.height;
drawImage(node.data.imageObject, pt, node.data.color);
- }
- else {
+ } else {
var img = new Image(node.data.width, node.data.height);
img.onload = function() {
node.data.imageObject = img;
@@ -247,8 +281,7 @@
};
img.src = '_img/' + node.data.image;
}
- }
- else {
+ } else {
var color = node.data.color || 'black';
ctx.fillStyle = color;
ctx.lineWidth = 5;
@@ -260,7 +293,6 @@
}
if (node.data.balloon) {
- node.data.p = pt;
repositionBalloon(node.data.balloon, node);
if (node.data.oldWidth) {
node.data.width = node.data.oldWidth;
@@ -272,6 +304,7 @@
}
};
+ particleSystem.eachEdge(drawEdge);
particleSystem.eachNode(drawNode);
if (balloonNode) {
var selectedDimension = Math.max((balloonNode.data.image) ? 150 : 50, balloonNode.data.width);
@@ -291,6 +324,7 @@
balloon.data('node').data.balloon = undefined;
balloon.remove();
balloon = undefined;
+ balloonNode = undefined;
}
var pos = $(canvas).offset();
_mouseP = arbor.Point(e.pageX-pos.left, e.pageY-pos.top)
@@ -307,8 +341,10 @@
balloon = $('<div>');
balloon.css({
'position': 'absolute',
- 'background': 'rgba(0,0,0,0.8)', 'color': 'red',
- 'max-width': '250px',
+ 'background': 'rgba(0,0,0,0.45)', 'color': 'red',
+ 'max-width': '150px',
+ 'max-height': '150px',
+ 'overflow': 'hidden',
'padding': '5px',
'border': 'solid 2px white',
'border-radius': '5px'