-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlesson_4.html
145 lines (130 loc) · 5.53 KB
/
lesson_4.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lesson 4</title>
</head>
<link rel="stylesheet" href="styles4.css">
<script src="pixi.min.js"></script>
<body>
<script src="uniforms_4.js"></script>
<div id="title">
Intro to Math Art!
<div class="menu">
<input type="radio" id="circle" name="phase" value="circle" oninput="handleCirclePhase(this.value)" checked>
<label for="circle">1</label>
<input type="radio" id="triangle" name="phase" value="triangle" oninput="handleTrianglePhase(this.value)">
<label for="triangle">2</label>
<input type="radio" id="art" name="phase" value="art" oninput="handleArtPhase(this.value)">
<label for="triangle">3</label>
<input type="checkbox" id="axes" oninput="handleAxes(this.value)" checked>
<label for="axes">Axes</label>
<input type="checkbox" id="controls" oninput="handleControls(this.value)" checked>
<label for="controls">Controls</label>
</div>
</div>
<div style="margin-top: 1em;">
<div id="instructions" class="col-6 instructionsPanel">
<div class="panel" id="panel1" style="background-color: beige;">
If we graph a line in Cartesian, <br>
what does it look like in Polar?
<div type="text" id="equation" class="equation">
y = mx + b
</div>
</div>
<div class="panel" id="panel2" style="background-color: rgb(159, 160, 230); display: none;">
What do Sine waves look like <br>
in Polar coordinates?
<div type="text" id="equation2" class="equation" style="display: none;">
y = a * sin(n * x + time) + c
</div>
</div>
<div class="panel" id="panel3" style="background-color: rgb(159, 160, 230); display: none;">
Now, let's try to make it more <br>
interesting and beautiful!
<div type="text" id="equation3" class="equation">
y = a * sin(n * x + time + A * sin(N * x + v * time)) + c
</div>
</div>
</div>
<div class="sliders collapseUp" id="slidersPanel">
<div id="slidersPhase2">
<div class="sidebside">
<div type="text" id="sliderCart" class="equation sbs" style="color: rgb(77, 179, 77);">
Cartesian
</div>
<div type="text" id="sliderPol" class="equation sbs">
Polar
</div>
</div>
<div class="equation">
<input type="range" min="0" max="360" value="0" step="1" class="slider" id="sliderInput"
oninput="handleSlider(this.value)">
</div>
<div id="slidersPhase2Line">
<div type="text" id="" value="y = 0*x" class="equation">
m <input type="range" min="0" max="2.4" value="0" step="0.01" class="slider" id="mSlider"
oninput="handleMSlider(this.value)">
</div>
<div type="text" id="" value="y = 0*x" class="equation">
b <input type="range" min="0" max="8" value="0" step="0.1" class="slider" id="bSlider"
oninput="handleBSlider(this.value)">
<br>
cycles
<input type="range" min="1" max="4" value="1" step="1" class="slider" id="cycles"
oninput="handleCycles(this.value)">
</div>
</div>
<div id="slidersPhase2Sine" style="display: none;">
<div type="text" id="" value="y = 0*x" class="equation">
c <input type="range" min="0" max="8" value="1" step="0.05" class="slider" id="cSlider"
oninput="handleCSlider(this.value)">
</div>
<div type="text" id="" value="y = 0*x" class="equation">
n <input type="range" min="0" max="8" value="1" step="0.25" class="slider" id="nSlider"
oninput="handleNSlider(this.value)">
</div>
<div type="text" id="" value="y = 0*x" class="equation">
a <input type="range" min="0" max="8" value="1" step="0.05" class="slider" id="aSlider"
oninput="handleASlider(this.value)">
<br>
cycles
<input type="range" min="1" max="4" value="1" step="1" class="slider" id="cycles"
oninput="handleCycles(this.value)">
</div>
</div><!--
--><div id="slidersPhase3" class="half" style="display: none;">
<div type="text" id="" value="y = 0*x" class="equation">
C <input type="range" min="0" max="8" value="1" step="0.05" class="slider" id="cSlider2"
oninput="handleCSlider2(this.value)">
</div>
<div type="text" id="" value="y = 0*x" class="equation">
N <input type="range" min="0" max="8" value="1" step="0.25" class="slider" id="nSlider2"
oninput="handleNSlider2(this.value)">
</div>
<div type="text" id="" value="y = 0*x" class="equation">
A <input type="range" min="0" max="8" value="1" step="0.05" class="slider" id="aSlider2"
oninput="handleASlider2(this.value)">
<br>
v
<input type="range" min="1" max="4" value="1" step="1" class="slider" id="vSlider"
oninput="handleVSlider(this.value)">
</div>
</div>
</div>
<div id="slidersPhase1" style="display: none;" class="equation">
<div type="text" id="sliderTime" class="equation">
time = 0
</div>
<input type="range" min="0" max="6.3" value="0" step="0.1" class="slider" id="time"
oninput="handleTime(this.value)">
<br>
speed
<input type="range" min="0" max="1" value="0" step="0.01" class="slider" id="speed"
oninput="handleSpeed(this.value)">
</div>
</div>
</div>
</body>
</html>