InfiniteLineThrough[{p1,p2,…}]
gives an infinite line passing through the points pi.
InfiniteLineThrough
InfiniteLineThrough[{p1,p2,…}]
gives an infinite line passing through the points pi.
Details
- InfiniteLineThrough is typically used to specify point constraints in GeometricScene.
- InfiniteLineThrough gives an explicit InfiniteLine object when possible.
- The pi in InfiniteLineThrough[{p1,p2,…}] can be lists of coordinates or explicit Point objects.
- InfiniteLineThrough can be used with symbolic points and quantities in GeometricScene to constrain them to be on a line.
Examples
open all close allBasic Examples (2)
An infinite line passing through three points:
pts = {{0, 0}, {1, 1}, {2, 2}};InfiniteLineThrough[pts]Graphics[{%, Red, Point[pts]}]RegionDistance from an infinite line to a point:
RegionDistance[InfiniteLineThrough[{{0, 0}, {1, 2}}], {5, 6}]Scope (2)
InfiniteLineThrough works on coordinates:
InfiniteLineThrough[{{0, 0}, {2, 2}, {4, 4}}]InfiniteLineThrough[{Point[{0, 0}], Point[{1, 0}]}]InfiniteLineThrough[Point[{{0, 0}, {1, 0}}]]InfiniteLineThrough works with points in 1D:
InfiniteLineThrough[{{0}, {2}}]InfiniteLineThrough[{{0, 0}, {2, 2}}]InfiniteLineThrough[{{0, 0, 1, 0}, {2, 2, 3, 0}}]Applications (3)
Basic Applications (3)
Visualize the line passing through three points:
pts = {{0, 0}, {1, 1}, {2, 2}};Graphics[{InfiniteLineThrough[pts], Red, Point[pts]}]Find the implicit representation of the circle passing through three points:
RegionConvert[InfiniteLineThrough[{{1, 0}, {3, -1}}], "Implicit"]Its parametric representation:
RegionConvert[InfiniteLineThrough[{{1, 0}, {3, -1}}], "Parametric"]Find an InfiniteLine that best fits a set of points:
pts = Sort @ {{-24, -20}, {-24, -19}, {-25, -20}, {-80, -59}, {-76, -56}, {-95, -70}, {-83, -61}, {-46, -35}, {-58, -44}};lines = InfiniteLineThrough /@ Subsets[pts, {2}];TakeSmallestBy[lines, Count[RegionMember[#, pts], False]&, 1]Best fit using RegionFit:
RegionFit[pts, "Line"]Graphics[{Point[pts], %, Red, First[%%]}]Properties & Relations (2)
InfiniteLineThrough returns an InfiniteLine object:
InfiniteLineThrough[{{0, 0}, {2, 2}, {4, 4}}]Use RegionFit to obtain an InfiniteLine that best fits a set of points:
RegionFit[{{-24, -20}, {-24, -19}, {-25, -20}, {-80, -59}, {-76, -56}}, "Line"]History
Text
Wolfram Research (2022), InfiniteLineThrough, Wolfram Language function, https://reference.wolfram.com/language/ref/InfiniteLineThrough.html.
CMS
Wolfram Language. 2022. "InfiniteLineThrough." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/InfiniteLineThrough.html.
APA
Wolfram Language. (2022). InfiniteLineThrough. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InfiniteLineThrough.html
BibTeX
@misc{reference.wolfram_2026_infinitelinethrough, author="Wolfram Research", title="{InfiniteLineThrough}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/InfiniteLineThrough.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_infinitelinethrough, organization={Wolfram Research}, title={InfiniteLineThrough}, year={2022}, url={https://reference.wolfram.com/language/ref/InfiniteLineThrough.html}, note=[Accessed: 13-June-2026]}