Skip to content

Commit

Permalink
Add "Solar Eclipses"
Browse files Browse the repository at this point in the history
  • Loading branch information
ricktu288 committed Aug 2, 2024
1 parent 7629a10 commit ec8d3a8
Show file tree
Hide file tree
Showing 20 changed files with 1,083 additions and 4 deletions.
8 changes: 8 additions & 0 deletions cn/gallery/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@
],
"title": "反射式单色仪",
"description": "<p>这是一个反射式单色仪的模拟,其透过反射式衍射光栅与聚焦处的出射口,从多波长混合的光之中取得窄频宽的光。</p>"
},
{
"id": "solar-eclipses",
"contributors": [
"Yi-Ting Tu"
],
"title": "日食",
"description": "<p>本模拟演示了不同类型的日食。右上方的图中,月球的影子遮蔽了太阳,在中心产生了日全食,周围地区则是日偏食。右下方的图为日环食,其中由于月球距离地球较远,无法完全遮蔽太阳,在中心留下一个明亮的环(本二维模拟器中,这个“环”为阳光只来自太阳的最上方与最下方的部分),而周围地区也是日偏食。</p>"
}
]
}
Expand Down
9 changes: 8 additions & 1 deletion cn/gallery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,13 @@ <h2>其他</h2>
<p class="example-contributor">James Garrard</p>
</div>
</a>
<a href="solar-eclipses" class="thumbnail example-container">
<img src="solar-eclipses-thumbnail.png" alt="Thumbnail" class="img-rounded example-image" loading="lazy">
<div class="caption">
<p class="example-title">日食</p>
<p class="example-contributor">Yi-Ting Tu</p>
</div>
</a>

<br>

Expand All @@ -605,7 +612,7 @@ <h2>其他</h2>
<span id="language">语言:简体中文</span>
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="https://phydemo.app/ray-optics/gallery/">English</a></li><li><a href="https://phydemo.app/ray-optics/pl/gallery/">polski <span style="color:gray">(90% 已翻译)</span></a></li><li><a href="https://phydemo.app/ray-optics/cn/gallery/">简体中文 <span style="color:gray">(100% 已翻译)</span></a></li><li><a href="https://phydemo.app/ray-optics/tw/gallery/">正體中文 <span style="color:gray">(100% 已翻译)</span></a></li>
<li><a href="https://phydemo.app/ray-optics/gallery/">English</a></li><li><a href="https://phydemo.app/ray-optics/pl/gallery/">polski <span style="color:gray">(88% 已翻译)</span></a></li><li><a href="https://phydemo.app/ray-optics/cn/gallery/">简体中文 <span style="color:gray">(100% 已翻译)</span></a></li><li><a href="https://phydemo.app/ray-optics/tw/gallery/">正體中文 <span style="color:gray">(100% 已翻译)</span></a></li>
</ul>
</div>
</div>
Expand Down
Binary file added cn/gallery/solar-eclipses-thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions cn/gallery/solar-eclipses.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
 <!DOCTYPE html>
<html lang="zh-CN">
<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>日食 - 射线光学模拟</title>
<meta property="og:title" content="日食 - 射线光学模拟">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phydemo.app/ray-optics/cn/gallery/solar-eclipses">
<meta property="og:image" content="https://phydemo.app/ray-optics/cn/gallery/solar-eclipses-thumbnail.png">
<meta property="og:description" content="自由、开源的网页程序,用于建立及模拟二维几何光学场景。">
<meta property="og:locale" content="zh-CN">
<link rel="canonical" href="https://phydemo.app/ray-optics/cn/gallery/solar-eclipses">
<link rel="alternate" href="https://phydemo.app/ray-optics/gallery/solar-eclipses" hreflang="en">
<link rel="alternate" href="https://phydemo.app/ray-optics/cn/gallery/solar-eclipses" hreflang="zh-CN">
<link rel="alternate" href="https://phydemo.app/ray-optics/tw/gallery/solar-eclipses" hreflang="zh-TW">

