-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrustum_flatten.html
185 lines (130 loc) · 5.92 KB
/
frustum_flatten.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<html>
<head>
<title>Frustum Flattener</title>
<link rel="shortcut icon" type="image/png" href="../favicon.png" />
<link rel="apple-touch-icon-precomposed" href="../apple-touch-icon-60x60.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../apple-touch-icon-152x152.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../apple-touch-icon-120x120.png">
<meta content="width=device-width, minimum-scale=1, maximum-scale=1" name="viewport">
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="script/mdj.math.library.js"></script>
<script type="text/javascript" src="script/frustum_formulas.js"></script>
<script type="text/javascript">$(document).bind("mobileinit", function () {$.mobile.ajaxEnabled = false;});</script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<!-- ###################
##### PAGE #####
################### -->
<div data-role="page" id="frustum_page">
<script>
LoadNavPanel("#frustum_page");
$(document).on('pageshow', '#frustum_page', function(){calculateFrustum();});
$(document).on('change', "#calcKind", function(){changeKind();});
$(document).on('change', '.user_values, .calculated_values', function(){calculateFrustum();});
$(".calculated_values").prop("readonly",true);
</script>
<!-- ##### PANEL ##### -->
<div data-role="panel" id="navpanel" class="navpanel" data-display="reveal" data-position="left">
<ul data-role="listview" id="navigation_links" data-theme="d">
</ul>
</div> <!-- Panel -->
<!-- ##### HEADER ##### -->
<div data-role="header" data-position="fixed" data-theme="b">
<a href="#navpanel" data-role="button" data-icon="bars" data-iconpos="notext">Navigation</a>
<h1>Frustum Flattener</h1>
</div> <!-- header -->
<!-- ##### CONTENT ##### -->
<div role="main" class="ui-content">
<div class="ui-field-contain">
<label for="calcKind">Calculate By:</label>
<select name="calcKind" id="calcKind" data-mini="true">
<option value="circumference">Circumference</option>
<option value="radius">Radius</option>
</select>
</div> <!-- fieldcontain -->
<div class="ui-grid-a">
<div class="ui-block-a">
<label for="c" id="c1Label">Top Circumf. (c'):</label>
<input class="user_values" type="number" name="c" id="c" value="28" min="0" data-clear-btn="true"/>
<label for="r" id="r1Label">Top Radius (r'):</label>
<input class="calculated_values" type="number" id="r" class="calc" value="5" min="0" data-clear-btn="true"/>
<label for="height">Height (H):</label>
<input class="user_values" type="number" data-clear-btn="true" id="height" value="30" min="0"/>
</div>
<div class="ui-block-b">
<label for="C" id="c2Label">Bottom Circumf. (C):</label>
<input class="user_values" type="number" id="C" name="C" value="62" min="0" data-clear-btn="true"/>
<label for="R" id="r2Label">Bottom Radius (R):</label>
<input class="calculated_values" type="number" id="R" class="calc" value="10" min="0" data-clear-btn="true"/>
<label for="slant">Slant (h'):</label>
<input class="calculated_values" type="number" data-clear-btn="true" id="slant" readonly/>
</div>
</div> <!-- GRID -->
<div data-role="collapsible" data-collapsed="false" data-theme="b">
<h3>Flattened Shape</h3>
<div class="ui-grid-a">
<div class="ui-block-a">
<label for="s">Radius (s'):</label>
<input class="calculated_values" id="s" readonly/>
</div>
<div class="ui-block-b">
<label for="S">Radius (S):</label>
<input class="calculated_values" id="S" readonly />
</div>
</div>
<label for="arcAngle">Arc Angle (θ):</label>
<input class="calculated_values" id="arcAngle" readonly />
<div class="ui-grid-a">
<div class="ui-block-a">
<label for="arcLength">Arc Length (l):</label>
<input class="calculated_values" id="arcLength" readonly />
</div>
<div class="ui-block-b">
<label for="arcChord">Chord Length (l'):</label>
<input class="calculated_values" id="arcChord" readonly />
</div>
</div>
</div>
<!--
<div data-role="collapsible" data-collapsed="true" data-theme="b">
<h3>Geometric Properties</h3>
<label for="volume">Volume (in<sup>3</sup>):</label>
<input class="calculated_values" id="volume" readonly />
<label for="area">Lateral Surface Area (in<sup>2</sup>):</label>
<input class="calculated_values" id="area" readonly />
<label for="totalArea">Total Surface Area (in<sup>2</sup>):</label>
<input class="calculated_values" id="totalArea" readonly />
</div>
-->
</div> <!-- Content -->
<!-- ##### FOOTER ##### -->
<div data-role="footer" data-position="fixed" data-theme="b">
<div data-role="controlgroup" data-type="horizontal" align="center">
<a href="https://formulae.scenic-shop.com/geometry/frustum/" data-role="button" id="formula" data-icon="gear">Formulas</a>
<a href="#diagram" data-role="button" id="frust_diagram" data-icon="info">Diagram</a>
<a href="disclaimer.html" data-role="button" data-rel="dialog">Disclaimer</a>
</div>
</div> <!-- Footer -->
</div> <!-- Page -->
</div> <!-- Page -->
<!-- ######################
##### DIAGRAM #####
###################### -->
<div data-role="page" id="diagram" data-dialog="true">
<div data-role="header" data-position="fixed" data-theme="b">
<h1>Frustum Diagram</h1>
</div><!-- /header -->
<div data-role="content">
<h1>
<img class="centered" src="image/frustum_1.jpg" alt="Diagram" />
<img class="centered" src="image/frustum_2.jpg" alt="Diagram" />
</h1>
</div>
</div><!-- Page -->
</body>
</html>