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
Machine Learning for Materials (Lecture 4)
aronwalsh
0
790
機械学習による確率推定とカリブレーション/probabilistic-calibration-on-classification-model
ktgrstsh
2
210
The Incredible Machine: Developer Productivity and the Impact of AI
tomzimmermann
0
380
山形とさくらんぼに関するレクチャー(YG-900)
07jp27
1
210
As We May Interact: Challenges and Opportunities for Next-Generation Human-Information Interaction
signer
PRO
0
130
Презентация программы магистратуры СПбГУ "Искусственный интеллект и наука о данных"
dscs
0
370
化学におけるAI・シミュレーション活用のトレンドと 汎用原子レベルシミュレーター: Matlantisを使った素材開発
matlantis
0
210
解説!データ基盤の進化を後押しする手順とタイミング
shomaekawa
1
330
ベイズのはなし
techmathproject
0
270
私たちのプロダクトにとってのよいテスト/good test for our products
camel_404
0
150
Sociovirology
uni_of_nomi
0
100
ABEMAの効果検証事例〜効果の異質性を考える〜
s1ok69oo
4
2k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
31
6.3k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
150
Being A Developer After 40
akosma
86
590k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
The Cost Of JavaScript in 2023
addyosmani
45
6.6k
Code Review Best Practice
trishagee
64
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Building Your Own Lightsaber
phodgson
102
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