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

Method foot

numericals.py:117–124  ·  view source on GitHub ↗
(self, line: Line)

Source from the content-addressed store, hash-verified

115 return line.perpendicular_line(self)
116
117 def foot(self, line: Line) -> Point:
118 if isinstance(line, Line):
119 l = line.perpendicular_line(self)
120 return line_line_intersection(l, line)
121 elif isinstance(line, Circle):
122 c, r = line.center, line.radius
123 return c + (self - c) * r / self.distance(c)
124 raise ValueError('Dropping foot to weird type {}'.format(type(line)))
125
126 def parallel_line(self, line: Line) -> Line:
127 return line.parallel_line(self)

Callers 8

additionally_drawMethod · 0.80
sample_withinMethod · 0.80
sample_withinMethod · 0.80
sketch_incenter2Function · 0.80
sketch_excenter2Function · 0.80
sketch_2l1cFunction · 0.80
sketch_cc_tangentFunction · 0.80
sketch_reflectFunction · 0.80

Calls 3

distanceMethod · 0.95
line_line_intersectionFunction · 0.85
perpendicular_lineMethod · 0.45

Tested by

no test coverage detected