-
Notifications
You must be signed in to change notification settings - Fork 0
/
transform.html
216 lines (205 loc) · 10.1 KB
/
transform.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Identifying Transformations</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Teko:wght@300..700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="styles.css" />
<script src="transform.js"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<!-- Header -->
<div class="w3-container spartan">
<h1>
<a href="index.html"><i class="fa fa-home"></i></a> ACAD Math Apps
</h1>
<img src="Images/Spartan-Logo2.png" height="50" class="logo" />
</div>
<!-- Body -->
<div class="w3-container">
<h2>Identifying Transformations</h2>
<p>
Click the button to generate a function. Then give its shift left/right, shift up/down, vertical
stretch/compression, vertical reflection, horizontal stretch/compression, and horizontal reflection.
</p>
</div>
<div class="w3-container">
<div class="w3-panel w3-border-green w3-leftbar w3-topbar">
<h3>What the Variables do</h3>
<ul>
<li>
<p>
\(a\) - Vertical stretch if \(|a|>1\), compression if \(|a|<1\), and reflection if
\(a<0\)
</p>
</li>
<li>
<p>
\(b\) - Horizontal compression if \(|b|>1\), stretch if \(|b|<1\), and reflection if
\(b<0\)
</p>
</li>
<li><p>\(h\) - Horizontal shift right if \(h>0\), shift left if \(h<0\)</p></li>
<li><p>\(k\) - Vertical shift up if \(k>0\), shift down if \(k<0\)</p></li>
</ul>
</div>
<div>
<h2>Choose Settings</h2>
<label for="funcType">▶Function Type:</label>
<select name="funcType" id="funcType">
<option value="1">Quadratic</option>
<option value="2">Absolute Value</option>
<option value="3">Radical (Square Root)</option>
<option value="4">Exponential</option>
<option value="5">Sine</option>
<option value="6">Random</option>
</select>
<br />
<label for="horComp">▶Horizontal Compression:</label>
<select name="horComp" id="horComp">
<option value="1">No Horizontal Compression (b = 1)</option>
<option value="2">Standard Horizontal Compression</option>
<option value="3">GCF Horizontal Compression</option>
<option value="4">Random</option>
</select>
<br />
<br />
</div>
<div>
<button onclick="startFresh()" class="start" id="startFresh">Start</button><button onclick="debug()" style="visibility: hidden">Debug</button><button onclick="check()" class="next" id="check" style="visibility: hidden;">Check Answer</button><button onclick="nextProb()" class="next" id="nextProb" style="visibility: hidden;">Next Problem</button>
</div>
<div><br /></div>
<div id="newScores" class="scoreGrid">
<div class="scoreCard">
<span class="scoreText">CORRECT:</span>
<br /><span class="scoreText" id="correct">0</span>
</div>
<div class="scoreCard">
<span class="scoreText">GUESSES:</span>
<br /><span class="scoreText" id="guesses">0</span>
</div>
<div class="scoreCard">
<span class="scoreText">PERCENT:</span>
<br /><span class="scoreText" id="percent">0</span>
</div>
</div>
<div id="result"><h2></h2></div>
<div id="problem"><h2></h2></div>
<br />
<h4>Input Answers:</h4>
<div class="w3-container" style="padding-left: 20px" id="horizShiftInput">
<label for="horizShiftDir">▶Horizontal Shift:</label>
<select id="horizShiftDir">
<option value="0">None</option>
<option value="1">Right</option>
<option value="-1">Left</option>
</select>
by <input id="horizShiftVal" style="width: 50px" />
<br />
</div>
<div class="w3-container" style="padding-left: 20px" id="vertShiftInput">
<label for="vertShiftDir">▶Vertical Shift:</label>
<select id="vertShiftDir">
<option value="0">None</option>
<option value="1">Up</option>
<option value="-1">Down</option>
</select>
by <input id="vertShiftVal" style="width: 50px" />
<br/>
</div>
<div class="w3-container" style="padding-left: 20px" id="vertCompInput">
<label for="vertCompDir">▶Vertical Stretch:</label>
<select id="vertCompDir">
<option value="0">None</option>
<option value="1">Stretch</option>
<option value="-1">Compression</option>
</select>
by <input id="vertCompVal" style="width: 50px" />
with
<select id="vertRef">
<option value="0">No reflection</option>
<option value="1">Reflection</option>
</select>
<br/>
</div>
<div class="w3-container" style="padding-left: 20px" id="horizCompInput">
<label for="horizCompDir">▶Horizontal Compression:</label>
<select id="horizCompDir">
<option value="0">None</option>
<option value="1">Compression</option>
<option value="-1">Stretch</option>
</select>
by <input id="horizCompVal" style="width: 50px" />
with
<select id="horizRef">
<option value="0">No reflection</option>
<option value="1">Reflection</option>
</select>
<br/>
</div>
<div class="w3-container" style="padding-left: 20px; display: none" id="amp">
<label for="sineVertCompDir">▶Amplitude:</label>
<select id="sineVertCompDir">
<option value="0">None</option>
<option value="1">Stretch</option>
<option value="-1">Compression</option>
</select>
by <input id="sineVertCompVal" style="width: 50px" />
with
<select id="sineVertRef">
<option value="0">No reflection</option>
<option value="1">Reflection</option>
</select>
<br/>
</div>
<div class="w3-container" style="padding-left: 20px; display: none" id="mid">
<label for="sineVertShiftDir">▶Midline:</label>
<select id="sineVertShiftDir">
<option value="0">None</option>
<option value="1">Up</option>
<option value="-1">Down</option>
</select>
by <input id="sineVertShiftVal" style="width: 50px" />
<br/>
</div>
<div class="w3-container" style="padding-left: 20px; display: none" id="phase">
<label for="sineHorizShiftDir">▶Phase Shift:</label>
<select id="sineHorizShiftDir">
<option value="0">None</option>
<option value="1">Right</option>
<option value="-1">Left</option>
</select>
by <input id="sineHorizShiftVal" style="width: 50px" />
<br/>
</div>
<div class="w3-container" style="padding-left: 20px; display: none" id="freq">
<label for="sineHorizCompDir">▶Frequency:</label>
<select id="sineHorizCompDir">
<option value="0">None</option>
<option value="1">Compression</option>
<option value="-1">Stretch</option>
</select>
by <input id="sineHorizCompVal" style="width: 50px" />
with
<select id="sineHorizRef">
<option value="0">No reflection</option>
<option value="1">Reflection</option>
</select>
</div>
<br /><br />
<div id="debug"></div>
</div>
</body>
</html>