角度比长度更重要。
Solve[{116/Sin == 144/Sin, (2 R)/Sin == 95/Cos, (2 R)/Sin
看你的代码太费劲了,
你的代码没有注释,
你的代码没有对应的图片。 王守恩 发表于 2025-9-23 09:56
角度比长度更重要。
Solve[{116/Sin == 144/Sin, (2 R)/Sin == 95/Cos, (2 R)/Sin
老同志的方程思想不错 方程组太牛逼了 下次有时间把这个代码优化一下 nyy 发表于 2025-10-24 12:07
下次有时间把这个代码优化一下
(*解析几何求解问题*)
Clear["Global`*"];(*mathematica11.2,win7(64bit)Clear all variables*)
(*点坐标初始赋值*)
AA={0,0};
EE={xe,ye};
CC=EE*(87+29)/87;
DD={95,0};
BB={144,0};
OO=(EE+DD)/2;
FF={xf,yf};
(*列方程组解决问题*)
ans=Solve[{
EuclideanDistance==87,(*AE=87*)
EuclideanDistance==EuclideanDistance==R,(*OE=OD=OG=R*)
Dot==0,(*OF⊥CB,内积等于零*)
Det[(#~Join~{1})&/@{CC,FF,BB}]==0 (*CFB三点共线*)
},{xe,ye,xf,yf,R}]//FullSimplify
Grid(*列表显示*)
Grid,Alignment->Left](*列表显示*)
求解结果
\[\begin{array}{lllll}
\text{xe}\to 63 & \text{ye}\to -60 & \text{xf}\to \frac{531}{5} & \text{yf}\to -\frac{252}{5} & R\to 34 \\
\text{xe}\to 63 & \text{ye}\to 60 & \text{xf}\to \frac{531}{5} & \text{yf}\to \frac{252}{5} & R\to 34 \\
\text{xe}\to \frac{85671}{985} & \text{ye}\to -\frac{2028}{985} & \text{xf}\to \frac{1530351}{16745} & \text{yf}\to -\frac{86268}{16745} & R\to 26 \sqrt{\frac{5}{197}} \\
\text{xe}\to \frac{85671}{985} & \text{ye}\to \frac{2028}{985} & \text{xf}\to \frac{1530351}{16745} & \text{yf}\to \frac{86268}{16745} & R\to 26 \sqrt{\frac{5}{197}} \\
\end{array}\]
结果数值化
\[\begin{array}{lllll}
\text{xe}\to 63.00000000 & \text{ye}\to -60.00000000 & \text{xf}\to 106.2000000 & \text{yf}\to -50.40000000 & R\to 34.00000000 \\
\text{xe}\to 63.00000000 & \text{ye}\to 60.00000000 & \text{xf}\to 106.2000000 & \text{yf}\to 50.40000000 & R\to 34.00000000 \\
\text{xe}\to 86.97563452 & \text{ye}\to -2.058883249 & \text{xf}\to 91.39151986 & \text{yf}\to -5.151866229 & R\to 4.142144421 \\
\text{xe}\to 86.97563452 & \text{ye}\to 2.058883249 & \text{xf}\to 91.39151986 & \text{yf}\to 5.151866229 & R\to 4.142144421 \\
\end{array}\] (* 方法1:计算三角形面积 *)
ArePointsCollinear :=
Det[{pts[] - pts[], pts[] - pts[]}] == 0
(* 示例 *)
points1 = {{1, 1}, {2, 2}, {3, 3}};(* 共线 *)
points2 = {{1, 1}, {2, 2}, {3, 4}};(* 不共线 *)
ArePointsCollinear(* 输出:True *)
ArePointsCollinear(* 输出:False *)
(* 方法2:面积法 *)
AreCollinearByArea :=
Area] == 0
(* 或者直接计算 *)
AreCollinearByArea2 :=
Abs] - pts[], pts[] - pts[]]] == 0
有不少办法能够判定三个点是否共线 越来越觉得方程思想很牛逼!
页:
1
[2]