Wolfram Book 之圆的方程

例 1

由以上的结果可见,△ABC 的外接圆的方程为 (x-2)^2+(y+3)^2=25.

Mathematica 代码:

With[{A = {5, 1}, B = {7, -3}, C = {2, -8}, P = {x, y}},

Norm[P – A] == Norm[P – B] == Norm[P – C] == r

]

Solve[%, {x, y, r}]

With[{A = {5, 1}, B = {7, -3}, C = {2, -8}}, Circumsphere[{A, B, C}]]

With[{A = {5, 1}, B = {7, -3}, C = {2, -8}, P = {2, -3}},

Graphics[{Line[{A, B, C, A}], Dashed, Circle[P, 5]}]

]

例 2

Mathematica 代码:

RegionDistance[

ImplicitRegion[a x + y – 1 == 0, {x, y}],

RegionCentroid@

ImplicitRegion[x^2 + y^2 – 2 x – 8 y + 13 == 0, {x, y}]

] == 1

Solve[%, a]

发布者:Cara,转载请注明出处:http://www.makercollider.com/course/1826

发表评论

登录后才能评论
QR code