MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / sketch_centroid

Function sketch_centroid

numericals.py:1379–1385  ·  view source on GitHub ↗
(args: tuple[gm.Point, ...])

Source from the content-addressed store, hash-verified

1377
1378
1379def sketch_centroid(args: tuple[gm.Point, ...]) -> tuple[Point, ...]:
1380 a, b, c = args
1381 x = (b + c) * 0.5
1382 y = (c + a) * 0.5
1383 z = (a + b) * 0.5
1384 i = line_line_intersection(Line(a, x), Line(b, y))
1385 return x, y, z, i
1386
1387
1388def sketch_ninepoints(args: tuple[gm.Point, ...]) -> tuple[Point, ...]:

Callers

nothing calls this directly

Calls 2

line_line_intersectionFunction · 0.85
LineClass · 0.70

Tested by

no test coverage detected