- 注册时间
- 2021-11-19
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 9612
- 在线时间
- 小时
|
楼主 |
发表于 2025-5-2 11:16:42
|
显示全部楼层
我用解析几何,解决一下这个问题!
- Clear["Global`*"];(*mathematica11.2,win7(64bit)Clear all variables*)
- deg=Pi/180;(*角度制下1°所对应的弧度*)
- (*子函数,二维旋转矩阵,不知道为什么RotationMatrix这个函数用不了了*)
- rotmatrix[x_]:={{Cos[x],-Sin[x]},{Sin[x],Cos[x]}}
- (*定义变量*)
- {xA,yA}={0,0}
- {xB,yB}={0,-4}
- {xC,yC}={4,-4}
- {xD,yD}={4,0}
- {xQ,yQ}=rotmatrix[90deg].{xP,yP} (*这里的乘法只能用点,而不能用星号*)
- {xM,yM}=({xQ,yQ}+{xD,yD})/2(*中点坐标公式*)
- (*列方程组解决问题*)
- ans=Solve[{
- (xA-xQ)^2+(yA-yQ)^2==8,(*AQ=根号8*)
- Det[{{xB,yB,1},{xP,yP,1},{xM,yM,1}}]==0,(*BPM三点共线*)
- Det[{{xB,yB,1},{xP,yP,1},{xN,yN,1}}]==0,(*BPN三点共线*)
- yN==0
- },{xP,yP,xN,yN}]//FullSimplify
- (*绘图,画出线与点*)
- ptA={xA,yA}
- ptB={xB,yB}
- ptC={xC,yC}
- ptD={xD,yD}
- ptP={xP,yP}
- ptQ={xQ,yQ}
- ptM={xM,yM}
- ptN={xN,yN}
- points={ptA,ptB,ptC,ptD,ptP,ptQ,ptM,ptN}
- Graphics[{
- Blue, Line[{ptA,ptB,ptC,ptD,ptA}],(*绘制线段连接点*)
- Blue, Line[{ptB,ptP,ptM}],
- Blue,Line[{ptA,ptP}],
- Blue,Line[{ptA,ptQ}],
- Blue,Line[{ptQ,ptD}],
- Blue,Line[{ptB,ptD}],
- Pink,Dashed,Line[{ptP,ptQ}],
- Pink,Dashed,Line[{ptP,ptD}],
- Red, PointSize[0.01], Point[points],(* 标记所有点 *)
- Text["A", ptA, {0, 2}], (* 在点A上方标注"A"*)
- Text["B", ptB, {0, 2}],
- Text["C", ptC, {0, 2}],
- Text["D", ptD, {0, 2}],
- Text["P", ptP, {0, 2}],
- Text["Q", ptQ, {0, 2}],
- Text["N", ptN, {0, 2}],
- Text["M", ptM, {0, 2}]
- }, Axes -> True,ImageSize -> 400]/.ans
- aaa={ptP,ptQ,ptM,ptN}/.ans
- Grid[ans,Alignment->Left](*列表显示*)
复制代码
方程组求解结果:
\[\begin{array}{llll}
\text{xP}\to 1 & \text{yP}\to -\sqrt{7} & \text{xN}\to \frac{4}{9} \left(\sqrt{7}+4\right) & \text{yN}\to 0 \\
\text{xP}\to 1 & \text{yP}\to \sqrt{7} & \text{xN}\to \frac{1}{9} (-4) \left(\sqrt{7}-4\right) & \text{yN}\to 0 \\
\end{array}\]
PQMN四点坐标如下
\[\begin{array}{llll}
\left\{1,-\sqrt{7}\right\} & \left\{\sqrt{7},1\right\} & \left\{\frac{1}{2} \left(\sqrt{7}+4\right),\frac{1}{2}\right\} & \left\{\frac{4}{9} \left(\sqrt{7}+4\right),0\right\} \\
\left\{1,\sqrt{7}\right\} & \left\{-\sqrt{7},1\right\} & \left\{\frac{1}{2} \left(4-\sqrt{7}\right),\frac{1}{2}\right\} & \left\{\frac{1}{9} (-4) \left(\sqrt{7}-4\right),0\right\} \\
\end{array}\]
mathematica软件画图结果
|
|