- 注册时间
- 2009-3-10
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 2343
- 在线时间
- 小时
|
发表于 2024-1-18 21:59:06
|
显示全部楼层
本帖最后由 dlsh 于 2024-1-18 22:01 编辑
- Clear["Global`*"]
- \!\(\*OverscriptBox["b", "_"]\) = b = 0;
- \!\(\*OverscriptBox["c", "_"]\) = c = 1;
- \!\(\*OverscriptBox["p", "_"]\) = p;
- FourPoint[a_, b_, c_, d_] := ((
- \!\(\*OverscriptBox["c", "_"]\) d - c
- \!\(\*OverscriptBox["d", "_"]\)) (a - b) - (
- \!\(\*OverscriptBox["a", "_"]\) b - a
- \!\(\*OverscriptBox["b", "_"]\)) (c - d))/((a - b) (
- \!\(\*OverscriptBox["c", "_"]\) -
- \!\(\*OverscriptBox["d", "_"]\)) - (
- \!\(\*OverscriptBox["a", "_"]\) -
- \!\(\*OverscriptBox["b", "_"]\)) (c - d));(*过两点A和B、C和D的交点*)
- \!\(\*OverscriptBox["FourPoint", "_"]\)[a_, b_, c_, d_] := -(((c
- \!\(\*OverscriptBox["d", "_"]\) -
- \!\(\*OverscriptBox["c", "_"]\) d) (
- \!\(\*OverscriptBox["a", "_"]\) -
- \!\(\*OverscriptBox["b", "_"]\)) - ( a
- \!\(\*OverscriptBox["b", "_"]\) -
- \!\(\*OverscriptBox["a", "_"]\) b) (
- \!\(\*OverscriptBox["c", "_"]\) -
- \!\(\*OverscriptBox["d", "_"]\)))/((a - b) (
- \!\(\*OverscriptBox["c", "_"]\) -
- \!\(\*OverscriptBox["d", "_"]\)) - (
- \!\(\*OverscriptBox["a", "_"]\) -
- \!\(\*OverscriptBox["b", "_"]\)) (c - d)));
- e = FourPoint[d, p, a, c];
- \!\(\*OverscriptBox["e", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[d, p, a, c]; f =
- FourPoint[h, p, a, b];
- \!\(\*OverscriptBox["f", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[h, p, a, b];
- k = FourPoint[b, e, f, c];
- \!\(\*OverscriptBox["k", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[b, e, f, c]; r =
- FourPoint[d, e, a, b];
- \!\(\*OverscriptBox["r", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[d, e, a, b];
- l = FourPoint[d, h, a, p];
- \!\(\*OverscriptBox["l", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[d, h, a, p]; q =
- FourPoint[l, e, a, b];
- \!\(\*OverscriptBox["q", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[l, e, a, b];
- t = FourPoint[a, c, q, p];
- \!\(\*OverscriptBox["t", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[a, c, q, p]; m =
- FourPoint[r, t, a, p];
- \!\(\*OverscriptBox["m", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[r, t, a, p];
- g = FourPoint[d, h, k, p];
- \!\(\*OverscriptBox["g", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[d, h, k, p]; n =
- FourPoint[m, g, b, c];
- \!\(\*OverscriptBox["n", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[m, g, b, c];
- s = FourPoint[n, h, a, d];
- \!\(\*OverscriptBox["s", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[n, h, a, d]; i =
- FourPoint[p, s, b, a];
- \!\(\*OverscriptBox["i", "_"]\) =
- \!\(\*OverscriptBox["FourPoint", "_"]\)[p, s, b, a];
- x1 = FourPoint[b, p, i, m]; x2 = FourPoint[b, p, l, r];
- Simplify[{1, e, f, k, r}]
- Simplify[{2, q, t, m}]
- Simplify[{3, g, n, s, i}]
- Simplify[{4, x1, x2, , x1 - x2}]
复制代码
典型线性构造,复数或解析方法简单,复数没有优势,同样构造,复杂度可能相同。 |
|