Did I find the right examples for you? yes no

All Samples(93)  |  Call(90)  |  Derive(0)  |  Import(3)
A line in space.

A line is declared with two distinct points.

Note:
At the moment only lines in a 2D space can be declared, because
Points can be defined only for 2D spaces.

*Example*
(more...)

src/s/y/sympy-HEAD/sympy/geometry/tests/test_geometry.py   sympy(Download)
from sympy import (Abs, C, Dummy, Rational, Float, S, Symbol, cos, oo, pi,
                   simplify, sin, sqrt, symbols, tan)
from sympy.geometry import (Circle, Curve, Ellipse, GeometryError, Line, Point,
                            Polygon, Ray, RegularPolygon, Segment, Triangle,
                            are_similar, convex_hull, intersection, centroid)
    p9 = Point(2, 1)
 
    l1 = Line(p1, p2)
    l2 = Line(p3, p4)
    l3 = Line(p3, p5)
    l4 = Line(p1, p6)

src/s/y/sympy-polys-HEAD/sympy/geometry/tests/test_geometry.py   sympy-polys(Download)
from sympy import Symbol, Rational, sqrt, pi, cos, oo, simplify, Real, raises
from sympy.geometry import Point, Polygon, convex_hull, Segment, \
        RegularPolygon, Circle, Ellipse, GeometryError, Line, intersection, \
        Ray, Triangle, are_similar, Curve
 
    p5 = Point(x1, 1 + x1)
 
    l1 = Line(p1, p2)
    l2 = Line(p3, p4)
    l3 = Line(p3, p5)
 
    # Basic stuff
    assert Line(p1, p2) == Line(p2, p1)

src/s/y/sympy-HEAD/sympy/core/tests/test_sympify.py   sympy(Download)
from sympy.utilities.pytest import XFAIL, raises
from sympy.utilities.decorator import conserve_mpmath_dps
from sympy.geometry import Point, Line
from sympy.functions.combinatorial.factorials import factorial, factorial2
from sympy.abc import _clash, _clash1, _clash2
def test_geometry():
    p = sympify(Point(0, 1))
    assert p == Point(0, 1) and type(p) == Point
    L = sympify(Line(p, (1, 0)))
    assert L == Line((0, 1), (1, 0)) and type(L) == Line