Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
空の色を計算してみた/calculate-sky-color
Search
kohei.okamoto
August 13, 2021
Science
0
68
空の色を計算してみた/calculate-sky-color
kohei.okamoto
August 13, 2021
Tweet
Share
More Decks by kohei.okamoto
See All by kohei.okamoto
四則演算を理解する/four-arithmetic-operations
koheiokamoto
0
260
ハムスターの回し車の騒音問題に挑んだ話/hamster-LT
koheiokamoto
0
65
俺のオブジェクト指向/20200626LT
koheiokamoto
1
730
経験者がいない状態で、戦略的DDDを現場でやってみた話/ OOC2020
koheiokamoto
7
3.6k
Other Decks in Science
See All in Science
はじめての「相関と因果とエビデンス」入門:“動機づけられた推論” に抗うために
takehikoihayashi
17
7k
ほたるのひかり/RayTracingCamp10
kugimasa
0
410
生成AI による論文執筆サポートの手引き(ワークショップ) / A guide to supporting dissertation writing with generative AI (workshop)
ks91
PRO
0
320
理論計算機科学における 数学の応用: 擬似ランダムネス
nobushimi
1
370
Factorized Diffusion: Perceptual Illusions by Noise Decomposition
tomoaki0705
0
270
LIMEを用いた判断根拠の可視化
kentaitakura
0
370
Transformers are Universal in Context Learners
gpeyre
0
620
インフラだけではない MLOps の話 @事例でわかるMLOps 機械学習の成果をスケールさせる処方箋 発売記念
icoxfog417
PRO
2
620
非同期コミュニケーションの構造 -チャットツールを用いた組織における情報の流れの設計について-
koisono
0
170
20240420 Global Azure 2024 | Azure Migrate でデータセンターのサーバーを評価&移行してみる
olivia_0707
2
930
WCS-LA-2024
lcolladotor
0
140
FOGBoston2024
lcolladotor
0
120
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Navigating Team Friction
lara
183
15k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Designing for humans not robots
tammielis
250
25k
How to Ace a Technical Interview
jacobian
276
23k
Mobile First: as difficult as doing things right
swwweet
222
9k
The Cult of Friendly URLs
andyhume
78
6.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Building Your Own Lightsaber
phodgson
103
6.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Building Adaptive Systems
keathley
38
2.3k
Transcript
ՆٳΈͷࣗ༝ݚڀ ۭͷ৭ΛܭࢉͰٻΊͯΈΔ 2021/08/13 Ԭຊᕣฏ
ࣗݾհɿԬຊ ᕣฏ • ࠇഎܠͷεϥΠυॳઓͰυΩυΩͯ͠·͢ • େֶԽֶͬͯ·ͨ͠ • લ৬ۚ༥ܥͷγεςϜ࡞ͬͯ·ͨ͠ • ࠓOESͷWebνʔϜͰ։ൃ͍ͯ͠·͢
• goͬͨ͜ͱͳ͍ίϯϓϨοΫεͩͬͨͷͰɺࠓճ͡ΊͯgoΛ ৮ͬͯΈ·ͨ͠ (ͱ͍͍ͭͭɺ͓తʹશવίʔυॻ͍ͯ·ͤΜw)
None
;ͱؾʹͳͬͨ ۭͷ৭ͬͯԿ৭ͩΖ͏ɾɾɾʁ
ͦͦɺۭͬͯͳΜͰݟ͑Δͷʁ • ۭؾத͍͍ͩͨૉͱࢎૉ͔ΒͰ͖͍ͯ·͢ɻ • ૉͱࢎૉ͕ଠཅͷޫΛࢄཚ͠·͢ɻ • ͦͷࢄཚͷΈΛϨΠϦʔࢄཚͱ͍͍·͢ɻ
ͦͦɺۭͬͯͳΜͰݟ͑Δͷʁ • ۭؾத͍͍ͩͨૉͱࢎૉ͔ΒͰ͖͍ͯ·͢ɻ • ૉͱࢎૉ͕ଠཅͷޫΛࢄཚ͠·͢ɻ • ͦͷࢄཚͷΈΛϨΠϦʔࢄཚͱ͍͍·͢ɻ • ͳͷͰɺۭؾ͕ͳ͍ͱۭࠇ͍Ͱ͢ɻ
ࢄཚʹ͍Ζ͍Ζ (ͪΐͬͱઢ) • ϨΠϦʔࢄཚ • ޫͷΑΓࡉཻ͔͍ࢠʹର͢Δࢄཚ • ࠓճͬͪ͜ • ϛʔࢄཚ
• ޫͷΑΓେཻ͖͍ࢠʹର͢Δࢄཚ • લํͷࢄཚͷґଘੑ͕গͳ͍ɻͷͰɺશ෦ͷޫ͕ࢄཚ͞ΕͯӢ ന͘Έ͑·͢ɻ
ࠓճͷΞϓϩʔν 1. ଠཅޫͷR / G / BͷޫͷॏͶ߹Θͤͱͯۙ͠ࣅ͢Δɻ 2. R /
G / BͦΕͧΕࢄཚ͞ΕΔޫͷ૬ରΛܭࢉ͢Δ 3. RGBʹ্هͰٻΊͨ૬ରΛೖྗ͢Δ 4. ্هͱ୯ͷޫΛݟൺ͍͍ͯͩͨͷΛٻΊͯΈΔ
ࠓճͷΞϓϩʔν 1. ଠཅޫͷR / G / BͷޫͷॏͶ߹Θͤͱͯۙ͠ࣅ͢Δɻ 2. R /
G / BͦΕͧΕࢄཚ͞ΕΔޫͷ૬ରΛܭࢉ͢Δ 3. RGBʹ্هͰٻΊͨ૬ରΛೖྗ͢Δ 4. ্هͱ୯ͷޫΛݟൺ͍͍ͯͩͨͷΛٻΊͯΈΔ
RGB͍͍ͩͨ 6 : 7 : 8͘Β͍ɾɾɾʁ ग़యɿhttps://www.fondriest.com/environmental-measurements/
ࠓճͷΞϓϩʔν 1. ଠཅޫͷR / G / BͷޫͷॏͶ߹Θͤͱͯۙ͠ࣅ͢Δɻ 2. R /
G / BͦΕͧΕࢄཚ͞ΕΔޫͷ૬ରΛܭࢉ͢Δ 3. RGBʹ্هͰٻΊͨ૬ରΛೖྗ͢Δ 4. ্هͱ୯ͷޫΛݟൺ͍͍ͯͩͨͷΛٻΊͯΈΔ
I = kN(n − 1)2 λ4 ϨΠϦʔࢄཚʹΑΔࢄཚڧ k : ൺྫఆɺN
: ࢠɺn : ۶ંɺЕ:
ࠓճ૬ର͕΄͍͠ͷͰɺదʹఆΛ͔͚ͨ type Light struct { Wavelength in t Intensity in
t } func scatteredLight(light Light) Light { return Light{light.Wavelength, light.Intensity << 40 / (light.Wavelength * light.Wavelength * light.Wavelength * light.Wavelength) } }
͜Μͳײ͡Ͱग़ྗͯ͠RGBΛऔಘ red := Light{700, 6 } green := Light{546, 7
} blue := Light{436, 8 } fmt.Println("sky color!!" ) fmt.Println("red: ", scatteredLight(red) ) fmt.Println("green: ", scatteredLight(green) ) fmt.Println("blue: ", scatteredLight(blue))
͜Μͳײ͡Ͱग़ྗͯ͠RGBΛऔಘ red := Light{700, 6 } green := Light{546, 7
} blue := Light{436, 8 } fmt.Println("sky color!!" ) fmt.Println("red: ", scatteredLight(red) ) fmt.Println("green: ", scatteredLight(green) ) fmt.Println("blue: ", scatteredLight(blue))
ࠓճͷΞϓϩʔν 1. ଠཅޫͷR / G / BͷޫͷॏͶ߹Θͤͱͯۙ͠ࣅ͢Δɻ 2. R /
G / BͦΕͧΕࢄཚ͞ΕΔޫͷ૬ରΛܭࢉ͢Δ 3. RGBʹ্هͰٻΊͨ૬ରΛೖྗ͢Δ 4. ্هͱ୯ͷޫΛݟൺ͍͍ͯͩͨͷΛٻΊͯΈΔ
#1B56F3
ࠓճͷΞϓϩʔν 1. ଠཅޫͷR / G / BͷޫͷॏͶ߹Θͤͱͯۙ͠ࣅ͢Δɻ 2. R /
G / BͦΕͧΕࢄཚ͞ΕΔޫͷ૬ରΛܭࢉ͢Δ 3. RGBʹ্هͰٻΊͨ૬ରΛೖྗ͢Δ 4. ্هͱ୯ͷޫΛݟൺ͍͍ͯͩͨͷΛٻΊͯΈΔ
430nm #3D00FF #1B56F3 440nm #0000FF 450nm #0046FF 460nm #007BFF
430nm #3D00FF 440nm #0000FF 450nm #0046FF 460nm #007BFF ͍͍ͩͨ͜Ε͘Β͍ #1B56F3
450nm #0046FF ͍͍ͩͨ͜Ε͘Β͍ #1B56F3
ۭ৭ #89BDDE 450nm #0046FF ͍͍ͩͨ͜Ε͘Β͍ #1B56F3
·ͱΊ • ݁ߏࡶʹܭࢉͯͦ͠ΕͬΆ͍ײ͡ͷ৭ಋग़Ͱ͖ͯײಈɻ • #1B56F3ɺ͍͍ͩͨ450nm • ্ۭͷۭͷ৭݁ߏͦΕͬΆ͍৭ʹͳͬͯΔͷͰɻ • ͪͳΈʹνϦͳͲ͕ଟ͍բΜͰനͬΆ͘ͳΓ·͢ɻ •
͍ͭͰʹ(?) goͷνϡʔτϦΞϧ͜ΕΛػʹͰ͖ͯΑ͔ͬͨɻ #1B56F3