-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·158 lines (123 loc) · 7.57 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title style="color:white;">ISING Music</title>
<script src="libraries/p5.js" type="text/javascript"></script>
<script src="libraries/Tone.js" type="text/javascript"></script>
<script src="libraries/StartAudioContext.js" type="text/javascript"></script>
<script src="libraries/ising.js" type="text/javascript"></script>
<script src="libraries/p5.dom.js" type="text/javascript"></script>
<!-- <script src="libraries/p5.sound.js" type="text/javascript"></script> -->
<!-- <script src="sketch.js" type="text/javascript"></script> -->
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Josefin+Slab" rel="stylesheet">
<link rel="stylesheet" href="button.css">
<!-- <link rel="stylesheet" href="libraries/flat-ui.min.css"> -->
<!-- include the jQuery and jQuery UI scripts -->
<script src="https://code.jquery.com/jquery-2.1.1.js"></script>
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<!-- plus a jQuery UI theme, here I use "flick" -->
<style>
body {
padding: 0;
margin: 0;
}
canvas {
vertical-align: top;
}
</style>
</head>
<body>
<div class="loading" id="loading" onclick="dismissDiv()">Loading… <p>Click/tap to dismiss</p> <div style="color:black;"> Click to dismiss</div></div>
<div id='big'>
<center>
<h1>ISING MUSIC</h1>
<center>
<div id='ising'>
<canvas id='canvas' height=512 width=512></canvas>
</div>
</center>
<div id='panelcontainer'>
<!-- =================== add control panel items between here ============== -->
<div id='panel'>
<!-- <br> -->
<div>
<!-- <center> -->
<!-- <input type='button' id='dostep' value='Step' onclick='update_step()'></input> -->
<input type='button' class='custom-btn btn-1' id='pause' value='Pause' onclick='update_pause()'></input>
<input type='button' class='custom-btn btn-1' id='restart' value='Restart' onclick='update_restart()'></input>
<!-- <input type='button' id='resetdata' value='Reset data' onclick='init_measurements()'></input> -->
<!-- </center> -->
</div>
<br>
<div>
<input style='width:150px;' type="range" id="temp" min=-5 max=2 step=0.000001 value=0 oninput='update_temp()' onchange="update_temp()"></input>
<label class='eb_label' for="temp" title="Temperature">Temperature</label>
<br>
<span hidden onclick='dotextbox(this.id)' class='eb_span' id="label_temp"></span>
<input hidden style='width: 1px; display: none;' id='label_temp_input' type='text' value='' onblur='undotextbox(this.id)'>
</div>
<div>
<input style="width:150px;" type="range" id="field" min=-5 max=5 step=0.00001 value=0.0 oninput='update_field()' onchange="update_field()"></input>
<label class='eb_label' for="field" title="External field">Magnetism </label>
<br>
<span hidden onclick='dotextbox(this.id)' class='eb_span' id="label_field"></span>
<input hidden style='width: 1px; display: none;' id='label_field_input' type='text' value='' onblur='undotextbox(this.id)'>
</div>
<div>
<input style="width:150px;" type="range" id="interaction" min=-3.0 max=3.0 step=0.001 value=0.0 oninput='update_interaction()' onchange="update_interaction()"></input>
<label class='eb_label' for="field" title="External field">Interaction </label>
<br>
<span hidden onclick='dotextbox(this.id)' class='eb_span' id="label_field"></span>
<input hidden style='width: 1px; display: none;' id='label_field_input' type='text' value='' onblur='undotextbox(this.id)'>
</div>
<div>
<input style="width:150px;" type="range" id="frames" min=-2 max=0.7 step=0.00001 value=0 oninput='update_frames()' onchange="update_frames()"></input>
<label class='eb_label' for="frames" title="Samples per redraw">Speed</label>
<br>
<span hidden onclick='dotextbox(this.id)' class='eb_span' id="label_frames"></span>
<input hidden style='width: 1px; display: none;' id='label_frames_input' type='text' value='' onblur='undotextbox(this.id)'>
</div>
<div class="withspace">
<label class='eb_label' for='method'>Algorithm</label>
<input type='radio' class="radio" name='method' onclick='update_method()' checked=true id='method_metropolis' value='metropolis'>metropolis</input>
<input type='radio' name='method' onclick='update_method()' id='method_wolff' value='wolff'>wolff</input>
</div>
<input type='button' name="radio" class='custom-btn btn-1' id='grid' value='16' onclick='change_num()'></input>
<input type='button' name="radio" class='custom-btn btn-1' id='grid2' value='32' onclick='change_num2()'></input>
<input type='button' name="radio" class='custom-btn btn-1' id='grid3' value='64' onclick='change_num3()'></input>
<br>
<br>
<div id="speel" style="align: left;">
<h5> - The Ising Model is a mathematical model of ferromagnetism. Electrons within a magnet can have a spin up or a spin down. </h5>
</div>
<!-- <div class="radio-tile-group">
<label class='eb_label' for='num'>Lattice size</label>
<div class="input-container">
<input id="grid" class="radio-button" onclick="change_num()" value="16" type="radio" name="radio" />
<div class="radio-tile">
<label for="walk" class="radio-tile-label">16</label>
</div>
</div>
<div class="input-container">
<input id="grid2" class="radio-button" onclick="change_num2()" value="32" type="radio" name="radio" />
<div class="radio-tile">
<label for="bike" class="radio-tile-label">32</label>
</div>
</div>
<div class="input-container">
<input id="grid3" class="radio-button" type="radio" onclick="change_num3()" value="64" name="radio" />
<div class="radio-tile">
<label for="drive" class="radio-tile-label">64</label>
</div>
</div>
</div> -->
<!-- ========================== and here ================================= -->
</div>
<br>
<br>
</div>
</div>
</body>
</html>