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
Pythonと数学と 多面体とペーパークラフトとベルヌーイと長門屋と田宮模型と私
Search
Kimikazu Kato
October 08, 2018
1
1.7k
Pythonと数学と 多面体とペーパークラフトとベルヌーイと長門屋と田宮模型と私
2018年10月8日PyLadies Tokyo 4周年記念パーティでのLTです。
Kimikazu Kato
October 08, 2018
Tweet
Share
More Decks by Kimikazu Kato
See All by Kimikazu Kato
PyTorchの最近の動向
hamukazu
0
720
Python 3.11: What changed in math?
hamukazu
0
450
機械学習も筋肉が大事?意外と知らない数学
hamukazu
0
960
レコメンデーションシステムのキホン
hamukazu
4
890
機械学習の中身を理解する
hamukazu
28
10k
機械学習に役立つ数学
hamukazu
11
6.2k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Scaling GitHub
holman
459
140k
Done Done
chrislema
182
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
A designer walks into a library…
pauljervisheath
205
24k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Side Projects
sachag
452
42k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
4 Signs Your Business is Dying
shpigford
182
22k
Automating Front-end Workflow
addyosmani
1366
200k
A Philosophy of Restraint
colly
203
16k
Transcript
Pythonͱֶͱ ଟ໘ମͱϖʔύʔΫϥϑτ ͱϕϧψʔΠͱͱాٶܕͱࢲ Ճ౻ެҰ @hamukazu 201810݄8 PyLadiesTokyo4पه೦ύʔςΟ
ࣗݾհ Ճ౻ެҰʢ͖Έ͔ͣʣ Twitter: @hamukazu • ֶΤόϯδΣϦετ • ےτϨܯ • ϏʔϧΫζ
࠷ۙຊग़ͨ͠Αʂ ങͬͯͶ— http://bit.ly/mlessence
• ਖ਼ेೋ໘ମͷݟऔΓਤΛඳ͖ͳ͍͞ • ਖ਼ेೋ໘ମͷɺลɺ໘ͷΛͦΕͧΕ͑ͳ͍͞
ղ ུ
͔֬ΊΔํ๏ ࣮Λ࡞Δ
ଟ໘ମϖʔύʔΫϥϑτ • 2017ʹΓ࢝ΊͨʢϒϩάͰൃදʣ • ࡞ϓϩάϥϜΛΦʔϓϯιʔεͰެ։ • ࠷ॳਖ਼ଟ໘ମ • 2018PyConJP SprintsͰਖ਼ଟ໘ମʢ४ਖ਼ଟ໘ମʣ
https://github.com/hamukazu/craft_regpolyhed https://github.com/hamukazu/craft_truncated
ྫ ਖ਼ेೋ໘ମ ਖ਼ೋे໘ମ
ਖ਼ೋे໘ମ ྫ ʢ2ͭ߹Θͤͯ1ͭͷཱମʣ
Ͳ͏ͬͯ࡞Δ͔ • ݴޠͪΖΜPython • Reportlabͱ͍͏ϥΠϒϥϦ • ͋ͱֶతܭࢉʢϕΫτϧܭࢉͱճసߦྻʣ • ࣗಈඳը͢ΔΞϧΰϦζϜΛ࡞ͬͨͷͰͳ͘ɺҰͭҰͭ ઢΛҾ͘ϓϩάϥϜΛॻ͍ͨ
ReportLab PythonͰPDFϑΝΠϧΛฤूͰ͖ΔϥΠϒϥϦ اۀ͕͍ͬͯΔΦʔϓϯιʔε ReportLabϥΠϒϥϦ໊͔ͭاۀ໊
ֶతܭࢉ ✓ cos ✓ sin ✓ sin ✓ cos ✓
◆ ✓ x y ◆ = ✓ x cos ✓ y sin ✓ x sin ✓ + y cos ✓ ◆ (x,y)ΛݪΛத৺ʹθճసͤͨ͞ΛٻΊΔ ඞཁͳܭࢉ͜ΕͱɺϕΫτϧجຊܭࢉʢɾࠩɾεΧϥʔഒʣ͚ͩ
ਖ਼ޒ֯ܗͷඳ͖ํ 108° 72° A1 A2 A3 − → OA3 =
− → OA2 + − − − → A2A3 = − → OA2 + cos 72◦ − sin 72◦ sin 72◦ cos 72◦ − − − → A1A2 ͜ΕΛ܁ΓฦͤΑ͍
࣍ʹఔ
ඞཁͳͷ φ-022 ʢಛްޱʣ ϓϥε͞Έ ϑΟοτΧʔϒ ϓϨϛΞϜνλϯ ʢϕϧψʔΠۂઢʣ λϛϠ ΫϥϑτϘϯυ
ϕϧψʔΠۂઢ Ωλʔʂ
ఆٛʢϕϧψʔΠۂઢʣ ฏ໘ͷۃ࠲ඪදࣔɹɹɹʹରͯ͠ Ͱද͞ΕΔۂઢΛϕϧψʔΠۂઢͱݺͿ ఆཧ ݪ͔Βग़ΔઢͱϕϧψʔΠۂઢͷͳ֯͢ҰఆͰ͋Δ r = aebθ ূ໌ ಡऀͷԋशͱ͢Δ
(r, θ)
࡞Γํͷίπ • ંΓఆنΛͬͯંΔ • ͘Β͍ΈཱͯͯͨΒҰணࡎΛס͔ͯ͠ݻఆ͢Δ • ͷΓ͠Ζ͕ͳ͍໘͕͋ΔͷͰͦΕΛ࠷ޙʹด͡Δ
TODO • ϦϑΝΫλϦϯάͯ͠ύοέʔδԽ • pip install͍ͨ͠ΑͶʁ • ࡞ΓํͷίπͷυΩϡϝϯτӳ༁ͯ͠ެ։