-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
executable file
·65 lines (62 loc) · 2.95 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Networking Graphing</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="Turner Bohlen">
<link rel="stylesheet" type="text/css" href="graphing.css">
<script type="text/javascript" src="processing-1.3.6.js"></script>
<script type="text/processing" data-processing-target="theCanvas" src="graphing.pde"></script>
<script type="text/javascript">
function boostAll() {
processingInstance = Processing.getInstanceById('theCanvas');
processingInstance.boostAll();
}
function restart() {
processingInstance = Processing.getInstanceById('theCanvas');
processingInstance.restart();
}
function replay() {
processingInstance = Processing.getInstanceById('theCanvas');
processingInstance.replay();
}
</script>
</head>
<body>
<canvas id="theCanvas"></canvas>
<div class="inputwrap">
<input type='button' value="New Graph" onclick="restart();"></input>
<div class='graphOptions'>
<label class='nodeLabel' for='nodes'>Total Nodes:</label>
<input class='nodeInput' id='nodes' type='text' size='5' value='20'></input>
<label class='nodeLabel' for='connectionsPerNode'>Ave. Edges/Node:</label>
<input class='nodeInput' id='connectionsPerNode' type='text' size='5' value='30'></input>
</div>
<input type='button' value="Replay" onclick="replay();"></input>
<input type='button' value="Boost" onclick="boostAll();"></input>
<div class='info'>
<p id="calcsPerSec">Calculations/second: 0</p>
<p id="calcs">Calculations: 0</p>
<p id="energy">Potential Energy: 0</p>
</div>
<label for='gravDist'>Max distance for repulsion interactions</label>
<input id='gravDist' type='text' size='10' value='300.0'></input>
<label for='springLength'>Relaxed Spring Length</label>
<input id='springLength' type='text' size='10' value='100.0'></input>
<label for='forceScale'>Additional scale for all Forces</label>
<input id='forceScale' type='text' size='10' value='100.0'></input>
<label for='springCoeff'>Coefficient of Spring Force</label>
<input id='springCoeff' type='text' size='10' value='0.001'></input>
<label for='repulsionCoeff'>Coefficient Repulsion Force</label>
<input id='repulsionCoeff' type='text' size='10' value='5000.0'></input>
<label for='frictionCoeff'>Coefficient of Friction Force</label>
<input id='frictionCoeff' type='text' size='10' value='-0.05'></input>
<label for='stepsPerDraw'>Calculations/Frame</label>
<input id='stepsPerDraw' type='text' size='10' value='10'></input>
<label for='stepsPerSec'>Calculations/Model Second (1/delta T)</label>
<input id='stepsPerSec' type='text' size='10' value='10'></input>
<label for='lineOpacity'>Line Opacity (0-255)</label>
<input id='lineOpacity' type='text' size='10' value='150'></input>
</div>
</body>
</html>