Skip to content

Commit

Permalink
Add 'Specular and Diffuse Reflections' by Steve Stonebraker
Browse files Browse the repository at this point in the history
  • Loading branch information
ricktu288 committed Jun 3, 2023
1 parent fde0737 commit 28afef4
Show file tree
Hide file tree
Showing 21 changed files with 587 additions and 5 deletions.
1 change: 1 addition & 0 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ <h3><img src="icon128.png" alt="Icon" width="64" height="64"><br>
<li>Matteo Ricci Cipolloni (gallery)</li>
<li>Mikhail Kochiev (gallery)</li>
<li>Fundacja Nauka i Wiedza (pl translations)</li>
<li>Steve Stonebraker (gallery)</li>
</ul>
(GitHub contributors first; others sorted chronologically.)

Expand Down
10 changes: 9 additions & 1 deletion cn/gallery/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@
"title": "用一条光线解迷宫",
"description": "<p>此模拟中,一条光线在迷宫内部产生,并被墙壁多次反射。迷宫内的大红色和小红色正方形(如下面的截图所示)分别代表光线的起源和初始方向。取决于光线初始方向,光线可能最终会离开迷宫,因此原则上可以通过追踪光线的路径计算出迷宫的解法。 </p>"
},
{
"id": "specular-and-diffuse-reflection",
"contributors": [
"Steve Stonebraker"
],
"title": "镜面反射与漫反射",
"description": "<p>同一束光线照射在光滑表面和粗糙表面上,展示了镜面反射与漫反射之间的区别。</p>"
},
{
"id": "chaff-countermeasure",
"contributors": [
Expand Down Expand Up @@ -435,4 +443,4 @@
}
]
}
]
]
9 changes: 8 additions & 1 deletion cn/gallery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ <h2>光的反射</h2>
<p class="example-contributor">Stas Fainer, Yi-Ting Tu</p>
</div>
</a>
<a href="specular-and-diffuse-reflection" class="thumbnail example-container">
<img src="specular-and-diffuse-reflection-thumbnail.png" alt="Thumbnail" class="img-rounded example-image" loading="lazy">
<div class="caption">
<p class="example-title">镜面反射与漫反射</p>
<p class="example-contributor">Steve Stonebraker</p>
</div>
</a>
<a href="chaff-countermeasure" class="thumbnail example-container">
<img src="chaff-countermeasure-thumbnail.png" alt="Thumbnail" class="img-rounded example-image" loading="lazy">
<div class="caption">
Expand Down Expand Up @@ -544,7 +551,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">(100% 已翻译)</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">(98% 已翻译)</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
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/specular-and-diffuse-reflection.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/tw/gallery/specular-and-diffuse-reflection">
<meta property="og:image" content="https://phydemo.app/ray-optics/tw/gallery/specular-and-diffuse-reflection-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/specular-and-diffuse-reflection">
<link rel="alternate" href="https://phydemo.app/ray-optics/gallery/specular-and-diffuse-reflection" hreflang="en">
<link rel="alternate" href="https://phydemo.app/ray-optics/cn/gallery/specular-and-diffuse-reflection" hreflang="zh-CN">
<link rel="alternate" href="https://phydemo.app/ray-optics/tw/gallery/specular-and-diffuse-reflection" hreflang="zh-TW">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/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">
<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/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>
贡献者:Steve Stonebraker
</p>
<div class="description">
<p>同一束光线照射在光滑表面和粗糙表面上,展示了镜面反射与漫反射之间的区别。</p>
</div>
<p>
<a href="https://phydemo.app/ray-optics/simulator/?zh-CN#../tw/gallery/specular-and-diffuse-reflection" target="_blank" class="btn btn-success btn-lg">在模拟器中打开</a>
</p>
<img src="specular-and-diffuse-reflection.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/specular-and-diffuse-reflection">English</a></li><li><a href="https://phydemo.app/ray-optics/cn/gallery/specular-and-diffuse-reflection">简体中文</a></li><li><a href="https://phydemo.app/ray-optics/tw/gallery/specular-and-diffuse-reflection">正體中文</a></li>
</ul>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="https://polyfill.io/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>
100 changes: 100 additions & 0 deletions cn/gallery/specular-and-diffuse-reflection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"version": 2,
"objs": [
{
"type": "parallel",
"p1": {
"type": 1,
"x": 353,
"y": 376,
"exist": true
},
"p2": {
"type": 1,
"x": 291,
"y": 415,
"exist": true
},
"p": 0.5
},
{
"type": "curvedmirror",
"p1": {
"type": 1,
"x": 600,
"y": 540,
"exist": true
},
"p2": {
"type": 1,
"x": 860,
"y": 540,
"exist": true
},
"p": "0.002\\cdot\\left(\\sin\\left(100x\\right)+\\sin\\left(70x\\right)-\\sin\\left(200x\\right)-\\sin\\left(631x\\right)+\\sin\\left(1391x\\right)-0.7\\cdot\\sin\\left(10000x\\right)\\right)"
},
{
"type": "mirror",
"p1": {
"type": 1,
"x": 280,
"y": 540,
"exist": true
},
"p2": {
"type": 1,
"x": 560,
"y": 540,
"exist": true
}
},
{
"type": "parallel",
"p1": {
"type": 1,
"x": 670,
"y": 363,
"exist": true
},
"p2": {
"type": 1,
"x": 608,
"y": 402,
"exist": true
},
"p": 0.5
},
{
"type": "text",
"x": 369.4823529411765,
"y": 574.3411764705884,
"p": "镜面反射"
},
{
"type": "text",
"x": 693.4823529411765,
"y": 576.3411764705884,
"p": "漫反射"
}
],
"mode": "light",
"rayDensity_light": 0.28311559552082877,
"rayDensity_images": 1.0124771987582037,
"observer": {
"type": 5,
"c": {
"type": 1,
"x": 886.4823529411765,
"y": 363.8411764705884,
"exist": true
},
"r": 20,
"exist": true
},
"origin": {
"x": -181.3529411764706,
"y": -188.4264705882355
},
"scale": 1.25,
"colorMode": false
}
Binary file added cn/gallery/specular-and-diffuse-reflection.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 @@ -86,6 +86,14 @@
"title": "Maze solution",
"description": "<p>This is a simulation of a light ray originating inside a maze and reflected repeatedly by the walls. The larger and smaller red squares inside the maze (seen in the screenshot below) represent the origin and the initial direction of the light ray, respectively. For some initial orientations of the light ray, it exits the maze, and thus by retracing the path of the ray a solution to the maze can in principle be calculated.</p>"
},
{
"id": "specular-and-diffuse-reflection",
"contributors": [
"Steve Stonebraker"
],
"title": "Specular and Diffuse Reflections",
"description": "<p>Identical beams shine on a smooth surface and a rough surface, illustrating the difference between specular and diffuse reflections.</p>"
},
{
"id": "chaff-countermeasure",
"contributors": [
Expand Down
9 changes: 8 additions & 1 deletion gallery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ <h2>Reflection</h2>
<p class="example-contributor">Stas Fainer, Yi-Ting Tu</p>
</div>
</a>
<a href="specular-and-diffuse-reflection" class="thumbnail example-container">
<img src="specular-and-diffuse-reflection-thumbnail.png" alt="Thumbnail" class="img-rounded example-image" loading="lazy">
<div class="caption">
<p class="example-title">Specular and Diffuse Reflections</p>
<p class="example-contributor">Steve Stonebraker</p>
</div>
</a>
<a href="chaff-countermeasure" class="thumbnail example-container">
<img src="chaff-countermeasure-thumbnail.png" alt="Thumbnail" class="img-rounded example-image" loading="lazy">
<div class="caption">
Expand Down Expand Up @@ -545,7 +552,7 @@ <h2>Miscellaneous</h2>
<span id="language">Language: English</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">(100% translated)</span></a></li><li><a href="https://phydemo.app/ray-optics/cn/gallery/">简体中文 <span style="color:gray">(100% translated)</span></a></li><li><a href="https://phydemo.app/ray-optics/tw/gallery/">正體中文 <span style="color:gray">(100% translated)</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">(98% translated)</span></a></li><li><a href="https://phydemo.app/ray-optics/cn/gallery/">简体中文 <span style="color:gray">(100% translated)</span></a></li><li><a href="https://phydemo.app/ray-optics/tw/gallery/">正體中文 <span style="color:gray">(100% translated)</span></a></li>
</ul>
</div>
</div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions gallery/specular-and-diffuse-reflection.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
 <!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>Specular and Diffuse Reflections - Ray Optics Simulation</title>
<meta property="og:title" content="Specular and Diffuse Reflections - Ray Optics Simulation">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phydemo.app/ray-optics/gallery/specular-and-diffuse-reflection">
<meta property="og:image" content="https://phydemo.app/ray-optics/gallery/specular-and-diffuse-reflection-thumbnail.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/gallery/specular-and-diffuse-reflection">
<link rel="alternate" href="https://phydemo.app/ray-optics/gallery/specular-and-diffuse-reflection" hreflang="en">
<link rel="alternate" href="https://phydemo.app/ray-optics/cn/gallery/specular-and-diffuse-reflection" hreflang="zh-CN">
<link rel="alternate" href="https://phydemo.app/ray-optics/tw/gallery/specular-and-diffuse-reflection" hreflang="zh-TW">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/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">
<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/">Home</a>
<a href="https://phydemo.app/ray-optics/gallery/" class="active">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>Specular and Diffuse Reflections</span></b></h1>
<p>
Contributor: Steve Stonebraker
</p>
<div class="description">
<p>Identical beams shine on a smooth surface and a rough surface, illustrating the difference between specular and diffuse reflections.</p>
</div>
<p>
<a href="https://phydemo.app/ray-optics/simulator/#specular-and-diffuse-reflection" target="_blank" class="btn btn-success btn-lg">Open in Simulator</a>
</p>
<img src="specular-and-diffuse-reflection.png" alt="Specular and Diffuse Reflections" 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">Language: English</span>
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="https://phydemo.app/ray-optics/gallery/specular-and-diffuse-reflection">English</a></li><li><a href="https://phydemo.app/ray-optics/cn/gallery/specular-and-diffuse-reflection">简体中文</a></li><li><a href="https://phydemo.app/ray-optics/tw/gallery/specular-and-diffuse-reflection">正體中文</a></li>
</ul>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="https://polyfill.io/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>
Loading

0 comments on commit 28afef4

Please sign in to comment.