forked from ricktu288/ray-optics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
457 lines (431 loc) · 22 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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ray Optics Simulation - PhyDemo</title>
<meta property="og:title" content="Ray Optics Simulation - PhyDemo">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phydemo.app/ray-optics/">
<meta property="og:image" content="https://phydemo.app/ray-optics/image.png">
<meta property="og:description" content="A free, open-source web app for creating and simulating 2D geometric optical scenes.">
<meta property="og:locale" content="en">
<link rel="canonical" href="https://phydemo.app/ray-optics/">
<link rel="alternate" href="https://phydemo.app/ray-optics/" hreflang="en">
<link rel="alternate" href="https://phydemo.app/ray-optics/de/" hreflang="de">
<link rel="alternate" href="https://phydemo.app/ray-optics/es/" hreflang="es">
<link rel="alternate" href="https://phydemo.app/ray-optics/fr/" hreflang="fr">
<link rel="alternate" href="https://phydemo.app/ray-optics/jp/" hreflang="ja">
<link rel="alternate" href="https://phydemo.app/ray-optics/ko/" hreflang="ko">
<link rel="alternate" href="https://phydemo.app/ray-optics/nl/" hreflang="nl">
<link rel="alternate" href="https://phydemo.app/ray-optics/pl/" hreflang="pl">
<link rel="alternate" href="https://phydemo.app/ray-optics/ru/" hreflang="ru">
<link rel="alternate" href="https://phydemo.app/ray-optics/si/" hreflang="si">
<link rel="alternate" href="https://phydemo.app/ray-optics/cn/" hreflang="zh-CN">
<link rel="alternate" href="https://phydemo.app/ray-optics/tw/" hreflang="zh-TW">
<link rel="stylesheet" href="thirdparty/bootstrap-3.3.7/bootstrap.min.css">
<link rel="icon" href="icon128.png" type="image/png">
<style>
.carousel-inner>.item>a>img {
width: 1920px;
}
.thumbnail.right-caption>img {
float: left;
margin-right: 9px;
}
.thumbnail {
margin-bottom: 5px;
}
.tool-title {
font-size: 16pt;
margin-top: 0px;
margin-bottom: 0px;
}
.mode-title {
font-size: 16pt;
margin-top: 0px;
margin-bottom: 0px;
}
.brand {
font-size: 12pt;
color: #888;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 5px;
margin-right: 5px;
padding: 0px;
height: 40px;
line-height: 40px;
position: relative;
text-align: center;
text-decoration: none;
}
.brand:hover {
text-decoration: none;
}
.github-button-container {
color: #888;
margin-top: 7px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
padding: 0px;
height: 40px;
width: 92px;
line-height: 40px;
position: relative;
text-align: center;
display: inline-block;
float: right;
}
.github-button-container a {
color: transparent;
}
.navul {
font-size: 11pt;
}
.navul a {
color: #555;
float: left;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 5px;
margin-right: 5px;
padding: 2px;
height: 40px;
line-height: 40px;
position: relative;
text-align: center;
text-decoration: none;
}
.clearfix {
clear: both;
}
.navul a:hover {
border-bottom: 3px solid #CCC;
text-decoration: none;
}
.navul a.active {
color: #000;
border-bottom: 3px solid gray;
}
body {
padding-top: 72px;
}
</style>
</head>
<body>
<div class="navbar navbar-fixed-top container" style="background-color:white;max-height:90px;overflow:hidden">
<a href="https://phydemo.app/ray-optics/" class="navbar-left brand">
<img src="icon128.png" alt="" style="width:18pt; height:18pt"> Ray Optics Simulation
</a>
<div class="navbar-right">
<span class="navul">
<a href="https://phydemo.app/ray-optics/" class="active">Home</a>
<a href="https://phydemo.app/ray-optics/gallery/">Gallery</a>
<a href="https://phydemo.app/ray-optics/about">About</a>
</span>
<span class="github-button-container">
<a class="github-button" href="https://github.com/ricktu288/ray-optics" data-show-count="true" aria-label="Star ricktu288/ray-optics on GitHub">Star</a>
</span>
</div>
</div>
<div class="container">
<center>
<h1><b><span id="title">Ray Optics Simulation</span></b></h1>
<p id="description">
Create & simulate 2D geometric optical scenes interactively.<br> Totally free and web-based. Source code is <a href="https://github.com/ricktu288/ray-optics">available on GitHub</a>.
</p>
<p>
<a href="https://phydemo.app/ray-optics/simulator/" target="_blank" class="btn btn-success btn-lg" id="start">Launch Simulator</a>
<!--<a href="https://github.com/ricktu288/ray-optics" class="btn btn-success btn-lg" id="github_link">View On GitHub</a><br>-->
</p>
</center>
<br>
<div id="screenshots" class="carousel slide" data-ride="carousel" style="aspect-ratio: 940/440; max-width: 1140px">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#screenshots" data-slide-to="0" class="active"></li>
<li data-target="#screenshots" data-slide-to="1"></li>
<li data-target="#screenshots" data-slide-to="2"></li>
<li data-target="#screenshots" data-slide-to="3"></li>
<li data-target="#screenshots" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<a href="https://phydemo.app/ray-optics/simulator/#spherical-lens-and-mirror" target="_blank"><img src="img/1.jpg" alt="1.jpg"></a>
</div>
<div class="item">
<a href="https://phydemo.app/ray-optics/simulator/#compound-microscope" target="_blank"><img src="img/3.svg" alt="3.svg"></a>
</div>
<div class="item">
<a href="https://phydemo.app/ray-optics/simulator/#apparent-depth" target="_blank"><img src="img/5.svg" alt="5.svg"></a>
</div>
<div class="item">
<a href="https://phydemo.app/ray-optics/simulator/#chromatic-dispersion" target="_blank"><img src="img/6.png" alt="6.png"></a>
</div>
<div class="item">
<a href="https://phydemo.app/ray-optics/simulator/#images-formed-by-two-mirrors" target="_blank"><img src="img/4.svg" alt="4.svg"></a>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#screenshots" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#screenshots" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div class="row" style="font-size: 10pt">
<div class="col-sm-6">
<div class="col-sm-12">
<h2 id="tools">Tools</h2>
<div class="row thumbnail right-caption">
<img src="img/ray.svg" alt="ray" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="ray">Ray</p>
<span id="ray_desc">
A single ray of light defined by two points.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/beam.svg" alt="Beam" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="beam">Beam</p>
<span id="beam_desc">
A parallel beam of rays emerges from a line segment,
with density controlled by the "Ray density" slider.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/point_source.svg" alt="Point Source" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="point_source">Point Source</p>
<span id="point_source_desc">
Rays emerge from a single point,
with number controlled by the "Ray density" slider.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/mirror.svg" alt="Mirror" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="mirror">Mirror</p>
<span id="mirror_desc">
Simulate the reflection of light on a mirror.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/mirror_arc.svg" alt="Mirror (Curved)" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="mirror_arc">Mirror (Curved)</p>
<span id="mirror_arc_desc">
A mirror whose shape is curved. Can be circular, parabolic, or defined by a custom equation y = f(x).
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/ideal_curved_mirror.svg" alt="Ideal curved mirror" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="ideal_curved_mirror">Ideal curved mirror</p>
<span id="ideal_curved_mirror_desc">
The idealized "curved" mirror which obeys exactly the mirror equation (1/p + 1/q = 1/f).
The focal length (in pixels) can be set directly.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/beamsplitter.svg" alt="Beam Splitter" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="beamsplitter">Beam Splitter</p>
<span id="beamsplitter_desc">
A mirror that transmits a percentage of incoming light.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/glass_halfplane.svg" alt="Glass" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="glass_halfplane">Glass</p>
<span id="glass_halfplane_desc">
Simulate the refraction and reflection of light on a surface.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/glass.svg" alt="Glass (Other shapes)" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="glass">Glass (Other shapes)</p>
<span id="glass_desc">
Glass with any shapes constructed from line segments and circular arcs, or shapes defined by a custom inequality f(x) < y < g(x).
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/ideal_lens.svg" alt="Glass (Ideal lens)" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="ideal_lens">Glass (Ideal lens)</p>
<span id="ideal_lens_desc">
An ideal lens that obeys exactly the thin lens equation (1/p + 1/q = 1/f).
The focal length (in pixels) can be set directly.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/blocker.svg" alt="Blocker" class="img-rounded" style="width:100px;height:100px;">
<div class="caption">
<p class="tool-title" id="blocker">Blocker</p>
<span id="blocker_desc">
A line-segment light blocker that absorbes the incident rays.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/ruler.svg" alt="Ruler" style="width:100px;height:100px;" class="img-rounded">
<div class="caption" class="img-rounded">
<p class="tool-title" id="ruler">Ruler</p>
<span id="ruler_desc">
A ruler from a point for zero and another point.
The scale is in pixels.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/protractor.svg" alt="Protractor" style="width:100px;height:100px;" class="img-rounded">
<div class="caption" class="img-rounded">
<p class="tool-title" id="protractor">Protractor</p>
<span id="protractor_desc">
A protractor defined from the center and another point for the zero direction.
The scale is in degrees.
</span>
</div>
</div>
<div class="row thumbnail right-caption">
<img src="img/power.svg" alt="Detector" style="width:100px;height:100px;" class="img-rounded">
<div class="caption" class="img-rounded">
<p class="tool-title" id="power">Detector</p>
<span id="power_desc">
A tool for measuring the rate of energy flow (P), the rate of perpendicular momentum flow (F⊥), and the rate of parallel momentum flow (F∥) through a line segment. The units are arbitrary.
</span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="col-sm-12">
<h2 id="views">Views</h2>
<div class="row thumbnail">
<div class="caption">
<p class="mode-title" id="rays">Rays</p>
<span id="rays_desc">
Show the rays. When the "Ray density" is high, they appear to be continuous.
</span>
</div>
<center>
<div style="aspect-ratio: 519/163; max-width: 510px">
<img src="img/high_density.png" alt="High density" style=";width:100%" class="img-rounded">
</div>
<div style="aspect-ratio: 519/163; max-width: 510px">
<img src="img/low_density.svg" alt="Low density" class="img-rounded" style="margin-top:5px; width:100%">
</div>
</center>
</div>
<div class="row thumbnail">
<div class="caption">
<p class="mode-title" id="extended_rays">Extended Rays</p>
<span id="extended_rays_desc">
Show both the rays and their extension.
Orange indicates backward extensions, and gray indicates forward ones.
</span>
</div>
<center>
<div style="aspect-ratio: 445/216; max-width: 510px">
<img src="img/extended_rays.svg" alt="Extended rays" class="img-rounded" style="width:100%">
</div>
</center>
</div>
<div class="row thumbnail">
<div class="caption">
<p class="mode-title" id="all_images">All Images</p>
<span id="all_images_desc">
Show the position of all images.
Yellow points indicate real images, orange indicates virtual images,
and gray (none in this picture) indicates virtual objects.
Note that some images cannot be detected if "Ray density" is not high enough.
</span>
</div>
<center>
<div style="aspect-ratio: 445/216; max-width: 510px">
<img src="img/all_images.svg" alt="All images" class="img-rounded" style="width:100%">
</div>
</center>
</div>
<div class="row thumbnail">
<div class="caption">
<p class="mode-title" id="seen_by_observer">Seen by observer</p>
<span id="seen_by_observer_desc">
Simulate the rays and images seen from some position.
The blue circle is the observer.
Any rays crossing it are considered to be "observed".
The observer does not know where the rays actually begin,
but may think they begin at some point(s) if they intersect there.
The rays are shown in blue, and the point(s) in yellow (real) or orange (virtual).
</span>
</div>
<center>
<div style="aspect-ratio: 445/216; max-width: 510px">
<img src="img/seen_by_observer.svg" alt="Seen by obeserver" class="img-rounded" style="width:100%">
</div>
</center>
</div>
<div class="row thumbnail">
<div class="caption">
<p class="mode-title" id="simulate_colors">Simulate Colors</p>
<span id="simulate_colors_desc">
Simulate colors (wavelengths) of light sources, mixture of colors, color filtering, and chromatic dispersion of glasses.
</span>
</div>
<center>
<div style="aspect-ratio: 445/216; max-width: 510px">
<img src="img/simulate_colors.png" alt="Simulate Colors" class="img-rounded" style="width:100%">
</div>
</center>
</div>
</div>
</div>
</div>
<div style="float: right;">
<div class="dropup">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
<span id="language">Language: English</span>
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="https://phydemo.app/ray-optics/">English</a></li>
<li><a href="https://phydemo.app/ray-optics/de/">Deutsch</a></li>
<li><a href="https://phydemo.app/ray-optics/es/">Español</a></li>
<li><a href="https://phydemo.app/ray-optics/fr/">Français</a></li>
<li><a href="https://phydemo.app/ray-optics/jp/">日本語</a></li>
<li><a href="https://phydemo.app/ray-optics/ko/">한국어</a></li>
<li><a href="https://phydemo.app/ray-optics/nl/">Nederlands</a></li>
<li><a href="https://phydemo.app/ray-optics/pl/">polski</a></li>
<li><a href="https://phydemo.app/ray-optics/ru/">Русский</a></li>
<li><a href="https://phydemo.app/ray-optics/si/">සිංහල</a></li>
<li><a href="https://phydemo.app/ray-optics/cn/">简体中文</a></li>
<li><a href="https://phydemo.app/ray-optics/tw/">正體中文</a></li>
</ul>
</div>
</div>
</div>
<script src="thirdparty/jquery.min.js"></script>
<script src="thirdparty/bootstrap-3.3.7/bootstrap.min.js"></script>
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>