<link rel="stylesheet" href="../../thirdparty/bootstrap-3.3.7/bootstrap.min.css">
<link rel="stylesheet" href="gallery.css">
<link rel="icon" href="../../icon128.png" type="image/png">
</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/cn/" class="navbar-left brand">
<img src="../../icon128.png" alt="" style="width:18pt; height:18pt">
射线光学模拟
</a>
<div class="navbar-right">

<span class="navul">
<a href="https://phydemo.app/ray-optics/cn/">首页</a>
<a href="https://phydemo.app/ray-optics/cn/gallery/" class="active">作品集</a>
<a href="https://phydemo.app/ray-optics/cn/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>日食</span></b></h1>
<p>
贡献者:Yi-Ting Tu
</p>
<div class="description">
<p>本模拟演示了不同类型的日食。右上方的图中,月球的影子遮蔽了太阳,在中心产生了日全食,周围地区则是日偏食。右下方的图为日环食,其中由于月球距离地球较远,无法完全遮蔽太阳,在中心留下一个明亮的环(本二维模拟器中,这个“环”为阳光只来自太阳的最上方与最下方的部分),而周围地区也是日偏食。</p>
</div>
<p>
<a href="https://phydemo.app/ray-optics/simulator/?zh-CN#../cn/gallery/solar-eclipses" target="_blank" class="btn btn-success btn-lg">在模拟器中打开</a>
</p>
<img src="solar-eclipses.png" alt="日食" style="width:100%">
</center>

