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
61
空の色を計算してみた/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
250
ハムスターの回し車の騒音問題に挑んだ話/hamster-LT
koheiokamoto
0
63
俺のオブジェクト指向/20200626LT
koheiokamoto
1
710
経験者がいない状態で、戦略的DDDを現場でやってみた話/ OOC2020
koheiokamoto
7
3.6k
Other Decks in Science
See All in Science
はじめての「相関と因果とエビデンス」入門:“動機づけられた推論” に抗うために
takehikoihayashi
17
6.8k
Iniciativas independentes de divulgação científica: o caso do Movimento #CiteMulheresNegras
taisso
0
230
論文紹介: PEFA: Parameter-Free Adapters for Large-scale Embedding-based Retrieval Models (WSDM 2024)
ynakano
0
150
ベイズのはなし
techmathproject
0
290
深層学習を利用して 大豆の外部欠陥を判別した研究事例の紹介
kentaitakura
0
230
拡散モデルの原理紹介
brainpadpr
3
4.8k
Coqで選択公理を形式化してみた
soukouki
0
200
Mechanistic Interpretability の紹介
sohtakahashi
0
350
小杉考司(専修大学)
kosugitti
2
560
20240420 Global Azure 2024 | Azure Migrate でデータセンターのサーバーを評価&移行してみる
olivia_0707
2
890
私たちのプロダクトにとってのよいテスト/good test for our products
camel_404
0
180
Introduction to Graph Neural Networks
joisino
PRO
4
2.1k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
31
6.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
What's in a price? How to price your products and services
michaelherold
243
12k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Building Your Own Lightsaber
phodgson
103
6.1k
Designing for humans not robots
tammielis
250
25k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
The Cult of Friendly URLs
andyhume
78
6k
Ruby is Unlike a Banana
tanoku
97
11k
Facilitating Awesome Meetings
lara
50
6.1k
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