-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (119 loc) · 3.68 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Double Pendulum</title>
<link rel="stylesheet" href="assets/fontawesome/css/all.min.css" />
<link rel="stylesheet" href="styles.css" />
<script src="p5.min.js" defer></script>
<script src="script.js" defer></script>
</head>
<body>
<div class="page">
<div class="side">
<div class="box">
<h1>Double Pendulum</h1>
<div class="description">
<p>Created by <a href="https://zsrobinson.com">Zachary Robinson</a></p>
<p>View this project on <a href="https://github.com/zsrobinson/pendulum">GitHub</a></p>
<p>Read the <a href="https://github.com/zsrobinson/pendulum/blob/main/README.md">Project Description</a></p>
</div>
<p>Units may not be to scale</p>
</div>
<div class="box" id="time-controls">
<h2>Time Controls</h2>
<div>
<button id="play-button">
<i class="fa-solid fa-play"></i>
<!-- <span>Start</span> -->
</button>
<button id="pause-button">
<i class="fa-solid fa-pause"></i>
<!-- <span>Pause</span> -->
</button>
<button id="restart-button">
<i class="fa-solid fa-arrow-rotate-right"></i>
<!-- <span>Restart</span> -->
</button>
</div>
</div>
</div>
<div class="side">
<div class="box">
<h2>Parameters</h2>
<div class="parameter">
<div>
<i class="fa-solid fa-earth-americas"></i>
<strong>Force of Gravity</strong>
<p id="g-output">9.81 m/s²</p>
</div>
<input type="range" id="g-input" min="0" max="50" value="9.81" step="0.01">
</div>
<div class="parameter">
<div>
<i class="fa-solid fa-feather-pointed"></i>
<strong>Damping</strong>
<p id="dampRate-output">0.05 m/s²</p>
</div>
<input type="range" id="dampRate-input" min="0" max="1" value="0.05" step=".025">
</div>
<!-- ONE -->
<p></p>
<div class="parameter">
<div>
<i class="fa-solid fa-ruler"></i>
<strong>Length 1</strong>
<p id="len1-output">1.5 m</p>
</div>
<input type="range" id="len1-input" min="0.5" max="5" value="2" step="0.1">
</div>
<div class="parameter">
<div>
<i class="fa-solid fa-weight-hanging"></i>
<strong>Mass 1</strong>
<p id="mass1-output">30 kg</p>
</div>
<input type="range" id="mass1-input" min="10" max="100" value="30">
</div>
<div class="parameter">
<div>
<i class="fa-solid fa-circle-dot"></i>
<strong>Angle 1</strong>
<p id="angle1-output">45°</p>
</div>
<input type="range" id="angle1-input" min="-180" max="180" value="45" step="5">
</div>
<!-- TWO -->
<p></p>
<div class="parameter">
<div>
<i class="fa-solid fa-ruler"></i>
<strong>Length 2</strong>
<p id="len2-output">1.5 m</p>
</div>
<input type="range" id="len2-input" min="0.5" max="5" value="2" step="0.1">
</div>
<div class="parameter">
<div>
<i class="fa-solid fa-weight-hanging"></i>
<strong>Mass 2</strong>
<p id="mass2-output">30 kg</p>
</div>
<input type="range" id="mass2-input" min="10" max="100" value="30">
</div>
<div class="parameter">
<div>
<i class="fa-solid fa-circle-dot"></i>
<strong>Angle 2</strong>
<p id="angle2-output">90°</p>
</div>
<input type="range" id="angle2-input" min="-180" max="180" value="90" step="5">
</div>
</div>
</div>
</div>
<div class="sim" id="sim"></div>
</body>
</html>