-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
107 lines (96 loc) · 4.23 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
<!DOCTYPE html>
<html>
<head>
<title>A solids of revolution graphing calculator</title>
<link rel="shortcut icon" href="https://lh6.googleusercontent.com/-eJP7CsCRims/AAAAAAAAAAI/AAAAAAAAAOE/9fdQHCWUWQs/s32-c-k-no/photo.jpg"/>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/85/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.13.1/math.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<script src="vendor/js/Detector.js"></script>
<script src="vendor/js/ThreeCSG.js"></script>
<script src="vendor/js/TrackballControls.js"></script>
<script src="js/examples.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<p id="form">
Rotate <input id="function1" class="functionInput" type="text" autofocus="autofocus" placeholder="function 1" name="function">
and <input id="function2" class="functionInput" type="text" placeholder="function 2" name="function">
bounded by <input id="bound1" class="boundInput" type="text" placeholder="bound 1" name="bounds">
and <input id="bound2" class="boundInput" type="text" placeholder="bound 2" name="bounds">
around <input id="rotation" class="rotationInput" type="text" placeholder="axis of rotation" name="rotation">
<button id="rotate-button" type="button" onclick="submit()">Rotate!</button>
<!-- <input id="rotate" type="range" onchange="rotate()" min="0" max="360" value="360" step="30"/> -->
<select id="quality">
<option value="0.5">Select Quality
<option value="1">Low
<option value="0.5">Medium
<option value="0.25">High
<option value="0.1">Ultra
</select>
<button type="button" onclick="reset()">Reset</button>
<button id="example-button" type="button" onclick="showExamples()">Show examples</button>
</p>
<p id="wip">
This calculator is a <a href="https://github.com/saxocellphone/Three" target="_blank"><b>work in progress</b></a> and things may not work as expected!
In addition, please note that some solids may take longer to graph than others.
</p>
<div id="modal">
<div id="examples">
<button type="button" class="close" onclick="hideExamples()">×</button>
<table>
<colgroup span="4"></colgroup>
<tr>
<th>Function 1</th>
<th>Function 2</th>
<th>Bound 1</th>
<th>Bound 2</th>
<th>Axis of rotation</th>
</tr>
<tr>
<td><code>y=x</code></td>
<td><code>y=x^2</code></td>
<td><code>x=1</code></td>
<td><code>x=5</code></td>
<td><code>y=0</code></td>
<td><button type="button" onclick="tryMe(0)">Try me!</button></td>
</tr>
<tr>
<td><code>y=3</code></td>
<td><code>y=-x^2</code></td>
<td><code>x=-3</code></td>
<td><code>x=3</code></td>
<td><code>y=4</code></td>
<td><button type="button" onclick="tryMe(1)">Try me!</button></td>
</tr>
<tr>
<td><code>x=y</code></td>
<td><code>x=sqrt(y)</code></td>
<td><code>y=1</code></td>
<td><code>y=5</code></td>
<td><code>x=1</code></td>
<td><button type="button" onclick="tryMe(2)">Try me!</button></td>
</tr>
<tr>
<td><code>y=sin(x)</code></td>
<td>(blank)</td>
<td><code>x=0</code></td>
<td><code>x=pi</code></td>
<td><code>y=0</code></td>
<td><button type="button" onclick="tryMe(3)">Try me!</button></td>
</tr>
</table>
</div>
</div>
<noscript>
<div id="javascript-error-message" style="font-family: monospace; font-size: 13px; font-weight: normal; text-align: center; background: none repeat scroll 0% 0% rgb(255, 255, 255); color: rgb(0, 0, 0); padding: 1.5em; width: 400px; margin: 5em auto 0px;">
<p>Your browser seems to have <a href="http://en.wikipedia.org/wiki/JavaScript">Javascript</a> turned off.</p>
<p>Find out how to enable it <a href="http://www.enable-javascript.com/" target="_blank">here</a>.</p>
</div>
</noscript>
<script src="js/graph.js"></script>
</body>
</html>