-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
171 lines (168 loc) · 9.29 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
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
<!DOCTYPE html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script>
<link rel="stylesheet" href="style.css">
<title>Line Drawings</title>
</head>
<body>
<div id="navbar" class="sticky">
<a href="javascript:scrollToId('line-drawings')">Line Drawings</a>
<a href="javascript:scrollToId('examples')">Examples</a>
<a href="javascript:scrollToId('how-it-works')">How it Works</a>
</div>
<div class="content">
<div class="parallax banner">
<div class="header">
<h1>Line Drawings</h1>
<h2>Art, Mathematics and Technology</h2>
<h3>Suzanna Wentzel</h3>
<button class="button" onclick="scrollToId('line-drawings')">Try It Out!</button>
</div>
</div>
<div class="canvas-container" id="line-drawings">
<div id="canvas-placeholder"></div>
<script src="art.js"></script>
<div class="form">
<h2>Play with parameters!</h2>
<label class="input-row">
Number of lines:
<div class="input-row">
<input type="range" id="numLines" name="number of lines" min="2" max="1000" value="160" oninput="changeNumLines(this.value)" onchange="changeNumLines(this.value)"/>
<p class="number-indication" id="txtNumLines">160</p>
</div>
</label>
<label class="input-row">
Line weight:
<div class="input-row">
<input type="range" id="lineWeight" name="line weight" min="1" max="10" value="1" oninput="changeLineWeight(this.value)" onchange="changeLineWeight(this.value)"/>
<p class="number-indication" id="txtLineWeight">1</p>
</div>
</label>
<p><b>Function 1</b></p>
<label class="input-row">
Zoom:
<div class="input-row">
<input type="range" id="zoom" name="zoom" min="2" max="1000" value="250" oninput="changeZoom1(this.value)" onchange="changeZoom1(this.value)"/>
<p class="number-indication" id="txtZoom1">250</p>
</div>
</label>
<label class="input-row">
R:
<div class="input-row">
<input type="range" id="R1" name="R1" min="0.1" max="3" step="0.05" value="1.0" oninput="changeR1(this.value)" onchange="changeR1(this.value)"/>
<p class="number-indication" id="txtR1" >1.0</p>
</div>
</label>
<label class="input-row">
r:
<div class="input-row">
<input type="range" id="r1" name="r1" min="0.1" max="2" step="0.01" value="0.58" oninput="changer1(this.value)" onchange="changer1(this.value)"/>
<p class="number-indication" id="txtr1" >0.58</p>
</div>
</label>
<label class="input-row">
d:
<div class="input-row">
<input type="range" id="d1" name="d1" min="0.01" max="3" step="0.01" value="0.29" oninput="changed1(this.value)" onchange="changed1(this.value)"/>
<p class="number-indication" id="txtd1" >0.29</p>
</div>
</label>
<label class="input-row">
time interval:
<div class="input-row">
<input type="range" id="timeInterval1" name="timeInterval" min="0.001" max="0.3" step="0.001" value="0.05" oninput="changeTimefactor1(this.value)" onchange="changeTimefactor1(this.value)"/>
<p class="number-indication" id="txtTimeFactor1" >0.05</p>
</div>
</label>
<p><b>Function 2</b></p>
<label class="input-row">
Zoom:
<div class="input-row">
<input type="range" id="zoom2" name="zoom2" min="2" max="1000" value="300" oninput="changeZoom2(this.value)" onchange="changeZoom2(this.value)"/>
<p class="number-indication" id="txtZoom2">300</p>
</div>
</label>
<label class="input-row">
R:
<div class="input-row">
<input type="range" id="R2" name="R2" min="0.1" max="3" step="0.05" value="2.0" oninput="changeR2(this.value)" onchange="changeR2(this.value)"/>
<p class="number-indication" id="txtR2">2.0</p>
</div>
</label>
<label class="input-row">
r:
<div class="input-row">
<input type="range" id="r2" name="r2" min="0.1" max="2" step="0.01" value="0.9" oninput="changer2(this.value)" onchange="changer2(this.value)"/>
<p class="number-indication" id="txtr2" >0.9</p>
</div>
</label>
<label class="input-row">
d:
<div class="input-row">
<input type="range" id="d2" name="d2" min="0.01" max="3" step="0.01" value="0.45" oninput="changed2(this.value)" onchange="changed2(this.value)"/>
<p class="number-indication" id="txtd2" >0.45</p>
</div>
</label>
<label class="input-row">
time interval:
<div class="input-row">
<input type="range" id="timeInterval2" name="timeInterval" min="0.001" max="0.3" step="0.001" value="0.015" oninput="changeTimefactor2(this.value)" onchange="changeTimefactor2(this.value)"/>
<p class="number-indication" id="txtTimeFactor2" >0.015</p>
</div>
</label>
</div>
</div>
<div id="examples" class="example-container">
<h2>Examples</h2>
<div class="card-container">
<div id="card1" class="card">
<video id="example1" width="300" height="168" autoplay loop muted>
<source src="./public/example-1.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<h3>Moving Blob</h3>
<button class="button" onclick="setValues(1000, 1, 572, 1.0, 0.58, 0.29, 0.021, 300, 2.0, 0.9, 0.45, 0.015)">Try This One</button>
</div>
<div id="card2" class="card">
<video id="example2" width="300" height="168" autoplay loop muted>
<source src="./public/example-2.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<h3>Moiré Flower</h3>
<button class="button" onclick="setValues(1000, 1, 2, 0.1, 1.82, 2.16, 0.101, 1000, 0.1, 0.9, 0.45, 0.027)">Try This One</button>
</div>
<div id="card3" class="card">
<video id="example3" width="300" height="168" autoplay loop muted>
<source src="./public/example-3.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<h3>Spiraling</h3>
<button class="button" onclick="setValues(351, 1, 130, 0.2, 0.29, 2.16, 0.101, 448, 0.1, 0.33, 0.39, 0.058)">Try This One</button>
</div>
<div id="card4" class="card">
<video id="example4" width="300" height="168" autoplay loop muted>
<source src="./public/example-4.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<h3>Spiky Ball</h3>
<button class="button" onclick="setValues(1000, 1, 46, 0.95, 1.82, 2.16, 0.151, 1000, 0.5, 0.9, 0.45, 0.027)">Try This One</button>
</div>
</div>
</div>
<div id="how-it-works" class="canvas-container">
<div class="how-it-works">
<video class="explanation-video" width="711" height="400" controls>
<source src="./public/explanation_art.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<div class="info">
<h2>How it Works</h2>
<p>The basic idea is that lines are drawn between two functions, between two hypotrochoids. Watch the video for a quick introduction, read the poster for more information or see the <a href="https://github.com/SuzannaWentzel/Moire">GitHub Repo</a> for the code!</p>
<a class="download button" href="./public/Hypotrochoid line drawings_v5.pdf" download="Line drawings poster">Download Poster</a>
</div>
</div>
</div>
<div class="footer">© Suzanna Wentzel, 2020</div>
</div>
</body>
<script src="main.js"></script>