forked from julemarie/bezier-splines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
82 lines (64 loc) · 2.35 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
<!DOCTYPE html>
<html>
<head>
<title>Bézier Splines: Continuity</title>
<link rel="stylesheet" type="text/css" href="style.css">
<!-- <script src="https://cdn.plot.ly/plotly-latest.min.js"></script> -->
<script src="plotly-2.29.0.min.js"></script>
<script src="bezierc2spline.js"></script>
<script src="script.js"></script>
</head>
<body>
<div class="grid-container">
<h1 id="pagename">Bézier Splines: Continuity</h1>
<p id="pagedescription">
Created by <a href="https://github.com/julemarie">Jule Schmidt</a>
and <a href="http://tinoweinkauf.net">Tino Weinkauf</a>
for the course <a href="https://www.kth.se/student/kurser/kurs/DH2320">DH2320</a> / <a href="https://www.kth.se/student/kurser/kurs/DD2258">DD2258</a> at KTH.
Inspired by <a href="https://acegikmo.com">Freya Holmér</a>'s video <a href="https://www.youtube.com/watch?v=jvPPXbo87ds">The Continuity of Splines</a>.
Uses <a href="https://github.com/Zunawe">Bryce Wilson</a>'s <a href="https://github.com/Zunawe/bezier-spline">code for solving C2 Bézier splines</a>
and <a href="https://plotly.com/">Plotly</a>.
<a href="https://github.com/KTHVisualization/BezierSplinesContinuity">Code on github.</a>
</p>
<div id="plotCanvasContainer" class="main-plot-container">
<canvas
id="plotCanvas"
class="main-plot"
>
</canvas>
</div>
<div class="buttonArea">
<div id="ContinuityModes" class="toggle-buttons">
<input type="radio" id="curve" value="5" name="contmode" />
<label for="curve">Bézier Curve</label>
<input type="radio" id="broken" value="0" name="contmode" checked="checked" />
<label for="broken">Broken (C0)</label>
<input type="radio" id="aligned" value="1" name="contmode" />
<label for="aligned">Aligned (G1)</label>
<input type="radio" id="mirrored" value="2" name="contmode" />
<label for="mirrored">Mirrored (C1)</label>
<input type="radio" id="G2" value="3" name="contmode" />
<label for="G2">G2</label>
<input type="radio" id="C2" value="4" name="contmode" />
<label for="C2">C2</label>
</div>
<button class="clear-canvas" onclick="resetCanvas()">
Clear all Curves
</button>
</div>
<div
class="velocity"
id="velocityPlot"
>
</div>
<div
class="acceleration"
id="accelerationPlot"
>
</div>
</div>
</body>
<script type="text/javascript">
init_view();
</script>
</html>