-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
77 lines (77 loc) · 3.96 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
<html>
<head>
<title>curve fitter</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="canvas-container" oncontextmenu="return false">
<canvas id="path" width="600" height="600"></canvas>
<canvas id="sample" width="600" height="600"></canvas>
<canvas id="circles" width="600" height="600"></canvas>
</div>
<div class="meta">
<div class="controls">
<span>Animation Speed: </span><br><input id="speed-slider" type="range" min="1" max="20" value="10" step="0.5"><br>
<button id="step-back" disabled>step back</button>
<button id="play-pause">pause</button>
<button id="step-forward" disabled>step forward</button><br>
<span>Fade: </span><br><input id="fade-path" type="range" min="0" max="3" value="0" step="0.25"><br>
<span>Number of Circles: </span><br><input id="comp-sider" type="range" min="0" max="1" value="0" step="1">
<span id="num-circles">0</span> circles<br>
<label>Show circles: <input type="checkbox" id="show-circles" checked autocomplete="off"></label><br>
<label>Show samples: <input type="checkbox" id="show-points" checked autocomplete="off"></label><br>
<label>Sample Mode:
<select id="mode-select">
<option value="input">Input</option>
<option value="curve">Curve</option>
<option value="point">Point</option>
</select></label>
<div id="input-controls" style="padding:0">
<span>Input Data Points: </span><br>
<textarea id="sample-data" cols="10" rows="12" style="font-family:monospace;"></textarea>
<br><button id="input-fit">Evaluate</button>
<br><button id="export-input">Export points</button>
</div>
<div id="curve-controls" hidden style="padding:0">
<span>Sample Rate: </span><br><input id="sample-slider" type="range" min="1" max="2" value="1.3" step="0.05"><br>
</div>
<div id="point-controls" hidden style="padding:0">
<button id="clear-samples">Clear Samples</button>
<button id="point-fit">Evaluate</button>
</div>
</div>
</div>
<div class="description" >
This app lets you input a set of points, and then constructs a Ptolemaic system of epicycles and deferents based on the Discrete Fourier Transform of the sample.
<br><br>Parameters:
<ul>
<li><b>Animation Speed</b>: Controls the speed at which the path is drawn</li>
<li><b>Fade</b>: Controls the speed at which the path fades (Far-left indicates no fade)</li>
<li><b>Compression</b>: Determines how many epicycles to use (Removes from the system in order of radius)</li>
<li><b>Show circles</b>: Show/hide epicycles</li>
<li><b>Show samples</b>: Show/hide sample points</li>
<li><b>Sample Mode</b>: Determines the method of sample input (Switching modes clears the screen)</li>
<ul>
<li><b>Input Mode</b>: Type in the coordinates of the samples</li>
<ul>
<li><b>Input Data Points</b>: Type the coordinates here</li>
<li><b>Evaluate</b>: Same as Point Mode's Evaluate</li>
</ul>
<li><b>Curve Mode</b>: Click and drag with the mouse to input samples</li>
<ul>
<li><b>Sample Rate</b>: Determines the rate at which a sample is taken along the drag</li>
</ul>
<li><b>Point Mode</b>: Click individual points to input a sample</li>
<ul>
<li><b>Clear Samples</b>: Clears all samples from the list</li>
<li><b>Evaluate</b>: Finish sampling, start construction (Note: evaluating in Curve mode is implicit in the release of the mouse)</li>
</ul>
</ul>
</ul>
</div>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.13.3/math.min.js"></script> -->
<script src="complex.min.js"></script>
<script src="dft.js"></script>
<script src="main.js"></script>
</body>
</html>