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
円と円の交点の求め方
Search
Sho Iizuka
June 13, 2014
Science
0
38
円と円の交点の求め方
https://www.slideshare.net/kujira16/ss-35835784
Sho Iizuka
June 13, 2014
Tweet
Share
More Decks by Sho Iizuka
See All by Sho Iizuka
半年前の自分に教えたい systemd のハマりどころ
arosh
19
16k
Osaka.Stan#5 LT プログラミングコンテストのデータを分析した話
arosh
1
6.4k
簡潔データ構造輪講資料(順列)
arosh
1
7.6k
Pythonにおける日本語処理
arosh
1
2k
FM-index による全文検索
arosh
0
27
円と円の外接線の求め方
arosh
0
28
Other Decks in Science
See All in Science
メール送信サーバの集約における透過型SMTP プロキシの定量評価 / Quantitative Evaluation of Transparent SMTP Proxy in Email Sending Server Aggregation
linyows
0
550
いまAI組織が求める企画開発エンジニアとは?
roadroller
2
1.4k
大規模言語モデルの開発
chokkan
PRO
85
41k
白金鉱業Meetup Vol.16_【初学者向け発表】 数理最適化のはじめの一歩 〜身近な問題で学ぶ最適化の面白さ〜
brainpadpr
10
1.8k
Science of Scienceおよび科学計量学に関する研究論文の俯瞰可視化_LT版
hayataka88
0
1k
Snowflakeによる統合バイオインフォマティクス
ktatsuya
PRO
0
560
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
110
マクロ経済学の視点で、財政健全化は必要か
ryo18cm
1
120
JSol'Ex : traitement d'images solaires en Java
melix
0
130
深層学習を利用して 大豆の外部欠陥を判別した研究事例の紹介
kentaitakura
0
260
山形とさくらんぼに関するレクチャー(YG-900)
07jp27
1
250
Online Feedback Optimization
floriandoerfler
0
720
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
53
13k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Automating Front-end Workflow
addyosmani
1366
200k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
950
Making the Leap to Tech Lead
cromwellryan
133
9k
Side Projects
sachag
452
42k
Optimizing for Happiness
mojombo
376
70k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Scaling GitHub
holman
459
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Transcript
ԁͱԁͷަͷٻΊํ !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Λֻ͚ͯճసͤ͞ΔςΫχοΫʹؾͮ͘ͷʹ࣌ ͕͔͔ؒͬͯ͠·ͬͨʢిؾܥͳΒৗతʹͬͯ ͍Δͣͳͷʹʣ