Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
円と円の交点の求め方
Search
Sho Iizuka
June 13, 2014
Science
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
円と円の交点の求め方
https://www.slideshare.net/kujira16/ss-35835784
Sho Iizuka
June 13, 2014
Transcript
12 slides
ԁͱԁͷަͷٻΊํ !TIPSB@LVKJSB
w *$1$ͷϥΠϒϥϦΛඋ͍ͯͨ͠Β ʮԁͱԁͷަʯͷίʔυ͕Α͔͘Βͳ͔ͬͨͷ Ͱղઆ͠·͢ɻ w ࢀߟʹͨ͠ίʔυίϨͰ͢
ͷίʔυ pair<P, P> cc_cross(const C& c1, const C& c2) {
double d = abs(c1.p - c2.p); double rc = (d*d + c1.r*c1.r - c2.r*c2.r) / (2*d); double rs = sqrt(c1.r*c1.r - rc*rc); P diff = (c2.p - c1.p) / d; return make_pair(c1.p + diff * P(rc, rs), c1.p + diff * P(rc, -rs)); }
double d = abs(c1.p - c2.p); d c1.p c2.p
double rc = (d*d + c1.r*c1.r - c2.r*c2.r) / (2*d);
cos = a2+b2 c2 2ab ༨ݭఆཧ b c a θ
double rc = (d*d + c1.r*c1.r - c2.r*c2.r) / (2*d);
b bcosθ θ cos = a2 + b2 c2 2ab b cos = a2 + b2 c2 2a
double rs = sqrt(c1.r*c1.r - rc*rc); c1.r rc rs
P diff = (c2.p - c1.p) / d; =>
diffは c1.p→c2.p の単位ベクトル d c1.p c2.p
c1.p + diff * P(rc, rs) ͘ͳΔͷͰ࣍ͷϖʔδϔ rc rs c1.p
diff * P(rc, rs) ͱʁ => rc*diff + rs*rot90(diff) ͷ͜ͱ
di = (x + jy) rot90(di ) = rot90(x + jy) = y + jx di P(rc, rs) = (x + jy) · (rc + jrs ) = rc(x + jy) + rs( y + jx) = rc di + rs rot90(di )
c1.p + diff * P(rc, -rs) ઌ΄Ͳͱಉ༷ rc rs c1.p
ײ w ༨ݭఆཧศརͳΜ͚ͩͲɺΑ͘ΕΔ w KΛֻ͚ͯճసͤ͞ΔςΫχοΫʹؾͮ͘ͷʹ࣌ ͕͔͔ؒͬͯ͠·ͬͨʢిؾܥͳΒৗతʹͬͯ ͍Δͣͳͷʹʣ
More Decks by Sho Iizuka
See All by Sho Iizuka
半年前の自分に教えたい systemd のハマりどころ
arosh
19
19k
Osaka.Stan#5 LT プログラミングコンテストのデータを分析した話
arosh
1
8.4k
簡潔データ構造輪講資料(順列)
arosh
1
9.8k
Pythonにおける日本語処理
arosh
1
2.2k
FM-index による全文検索
arosh
0
67
円と円の外接線の求め方
arosh
0
98
Other Decks in Science
See All in Science
TypeScript で WebAssembly を用いた 型安全なプラグイン設計
nagano
3
690
AI Safety, Seen Through Its Questions
kanekomasahiro
1
1.4k
SAT ソルバーの仕組みと制約ソルバーへの応用
tsoh
3
770
Utiliser Bitcoin sans Internet
rlifchitz
0
460
AWS WAFのAIトラフィック収益化機能を考えてみる_20260626
masakiokuda
1
140
チュートリアル:世界モデル
hf149
0
2.5k
ゲームと人工知能
miyayou
0
300
HOLO: Homography-Guided Pose Estimator Network for Fine-Grained Visual Localization on SD Maps
tomoaki0705
0
180
How a camera trap data standard enabled an ecosystem of interoperable tools
peterdesmet
0
160
[Relay webinaire eBIS actu n°16] Conclusion
institutdelelevage
PRO
0
310
「念のためのログ保存」を組織全体でやめるためのポリシーと仕組み作り
i2tsuki
4
430
[Relay webinaire eBIS actu n°16] Sélection pour la vitalité des jeunes bovins allaitants et laitiers
institutdelelevage
PRO
0
370
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How to build a perfect <img>
jonoalderson
1
6.2k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
520
sira's awesome portfolio website redesign presentation
elsirapls
0
510
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Skip the Path - Find Your Career Trail
mkilby
1
290
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
How to train your dragon (web standard)
notwaldorf
96
6.9k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
How to Think Like a Performance Engineer
csswizardry
28
2.9k