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
720
経験者がいない状態で、戦略的DDDを現場でやってみた話/ OOC2020
koheiokamoto
7
3.6k
Other Decks in Science
See All in Science
Science of Scienceおよび科学計量学に関する研究論文の俯瞰可視化_ポスター版
hayataka88
0
130
統計的因果探索の方法
sshimizu2006
1
1.2k
Iniciativas independentes de divulgação científica: o caso do Movimento #CiteMulheresNegras
taisso
0
240
第61回コンピュータビジョン勉強会「BioCLIP: A Vision Foundation Model for the Tree of Life」
x_ttyszk
1
1.5k
How were Quaternion discovered
kinakomoti321
2
1.1k
General Parasitology
uni_of_nomi
0
120
創薬における機械学習技術について
kanojikajino
13
4.4k
機械学習による確率推定とカリブレーション/probabilistic-calibration-on-classification-model
ktgrstsh
2
240
Analysis-Ready Cloud-Optimized Data for your community and the entire world with Pangeo-Forge
jbusecke
0
110
(論文読み)贈り物の交換による地位の競争と社会構造の変化 - 文化人類学への統計物理学的アプローチ -
__ymgc__
1
110
The thin line between reconstruction, classification, and hallucination in brain decoding
ykamit
1
950
【人工衛星開発】能見研究室紹介動画
02hattori11sat03
0
150
Featured
See All Featured
Unsuck your backbone
ammeep
668
57k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Side Projects
sachag
452
42k
The World Runs on Bad Software
bkeepers
PRO
65
11k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Become a Pro
speakerdeck
PRO
25
5k
Designing for humans not robots
tammielis
250
25k
Why Our Code Smells
bkeepers
PRO
334
57k
A designer walks into a library…
pauljervisheath
204
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Documentation Writing (for coders)
carmenintech
65
4.4k
Happy Clients
brianwarren
98
6.7k
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