# libpysal.cg.get_point_at_angle_and_dist¶

libpysal.cg.get_point_at_angle_and_dist(ray, angle, dist)[source]

Returns the point at a distance and angle relative to the origin of a ray.

get_point_at_angle_and_dist(Ray, number, number) -> Point

Parameters
raythe ray which the angle and distance are relative to
anglethe angle relative to the ray at which the point is located
distthe distance from the ray origin at which the point is located

Examples

>>> ray = Ray(Point((0, 0)), Point((1, 0)))
>>> pt = get_point_at_angle_and_dist(ray, math.pi, 1.0)
>>> isinstance(pt, Point)
True
>>> round(pt[0], 8)
-1.0
>>> round(pt[1], 8)
0.0