Did I find the right examples for you? yes no

All Samples(62)  |  Call(60)  |  Derive(0)  |  Import(2)
A ray is a semi-line in the space. It starts at one point and
propagates in one unique direction.

A ray is declared with two distinct points: the first point is the source,
whereas the second point lies on the semi-line. Therefore, the second
point determines the direction to which the semi-line propagates.

Note:
At the moment only rays in a 2D space can be declared, because
Points can be defined only for 2D spaces.(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)
 
    # Testing Rays and Segments (very similar to Lines)
    assert Ray((1, 1), angle=pi/4) == Ray((1, 1), (2, 2))
    assert Ray((1, 1), angle=pi/2) == Ray((1, 1), (1, 2))
    assert Ray((1, 1), angle=-pi/2) == Ray((1, 1), (1, 0))

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
 
 
    # Testing Rays and Segments (very similar to Lines)
    r1 = Ray(p1, Point(-1, 5))
    r2 = Ray(p1, Point(-1, 1))
    r3 = Ray(p3, p5)
    assert l1.projection(r1) == Ray(p1, p2)