<div style="float: right; padding-top: 10px;">
<div class="dropup">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
<span id="language">语言:简体中文</span>
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="https://phydemo.app/ray-optics/gallery/solar-eclipses">English</a></li><li><a href="https://phydemo.app/ray-optics/cn/gallery/solar-eclipses">简体中文</a></li><li><a href="https://phydemo.app/ray-optics/tw/gallery/solar-eclipses">正體中文</a></li>
</ul>
</div>
</div>
</div>
</div>
<script src="../../thirdparty/jquery.min.js"></script>
<script src="../../thirdparty/bootstrap-3.3.7/bootstrap.min.js"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</body>
</html>
266 changes: 266 additions & 0 deletions cn/gallery/solar-eclipses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
{
"version": 5,
"name": "日食",
"modules": {
"CircleSource": {
"numPoints": 1,
"params": [
"r=0:1:500:100",
"N=1:1:4999:10",
"brightness=0.01:0.01:10:1"
],
"objs": [
{
"for": "theta=0:2pi/N:2pi-0.0001",
"type": "AngleSource",
"p1": {
"x": "`x_1+r*cos(theta)`",
"y": "`y_1+r*sin(theta)`"
},
"p2": {
"x": "`x_1+(r+1)*cos(theta)`",
"y": "`y_1+(r+1)*sin(theta)`"
},
"brightness": "`brightness/N`",
"emisAngle": 180
}
],
"maxLoopLength": 5000
}
},
"objs": [
{
"type": "ModuleObj",
"module": "CircleSource",
"points": [
{
"x": 383,
"y": 405
}
],
"params": {
"r": 236,
"N": 1000,
"brightness": 10
}
},
{
"type": "CircleBlocker",
"p1": {
"x": 1095,
"y": 234
},
"p2": {
"x": 1110,
"y": 251
}
},
{
"type": "CircleBlocker",
"p1": {
"x": 1291,
"y": 190
},
"p2": {
"x": 1406,
"y": 248
}
},
{
"type": "TextLabel",
"x": 1376.6666666666667,
"y": 415.6666666666667,
"text": "(非按比例)",
"alignment": "right"
},
{
"type": "TextLabel",
"x": 385,
"y": 439,
"text": "太阳",
"alignment": "center"
},
{
"type": "TextLabel",
"x": 1043,
"y": 631,
"text": "月亮",
"alignment": "center"
},
{
"type": "TextLabel",
"x": 1226,
"y": 591,
"text": "日偏食",
"fontSize": 16
},
{
"type": "LineArrow",
"p1": {
"x": 1221,
"y": 236
},
"p2": {
"x": 1170,
"y": 216
},
"arrow": true
},
{
"type": "LineArrow",
"p1": {
"x": 1214,
"y": 152
},
"p2": {
"x": 1165,
"y": 193
},
"arrow": true
},
{
"type": "LineArrow",
"p1": {
"x": 1226,
"y": 163
},
"p2": {
"x": 1180,
"y": 242
},
"arrow": true
},
{
"type": "TextLabel",
"x": 1196,
"y": 704,
"text": "日环食",
"fontSize": 16
},
{
"type": "TextLabel",
"x": 1283,
"y": 666,
"text": "地球",
"alignment": "center"
},
{
"type": "CircleBlocker",
"p1": {
"x": 1280,
"y": 639
},
"p2": {
"x": 1395,
"y": 697
}
},
{
"type": "TextLabel",
"x": 1294,
"y": 215,
"text": "地球",
"alignment": "center"
},
{
"type": "CircleBlocker",
"p1": {
"x": 1044,
"y": 581
},
"p2": {
"x": 1059,
"y": 598
}
},
{
"type": "TextLabel",
"x": 1092,
"y": 280,
"text": "月亮",
"alignment": "center"
},
{
"type": "LineArrow",
"p1": {
"x": 1221,
"y": 587
},
"p2": {
"x": 1161,
"y": 653
},
"arrow": true
},
{
"type": "LineArrow",
"p1": {
"x": 1217,
"y": 577
},
"p2": {
"x": 1175,
"y": 578
},
"arrow": true
},
{
"type": "TextLabel",
"x": 1221,
"y": 154,
"text": "日偏食",
"fontSize": 16
},
{
"type": "LineArrow",
"p1": {
"x": 1198,
"y": 676
},
"p2": {
"x": 1159,
"y": 616
},
"arrow": true
},
{
"type": "TextLabel",
"x": 1226,
"y": 253,
"text": "日全食",
"fontSize": 16
},
{
"type": "CropBox",
"p1": {
"x": 95.99999999999994,
"y": 17.190476190476197
},
"p4": {
"x": 1456,
"y": 815.5238095238095
},
"width": 1140
},
{
"type": "CropBox",
"p1": {
"x": 1027.6666666666667,
"y": -11.142857142857139
},
"p4": {
"x": 1427.6666666666667,
"y": 388.8571428571429
},
"width": 500
}
],
"width": 1200,
"height": 700,
"rayModeDensity": 0.4263477291781528,
"origin": {
"x": 218.1428571428571,
"y": 135.54761904761904
},
"scale": 0.5
}
Binary file added cn/gallery/solar-eclipses.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions gallery/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,14 @@
],
"title": "Reflecting Monochromator",
"description": "<p>This is a simulation of a reflecting monochromator, which uses a reflective diffraction grating and a slit at the focus to get narrow band wavelengths from composite light.</p>"
},
{
"id": "solar-eclipses",
"contributors": [
"Yi-Ting Tu"
],
"title": "Solar Eclipses",
"description": "<p>This simulation demonstrates the different types of solar eclipses. The top-right diagram depicts a solar eclipse where the Moon's shadow covers the Sun, resulting in a total eclipse at the center and a partial eclipse in surrounding areas. The bottom-right diagram illustrates an annular eclipse where the Moon is too far from Earth to completely cover the Sun, leaving a bright ring at the center (in this 2D simulator, the \"ring\" is demonstrated by sunlight coming only from the upper and the lower part of the sun) and also a partial eclipse in surrounding areas.</p>"
}
]
}
Expand Down
Loading

0 comments on commit ec8d3a8

Please sign in to comment.