📍 重心计算器(三角形 / 多边形)Centroid Calculator (triangle or polygon)
求三角形(三个顶点)或任意简单多边形(按顺序列出顶点,用鞋带公式)的面积重心和面积,三点共线 / 面积为 0 时给出提示。本地处理。Area centroid and area of a triangle (three vertices) or any simple polygon (vertices in order, shoelace formula), with a warning when the points are collinear / the area is 0. Processed locally.
使用说明与常见问题How-to & FAQ
「重心计算器(三角形 / 多边形)」是什么?What is the Centroid Calculator (triangle or polygon) tool?
求三角形(三个顶点)或任意简单多边形(按顺序列出顶点,用鞋带公式)的面积重心和面积,三点共线 / 面积为 0 时给出提示。本地处理。Area centroid and area of a triangle (three vertices) or any simple polygon (vertices in order, shoelace formula), with a warning when the points are collinear / the area is 0. Processed locally.
如何使用「重心计算器(三角形 / 多边形)」?How do I use the Centroid Calculator (triangle or polygon) tool?
在「重心计算器(三角形 / 多边形)」中,填写「图形」、「x1」、「y1」、「x2」、「y2」等参数,结果会随输入实时计算并显示在下方。In the Centroid Calculator (triangle or polygon): Fill in "Shape", "x1", "y1", "x2", "y2"; results are recalculated instantly as you type.
三角形的重心怎么算?How is a triangle's centroid found?
三个顶点坐标的平均值:x =(x1 + x2 + x3)÷ 3,y 同理,也是三条中线的交点。Average the three vertices: x = (x1 + x2 + x3) ÷ 3, and the same for y; it is where the three medians meet.
多边形用什么公式?Which formula is used for polygons?
鞋带公式:A = ½ Σ (xᵢyᵢ₊₁ − xᵢ₊₁yᵢ),Cx = Σ (xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) ÷ (6A),Cy 同理。顶点要沿边界按顺序输入(顺时针或逆时针均可),多边形不能自交。The shoelace formula: A = ½ Σ (xᵢyᵢ₊₁ − xᵢ₊₁yᵢ), Cx = Σ (xᵢ + xᵢ₊₁)(xᵢyᵢ₊₁ − xᵢ₊₁yᵢ) ÷ (6A), and likewise Cy. List the vertices in order around the boundary (either direction); the polygon must not cross itself.
为什么提示共线?Why the collinear warning?
三点在一条直线上(或多边形面积为 0)时没有面积,面积重心无定义;页面改为显示顶点平均值供参考。When the points lie on one line (or the polygon has zero area) there is no area, so the area centroid is undefined; the page shows the average of the vertices instead.
能举个计算实例吗?Can you show a worked example?
例如在「重心计算器(三角形 / 多边形)」中填 图形 = 三角形,x1 = 0,y1 = 0,x2 = 6,y2 = 0,x3 = 0,结果区显示:重心 x:2;重心 y:2;面积:18For example, entering Shape = Triangle, x1 = 0, y1 = 0, x2 = 6, y2 = 0, x3 = 0 in the Centroid Calculator (triangle or polygon) gives: Centroid x: 2; Centroid y: 2; Area: 18
哪些输入会被检查?Which inputs are validated?
「重心计算器(三角形 / 多边形)」会检查这些输入——「x1」、「y1」、「x2」、「y2」、「x3」、「y3」:必须填写;绝对值超过 10¹⁵ 的数也会被拒绝。不符合时结果区显示具体提示,不会给出数字。The Centroid Calculator (triangle or polygon) checks its inputs — "x1", "y1", "x2", "y2", "x3", "y3": required; numbers above 10¹⁵ in absolute value are rejected too. When a value fails, the result area names the problem instead of showing a number.
有哪些选项可以调整?What options can I adjust?
「重心计算器(三角形 / 多边形)」的设置:「图形」可选 三角形、多边形(默认 三角形);「x1」默认 0;「y1」默认 0;「x2」默认 4;「y2」默认 0;「x3」默认 2;「y3」默认 6。每次生成结果都按当前设置处理。Settings in the Centroid Calculator (triangle or polygon) — "Shape": Triangle, Polygon (default Triangle); "x1" default 0; "y1" default 0; "x2" default 4; "y2" default 0; "x3" default 2; "y3" default 6. The result always uses the current settings.
计算精度如何?How precise are the results?
「重心计算器(三角形 / 多边形)」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The Centroid Calculator (triangle or polygon) uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.
「重心计算器(三角形 / 多边形)」免费吗?需要注册吗?Is the Centroid Calculator (triangle or polygon) free? Do I need an account?
「重心计算器(三角形 / 多边形)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Centroid Calculator (triangle or polygon) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.