多语言展示
当前在线:1605今日阅读:27今日分享:41

【Mathematica】12版本新功能之几何作图

Mathematica12是目前最新版本(2019年5月),其中新增的内置函数,可以根据已知条件自动绘制几何图形。
工具/原料
1

电脑

2

Mathematica12

方法/步骤
1

绘制一个经过ABC三点的圆。这是一个随机的几何图形:RandomInstance[ GeometricScene[{a, b, c}, {Point[{a, b, c}],    CircleThrough[{a, b, c}]}]]字母用小写字母表示。

2

加上线段BC的中点:RandomInstance[ GeometricScene[{a, b, c, d}, {Point[{a, b, c, d}],    d == Midpoint[{b, c}], CircleThrough[{a, b, c}]}]]

3

绘制三角形ABC:RandomInstance[ GeometricScene[{a, b, c, d}, {Point[{a, b, c, d}],    Triangle[{a, b, c}], d == Midpoint[{b, c}],    CircleThrough[{a, b, c}]}]]

4

限定∠ABC的度数是36°:RandomInstance[ GeometricScene[{a, b, c, d}, {Point[{a, b, c, d}],    Triangle[{a, b, c}], d == Midpoint[{b, c}],    CircleThrough[{a, b, c}], PlanarAngle[{a, b, c}] == 36 Degree}]]

5

再强加一个限制条件:RandomInstance[ GeometricScene[{a, b, c, d}, {Point[{a, b, c, d}],    Triangle[{a, b, c}], d == Midpoint[{b, c}],    CircleThrough[{a, b, c}], PlanarAngle[{a, b, c}] == 36 Degree,    PlanarAngle[{a, d, c}] == 99 Degree}]]此时的三角形ABC的形状已经确定了。

注意事项

如果条件自相矛盾,作图的程序就会报错,什么陷入死循环。

推荐信息